Needs work
Project:
Drupal core
Version:
main
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 May 2017 at 17:08 UTC
Updated:
4 Nov 2019 at 09:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tim.plunkettThis blocks the Layout initiative, since it will provide a field type plugin, causing FieldDefinitionIntegrityTest to fail.
Comment #3
dawehnerIs this something we could provide on the level of a trait so BrowserTestBase can use it as well?
Comment #6
borisson_A trait would be a good idea. I agree, setting to needs work based on #3
Comment #8
tim.plunkettAddressed #3
Interdiff not super helpful, as it's on top of a reroll.
Comment #9
borisson_Setting this to rtbc. I have one minor nitpick but that is not nearly enough to set this back to nw.
This doesn't have to go in an intermediary variable and it could be returned without it.
Comment #10
wim leersLooks great!
Comment #11
tim.plunkettOkay #9 was bugging me, good point. Leaving RTBC
Comment #12
alexpottHmm... I wrote a comment on this yesterday and dug out an issue but somehow it got lost.
I think there is a big difference between a beta stability experimental module and an alpha. Beta ones need to pass these tests - alphas we could exclude them. So for me we should be doing #2656994: Experimental modules should have their own version numbers first.
Comment #13
tim.plunkettWe have 7 implementations here. 4 do not care about experimental and 3 do.
I'd *really* like to not get this blocked on that other issue that has sat untouched for almost 3 years.
Should we add two methods? One with a boolean flag?
Comment #14
alexpott@tim.plunkett I think adding a boolean to include them and then preserving the status quo is a good way to go. We can then expand this argument to accept a string representing an experimental module stability in #2656994: Experimental modules should have their own version numbers.
That way we get the DRY and improved module selection now (ie. making it easier to exclude non-core modules) and incrementally improve this when possible.
system_rebuild_module_data() is deprecated.
Comment #16
mile23During the bootstrap process, core/test/bootstrap.php finds extensions so it can discover their tests: https://git.drupalcode.org/project/drupal/blob/8.8.x/core/tests/bootstra...
So you can call
drupal_phpunit_contrib_extension_directory_roots()in some circumstances. But it would be better to have a helper class that knows how to do this and isn't ever going to be the system under test. That could then be used by tests, and also replace the code in bootstrap.php.system_rebuild_module_data()is the system under test, and it also is replaced by a service so for instance under unit tests it won't be available. #2926068: Deprecate system_rebuild_module_data() and remove usages in coreComment #17
vacho commentedBy now only patch reroll
Comment #19
rpsuComment #20
rpsuThis would most likely need to skip also deprecated core modules. How they should be identified, currently there is no means for it (apart just listing them as in #3062281: Deprecate block_place module for removal in Drupal 9 in trait
Drupal\Tests\DeprecatedModulesTestTrait.Would it make sense to add an optional key to .info.yml files (
deprecated: TRUEas the first thing from the top of my head)?