GithubHelp home page GithubHelp logo

Comments (8)

antonmedv avatar antonmedv commented on July 19, 2024

After dont have desc.

from recipes.

mryanb avatar mryanb commented on July 19, 2024

If I remove ->desc() I then get this error:


Warning: strpos() expects parameter 1 to be string, object given in /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php on line 58

Call Stack:
    0.0003     245728   1. {main}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:0
    0.0212    3205464   2. Deployer\Deployer->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:114
    0.0312    3439552   3. Symfony\Component\Console\Application->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Deployer.php:186
    0.0389    3442072   4. Symfony\Component\Console\Application->doRun() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:120
    0.0393    3443160   5. Symfony\Component\Console\Application->doRunCommand() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:189
    0.0393    3443760   6. Symfony\Component\Console\Command\Command->run() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:826
    0.0399    3449096   7. Deployer\Console\TaskCommand->execute() /Users/auser/Sites/deployer-test/vendor/symfony/console/Command/Command.php:262
    0.0414    3463232   8. Deployer\Task\ScriptManager->getTasks() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Console/TaskCommand.php:65
    0.0415    3464384   9. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:52
    0.0415    3465360  10. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3466944  11. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3467480  12. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  13. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  14. Deployer\Collection\Collection->get() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:36
    0.0415    3468064  15. Deployer\Collection\Collection->has() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php:31
    0.0415    3468160  16. strpos() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php:58


Warning: explode() expects parameter 2 to be string, object given in /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php on line 61

Call Stack:
    0.0003     245728   1. {main}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:0
    0.0212    3205464   2. Deployer\Deployer->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:114
    0.0312    3439552   3. Symfony\Component\Console\Application->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Deployer.php:186
    0.0389    3442072   4. Symfony\Component\Console\Application->doRun() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:120
    0.0393    3443160   5. Symfony\Component\Console\Application->doRunCommand() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:189
    0.0393    3443760   6. Symfony\Component\Console\Command\Command->run() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:826
    0.0399    3449096   7. Deployer\Console\TaskCommand->execute() /Users/auser/Sites/deployer-test/vendor/symfony/console/Command/Command.php:262
    0.0414    3463232   8. Deployer\Task\ScriptManager->getTasks() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Console/TaskCommand.php:65
    0.0415    3464384   9. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:52
    0.0415    3465360  10. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3466944  11. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3467480  12. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  13. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  14. Deployer\Collection\Collection->get() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:36
    0.0415    3468064  15. Deployer\Collection\Collection->has() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php:31
    0.0442    3468480  16. explode() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php:61


Catchable fatal error: Object of class Closure could not be converted to string in /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Collection/Collection.php on line 49

Call Stack:
    0.0003     245728   1. {main}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:0
    0.0212    3205464   2. Deployer\Deployer->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/bin/dep:114
    0.0312    3439552   3. Symfony\Component\Console\Application->run() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Deployer.php:186
    0.0389    3442072   4. Symfony\Component\Console\Application->doRun() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:120
    0.0393    3443160   5. Symfony\Component\Console\Application->doRunCommand() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:189
    0.0393    3443760   6. Symfony\Component\Console\Command\Command->run() /Users/auser/Sites/deployer-test/vendor/symfony/console/Application.php:826
    0.0399    3449096   7. Deployer\Console\TaskCommand->execute() /Users/auser/Sites/deployer-test/vendor/symfony/console/Command/Command.php:262
    0.0414    3463232   8. Deployer\Task\ScriptManager->getTasks() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Console/TaskCommand.php:65
    0.0415    3464384   9. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:52
    0.0415    3465360  10. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3466944  11. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:39
    0.0415    3467480  12. array_map() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  13. Deployer\Task\ScriptManager->Deployer\Task\{closure}() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:44
    0.0415    3468064  14. Deployer\Collection\Collection->get() /Users/auser/Sites/deployer-test/vendor/deployer/deployer/src/Task/ScriptManager.php:36```

from recipes.

antonmedv avatar antonmedv commented on July 19, 2024

Please, show full deploy.php file.

from recipes.

mryanb avatar mryanb commented on July 19, 2024

Here is the test script I'm working with:

namespace Deployer;
require 'recipe/common.php';
require 'vendor/deployer/recipes/local.php';
// Configuration

set('ssh_type', 'native');
set('ssh_multiplexing', true);

set('repository', 'git@git-server:project/core.git');
set('shared_files', []);
set('shared_dirs', []);
set('writable_dirs', []);

// Servers

server('production', '10.10.1.21')
    ->set('deploy_path', '/home/www');


set('local_release_path', '/tmp/my_application');

/**
 * Main task
 */
task('deploy', [
    'deploy:prepare',
    'deploy:release',
    'local:update_code',
    'local:vendors',
    'deploy:symlink',
    'cleanup',
])->desc('Deploy your project');

after('local:vendors', function() {
    upload(get('local_release_path'), get('release_path'));
});

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

from recipes.

antonmedv avatar antonmedv commented on July 19, 2024

Really strange. Can you debug this steps?

from recipes.

mryanb avatar mryanb commented on July 19, 2024

@Elfet Any suggestions for debugging here?

from recipes.

pdbreen avatar pdbreen commented on July 19, 2024

Try using the closure to define a task and then use that task name for the after hook:

task('my_upload', function() {
    upload(get('local_release_path'), get('release_path'));
});
after('local:vendors', 'my_upload');

from recipes.

mryanb avatar mryanb commented on July 19, 2024

@pdbreen Thanks, your advise coupled with -vvv was able to uncover an issue with composer running locally.

from recipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.