Skip to content
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

Library composer/ca-bundle handled as Symfony bundle - wrong auto-generated recipe #622

Closed
RicoFactset opened this issue May 15, 2020 · 7 comments · Fixed by #627
Closed

Comments

@RicoFactset
Copy link

Hi,

please see comment from https://github.com/Seldaek in which relates to . Seems additional checks are required.

Type of ca-bundle is "library" and not "symfony-bundle"

Thanks
Rico

@andrew-demb
Copy link

Flex now try to auto discover bundle classes not only for symfony-bundle packages.

Ref #612

@sstok
Copy link

sstok commented May 16, 2020

FYI. If you need something to keep your (use an) CA bundle up-to-date have a look at https://github.com/paragonie/certainty/ 👍

@drupol
Copy link

drupol commented May 26, 2020

In the meantime, to fix the issue, constraint symfony/flex version to 1.6.2.

@weaverryan
Copy link
Member

I can confirm this. To repeat:

composer create-project symfony/skeleton ca-bundle-recipe-bug
cd cd ca-bundle-recipe-bug
composer require composer/ca-bundle

And then the error:

Screen Shot 2020-05-27 at 9 48 30 AM

Ping @SerheyDolgushev do you have any ideas on how this might be fixed?

Btw - this is affecting blackfire/php-sdk, as it requires composer/ca-bundle.

@stof
Copy link
Member

stof commented May 27, 2020

The new detection of bundle classes in any package type might require adding a validation that the detected class is actually a class implementing the Symfony BundleInterface, and not a random class with a name ending with Bundle.

Making the assumption that a class ending with Bundle in a symfony-bundle package is actually a Symfony bundle could be considered OK. But removing the restriction on the package type makes it much harder to justify this.

If we decide we don't want to implement such validation because broken cases would be very few, we could probably solve it by adding an explicit recipe for composer/ca-bundle forcing to define an empty array of bundle classes (which will disable the automatic detection).

@fabpot
Copy link
Member

fabpot commented May 28, 2020

See #627

@fabpot fabpot closed this as completed May 28, 2020
fabpot added a commit that referenced this issue May 28, 2020
This PR was merged into the 1.7-dev branch.

Discussion
----------

Fix bundle auto-detection

closes #622

Commits
-------

3a8102d Fix bundle auto-detection
@fabpot
Copy link
Member

fabpot commented May 28, 2020

I've just tagged 1.7.1 with the fix.

tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants