Pass the --symfony-version option to the build configuration - #210
Open
Amoifr wants to merge 2 commits into
Open
Pass the --symfony-version option to the build configuration#210Amoifr wants to merge 2 commits into
Amoifr wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Built on top of #209, since both touch
src/Application.phpand this PR extends the test file added there. Please merge #209 first — the diff shown here will shrink accordingly.Application::__construct()takes a$symfonyVersion… and drops it on the floor. It's never passed toBuildConfig, so--symfony-version(andSYMFONY_VERSION) have no effect: every build silently usesBuildConfig's own default of4.4.Easy to see:
So every
:class:,:method:and:namespace:link points at the wrong branch.The fix wires the version into
BuildConfigwhen one is given. After it, the same command yieldsblob/6.4, andSYMFONY_VERSION=7.4yieldsblob/7.4.On the default. The binary used to fall back to
'master'— a branch that doesn't exist onsymfony/symfonyanymore, and which would have produced 404 links the moment the value was actually honored. Rather than resurrect it, the fallback is now "no version given", which leavesBuildConfig's default (4.4) in place: builds that pass no option keep behaving exactly as they do today. The option's displayed default now reads fromBuildConfigtoo, so--helpno longer advertises a value the builder doesn't use.Happy to make the default something more current than
4.4if you'd like — that felt like your call rather than mine, so I left it alone.Tests cover the three paths through the binary: the option, the env var, and the default. The first two fail without the fix (the built HTML links to
4.4instead of the requested branch).Full suite green: 72 tests, 162 assertions.