Skip to content

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Nov 14, 2025

At the moment, running composer dump-env on a 7.4 project generates a broken APP_SHARE_DIR.
The reason is that since symfony/recipes#1465 we define that var as "$APP_PROJECT_DIR/var/share"
Yet, when the command runs, all env vars are emptied to make the result context-free.

This fixes it by hooking into calls to the getenv() function.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Nov 14, 2025

We might also want to make http-kernel conflict with affected versions of flex so that ppl are forced to update flex when moving to 7.4 and don't fall into this issue.

@nicolas-grekas nicolas-grekas merged commit 9cd3847 into 2.x Nov 16, 2025
5 of 6 checks passed
@nicolas-grekas nicolas-grekas deleted the project-dir branch November 16, 2025 09:38
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Nov 16, 2025
…ekas)

This PR was merged into the 7.4 branch.

Discussion
----------

[HttpKernel] Conflict with symfony/flex < 2.10

| Q             | A
| ------------- | ---
| Branch?       | 7.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

symfony/flex#1070 is a mandatory fix to have the new `APP_SHARE_DIR` env var work correctly.
This will also encourage people to change their flex requirement: at the moment, it's very easy to forget to bump to `^2` when your project already has a `^1` constraint. Yet, flex v1 isn't maintained anymore.

Commits
-------

af9703c [HttpKernel] Conflict with symfony/flex < 2.10
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

Successfully merging this pull request may close these issues.

2 participants