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

Contents of config.php in config:remove-dev-modules is parsed by deployer #31

Open
schmengler opened this issue Feb 6, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@schmengler
Copy link
Contributor

This change has a side effect that causes an error if app/etc/config.php contains anything that looks like a variable to Deployer: f8615cf

The issue is that the whole contents of the config file is passed as part of an argument to run():

    run("cat <<EOF > {{release_path}}/$configFile $updatedConfigEof");

Deployer parses the argument.

This fails if the file contains dumped configuration with CMS variables, e.g. address templates:

            'address_templates' => [
                'html' => '{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}{{depend company}}{{var company}}<br />{{/depend}}{{if street1}}{{var street1}}{{depend street2}} {{var street2}}{{/depend}}<br />{{/if}}{{depend street3}}{{var street3}}<br />{{/depend}}{{depend street4}}{{var street4}}<br />{{/depend}}{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />{{var country}}<br />{{depend telephone}}T: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}{{depend fax}}<br />F: {{var fax}}{{/depend}}{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}'
            ]

In this case:


[Deployer\Exception\ConfigurationException]
 Configuration parameter `/depend` does not exist.
@osrecio
Copy link
Collaborator

osrecio commented Dec 5, 2019

Hi @schmengler sorry for the delay (more than we'd like).-

What would you do to solve the problem?

We could create a local file and then use Deployer's cp function.

@schmengler
Copy link
Contributor Author

Good question. Your suggestion sounds reasonable, and I don't have a better idea

@osrecio osrecio added the enhancement New feature or request label Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants