recipes: Packs must never add/modify files in a project
As we always unpack packs now and because we are using Composer to uninstall the pack, the recipes are removed automatically by the Composer plugin/hooks.
It means that a pack CANNOT have anything in the recipes that modifies the local files, so env var, so file creation, …
In any case, even if we would want to “fix” that, it’s not worth it as we are losing the reference to the pack in symfony.lock, so we won’t be able to update the files whenever the recipe changes.
So, I propose to document that new rule: a pack cannot modify the local filesystem in a recipe and add a corresponding Github action check to ensure nobody tries that.
For existing packs that break this new rule, we must find other ways. The simplest way is to create an empty package with an attached recipe that is required in the pack.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (10 by maintainers)
I moved it to https://github.com/symfonycorp/platformsh-meta
Done then https://github.com/symfony/recipes-contrib/pull/1357
For the “empty package”, we might have a naming convention (
-metaat the end) and themetapackagetype should be used in composer.json.Here is such a package as an example: https://github.com/symfony/platformsh-meta