-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-8399: Moved RepositoryConfigurationProvider to Repository layer #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-8399: Moved RepositoryConfigurationProvider to Repository layer #383
Conversation
d421bca to
b94810a
Compare
src/lib/Base/Container/ApiLoader/RepositoryConfigurationProvider.php
Outdated
Show resolved
Hide resolved
tests/bundle/Core/ApiLoader/BaseRepositoryConfigurationProviderTestCase.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from below comments and Paweł's remark related to constructor property promotion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on other comments, especially on getting rid of ContainerInterface::get calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Any suggestions from me at this point are merely suggestions, that could also be treated as out of scope :)
Co-Authored-By: Paweł Niedzielski <[email protected]>
Co-Authored-By: Paweł Niedzielski <[email protected]>
Co-Authored-By: Paweł Niedzielski <[email protected]> Co-Authored-By: Konrad Oboza <[email protected]>
16ae74a to
9130e95
Compare
|
|
Note: regression tests for now are enough. There are no extra errors there compared to 5.0.x-dev baseline. |
…383) For more details see https://issues.ibexa.co/browse/IBX-8399 and #383 Key changes: * Changed Core Bundle ApiLoader Exception to be Repository Exceptions * Extracted an interface from RepositoryConfigurationProvider * Refactored StorageConnectionFactory to rely on ServiceProviderInterface * Added missing readonly keyword in relevant places * Deprecated RepositoryConfigurationProvider located in Core Bundle namespace * [Tests] Aligned tests with the changes * [PHPStan] Aligned baseline with the changes * [PHPStan] Updated baseline after PHPStan release --------- Co-Authored-By: Paweł Niedzielski <[email protected]> Co-Authored-By: Konrad Oboza <[email protected]>




Related PRs:
Description:
TL:DR;
Effectively moved
RepositoryConfigurationProviderfrom Bundle to Repository layer (for now actually deprecated the old class, but aiming to back-port deprecation to 4.6 and remove it in 5.0 as a follow-up).Background
We need to refactor DI configuration defining
RepositoryFactory(see related PR) so we can fix long outstanding ambiguity issues listed in the JIRA ticket. For now it will help with Symfony 5 Rectors refactoring. The changes done to./src/bundle/Core/ApiLoader/RepositoryFactory.phpare related to that refactoring (RepositoryConfigurationProviderinjection instead of$this->container->get()call) and probably can be applied in a simpler manner to resolve the target issue IBX-8138, however I feel like it's the highest time to do that cleanup - it's a low hanging fruit.But before we can do that, we need to move
RepositoryConfigurationProviderfrom the Bundle to the Repository layer as it's the most inner layer. I've done that in this PR and while at it I've introducedRepositoryConfigurationProviderInterfacecontracts.I've deprecated Core Bundle
RepositoryConfigurationProviderin favor of the Core Repository layer one (\Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider). Ideally I'd like to back-port that deprecation to 4.6, but as a follow-up due to time constraints.Additionally I've made
Ibexa\Bundle\Core\ApiLoader\Exception\*Exceptions final and implementing RepositoryInvalidArgumentExceptioninstead of the core PHP one.I've also cleaned up some minor parts of code touched around repository configuration provider injection refactoring.
Changelog:
For QA:
Regressions done via ibexa/commerce#872 should be enough.
Documentation: