Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomDeployer. The "symfonyEnvironment" option is not defined. #74

Open
morskoioleg opened this issue Aug 14, 2018 · 3 comments
Open

Comments

@morskoioleg
Copy link

I'm using v1.0.5 with Symfony 3.4.11 and CustomDeployer
When I run bin/console deploy I've got error:

The "symfonyEnvironment" option is not defined.

It is raised by ConfigurationAdapter

And I can't set it while configure deployer (like in DefaultDeployer), because there is no method in CustomConfiguration

public function configure()
    {
        return $this->getConfigBuilder()
            ->server('self')
	    ->symfonyEnvironment('prod_ru')
        ;
    }

Call to undefined method EasyCorp\Bundle\EasyDeployBundle\Configuration\CustomConfiguration::symfonyEnvironment()

Here is my code:

use EasyCorp\Bundle\EasyDeployBundle\Deployer\CustomDeployer;

return new class extends CustomDeployer
{
    public function configure()
    {
        return $this->getConfigBuilder()
            ->server('self')
        ;
    }
    
    public function deploy()
    {
         // ...
    }

    public function cancelDeploy()
    {
    }

    public function rollback()
    {

    }
};

Is it a bug or I just don't understand how to set symfonyEnvironment in right way?

@marc-arnoult
Copy link

Hi @morskoioleg, i have the same issue.

With a little research i found a temporary solution :

use EasyCorp\Bundle\EasyDeployBundle\Configuration\DefaultConfiguration;

return new class extends CustomDeployer
{
    public function configure()
    {
        return (new DefaultConfiguration($this->getContext()->getLocalProjectRootDir()))
            ->server('your_server')
            ->symfonyEnvironment('prod')
        ;
    }
    ...
}

@brooksvb
Copy link

+1 for this issue still existing in v1.0.5

@stefanocaronia
Copy link

sill existing in v1.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants