Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer outdated does not know about extra.symfony.require (lts) #485

Closed
c33s opened this issue Apr 11, 2019 · 3 comments
Closed

composer outdated does not know about extra.symfony.require (lts) #485

c33s opened this issue Apr 11, 2019 · 3 comments

Comments

@c33s
Copy link

c33s commented Apr 11, 2019

as composer does not know anything about extra.symfony.require the command composer outdated results in a wrong output if the developer wants to stick with symfony lts.

being on symfony/console 3.4.1 should show an available update to 3.4.24 but not to 4.2.5 if extra.symfony.require is set to 3.4.*.

My composer.json:

composer create-project symfony/skeleton:~3.4.0 my_project

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.0.8",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "symfony/console": "3.4.*",
        "symfony/dotenv": "3.4.*",
        "symfony/flex": "^1.1",
        "symfony/framework-bundle": "3.4.*",
        "symfony/yaml": "3.4.*"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "3.4.*"
        }
    }
}

When I run this command:

λ composer outdated

I get the following output:

symfony/cache                v3.4.24 v4.2.5  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/class-loader         v3.4.24 v3.4.24 Symfony ClassLoader Component
symfony/config               v3.4.24 v4.2.5  Symfony Config Component
symfony/console              v3.4.24 v4.2.5  Symfony Console Component
symfony/debug                v3.4.24 v4.2.5  Symfony Debug Component
symfony/dependency-injection v3.4.24 v4.2.5  Symfony DependencyInjection Component
symfony/dotenv               v3.4.24 v4.2.5  Registers environment variables from a .env file
symfony/event-dispatcher     v3.4.24 v4.2.5  Symfony EventDispatcher Component
symfony/filesystem           v3.4.24 v4.2.5  Symfony Filesystem Component
symfony/finder               v3.4.24 v4.2.5  Symfony Finder Component
symfony/flex                 v1.2.0  v1.2.1  Composer plugin for Symfony
symfony/framework-bundle     v3.4.24 v4.2.5  Symfony FrameworkBundle
symfony/http-foundation      v3.4.24 v4.2.5  Symfony HttpFoundation Component
symfony/http-kernel          v3.4.24 v4.2.5  Symfony HttpKernel Component
symfony/polyfill-apcu        v1.10.0 v1.11.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-mbstring    v1.10.0 v1.11.0 Symfony polyfill for the Mbstring extension
symfony/routing              v3.4.24 v4.2.5  Symfony Routing Component
symfony/yaml                 v3.4.23 v4.2.5  Symfony Yaml Component

it would be nice to have the following output:

symfony/flex                 v1.2.0  v1.2.1  Composer plugin for Symfony
symfony/polyfill-apcu        v1.10.0 v1.11.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-mbstring    v1.10.0 v1.11.0 Symfony polyfill for the Mbstring extension
symfony/yaml                 v3.4.23 v3.4.24  Symfony Yaml Component

as extra.symfony.require is a symfony feature i suspected that the issue at composer/composer will be closed. so maybe this can be handled in flex.

Closing this because I don't think we wanna support such custom flags, and as discussed with the Flex folks, the need for this Flex feature is something we are trying to fix entirely in Composer 2, so I really don't want to add custom support for it in Composer now.

composer/composer#8084 (comment)

@nicolas-grekas
Copy link
Member

see #437 and the related issue - looks like conflicting expectations :)

@c33s
Copy link
Author

c33s commented Apr 11, 2019

@nicolas-grekas thanks, already have seen that. wouldn't say conflicting would say "boolable" expectations. a way to solve this would be to add a flag for this.

@nicolas-grekas
Copy link
Member

composer up symfony/* and done :)

tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants