-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add SYMFONY_REQUIRE env var + disable recipes when flex is not in the root composer.json #409
Conversation
For before: with |
PR now handles a new This will also allow deprecating |
@nicolas-grekas is it possible to set |
@BoShurik I forgot to mention it, but Yes! I even plan to use it in our skeletons to replace |
PR ready, works as expected in symfony/symfony#28199 |
$this->io = $io; | ||
$config = $composer->getConfig(); | ||
$this->rfs = $rfs; | ||
$this->cache = new ComposerCache($io, $config->get('cache-repo-dir').'/'.preg_replace('{[^a-z0-9.]}i', '-', $this->endpoint)); | ||
$this->sess = bin2hex(random_bytes(16)); | ||
|
||
if (self::$DEFAULT_ENDPOINT !== $endpoint) { | ||
$this->io->writeError('<warning>Warning: Using '.$endpoint.' as the Symfony endpoint</warning>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning moved below, so that unrelated Composer commands don't display it.
I removed the special handling of the "none" endpoint. Instead, flex disables recipes (displaying a warning) when it can't find itself in the "require" of the root composer.json |
src/Downloader.php
Outdated
'manifests' => [], | ||
'vulnerabilities' => [], | ||
'locks' => [], | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don"t think this is needed and should probably be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L135 populates $bodies with empty arrays, that's why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pfff but the "if" L135 also prevents it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this code works right now without adding this, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
… root composer.json
Thank you @nicolas-grekas. |
…is not in the root composer.json (nicolas-grekas) This PR was squashed before being merged into the 1.0-dev branch (closes #409). Discussion ---------- Add SYMFONY_REQUIRE env var + disable recipes when flex is not in the root composer.json The C.I. for `symfony/symfony` is starting to fail transiently because solving the dependency graph takes too much memory. See e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.39377 But thanks to recent improvements in Flex, we know why and how to fix that: skipping old tags. This PR allows using Flex while disabling the recipes subsystem and allows configuring the minimum version of components we give to the solver. I plan to use the next version of Flex that embeds this PR (could be v1.1.0 btw) on `symfony/symfony`. Commits ------- 8649abc Add SYMFONY_REQUIRE env var + disable recipes when flex is not in the root composer.json
… (nicolas-grekas) This PR was merged into the 2.8 branch. Discussion ---------- [travis][appveyor] use symfony/flex to accelerate builds | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Playing with symfony/flex#409 The optimization is required because appveyor is transiently failing with OOM errors, see e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.39377 Commits ------- 940ec8f [travis][appveyor] use symfony/flex to accelerate builds
… (nicolas-grekas) This PR was merged into the 2.8 branch. Discussion ---------- [travis][appveyor] use symfony/flex to accelerate builds | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Playing with symfony/flex#409 The optimization is required because appveyor is transiently failing with OOM errors, see e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.39377 Commits ------- 940ec8f [travis][appveyor] use symfony/flex to accelerate builds
… (nicolas-grekas) This PR was merged into the 2.8 branch. Discussion ---------- [travis][appveyor] use symfony/flex to accelerate builds | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Playing with symfony/flex#409 The optimization is required because appveyor is transiently failing with OOM errors, see e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.39377 Commits ------- 940ec8f [travis][appveyor] use symfony/flex to accelerate builds
… (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- Use extra.symfony.require to restrict versions of symfony/* Proposed way to leverage symfony/flex#409 Benefits: - no `symfony/lts` / `symfony/force-lowest` anymore - only one line to change to upgrade to next minor - better control of exact minor used (right now, skeleton:4.0 pulls 4.1 components) - (and a lot less merge conflicts for us when merging 3.4 up to master); Commits ------- 32dec7e Use extra.symfony.require to restrict versions of symfony/*
… (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- Use extra.symfony.require to restrict versions of symfony/* Same as symfony/skeleton#93 on website-skeleton. See symfony/flex#409 Commits ------- b899463 Use extra.symfony.require to restrict versions of symfony/*
The C.I. for
symfony/symfony
is starting to fail transiently because solving the dependency graph takes too much memory.See e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.39377
But thanks to recent improvements in Flex, we know why and how to fix that: skipping old tags.
This PR allows using Flex while disabling the recipes subsystem and allows configuring the minimum version of components we give to the solver.
I plan to use the next version of Flex that embeds this PR (could be v1.1.0 btw) on
symfony/symfony
.