Closed (fixed)
Project:
Drupal core
Version:
9.0.x-dev
Component:
block_place.module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2019 at 08:24 UTC
Updated:
15 May 2020 at 20:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
rpsuThis can proceed now. #3084471: Remove/fix legacy tests after Place Blocks -module removal should be taken into account as well.
Comment #4
ravi.shankar commentedI have tried to remove block_place module, please review.
Comment #5
rpsuI am not fully certain if the Legacy* -tests introduced in #3062281: Deprecate block_place module for removal in Drupal 9 are supposed to be left around, or just remove the (only) module that is excluded in the non-Legacy* tests around.
As of now they serve no purpose, however they may hold some future value. All the modules that are utilizing the trait
DeprecatedModulesTestTraitblindly enable every core module for their tests, and introducing some other mechanism to locate the deprecated AND/OR experimental module might be a good option in the near future. If that is the case, the trait could be used, or extended/updated to provide list of suitable set of modules to be enabled.Comment #6
jeroentPatch no longer applied. Created a reroll.
Comment #7
jeroent@rpsu,
Briefly discussed with @borisson_ and @wimleers. They suggested keeping that trait for now since it's possible that some modules will be marked deprecated in Drupal 9. If not, we can still remove the trait later.
Comment #8
berdirAgree with that too, we'll eventually deprecate modules again.
I confirmed that there is no mention of block_place left after applying the patch.
But I think we can include #3084471: Remove/fix legacy tests after Place Blocks -module removal here as well and unmark these tests?
Comment #9
gábor hojtsyAgreed, closed #3084471: Remove/fix legacy tests after Place Blocks -module removal as duplicate. @berdir: I don't think we would unmark them, we would remove the legacy ones, no? At least they would be doing the same test twice once we remove block_place from the trait's list.
Comment #10
berdirDepends on the test, but my understanding is that some of these tests are only legacy because they can't avoid touching the block_place module and triggering that message? Typically because they just loop overall modules and install them for things. So we still need their test coverage, but now they shouldn't trigger any deprecation messages anymore?
Comment #11
catchBumping to critical since this has to happen before beta (or we'd have to update all the deprecation messages).
With the legacy tests, we already have modules we're about to deprecate in Drupal 9 for Drupal 10, so I'm not sure we can actually unmark everything. Although we could unmark and remark maybe to see what's really necessary? See #3111645: Uninstall entity_reference module and prevent it being enabled again, remove deprecated code for an example, but that shouldn't requite @legacy anywhere since there's not really any PHP code left to deprecate.
Comment #12
berdirentity_reference does, as far as I see, have any code left with @trigger_error()'s in it, so it shouldn't actually trigger anything. The trait is now an empty list of modules, it already doesn't do anything now, so we can definitely remove the usages.
I realized that all usages of the trait come with a subclass that tests not only the legacy modules but all the modules including legacy again, so I definitely think we should clean that up and only if really necessary add it back. (I didn't know that in #8). Not a huge deal for the kernel tests, but HelpTopicsSyntaxTest is no joke.
I never understood the "aggressive" @trigger_error() approach in block_place, as we didn't actually deprecate the API's, just move them out of core, and a single hook_requirements() just like we did now in entity_reference.module would have been enough IMHO :)
Comment #13
rpsuIf all usages of this trait will be gone should the trait be documented slightly better? For the some future day we'll deprecate something in core (#3111645: Uninstall entity_reference module and prevent it being enabled again, remove deprecated code 's follow up for Drupal 10 for example).
Comment #14
berdirNot sure, maybe in a follow-up that's not a beta blocker?
I don't think entity_reference will need this, as we can just remove it in D10, but there might be other modules, although I'll try to push for a simpler approach. To be perfectly clear, I do not mean to say anything negative about the work you did, you simply did what was required to get it committed and prepared for its removal from core.
Comment #15
rpsuYes, none taken :) - I am perfectly aware how things evolved.
My point is that if this trait is kept for future purposes and nothing is actually using it now (ie. all Legacy* tests using it are removed) this appears as dead piece of code unless it contains a reasoning why it exists, and how to use it. Or would this be clear enough in - say - 3 years? I am thinking of a issue reference in the docblock or a couple of sentences of why it exists/how it is intended to be used.
Thoughts on this?
Comment #16
berdir@catch suggested to just remove the trait and also suggested to change the deprecation approacg in block_place to be less "aggressive", meaning no @trigger_error() in the module file, similar to my change in #3062302: Properly deprecate the entity reference module. (In a follow-up)
There is a single use of it currently in contrib, in a migrate module.
We'll also need a change record for the removal of that trait.
Comment #17
andypostBut this trait could be useful in 9.x release cycle, other then that needs CR
Comment #19
berdirOne class still had the trait.
Comment #21
berdirAnd now also removed the call to that method..
Comment #22
rpsuProvided the trait should be gone and not saved for the future purposes, RTBC
Comment #23
rpsuoh man, pre-release of CR #3116386: Trait DeprecatedModulesTestTrait removed is there but I can't see how to attach it here?
Comment #24
rpsuNever mind, magic happened anyway behind the scenes.
Comment #25
catchI think we need the follow-up to remove the .module trigger_error() from place blocks in 8.8 and 8.9 before we can commit this, but looks good otherwise.
Comment #26
alexpottAt first sight this issue removing deprecated modules trait looks odd but actually I think if we do need to implement something like that in D9 then we should do it better.
One thought is that essentially we're doing the thing that causes #2917600: update_fix_compatibility() puts sites into unrecoverable state so it would be great to have that fixed.
Comment #27
catchHere's the 8.8/8.9 issue for Place Blocks: #3116399: [D8 only] Place blocks .module file should not trigger a deprecation
Comment #28
alexpottLooks like only 3 contrib projects are going to be affected - not too bad... http://grep.xnddx.ru/search?text=-%20block_place&filename=
Comment #29
webchickIs someone in contact with the https://www.drupal.org/project/block_place maintainers to replace the content of their repo with this module once (or before) this patch goes in?
EDIT: Yep, looks like this was taken care of in #3062281: Deprecate block_place module for removal in Drupal 9.
Comment #31
catchCommitted 262b7fc and pushed to 9.0.x. Thanks!
Comment #32
catchComment #33
rpsuthe https://www.drupal.org/project/block_place is in place but the package naming collision (core vs. contrib) still seems to exist, leading to failing test builds. #3083638: Ensure that simpletest and block_place do not get special core treatement should take care of that, hopefully before the first D9 beta release.
Comment #34
xjmComment #35
rpsuCR is now updated (version 9.0.0-alpha2) and published.
Comment #37
heddnI'm not sure we wanted to remove
Drupal\Tests\DeprecatedModulesTestTrait. I was using it to filter out deprecated modules from my tests since 8.6 or 8.7 and prepare my module for 9.x compatibility. But now with its removal, my tests fall over miserably. Could/should probably re-add it.See CR https://www.drupal.org/node/3116386.
Comment #38
rpsu9.0.x/9.1.x branches do not include deprecated core modules so there should be no need to use the trait?
#3124762: Add 'lifecycle' key to .info.yml files aims finally to have a similar way to filter in/out deprecated, experimental etc. modules based on their current status, effectively providing a way to replace the removed trait.
Comment #39
heddnMy point isn't so much that there aren't any deprecated modules in D9, nor that a new way to discover deprecated modules will be available. My point is that a non internal test layer was removed without first deprecating it.
However, I'd propose that additional modules in D9 will also be deprecated. And a test trait like what was removed would still be useful. But that's beside the point, right?
Comment #40
rpsuyes, I agree. Perhaps the original trait should've been documented as internal - even if I was planning to have it around still with D9.
For D9 there will be a (permanent) way to filter modules based on their statuses in a similar fashion as we had.
Comment #41
pameeela commentedAnyone able to update the IS with a release notes snippet, briefly summarising the effects of this change?
Comment #42
rpsuI'm not sure what you mean with this:
Comment #43
pameeela commentedOh, IS means issue summary. The release notes snippet is part of the issue summary template and should be included for issues that have a potentially disruptive change.
Comment #44
xjmUpdated with a correct release note, and polished this in the 9.0.0-alpha2 release notes.