deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.57k stars 1.48k forks source link

Package deployer/recipes is abandoned, you should avoid using it. No replacement was suggested. #2122

Closed marknotton closed 3 years ago

marknotton commented 4 years ago

When following the installation guidelines for Deployer Recipes a warning is thrown:

Package deployer/recipes is abandoned, you should avoid using it. No replacement was suggested.

The deployerphp/recipes repo has been archived in favour of baking them directly into the main repo.

The problem is the start of my deploy.php follows the usage examples like this:

namespace Deployer;

require 'recipe/common.php';
require 'recipe/npm.php';

Which throws this PHP Warning:

PHP Warning:  require(recipe/npm.php): failed to open stream: No such file or directory in /Users/marknotton/Projects/Websites/Hestercombe/Website/deploy.php on line 10

Warning: require(recipe/npm.php): failed to open stream: No such file or directory in /Users/marknotton/Projects/Websites/Hestercombe/Website/deploy.php on line 10
PHP Fatal error:  require(): Failed opening required 'recipe/npm.php' (include_path='/Users/marknotton/Projects/Websites/Hestercombe/Website/vendor/deployer/deployer:.:/usr/local/Cellar/php/7.3.11/share/php/pear') in /Users/marknotton/Projects/Websites/Hestercombe/Website/deploy.php on line 10

Fatal error: require(): Failed opening required 'recipe/npm.php' (include_path='/Users/marknotton/Projects/Websites/Hestercombe/Website/vendor/deployer/deployer:.:/usr/local/Cellar/php/7.3.11/share/php/pear') in /Users/marknotton/Projects/Websites/Hestercombe/Website/deploy.php on line 10
marknotton@marks Website % 

I thought maybe I just need to point my require paths to the new location in the "contrib" directory. But it doesn't exist.

My projects installation (via composer) doesn't contain any "contrib" folder or recipes as-per the official repo in the 'vendors' folder:

📦 deployer
 ┣ 📂 bin
 ┃ ┣ build
 ┃ ┣ changelog
 ┃ ┗ dep
 ┣ 📂 docs
 ┃ ┣ 📂 advanced
 ┃ ┃ ┣ deploy-and-git.md
 ┃ ┃ ┣ deploy-strategies.md
 ┃ ┃ ┗ parallel-io.md
 ┃ ┣ 📂 examples
 ┃ ┃ ┣ inventory.md
 ┃ ┃ ┗ simple-deploy.md
 ┃ ┣ 📂 images
 ┃ ┃ ┗ laravel.png
 ┃ ┣ README.md
 ┃ ┣ api.md
 ┃ ┣ cli.md
 ┃ ┣ configuration.md
 ┃ ┣ flow.md
 ┃ ┣ functions.md
 ┃ ┣ getting-started.md
 ┃ ┣ hosts.md
 ┃ ┣ how-to-deploy-laravel.md
 ┃ ┣ installation.md
 ┃ ┣ servers.md
 ┃ ┣ tasks.md
 ┃ ┗ usage-on-windows.md
 ┣ 📂 recipe
 ┃ ┣ 📂 config
 ┃ ┃ ┣ current.php
 ┃ ┃ ┣ dump.php
 ┃ ┃ ┗ hosts.php
 ┃ ┣ 📂 deploy
 ┃ ┃ ┣ check_remote.php
 ┃ ┃ ┣ cleanup.php
 ┃ ┃ ┣ clear_paths.php
 ┃ ┃ ┣ copy_dirs.php
 ┃ ┃ ┣ info.php
 ┃ ┃ ┣ lock.php
 ┃ ┃ ┣ prepare.php
 ┃ ┃ ┣ release.php
 ┃ ┃ ┣ rollback.php
 ┃ ┃ ┣ shared.php
 ┃ ┃ ┣ symlink.php
 ┃ ┃ ┣ update_code.php
 ┃ ┃ ┣ vendors.php
 ┃ ┃ ┗ writable.php
 ┃ ┣ README.md
 ┃ ┣ cakephp.php
 ┃ ┣ codeigniter.php
 ┃ ┣ common.php
 ┃ ┣ composer.php
 ┃ ┣ drupal7.php
 ┃ ┣ drupal8.php
 ┃ ┣ flow_framework.php
 ┃ ┣ fuelphp.php
 ┃ ┣ joomla.php
 ┃ ┣ laravel.php
 ┃ ┣ magento.php
 ┃ ┣ magento2.php
 ┃ ┣ prestashop.php
 ┃ ┣ silverstripe.php
 ┃ ┣ sulu.php
 ┃ ┣ sulu2.php
 ┃ ┣ symfony.php
 ┃ ┣ symfony3.php
 ┃ ┣ symfony4.php
 ┃ ┣ typo3.php
 ┃ ┣ wordpress.php
 ┃ ┣ yii.php
 ┃ ┣ yii2-app-advanced.php
 ┃ ┣ yii2-app-basic.php
 ┃ ┗ zend_framework.php
 ┣ 📂 src
 ┃ ┣ 📂 Collection
 ┃ ┃ ┣ Collection.php
 ┃ ┃ ┣ CollectionInterface.php
 ┃ ┃ ┗ PersistentCollection.php
 ┃ ┣ 📂 Configuration
 ┃ ┃ ┣ Configuration.php
 ┃ ┃ ┗ ConfigurationAccessor.php
 ┃ ┣ 📂 Console
 ┃ ┃ ┣ 📂 Input
 ┃ ┃ ┃ ┣ Argument.php
 ┃ ┃ ┃ ┗ Option.php
 ┃ ┃ ┣ 📂 Output
 ┃ ┃ ┃ ┣ Informer.php
 ┃ ┃ ┃ ┣ OutputWatcher.php
 ┃ ┃ ┃ ┗ VerbosityString.php
 ┃ ┃ ┣ Application.php
 ┃ ┃ ┣ AutocompleteCommand.php
 ┃ ┃ ┣ CommandEvent.php
 ┃ ┃ ┣ DebugCommand.php
 ┃ ┃ ┣ InitCommand.php
 ┃ ┃ ┣ RunCommand.php
 ┃ ┃ ┣ SshCommand.php
 ┃ ┃ ┣ TaskCommand.php
 ┃ ┃ ┗ WorkerCommand.php
 ┃ ┣ 📂 Exception
 ┃ ┃ ┣ ConfigurationException.php
 ┃ ┃ ┣ Exception.php
 ┃ ┃ ┣ GracefulShutdownException.php
 ┃ ┃ ┣ InitializationException.php
 ┃ ┃ ┣ NonFatalException.php
 ┃ ┃ ┗ RuntimeException.php
 ┃ ┣ 📂 Executor
 ┃ ┃ ┣ ExecutorInterface.php
 ┃ ┃ ┣ ParallelExecutor.php
 ┃ ┃ ┗ SeriesExecutor.php
 ┃ ┣ 📂 Host
 ┃ ┃ ┣ FileLoader.php
 ┃ ┃ ┣ Host.php
 ┃ ┃ ┣ HostCollection.php
 ┃ ┃ ┣ HostSelector.php
 ┃ ┃ ┣ Localhost.php
 ┃ ┃ ┣ Range.php
 ┃ ┃ ┗ Storage.php
 ┃ ┣ 📂 Initializer
 ┃ ┃ ┣ 📂 Exception
 ┃ ┃ ┃ ┣ IOException.php
 ┃ ┃ ┃ ┗ TemplateNotFoundException.php
 ┃ ┃ ┣ 📂 Template
 ┃ ┃ ┃ ┣ CakeTemplate.php
 ┃ ┃ ┃ ┣ CodeIgniterTemplate.php
 ┃ ┃ ┃ ┣ CommonTemplate.php
 ┃ ┃ ┃ ┣ DrupalTemplate.php
 ┃ ┃ ┃ ┣ FrameworkTemplate.php
 ┃ ┃ ┃ ┣ LaravelTemplate.php
 ┃ ┃ ┃ ┣ SymfonyTemplate.php
 ┃ ┃ ┃ ┣ Template.php
 ┃ ┃ ┃ ┣ TemplateInterface.php
 ┃ ┃ ┃ ┣ Typo3Template.php
 ┃ ┃ ┃ ┣ Yii2AdvancedAppTemplate.php
 ┃ ┃ ┃ ┣ Yii2BasicAppTemplate.php
 ┃ ┃ ┃ ┣ YiiTemplate.php
 ┃ ┃ ┃ ┗ ZendTemplate.php
 ┃ ┃ ┗ Initializer.php
 ┃ ┣ 📂 Logger
 ┃ ┃ ┣ 📂 Handler
 ┃ ┃ ┃ ┣ FileHandler.php
 ┃ ┃ ┃ ┣ HandlerInterface.php
 ┃ ┃ ┃ ┗ NullHandler.php
 ┃ ┃ ┗ Logger.php
 ┃ ┣ 📂 Ssh
 ┃ ┃ ┣ Arguments.php
 ┃ ┃ ┗ Client.php
 ┃ ┣ 📂 Support
 ┃ ┃ ┣ 📂 Changelog
 ┃ ┃ ┃ ┣ Changelog.php
 ┃ ┃ ┃ ┣ Item.php
 ┃ ┃ ┃ ┣ ParseException.php
 ┃ ┃ ┃ ┣ Parser.php
 ┃ ┃ ┃ ┗ Version.php
 ┃ ┃ ┣ Proxy.php
 ┃ ┃ ┣ Unix.php
 ┃ ┃ ┗ helpers.php
 ┃ ┣ 📂 Task
 ┃ ┃ ┣ Context.php
 ┃ ┃ ┣ GroupTask.php
 ┃ ┃ ┣ ScriptManager.php
 ┃ ┃ ┣ Task.php
 ┃ ┃ ┗ TaskCollection.php
 ┃ ┣ 📂 Type
 ┃ ┃ ┗ Csv.php
 ┃ ┣ 📂 Utility
 ┃ ┃ ┣ Httpie.php
 ┃ ┃ ┣ ProcessOutputPrinter.php
 ┃ ┃ ┣ ProcessRunner.php
 ┃ ┃ ┣ Reporter.php
 ┃ ┃ ┗ Rsync.php
 ┃ ┣ Deployer.php
 ┃ ┗ functions.php
 ┣ CODE_OF_CONDUCT.md
 ┣ LICENSE
 ┣ README.md
 ┣ SPONSORS.md
 ┣ composer.json
 ┗ composer.lock

Globally I have version 6.8.0 of the "deployer.phar" installed.

Via Composer I am using

"deployer/deployer": "^6.7",
"deployer/recipes": "^6.2"

I'm not particularly proficient with PHP so this is possibly a user error (especially when understanding scopes). I just can't seem to see any obvious way to include those recipes anymore. If that is the case I might suggest that the recipe installation guidelines need clearer instructions for the less experienced developers like myself.

In the meantime I'm going to continue using the archived recipes

edwinsiebel commented 4 years ago

Although still archived, you could use:

"deployer/recipes": "dev-master"

That is at least what I use for a recipe that I require.

beporter commented 4 years ago

I could be mistaken, but it seems like moving the recipes into the core is slated for an upcoming v7.0 release that hasn't happened as of this writing.

If that is indeed the case, it's unfortunate that the recipes package was abandoned "early".

antonmedv commented 4 years ago

Old versions are still tagged and working. Abandoned is added notify contributors what recipes should be updates in master repo instead.

jasperf commented 4 years ago

We use require 'vendor/deployer/recipes/cachetool.php'; in deploy.php and post composer install it now seems to be in vendor/deployer/recipes/recipe/cachetool.php. Seems composer install caused a update to last version set and now cachetool.php is located elsewhere. Did the recipes path change in 6.8?

antonmedv commented 3 years ago

I am cleaning up on issues. Fill free to reopen if needed. Also, we have a new section available: discussions.