- Issue created by @kingdutch
- Merge request !11902Issue #3520300: Replace DrupalKernel::loadLegacyIncludes with composer autoload.files β (Open) created by kingdutch
- πΊπΈUnited States smustgrave
Also probably needs a CR and links updated.
- πΊπΈUnited States nicxvan
Will this affect unit tests?
If I understand correctly the legacy files would not be loaded before this change, but after this change all unit tests will load all legacy includes.Not sure if this is a problem or acceptable, but it likely is a change.
- π³π±Netherlands kingdutch
Will this affect unit tests?
If I understand correctly the legacy files would not be loaded before this change, but after this change all unit tests will load all legacy includes.Not sure if this is a problem or acceptable, but it likely is a change.
You understand correctly. There were two tests that still relied on those functions and redefined them themselves, those have been changed in the diff. For the other tests if they ignore the functions then nothing happens. I guess the only risk is that people start using them in more places? However, there's nothing stopping someone from doing that in a place that's covered by a test that's not a unit test, so I'd argue that's acceptable.
I'll write up a change record and update the deprecation links later this week :) I'm not sure how I would go about writing a deprecation test. Any pointers to an example would be welcome.
- π³πΏNew Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies β .
- πΊπΈUnited States nicxvan
Left one other question.
You don't need to test deprecations directly unless there is complex BC logic.
The question is what happens if someone is calling that function directly and the files get loaded in composer as well.
- π¨π¦Canada Charlie ChX Negyesi πCanada
My worry about unit tests would be performance but I am so often wrong in what is useless micro optimization and what is legit worry.
- πΊπΈUnited States nicxvan
Great question!
This is somewhat anecdotal, the test run here was 6 minutes.
I checked 4 other issues they all ranged from 8-15 minutes.