-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Set "extra.symfony.bundles" property at composer.json
in order to be compatible with Symfony Flex
#97
Conversation
That should not be needed: symfony/flex#612 |
I mean, it seems like we dont have to change the bundle type, but add the extra section to composer.json (that would be better, since this is not a bundle only) |
Sorry, didn't noticed about the linked PR. Updating. |
composer.json
in order to be compatible with Symfony Flex
I've applied your proposal @jordisala1991. Thank you so much! |
…e compatible with Symfony Flex
I think it should be good now, but we have to try if it works. It could apply to doctrine extension too |
Surely we must release at least one of these packages before. |
mmm maybe I misunderstood the PR @jordisala1991 mentioned, but looked like this feature wasn't implemented. |
Seems like you are right, then if the auto discovery is enabled for all package types, then why it does not work? Have you tried if it works? I am not a user of flex |
Looks like Flex searches the bundle class in the paths defined in Based on that, I'm not sure if we change the composer type to |
Thank you for the analysys, I didn't see that comment. I've checked locally using the constraint
I just tested symfony/recipes-contrib#975 locally, since "sonata-project/form-extensions" is already using the type "symfony-bundle". Regardless the change at CI seems to work properly, locally the class is not being registered. |
So it is a bug on flex, or we are doing something wrong here? @SerheyDolgushev can you help us here? |
What about release |
I don't think having more repositories to mantain is a good idea. |
One day, we’ll have a monorepository 😁 |
After a manual removal of the entry for "sonata-project/form-extensions" at |
Sorry, I'm not sure what is going here, but in symfony/flex#612 Nicolas and Fabien decided to enable auto-discovery for all bundles by default. So |
When I test flex for packages, I do the following:
|
Thank you so much for the response and the tips @SerheyDolgushev. That is what I'm doing now. |
cb7e123
I'll try later to check if adding |
These are the classpaths where Flex is searching for the bundle declaration with the original "autoload.psr-4" configuration:
This is the result adding
Based on these results, I think the nearest name we could use is |
I've created this PoC, and its working as expected. |
Subject
Set "extra.symfony.bundles" property at
composer.json
in order to be compatible with Symfony Flex.I am targeting this branch, because this change respects BC.
Triggered by sonata-project/SonataAdminBundle#6173.
Changelog