Skip to content

[RFC] Command to remove non-production files #22064

@linaori

Description

@linaori
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version latest

I would like to propose a new feature that can be bundled with Symfony: A command that can remove files that you don't need in production. There have been several suggestions in the past to not include things like tests when developing:

I envision this as a command that people can add to their composer.json to remove:

  • Test files/directories
  • Docs (including images)
  • md files (readme, upgrade, etc), might have to be optional

This should definitely not be removing source files like Tree Shaking! You can narrow your dependencies for that to specific components/bundles.

Several use-cases could be satisfied by this:

  • Reducing the effective size of the application when using a buildserver or bundling Symfony in a desktop app /cc @jrobeson
  • A clean environment when developing, no mocks or test files in auto-completion
  • No readme files, examples or upgrade logs/contribution logs showing up in search results (hence this step might have to be optional).

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions