Deprecated ChainConfigResolver::addResolver() method#763
Conversation
… types, updated test method naming, and cleaned up PHPStan baseline.
|
| * @dataProvider addResolverProvider | ||
| */ | ||
| public function testAddResolver($declaredPriority, $expectedPriority) | ||
| public function testTaggedResolverAddedToConstructor(?int $declaredPriority, int $expectedPriority): void |
There was a problem hiding this comment.
We could a little expand that test to test also different $declaredPriority per each definition - we expect to put them into separate array groups 😉
I think we could test both scenarios (the same declaredPriority and different ones) with using single dataProvider - but splitting these priorities per each definition
There was a problem hiding this comment.
I intend to remove this entirely in 6.x, so I didn't want to put more tests in place (only what I've noticed I've missed in implementation when I looked at the test code yet again).
I want to replace it with tagged_iterator with priority, and make ChainConfigResolver completely not aware that priority exists (as implementation), so those tests would become irrelevant (and CompilerPass too).



Description:
ChainConfigResolvershould not change at runtime. Resolvers should only be added during construction, and should not be changed after.Otherwise, the
ChainConfigResolverbecomes stateful and can potentially cause issues in contexts where application should reset it's state, like in Messenger workers.Warning
When merging up, remove deprecations.
For QA:
Documentation: