I couldn't resist. :)

This should work once we're done with #1513210: Meta: Start converting module provided classes to PSR-0.

Right now this fails with "Fatal error: Class 'DrupalDefaultEntityController' not found in ../core/modules/node/node.module on line 4143"

I am hopeful that the front page works once the entity stuff is all (or at least user and node and obviously entity.module) converted to PSR-0.

Note that we should also remove modules/system/tests/registry.test with this.

Comments

Status: Needs review » Needs work

The last submitted patch, remove_registry.patch, failed testing.

berdir’s picture

StatusFileSize
new102.83 KB

Re-rolled. This patch currently includes the changes from #1495024: Convert the entity system to PSR-0.

I am now able to run the Tracker test (the only one that is currently converted to PSR-0) with this patch. Let's see if the test bot is too.

berdir’s picture

Status: Needs work » Needs review
robloach’s picture

1280 deletions, 663 insertions... I love this patch. Berdir gets 2:1 high fives. This is proof that adopting PHP standards is a good thing for Drupal.

berdir’s picture

StatusFileSize
new32.67 KB

Actually, that's just because the entity psr-0 patch was part of the conversion. The real delete ratio is more like this:

 12 files changed, 7 insertions(+), 712 deletions(-)

Re-rolled.

Status: Needs review » Needs work

The last submitted patch, remove-registry-1541674-5.patch, failed testing.

catch’s picture

I mentioned this to merlinofchaos and he pointed out that it will mean a lot of conversions to do in views (or any other contrib module with a lot of classes) to port it to 8.x once the registry is removed.

That's got to happen at some point, but I think it makes sense to schedule the actual commit of this patch so we can warn anyone else who might attempt a port. Not sure exactly when but was thinking either August 1st or September 1st (I doubt core classes will be fully converted for another 2-3 weeks and I'm going to be mostly afk the second half of June, so really that'd either be an extra 4 weeks or 8 weeks beyond when this could otherwise get committed.

berdir’s picture

Sonds fine to me, this isn't blocking something else, as long as we can port our own classes to PSR-0 asap, then we can throw this out whenever we feel like it. E.g. after the plugin system stuff lands, which Views will need to port to anyway.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new33.03 KB

Here's a re-roll, let's see how far we are.

andypost’s picture

Status: Needs review » Needs work
+++ b/core/modules/simpletest/simpletest.module
@@ -288,13 +288,9 @@ function simpletest_log_read($test_id, $prefix, $test_class, $during_test = FALS
+ * The list of test classes is loaded by searching the designated directory ¶
+ * for each module for files matching the PSR-0 standard. Once loaded the ¶
+ * test list is cached and stored in a static variable. ¶

trailing white-spaces

robloach’s picture

Issue tags: +PSR-0

Lots of the remaining tests are in #1593058: Remove system.info's files[] entry. Adding the tag.

Niklas Fiekas’s picture

Closing #1598610: Convert symfony.test to PSR-0 and remove all the files[] instances in system.info. Remember to also remove the PSR-0 class loading tests in symfony.test, that wouldn't even be executed, if PSR-0 wasn't working.

robloach’s picture

Status: Needs work » Needs review
Issue tags: -PSR-0

#9: remove-registry-1541674-9.patch queued for re-testing.

How're we looking? I know there are still patches to be committed, just wanted to see what the test-bot had to say.

Status: Needs review » Needs work
Issue tags: +PSR-0

The last submitted patch, remove-registry-1541674-9.patch, failed testing.

Tor Arne Thune’s picture

Status: Needs work » Needs review
StatusFileSize
new32.8 KB

Rerolled #9 out of curiosity.

Status: Needs review » Needs work

The last submitted patch, remove-registry-1541674-15.patch, failed testing.

Tor Arne Thune’s picture

Ah, the "list can not be used in namespace" problem. I guess this depends only on #1592632: Merge List field types into Options module now.

berdir’s picture

Priority: Normal » Major
Status: Needs work » Postponed

Given that we really want to remove the registry asap, I'm changing this to major and setting to postponed on #1592632: Merge List field types into Options module and until the views PSR-0 efforts are done.

robloach’s picture

sun’s picture

Tor Arne Thune’s picture

Status: Postponed » Needs review
StatusFileSize
new32.79 KB

The patch didn't apply anymore so I re-rolled #15 which is a re-roll of #9.

Status: Needs review » Needs work

The last submitted patch, remove-registry-1541674-21.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Postponed

This was postponed both on the List->Options issue, and on Views PSR-0. The first is done, the second is not (it was until recently blocked on plugins).

Re-postponing for now.

sun’s picture

Status: Postponed » Needs review
Issue tags: +API change, +API clean-up

Views should not block this removal. Last I checked and talked to @dawehner, it was using PSR-0 tests already.

The main problem for Views and all other contributed modules was the PIFR issue #1674290: PSR-0 tests in contrib modules are not found, which has been fixed already and just needs to be deployed.

Tor Arne Thune’s picture

The reason I rerolled it was to see what failed, so that it can be worked on, even in the postponed state (or not). Should have made that clear.

catch’s picture

I don't think we should postpone it on Views, but I do think we should schedule this commit to give people fair warning if there are contrib projects chasing HEAD since it's not a hard patch to get in and doesn't hold anything up. What about 31st August?

berdir’s picture

Status: Needs review » Needs work

Fine with me, could also do it during DrupalCon a few days earlier, then we'll have a reason to party ;)

Will try to get it back to green asap. I think should actually be needs work, the last patch failed.

robloach’s picture

I went through some of the most used projects on Drupal.org, and it looks like only Admin Menu is affected by this. I've put up #1691418: Update tests to PSR-0 to track that. Love this to go in sooner rather than later though, as I'm sure we have some follow ups to address.

[EDIT] sun reported:

However, this should not block the registry removal. I'm fine with having no automated tests for a short period. ;)

So, it looks like the only blockers are:

tim.plunkett’s picture

Why are we only talking about test classes?

Views is 99% done converting its test classes, but hasn't begun on the 250+ non-test classes.

Also,

$ grep -nr "^files\[\]" core
core/modules/field/tests/modules/field_test/field_test.info:5:files[] = field_test.entity.inc
core/modules/system/system.info:10:files[] = tests/registry.test
core/modules/system/tests/modules/file_test/file_test.info:6:files[] = file_test.module
robloach’s picture

Can we move the registry back over to http://drupal.org/project/registry for Drupal 8? That way, if a contrib module needs it, then it can simply depend on it until it fully moves to PSR-0. If Drupal Core doesn't need the registry, then why should it be in Drupal Core?

berdir’s picture

If someone wants to do that, then he can :)

The registry is IMHO not blocking anything, we don't need to get it out asap. We just want to get it out before API freeze/feature freeze/whatever point of no return it will be. damiankloip confirmed that he expects to have converted Views to PSR-0 by 31. August.

I will make sure that the patch is ready by then. Leaving it at needs work, will set it to postponed once the tests are green again.

Ok? :)

tim.plunkett’s picture

Sounds good to me.

robloach’s picture

Sounds good!

berdir’s picture

Ok, this should pass I think.

Had to remove the registering and unregistering of the autload functions in the upgrade tests. Also added an update function to remove the registry tables.

Tor Arne Thune’s picture

Status: Needs work » Needs review
berdir’s picture

Status: Needs review » Postponed

Green. We can re-test it shortly before the defined date....

catch’s picture

Priority: Major » Critical
tim.plunkett’s picture

If the Annotations patch goes in, Views is done. Then we don't have to wait until August 31st.

EDIT:
By "Views is done", I mean "Views no longer needs the registry". :)

sun’s picture

Status: Postponed » Reviewed & tested by the community
sun’s picture

Issue tags: -API change, -API clean-up, -PSR-0

#34: remove-registry-1541674-34.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +API change, +API clean-up, +PSR-0

The last submitted patch, remove-registry-1541674-34.patch, failed testing.

sun’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new4.3 KB
new34.27 KB

Re-rolled against HEAD.

Aside from conflicts and shifted hunks, no change except of renumbered system update. interdiff contains everything (but the shifted + conflicting hunks are misleading).

sun’s picture

StatusFileSize
new7.64 KB

That interdiff really isn't helpful, so here's a direct patch-to-patch diff.

robloach’s picture

This patch is great. The doc comments make complete sense for what is happening in SimpleTest, and the caches being cleared is needed. RTBC.

aspilicious’s picture

I would like to postpone this on #1724452: Test Annotations sandbox. Views is almost done converting his classes to plugins but we need the views testbot at this stage. When that conversion is passing tests we can merge in and we don't have to rely anymore on the registry.

Ok? Thanks :)

merlinofchaos’s picture

It's also worth noting that CTools' Export UI is not yet converted to the new plugin system and PSR-0 and it relies on the registry. While it shouldn't be a difficult conversion it'll still take a little time and might be tough to get done before Munich at this point.

catch’s picture

I said 31st August back in July, and I'm still happy to leave it until then?

plach’s picture

StatusFileSize
new34.33 KB
new905 bytes
+++ b/core/modules/simpletest/simpletest.module
@@ -288,13 +288,9 @@ function simpletest_log_read($test_id, $prefix, $test_class, $during_test = FALS
+ * The list of test classes is loaded by searching the designated directory
+ * for each module for files matching the PSR-0 standard. Once loaded the
+ * test list is cached and stored in a static variable.

Wrong comment wrapping. Rerolled the patch, no commit credit, please :)

tim.plunkett’s picture

Status: Reviewed & tested by the community » Postponed

Until August 31st.

webchick’s picture

Can we announce this at g.d.o/core? This is going to impact a large number of folks IMO.

catch’s picture

berdir’s picture

Status: Postponed » Needs review
Issue tags: -API change, -API clean-up, -PSR-0

#48: rr-1541674-48.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +API change, +API clean-up, +PSR-0

The last submitted patch, rr-1541674-48.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new35.27 KB

Re-rolled, will set back to postponed once it comes back green.

Status: Needs review » Needs work

The last submitted patch, rr-1541674-54.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new384 bytes
new34.33 KB

Forgot a }.

berdir’s picture

Status: Needs review » Postponed

Green, back to sleep with you.

dixon_’s picture

Status: Postponed » Needs review
StatusFileSize
new34.33 KB

1 day until scheduled commit. So, simple re-roll to catch up with HEAD and to have the test bot look at it one last time.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Re-roll looks good, bot is green. Awesome! Let's do this.

tim.plunkett’s picture

Confirmed that CTools and Views are no longer using the registry.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -API change, -API clean-up, -PSR-0

The last submitted patch, registry-1541674-61.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
Issue tags: +API change, +API clean-up, +PSR-0

#61: registry-1541674-61.patch queued for re-testing.

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

The fail in #62 was because I submitted it too early :)

Re-RTBCing.

webchick’s picture

I would commit this, but I'm pretty sure catch really wants to, so leaving this for him for a few hours. :)

catch’s picture

Status: Reviewed & tested by the community » Fixed

Yes, yes I did quite want to. Committed/pushed to 8.x, thanks all!

I think http://drupal.org/node/1320394 covers this for the change notice so moving straight to fixed.

berdir’s picture

Added a back-reference to http://drupal.org/node/1320394 and mentioned in the last sentence there that the registry has now actually been removed.

pounard’s picture

Big win! :)

albert volkman’s picture

Woohoo! Great work everyone.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

robloach’s picture

Status: Closed (fixed) » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.