Skip to content

Hypernode Deploy fails with error "Cannot redeclare twig_cycle()" #43

@fokkejan-made-by-mouses

Description

When we deploy our Magento 2 application to our environment, we get this error:

hypernode-deploy build -vvv
Agent pid 45
PHP Fatal error: Cannot redeclare twig_cycle() (previously declared in /opt/atlassian/pipelines/agent/build/vendor/twig/twig/src/Resources/core.php:19) in phar:///bin/hypernode-deploy/vendor/twig/twig/src/Extension/CoreExtension.php on line 362

This only happens with an existing cache in Bitbucket Pipelines.
So when we clear the cache in Bitbucket, the deploy works fine.
But on the next deploy we get the error of 'twig_cycle()'.

We expect that several versions of twig will be used.
Do you know why this happens and how to fix it?

We are using this version of this module:
hypernode/deploy-configuration: 3.2.0

For Bitbucket Pipelines we are using this image: quay.io/hypernode/deploy:3-php8.2-node18
The application version is Magento 2.4.7-p2
And on the server we have: Node v18.17.1 and PHP 8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions