Skip to content

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

Closed
@RicoFactset

Description

@RicoFactset

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

Activity

andrew-demb

andrew-demb commented on May 15, 2020

@andrew-demb

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

Ref #612

sstok

sstok commented on May 16, 2020

@sstok

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

drupol commented on May 26, 2020

@drupol

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

weaverryan

weaverryan commented on May 27, 2020

@weaverryan
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

stof commented on May 27, 2020

@stof
Member

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

fabpot commented on May 28, 2020

@fabpot
Member

See #627

added a commit that references this issue on May 28, 2020

bug #627 Fix bundle auto-detection (fabpot)

a530568
fabpot

fabpot commented on May 28, 2020

@fabpot
Member

I've just tagged 1.7.1 with the fix.

added a commit that references this issue on Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @fabpot@weaverryan@drupol@stof@sstok

      Issue actions

        Library composer/ca-bundle handled as Symfony bundle - wrong auto-generated recipe · Issue #622 · symfony/flex