composer-versions-check icon indicating copy to clipboard operation
composer-versions-check copied to clipboard

Allow to use symfony LTS

Open c33s opened this issue 7 years ago • 5 comments

currently the most current symfony version is 4.0.3, the most current LTS version is 3.4.3.

this is the relevant part from composer.json

        "php": "^7.1.0",
        "ext-iconv": "*",
        "sensio/framework-extra-bundle": "^5.1",
        "symfony/asset": "^3.4",
        "symfony/browser-kit": "^3.4",
        "symfony/console": "^3.4",
        "symfony/css-selector": "^3.4",
        "symfony/debug-pack": "*",
        "symfony/expression-language": "^3.4",
        "symfony/flex": "^1.0",
        "symfony/framework-bundle": "^3.4",
        "symfony/form": "^3.4",
        "symfony/lts": "^3",
        "symfony/orm-pack": "*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/process": "^3.4",
        "symfony/security-bundle": "^3.4",
        "symfony/serializer-pack": "*",
        "symfony/validator": "^3.4",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/web-link": "^3.4",
        "symfony/yaml": "^3.4"

on an update the plugin outputs:

43 packages are not up to date:

  - ocramius/proxy-manager (2.1.1) latest is 2.2.0
  - phpdocumentor/type-resolver (0.4.0) latest is 0.5.0
  - symfony/asset (v3.4.3) latest is v4.0.3
  - symfony/browser-kit (v3.4.3) latest is v4.0.3
  - symfony/cache (v3.4.3) latest is v4.0.3
  - symfony/config (v3.4.3) latest is v4.0.3
  - symfony/console (v3.4.3) latest is v4.0.3
  - symfony/css-selector (v3.4.3) latest is v4.0.3
  - symfony/debug (v3.4.3) latest is v4.0.3
  - symfony/debug-bundle (v3.4.3) latest is v4.0.3
  - symfony/dependency-injection (v3.4.3) latest is v4.0.3
  - symfony/doctrine-bridge (v3.4.3) latest is v4.0.3
  - symfony/dom-crawler (v3.4.3) latest is v4.0.3
  - symfony/dotenv (v3.4.3) latest is v4.0.3
  - symfony/event-dispatcher (v3.4.3) latest is v4.0.3
  - symfony/expression-language (v3.4.3) latest is v4.0.3
  - symfony/filesystem (v3.4.3) latest is v4.0.3
  - symfony/finder (v3.4.3) latest is v4.0.3
  - symfony/form (v3.4.3) latest is v4.0.3
  - symfony/framework-bundle (v3.4.3) latest is v4.0.3
  - symfony/http-foundation (v3.4.3) latest is v4.0.3
  - symfony/http-kernel (v3.4.3) latest is v4.0.3
  - symfony/inflector (v3.4.3) latest is v4.0.3
  - symfony/intl (v3.4.3) latest is v4.0.3
  - symfony/monolog-bridge (v3.4.3) latest is v4.0.3
  - symfony/options-resolver (v3.4.3) latest is v4.0.3
  - symfony/phpunit-bridge (v3.4.3) latest is v4.0.3
  - symfony/process (v3.4.3) latest is v4.0.3
  - symfony/property-access (v3.4.3) latest is v4.0.3
  - symfony/property-info (v3.4.3) latest is v4.0.3
  - symfony/routing (v3.4.3) latest is v4.0.3
  - symfony/security (v3.4.3) latest is v4.0.3
  - symfony/security-bundle (v3.4.3) latest is v4.0.3
  - symfony/serializer (v3.4.3) latest is v4.0.3
  - symfony/stopwatch (v3.4.3) latest is v4.0.3
  - symfony/translation (v3.4.3) latest is v4.0.3
  - symfony/twig-bridge (v3.4.3) latest is v4.0.3
  - symfony/twig-bundle (v3.4.3) latest is v4.0.3
  - symfony/validator (v3.4.3) latest is v4.0.3
  - symfony/var-dumper (v3.4.3) latest is v4.0.3
  - symfony/web-link (v3.4.3) latest is v4.0.3
  - symfony/web-profiler-bundle (v3.4.3) latest is v4.0.3
  - symfony/yaml (v3.4.3) latest is v4.0.3

as this is all coupled to the symfony lts 3.x it will allways pullute the output of this plugin, which makes it less handy than before.

thinking about it, let it look a little complex for me. on one side i want to see all new versions, also from my subdependencies on the other side i don't want to see subdependency versions which are higher than my symfony LTS. just ignoring major versions also doesn't really help. i would like to see of a non symfony package, for example a friendofsymfony package has a new major version. only working with a blacklist, whould make really huge lists, if i have to put all the packages above in it.

any good ideas how to solve this?

this is related to #30 #29 #28 maybe #33

c33s avatar Jan 12 '18 12:01 c33s

Hello,

None of the issue you linked would solve your case:

  • #30 Direct dependencies of symfony would still yelling about the new major
  • #29 If you ignore a package, it will be always ignored, even for minor/patch versions
  • #28 This option aim to be global
  • #33 I don't see the relation. :thinking:

To answer to the issue itself, the plugin uses the same information as the composer outdated command.

The "LTS" term is something related only to Symfony, there is no any information about that on composer neither packagist, so I really don't see how we can solve it. :confused:

Maybe an issue on composer about LTS releases would be a good start?

soullivaneuh avatar Jan 15 '18 16:01 soullivaneuh

since symfony flex there is an information about the symfony version to use.

in composer.json you have the extra > symfony > require property:

    "extra": {
        "symfony": {
            "id": "",
            "allow-contrib": false,
            "require": "3.4.*",
          }
    }

c33s avatar Apr 05 '19 13:04 c33s

Right, so you want composer-versions-check to not tell about outdated packages if you have the symfony.require option enabled, right?

If you want to write a PR about that, I'll be glad to take a look. :+1:

However, it must be optional. One great addition would be to tell when a new LTS version is available.

soullivaneuh avatar Apr 05 '19 14:04 soullivaneuh

todays most current symfony versions: 3.4.24, 4.2.5

if i have a project with the following versions with composer require set to 3.4.*:

  1. symfony/console: '3.4.1' -> 3.2.4
  2. symfony/process: '3.4.24'
  3. doctrine/orm: '2.6.1' -> 2.6.3
  4. monolog/monolog: '1.24.0'
  5. symfony/dotenv: '4.2.3->4.2.5`
  6. symfony/expression-language: '4.2.5`

so the require setting should only supress notifications for symfony components starting with 3.4 where the upgrade would lead to a version number higher than in the require propterty but ideally allow to upgrade a 4.x component to the next available version

your suggestion to create a ticket at composers repo is worth a try but for that i have to do some tests before.

respective the PR, sadly i currently really low on time. i i have some left i can have a look at the code (havn't coded a composer plugin before)

c33s avatar Apr 05 '19 15:04 c33s

maybe interesting: https://github.com/composer/composer/pull/7682

c33s avatar Apr 05 '19 16:04 c33s