Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 May 2008 at 05:02 UTC
Updated:
30 May 2008 at 12:17 UTC
Wouldn't it be cool if instead of forcing new Drupallers to learn the .info file syntax, the .info file just contained a PHP class with data about the module/theme? This patch does that. No changes in the behavior of Drupal should happen.
| Comment | File | Size | Author |
|---|---|---|---|
| drupalInfoFiles1.patch | 45.11 KB | tetrahedron |
Comments
Comment #1
webchickErm. Not really? :)
#1: Both modules and themes use the .info file construct. Most themers are fluent in CSS/XHTML, not in PHP. So this raises the barrier to contribute themes significantly, and it's already plenty high enough.
#2: And, because .info files would now be parsed as PHP, a syntax error here means that a buggy module could render your site completely useless by merely visiting admin/build/modules. vs. now when it displays an error message, at worst.
#3: I don't see a class ContributedModule or ContributedTheme here. How are contributed modules supposed to create .info files? They're certainly not OptionalCoreModules. :\
And finally, it's also more typing. ;)
244 characters:
293 characters:
So as an extremely lazy person, I object on those grounds as well. ;)
Comment #2
webchickBtw, it's worth reading through #132018: Add .info files to themes (and improve/clean up the theme system) to get some background on the reasoning behind why we went to .info files rather than template.php files for themers, as well as to see why the idea of using PHP for these was shot down already.
For example, I totally forgot about:
So I think this is a won't fix. :\
Comment #3
Crell commentedHm, I heard my name mentioned... :-)
I definitely recommend the thread webchick linked for background here. Using PHP code for info files has a number of issues. That said, I would still be open to dropping a proprietary file format in favor of something standardized like XML, if a good XML structure were put forward. (The main object to XML before was that parsing it in PHP 4 would be a huge PITA. For Drupal 7 and later that is a non-issue, and SimpleXML makes it, er, simple. :-) )
Comment #4
dries commentedI vote against this as well.
Comment #5
catchSounds like enough opposition to won't fix this. XML should probably go in another issue if that's an option.