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

[Suggestion] Filter on framework versions #1048

Open
emulienfou opened this issue Nov 24, 2019 · 0 comments
Open

[Suggestion] Filter on framework versions #1048

emulienfou opened this issue Nov 24, 2019 · 0 comments
Labels

Comments

@emulienfou
Copy link

Hello there, has I suggested recently on the Symfony Devs Slack, I think it would be very useful to have the possibility to filter packages by framework specific version.

Why should you add that?

This feature would be very helpful for developers who seek to find a package compatible with a specific version of a framework.
By example, if someone wants to build a website with Symfony 5 (who has just been released), will find all available packages compatible with this major version.
This feature will be also really helpful when a new major version of a framework (Symfony) has just been released and developers who want to contribute to make this package compatible with this new major version will be able to find package who need to be upgraded.

Is keywords can do the job?

Has proposed by someone could be used to filter specific version of Symfony by example.
However this means each package author need to had the "perfect" keyword in the composer.json file to be able to have a filtering system 100% accurate.

How could you achieve this?

The best way to achieve this goal would be to parse the packages listed in composer.json under the require and require-dev keys and analyse the version required.
The parser would also need to check the package type symfony-bridge, symfony-bundle.
Let's take a example with the next composer.json file from symfony/monolog-bundle:

{
    "type": "symfony-bridge",
    "require": {
        "php": ">=5.6",
        "symfony/monolog-bridge": "~3.4 || ~4.0 || ^5.0",
        "symfony/dependency-injection": "~3.4.10 || ^4.0.10 || ^5.0",
        "symfony/config": "~3.4 || ~4.0 || ^5.0",
        "symfony/http-kernel": "~3.4 || ~4.0 || ^5.0",
        "monolog/monolog": "~1.22 || ~2.0"
    },
    "require-dev": {
        "symfony/yaml": "~3.4 || ~4.0 || ^5.0",
        "symfony/console": "~3.4 || ~4.0 || ^5.0",
        "symfony/phpunit-bridge": "^3.4.19 || ^4.0 || ^5.0"
    },
}

This package seems to be compatible with the next versions of Symfony: 3.4, 4.0 and 5.0 due to the dependencies versions listed above but also because the type is symfony-bridge.
So with this information, a user will be able to filter packages by specifying the Symfony version 3.4, 4.0 or 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants