How to generate .yml parameters for .yml.dist parameters without installing / updating linker

I have a question. I want to know if there are alternative ways to generate .yml parameters for .yml.dist parameters without installing / updating the composer. During installation / updating of the composer, the file is created and overwritten accordingly. But I am looking to do without a composer. I wonder if there are symfony console commands for this. Does anyone have an answer?

+5
source share
1 answer

You can just run composer run-script post-install-cmd

Most likely, it will run some other scripts (in the Symfony configuration, by default they work with cache, bootstrap, etc.).

If you want to use the parameters only , create a new section in the Composers / Scripts section. Like this:

 "scripts": { "post-install-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], "post-update-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], "build-params": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" ] }, ... 

and then just run composer run-script build-params

+16
source

All Articles