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

Provide a way to setDefaultConfiguration programmatically #66

Open
YetiCGN opened this issue Jul 2, 2018 · 1 comment
Open

Provide a way to setDefaultConfiguration programmatically #66

YetiCGN opened this issue Jul 2, 2018 · 1 comment

Comments

@YetiCGN
Copy link

YetiCGN commented Jul 2, 2018

I've noticed in src/Configuration/DefaultConfiguration.php that the code assumes a lot of configuration defaults depending on the Symfony version used. So for 3.4 and up it already assumes the Symfony 4 directory structure. But it's entirely possible to run a project on Symfony 3.4 LTS and even 4.1 and still use the "old" layout.

Please provide an easy way to select either of the three configuration presets to save a couple of lines to set everything back to what's actually used.

The magic here made it a bit difficult to determine why our deployment was failing for a Symfony 3.4 project. You could also check your assumptions against the "extra" section in the composer.json, where some of the directories are configured.

Current code:

            ->configDir('app/config')
            ->logDir('var/logs')
            ->templatesDir('app/Resources/views')
            ->webDir('web')
            ->sharedFilesAndDirs(['app/config/parameters.yml', 'var/logs'])
            ->writableDirs(['var/cache/', 'var/logs/'])
            ->controllersToRemove(['web/app_*.php'])

Should be more like:

            ->directoryStructure(DefaultDeployer::SYMFONY_3)
@jbourdic
Copy link

jbourdic commented Aug 9, 2018

@YetiCGN great job !

I reference your PR

YetiCGN added a commit to YetiCGN/easy-deploy-bundle that referenced this issue Aug 13, 2018
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

2 participants