Skip to content

Prevent Symfony Flex from creating files for some recipes #1063

@guillemcanal

Description

@guillemcanal

Context

Symfony Flex is a great tool to get up an running when installing new components, but it has some issues:

We are using PHP to configure packages and components (ex : ./config/packages/doctrine.php, ./config/services.php).

We are using a different directory structure to organize our code were the Application layer is separated from the Domain and the Infrastructure.

Problem

When we use Composer to add or update any project dependency, Flex is noticing that some files are missing and creates them.

We end up having unwanted ./config/**.yaml files and empty directories like so ./src/{Controller,Entity/Repository}/.gitignore.

Possible solutions

  • Being able to tell flex that some files are not wanted (for example, by providing glob patterns in the composer extra section).
  • Prevent flex from creating files when adding/removing dependencies without recipes or when updating a dependency without a recipe.

Thank you for your consideration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions