Replies: 3 comments
-
What about the direct approach? require_once "vendor/my/recipes/recipe/my-custom-recipe.php"; |
Beta Was this translation helpful? Give feedback.
-
That could be a good alternative. However, in our situation we have included Deployer and the custom recipes in a Docker container which is responsible for deploying projects. Deployer and its dependencies are installed in the container as global. In v6 this would be fine, since the dependencies of composer global were included as well. This was our strategy:
We have not included Deployer and it's recipes and requirements to the project itself (because of maintenance). So that if Deployer or any of its requirements needed a hotfix, or a set of new recipes, we don't need to address this in hundreds of projects, but we only have to update the "Docker Deployment Container". |
Beta Was this translation helpful? Give feedback.
-
For anybody finding this discussion, here is a new issue describing this problem: #3485 |
Beta Was this translation helpful? Give feedback.
-
At v6 we had some packages containing custom recipes (basically a copy of like https://github.com/deployphp/recipes).
Unfortunately after upgrading to v7 this setup does not work anymore.
The autoloading has been broken and we get messages like:
The
composer.json
file of the package contains this autoload configuration:The
autoload.php
file contains:The file structure of the package:
What is the best practice for adding custom recipes to projects (using a composer package)? Couldn't find any documentation on this subject.
Beta Was this translation helpful? Give feedback.
All reactions