Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Colin O'Dell:
Avoid Unsupported Symfony Component Versions With This Composer Metapackage
Sep 12, 2018 @ 11:55:05

In a new post to his site Colin O'Dell has shared a Composer "metapackage" that can help you avoid unsupported Symfony component versions with the help of Composer's own internal version checking system.

Using symfony/symfony makes Composer install all Symfony Components in the same version. But when using the standalone packages, Composer might install dependencies in a different major version - for example, symfony/validator v2.8 is compatible with symfony/translation v3.0.

This is fine if you don't want to stick strictly to Symfony LTS versions, but it does mean that you could end up using versions of components which no longer receive security updates.

Rather than having to specifically define (and manage) the versions of package you want to install, you could opt to install his package that will do the hard work for you. It uses the "conflict" handling in the Composer configuration to limit version numbers on many of the popular Symfony packages and requires them to be greater than or equal to certain versions.

tagged: symfony component composer metapackage unsupported versions check

Link: https://www.colinodell.com/blog/201809/avoid-unsupported-symfony-component-versions-composer-metapackage