GithubHelp home page GithubHelp logo

Comments (5)

antonmedv avatar antonmedv commented on July 19, 2024 1

I think we need new version of recipes for 4.x.

from recipes.

antonmedv avatar antonmedv commented on July 19, 2024

Please show your deploy.php file.

from recipes.

mficzel avatar mficzel commented on July 19, 2024

I boiled it down a bit but this is enough to get the error:

<?php

ini_set('display_errors', 1);

require 'recipe/common.php';
require 'vendor/deployphp/recipes/recipes/local.php';

/**
 * Read Servers from yaml file
 */
serverList('deploy-servers.yaml');

/**
 * Add
 */
task('deploy', [
    'local:prepare'
])->desc('Deployer Deployment');

The exact error is the following:

PHP Fatal error:  Uncaught Error: Call to undefined function env() in phar:///__local_directory__/deployer.phar/vendor/deployphp/recipes/recipes/local.php:13
Stack trace:
#0 __local_directory__/deploy_dbg.php(6): require()
#1 phar:///__local_directory__/deployer.phar/bin/dep(60): require('__local_directory__')
#2 /__local_directory__/deployer.phar(4): require('phar://__local_directory__')
#3 {main}
  thrown in phar:///__local_directory__/deployer.phar/vendor/deployphp/recipes/recipes/local.php on line 13

from recipes.

mficzel avatar mficzel commented on July 19, 2024

The problem is that the method env() was moved to the namespace Deployer in the 4.x branch of deployer. So either this namespace must be used or the fullyQualyfiedName of that method \Deployer\env() must be used.

I think the easiest solution would be to add use \Deployer; to all recipes in deployphp/recipies but this would be a breaking change.

from recipes.

antonmedv avatar antonmedv commented on July 19, 2024

@gordalina i'm going switch branches for main deployer repo:

  • master -> 3.x
  • 4.x -> master

Can you do so for recipes?

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.