I'm going through a new test Symfony 5 install right now, and I'm on this section of the docs:
https://symfony.com/doc/5.4/page_creation.html#rendering-a-template
I ran composer require twig, and it says it's installing it, then when composer runs 'Unpacking Symfony packs', it then states "Removing symfony/twig-pack (v1.0.1)"...
I notice later in my VCS that nothing changed in composer.json and composer.lock, so the command at least didn't change any non-gitignored files. I notice twig/twig is specified as a dependency for packages all over composer.lock, so maybe it's just using one of those...? I'm a little confused at this point.
So my questions are: Why did it install it if it's already in composer.lock, and why then did it remove it? Am I reading the output wrong?
I think some of the output is from Symfony's composer.json "scripts" section, which was pre-written by running:
composer create-project symfony/skeleton:"^5.4" my_project_directory
cd my_project_directory
composer require webapp
from this page: https://symfony.com/doc/5.4/setup.html#creating-symfony-applications
Relevant pre-existing auto-generated composer.json specs:
"symfony/framework-bundle": "5.4.*",
"symfony/twig-bundle": "5.4.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
Here's my composer output... sorry for the long post, should be easy to pick out relevant points anyway:
symfony-5 % composer require twig
Using version ^1.0 for symfony/twig-pack
./composer.json has been updated
Running composer update symfony/twig-pack
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking symfony/twig-pack (v1.0.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing symfony/twig-pack (v1.0.1): Extracting archive
Generating optimized autoload files
115 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Run composer recipes at any time to see the status of your Symfony recipes.
Unpacking Symfony packs
- Unpacked symfony/twig-pack
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
- Removing symfony/twig-pack (v1.0.1)
Generating optimized autoload files
114 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script cache:clear [OK]
Executing script assets:install public [OK]
No security vulnerability advisories found
No security vulnerability advisories found
Also, I'm scratching my chin on why "No security vulnerability advisories found" is being outputted twice...