rocketeers / rocketeer

Send your projects up in the clouds
http://rocketeer.autopergamene.eu/
MIT License
2.66k stars 217 forks source link

Setting dependencies => 'null' causes an error #737

Open weldpua2008 opened 7 years ago

weldpua2008 commented 7 years ago

Hello, I am getting the following error:

$ /usr/bin/git submodule update --init --recursive
dev_server/0/dev              |-- Dependencies (Installs or update the dependencies on server)

  [RuntimeException]
  Class "Rocketeer\Strategies\Dependencies\nullStrategy" for strategy "dependencies" not found

Is there an issue with https://github.com/rocketeers/docs/blob/master/II-Concepts/Strategies.md ?

rocketeer -V

Rocketeer version 2.2.5

composer -V

Do not run Composer as root/super user! See https://getcomposer.org/root for details Composer version 1.4.1 2017-03-10 09:29:45

rocketeer strategies

+--------------+----------------+-----------------------------------------------------------------------+
| Strategy     | Implementation | Description                                                           |
+--------------+----------------+-----------------------------------------------------------------------+
| check        | Php            | Checks if the server is ready to receive a PHP application            |
| check        | Ruby           | Checks if the server is ready to receive a Ruby application           |
| check        | Node           | Checks if the server is ready to receive a Node application           |
| deploy       | Clone          | Clones a fresh instance of the repository by SCM                      |
| deploy       | Copy           | Copies the previously cloned instance of the repository and update it |
| deploy       | Sync           | Uses rsync to create or update a release from the local files         |
| test         | Phpunit        | Run the tests with PHPUnit                                            |
| migrate      | Artisan        | Migrates your database with Laravel's Artisan CLI                     |
| dependencies | Composer       | Installs dependencies with Composer                                   |
| dependencies | Bundler        | Installs dependencies with Bundler                                    |
| dependencies | Npm            | Installs dependencies with NPM                                        |
| dependencies | Bower          | Installs dependencies with Bower                                      |
| dependencies | Polyglot       | Runs all of the above package managers if necessary                   |
+--------------+----------------+-----------------------------------------------------------------------+

Content of strategies.php

cat .rocketeer/strategies.php |grep -vE '//|^$'

<?php

/*
 * This file is part of Rocketeer
 *
 * (c) Maxime Fabre <ehtnam6@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Rocketeer\Binaries\PackageManagers\Composer;
use Rocketeer\Tasks\Subtasks\Primer;

return [

    'check'        => 'Php',

    'deploy'       => 'Clone',

    'test'         => 'Phpunit',

    'migrate'      => 'Artisan',

    'dependencies' => 'null',

    'composer'     => [
        'install' => function (Composer $composer, $task) {
            return $composer->install([], ['--no-interaction' => null, '--no-dev' => null, '--prefer-dist' => null]);
        },
        'update'  => function (Composer $composer) {
            return $composer->update();
        },
    ],

    'primer'       => function (Primer $task) {
        return [
        ];
    },

];
benrolfe commented 7 years ago

I believe it should be null, without the quotes. Ie:

'dependencies' => null,

drmonkeyninja commented 7 years ago

It should be null rather than the string 'null' as @benrolfe suggests. There appears to be a merge request to fix the documentation waiting to be accepted (https://github.com/rocketeers/docs/pull/33).