There are some scripts that are executed after I run composer.
The problem is that they do things that I don't want, like php assets:install
(without --symlink).
So I need to either be able to remove that, or add my own script to do php assets:install --symlink
.
What would be the correct way for doing this?
EDIT
In Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets()
I can see an option for symlink:
if ($options['symfony-assets-install'] == 'symlink') {
$symlink = '--symlink ';
Is that configurable somewhere?
When you run composer update command it simply process the composer. json file and install dependencies, And creates the composer. lock file with updated dependencies. It does not process the composer.
To update your packagesNavigate to the root of your git repo, where your composer. json file is. Run composer update (on your local machine) to update the required packages and re-generate a composer. lock file.
To install assets with symlinks edit your composer.json (at the end) in this way
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "symlink"
}
Then run composer as uusal.
If you use composer to deploy to production environments, you may want to set the environment variable SYMFONY_ASSETS_INSTALL
to symlink
instead. This way production still uses hard copies which is the recommended option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With