Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As suggested in #61 (comment), this deprecates the "drivers" config node in favor of feature detection. The node only allows values supported by the resource bundle and causes confusion when folks try to create custom drivers (which can be done with the
sylius.grid_driver
tag without adding it to that config node), so it really doesn't offer any benefit to existing.Instead, Symfony's API for detecting features available at compile time is used. If an app has both
doctrine/orm
anddoctrine/doctrine-bundle
installed, then the ORM and DBAL drivers will be automatically enabled. If an app has bothdoctrine/phpcr-odm
anddoctrine/phpcr-bundle
installed, the (deprecated) PHPCR-ODM driver will be automatically enabled. The bundles are included in the dependency list because the driver services have dependencies to services created by the respective bundles, so the presence of the managers alone cannot fulfill the service requirements.If accepted as is, the "drivers" config node is no longer used by the bundle at all. I guess this could be a minor inconvenience if someone is using this bundle in an application that has both the ORM and PHPCR-ODM (and their bundles) installed and was using the config to disable one of the drivers, but you can accomplish the same with a compiler pass if needed.
On a side note, to have a full suite of test scenarios that actually makes sure these optional integrations stay optional, the CI would really need to run the tests without each of the Doctrine dependencies installed (similar to the steps in the resource bundle CI), but that's going to be a much larger undertaking (especially for the deprecated PHPCR-ODM integration).