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

[flex] Symfony 3.x and 4.x removed from Flex endpoint. "extra.symfony.require" has no effect. #1181

Closed
ureimers opened this issue Mar 13, 2023 · 6 comments

Comments

@ureimers
Copy link

ureimers commented Mar 13, 2023

Hello,

we were trying to update our Composer dependencies of our Symfony 4.4 project this morning and realized, that various Symfony components got updated to their Symfony 5.x version.

After some digging, we found out, that the typical Restricting packages listed in "symfony/symfony" to "4.4.*" message wasn't displayed any longer. And after digging into the Flex plugin's code, we found the link to the main flex json: https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json

This lead us to this repo, where we found out, that yesterday, the index.json was updated. See: 4058a63

All Symfony 3.x and 4.x splits where removed, which makes composer fallback to the highest version possible.

This can easily be reproduced by calling composer create-project symfony/skeleton:"4.4.*" my_project_directory: The created project uses a variety of Symfony 5.x components, although its composer.json restricts them to 4.4.*.

This makes composer up unusable without manually restricting every Symfony component to 4.4.*.

Can someone help? How is this file generated?

@ureimers ureimers changed the title [flex] Symfony 3.x and 4.x removed from Flex endpoint. "extra.symfony.require" have no effect. [flex] Symfony 3.x and 4.x removed from Flex endpoint. "extra.symfony.require" has no effect. Mar 13, 2023
@fabpot
Copy link
Member

fabpot commented Mar 13, 2023

I know why these versions were removed: they are not maintained anymore.
@nicolas-grekas We need to find another way here :)

@ureimers
Copy link
Author

Ah, okay. We had thought about that as well, but as the end-of-bug-fixes was already in November 2022 but the versions were removed just yesterday, we thought it must be something else.

But I see your point, I guess: "Why keep an unmaintained version in Flex' main file?" For 3.x that may hold true, but as 4.x is still receiving security fixes, I think, it should still be listed in the file. And after its EOL you'd still want it to be able to fix/limit its version number. ...gets trickier, the more I think about it.

@jakubtobiasz
Copy link

jakubtobiasz commented Mar 23, 2023

Hi!
In case you need a hotfix until the issue has been resolved:

    "extra": {
         ...
+        "symfony": {
+            "endpoint": [
+             "https://raw.githubusercontent.com/symfony/recipes/c8d90298241f176a261dadc4814d7058415a4c1f/index.json"
+            ]
        }
    },

It sets the Flex endpoint to the version when it worked. Of course, it should be replaced once the bug fixed, but for now, it does the job :).

@jordisala1991
Copy link

But 4.4 is supported until november right? At least for security issues.

@ureimers
Copy link
Author

@jordisala1991 correct.

But 4.4 is supported until november right? At least for security issues.

Even after that, versions that are no longer supported should still be working with composer. You'd just get the most current old version of each Symfony component ;-)

@fabpot
Copy link
Member

fabpot commented Mar 29, 2023

I've just fixed it.

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

4 participants