Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2012 at 04:51 UTC
Updated:
29 Jul 2014 at 21:35 UTC
The current core/modules/field/lib/Drupal/field/ directories are awful and ridiculous.
Proposal: a) rename core to drupal b) change the namespaces to drupal\modules\$modulename\classes (or lib for last). Results: drupal/modules/field/lib.
Comments
Comment #1
Crell commentedWe've been over this a few zillion times already. PSR-0 is what PSR-0 is. We're not inventing our own autoloader spec. That's not "creating standards", it's "ignoring standards".
Comment #2
chx commentedWe do not implement broken standards. We should drive them. If PSR-0 is broken why do you insist? And, once again, can't we solve this within the confines of PSR-0?
Comment #3
chx commentedActually this is a bug.
Comment #4
chx commentedProposal: a) rename core to drupal b) change the namespaces to
drupal\modules\$modulename\classes(or lib for last). As a consequence we have collapsed the namespace without problems.As for contrib, I will let others figure out something.
Comment #4.0
chx commentedUpdated issue summary.
Comment #5
xmacinfoNevertheless, this is not critical.
Comment #6
chx commentedHrm, I thought the definition of critical was "we can not release like this" and indeed we can not release like this.
Comment #7
aspilicious commentedCritical
Critical bugs either render a system unusable (not being able to create content or upgrade between versions, blocks not displaying, and the like), or expose security vulnerabilities. These bugs are to be fixed immediately.
http://drupal.org/node/45111
Comment #8
aspilicious commentedAnd there is a difference between a "critical" task and a "critical" bug...
Comment #9
webchickCan we not have 11 billion issues about this and instead just one "meta" issue? It seems like if we try and discuss this in separate silos we're dooming ourselves to failure. If/when we decide on a course of action, we can spin off sub-issues for patches.
Comment #10
chx commentedIt's only two , and they are quite different IMO because one is caused by composer (and/or the usage of composer) the other is just our setup.
Comment #11
chx commentedBut, you know what, there is such pushback that I will just won't fix it and I will point everyone complaining to this issue in the next five years. I wash my hands of this one.
Comment #12
Crell commentedFor those looking to this issue later, if the PSR-0 directory structure really bothers you, the way to address is it *not* to change things within Drupal. It's to make a reasoned, thoughtful proposal to the Framework Interoperability Group, which publishes PSRs: http://www.php-fig.org/
Comment #13
quicksketchThis argument is essentially continuing into #1971198: [policy] Drupal and PSR-0/PSR-4 Class Loading.
While I maintain that I find it ridiculous that the PHP Framework *Interoperability* Group is effectively dictating the pattern we use for *Drupal-specific* code that is not reusable on any other platform, it looks like PSR-4 is likely to solve our problems by making a new standard and we can kiss goodbye to PSR-0 and it's much-hated directory structure. More information in that other issue.
Comment #14
chx commentedTagging.
Comment #15
rudiedirkx commentedThis saddens me. It seems D8 won't be for Drupal developers (who won't like this PSR-0 implementation, which is very loosely interpretable), but about the framework creators and or Symfony relationship. That's too bad. Go chx!
Comment #16
mac_weber commented+1 for changing it.
D8 should be done for Drupal developers. It does not make sense to write a proposal to php-fig in order to write our system.
BTW, very interesting comments from many people, especially #13 and #15
Comment #17
chx commentedhttp://news.php.net/php.standards/40
Larry Garfield, 2009.
Comment #18
carlos8f commentedI miss the old Drupal, the one where I could open ./modules folder or ./includes and get stuff that made sense. As a former core developer, core now looks to me like an unintelligible class wasteland and I have no intention of ever coming back to it. I've found Node.js which has the module system I always wanted.
</rant>Comment #18.0
carlos8f commentedUpdated issue summary.