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

Crell’s picture

Status: Active » Closed (won't fix)

We'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".

chx’s picture

Priority: Normal » Critical
Status: Closed (won't fix) » Active

We 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?

chx’s picture

Category: task » bug

Actually this is a bug.

chx’s picture

Proposal: 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.

chx’s picture

Issue summary: View changes

Updated issue summary.

xmacinfo’s picture

Priority: Critical » Major

Nevertheless, this is not critical.

chx’s picture

Hrm, I thought the definition of critical was "we can not release like this" and indeed we can not release like this.

aspilicious’s picture

Critical
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

aspilicious’s picture

And there is a difference between a "critical" task and a "critical" bug...

webchick’s picture

Can 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.

chx’s picture

Status: Closed (won't fix) » Active

It'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.

chx’s picture

Status: Active » Closed (won't fix)

But, 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.

Crell’s picture

Status: Active » Closed (won't fix)

For 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/

quicksketch’s picture

This 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.

chx’s picture

Issue tags: +sad chx

Tagging.

rudiedirkx’s picture

This 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!

mac_weber’s picture

+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

chx’s picture

http://news.php.net/php.standards/40

the directory structure is incompatible with the way Drupal works.

Larry Garfield, 2009.

carlos8f’s picture

I 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>

carlos8f’s picture

Issue summary: View changes

Updated issue summary.