705 Commits (68847ed60907901f5c29d2b82e8d41b265c29bbf)

Author SHA1 Message Date
Nils Adermann edef748169 Solver: Clarify when/why undecided literals can get skipped in analyze 4 years ago
Nils Adermann 851050e85c Solver: multiconflict analyze handles positive decision same as regular literal 4 years ago
Nils Adermann 6e05345be7 Solver: Move analyze handling of multiconflict rule to clearer location
This way we're not looking at the previous decision at the top of the
loop but working with the current decision at the bottom
4 years ago
Nils Adermann b34f916470 Solver: No need to check previous decision if we reached the first one 4 years ago
Nils Adermann 2631210493 Solver: analyze multi conflict rules in conflict resolution correctly 4 years ago
Jordi Boggiano 6f9b39180c
Add phpdocs 4 years ago
Jordi Boggiano 05dacbdabb
Rename DEV_MASTER_ALIAS to DEFAULT_BRANCH_ALIAS 4 years ago
Yanick Witschi ea0ce9dd7d Merge branch 'master' into filter-packages 4 years ago
Nils Adermann edd2aa27db
Add missing isVerbose argument to problem formatting call 4 years ago
Jordi Boggiano 83c64a9d19
Reuse operation formatting logic in downloaders 4 years ago
Jordi Boggiano 5aae7f4f20
Merge remote-tracking branch 'jderusse/optimize-compile' 4 years ago
Jordi Boggiano a797ee1322
Fix inline aliases not being loaded when extracting dev requirements, fixes #8954 4 years ago
Graham Campbell fa799970ad Replace whitelist with allow list 4 years ago
Jordi Boggiano 2fa58ccf96
Reduce amount of packages loaded by avoiding extensions of the constraint beyond the root constraint 4 years ago
Jordi Boggiano 4b9b499ce5
Fix issue loading aliases and fix markPackageNameForLoading when called twice in a row for same package it would overwrite the constraint the second time 4 years ago
Jordi Boggiano f2befc46c9
Avoid storing duplicate packages when loading the same package twice 4 years ago
Jordi Boggiano 67a88880ec
Get rid of EmptyConstraint 4 years ago
Jordi Boggiano cb19347031
Update to latest master 4 years ago
Yanick Witschi b6c436598b
Updated to latest semver intervals 4 years ago
Yanick Witschi 6ef47baca1
Added a todo for package dupes 4 years ago
Yanick Witschi 014e9d5dd1
Fixed last remaining pool builder test 4 years ago
Yanick Witschi 5097ed6480
Fixed another test 4 years ago
Yanick Witschi 5a835db24d
Fixed another partial update test 4 years ago
Yanick Witschi 7be24dccd9
Fixed some of the partial update tests 4 years ago
Yanick Witschi 225a6a0a82
Improved variable naming 4 years ago
Yanick Witschi 0955d38374
Simplify package loading 4 years ago
Yanick Witschi 779b56ab2b
Fixed psalm annotations 4 years ago
Yanick Witschi b00291cf21
CS 4 years ago
Yanick Witschi 00500f83c0
Using the current subset branch of @Seldaek to fix subset tests 4 years ago
Yanick Witschi 26877285ad
Filter duplicate packages 4 years ago
Yanick Witschi 2427bef238
Typo 4 years ago
Yanick Witschi bca88bdd4b
Fixed PoolBuilder running endlessly when packages do not exist 4 years ago
Yanick Witschi b87fc5bbfd
Added more poolbuilder test 4 years ago
Yanick Witschi d78c37edd2
Cleanup and added some more improvements, tests still failing 4 years ago
Nils Adermann 5dd4b456b9
PoolBuilder: Do not load any alternatives to pkgs replaced by fixed pkg 4 years ago
Nils Adermann bb4cabc0b9
PoolBuilder: Avoid loading any alternatives to fixed packages 4 years ago
Yanick Witschi 1c8865a5d1
Comment 4 years ago
Yanick Witschi 10555ecff3
Make sure there's always a constraint 4 years ago
Yanick Witschi 912aecb666
Removed name constraints 4 years ago
Yanick Witschi af7feade8f
POC 4 years ago
Jordi Boggiano a66a939b76
Merge pull request #8937 from Seldaek/optim-rules
Optimize rule creation for alias packages
4 years ago
Jordi Boggiano 1055be7936
Fix unfixing of packages when a replacer gets unfixed before a replacee, refs #8882 4 years ago
Nils Adermann 86e79fcce3
Merge pull request #8938 from Seldaek/drop-dead-code
Remove some dead code from RuleSetGenerator
4 years ago
Jordi Boggiano 718021724c
Deduplicate more content in complex problem output 4 years ago
Jordi Boggiano 9bd255d8f1
Remove some dead code from RuleSetGenerator 4 years ago
Jordi Boggiano 5a4709c3d6
Optimize rule creation for alias packages
This mainly benefits projects running updates with minimum-stability: dev
4 years ago
Jordi Boggiano 8a7f3a9a09
Avoid rendering problem output for dev-master aliases which is useless 4 years ago
Jordi Boggiano 5e5f9f8142
Remove unused RULE_INTERNAL_ALLOW_UPDATE 4 years ago
Jordi Boggiano c8efb50d39
Change the single requirement ignore from --ignore-platform-reqs=xx to --ignore-platform-req=xx to avoid BC issues 4 years ago
Jordi Boggiano 2ddf4346ef
Improve error reporting for RULE_PACKAGE_ALIAS 4 years ago
Jordi Boggiano 0ea9eafcaf
Add rules for aliased packages when an alias is added, fixes #8902 4 years ago
Jordi Boggiano c0f5c13516
RuleSetGenerator instance does not need to be kept around anymore 4 years ago
Jordi Boggiano e85da00dff
Add a way to ignore only some packages in --ignore-platform-reqs, and make the platform check ignore those packages which were ignored as requirements, fixes #8861 4 years ago
Jérémy Derussé 95e6e16b78
Use Semver compiled constraints 4 years ago
Jordi Boggiano c7fb15faf4
Update to MatchAllConstraint 4 years ago
Jordi Boggiano af6444353f
Refactor hint generation and whitespace handling in SolverProblemsException 4 years ago
Jordi Boggiano 98e5f81a5f
Fix detection of fixed package problems to include more cases, fixes #8910 4 years ago
Nils Adermann ff0717ad66
Merge pull request #8859 from Seldaek/deduplicate-problems
Deduplicate require/conflict rules which are the same but for different versions of the same package
4 years ago
Markus Staab 11930001fb
Added phpdoc types for PoolBuilder (#8862) 4 years ago
Jordi Boggiano 3a64acb53e
Make sure versions are ordered also in the satisfied by package lists 4 years ago
Jordi Boggiano 56a11b9c2c
Deduplicate require/conflict rules which are the same but for different versions of the same package, fixes #8851 4 years ago
Jordi Boggiano 81bf47ffa2
Use fully qualified calls in hot classes 4 years ago
Nils Adermann 56edd53046 Remove unnecessary implementation of interface method in abstract class 4 years ago
Nils Adermann 994a5b41c2
Provide default impl for abstract method in interface for PHP < 5.3.9 (#8837) 4 years ago
Jordi Boggiano 1d4185b844
Recommend ocramius/package-versions fork if needed to solve dependencies 4 years ago
Jordi Boggiano 34801239f1
Tweak problem wording slightly 4 years ago
Jordi Boggiano 0ab48a1773
Add composer-runtime-api platform package 4 years ago
Jordi Boggiano af18c2bd7d
Update semver, fix poolbuilder usage and optimize creation of filtering nameConstraints 4 years ago
Jordi Boggiano ba9d4793bc
Fix transaction order 4 years ago
Jordi Boggiano 3f338ee8d9
Make sure versions are sorted before they get trimmed in error output 4 years ago
Jordi Boggiano 80a7c40c76
Shorten long lists of similar versions in problem output, fixes #8743 4 years ago
Jordi Boggiano b6bad4eef6
Add options to configure repository priorities 4 years ago
Jordi Boggiano 8930f1b824
Add color to lock operations and dry run output 4 years ago
Jordi Boggiano 2e64e8dc2e
Avoid generating duplicate aliases in lock file if several aliased packages are installed 4 years ago
Jordi Boggiano 64f907f93f
Fix handling of aliases to use consistent format everywhere 4 years ago
Jordi Boggiano a695f686c3
Add some docblocks and make sure RepositorySet/PoolBuilder accept regular rootAliases and not pre-normalized ones 4 years ago
Markus Staab c30925e68d
extracted `VersionParser::DEV_MASTER_ALIAS` (#8742) 4 years ago
Jordi Boggiano b166ef4b58
Fix more phpstan errors 4 years ago
Jordi Boggiano 80505e745e
Fix phpstan issues 4 years ago
Adam Žurek 25cd2382cb
Raise phpstan level to 1 (#8027) 4 years ago
Jordi Boggiano 3e19e3b0f1
Show alias of version in package lists in problems 4 years ago
Jordi Boggiano e09dd9c10d
Detect packages which are only available in lock file and warn appropriately 4 years ago
Jordi Boggiano 8945936dbd
Deduplicate solver problems which list problems for dev-master AND 9999999-dev 4 years ago
Nils Adermann 415b36a1a1 Remove match types from Pool as these are no longer used 4 years ago
Nils Adermann 80a5fdf398 Remove obsolete rules and their generation
The only automatic conflict we have results from packages using the same name
either by literally having the same name and being different versions or they
replace the same name, so

- removed all types of obsolete rules
- simplified rule generation significantly
- got rid of provide filtering in the pool
- fixed some language in error handling
4 years ago
Nils Adermann 4e3d989978 A package providing a name should not conflict with a package replacing it
Simplified whatProvides, mustMatchName is unused, removed unused
function from policy
4 years ago
Jordi Boggiano 2b86df4003
Add a hint about being on v2 when things go wrong 4 years ago
Nils Adermann 4fab2c7759 Error wording use "thus cannot" instead of "can thus not" 4 years ago
Nils Adermann 9858718ef6 Give a clearer error message explaining how to update a conflicting locked dependency 4 years ago
Nils Adermann f7b5cbd1fc Lock file should not contain new aliases for packages which were not updated 4 years ago
Nils Adermann 5ad93959cf PoolBuilder: On partial update of a new dep with mutual replace, unfix replacer
Test also verifies provider does not get uninstalled in partial update
for another package name
4 years ago
Nils Adermann 613450e58a PoolBuilder: properly clean up alias packages when unfixing packages
Prevent aliases to be duplicated: no need to apply root aliases from
composer.json on packages currently locked, they should have their
aliases in the lock file, otherwise request an update.
4 years ago
Nils Adermann 2dfbf3692a PoolBuilder: Remove null default for io 4 years ago
Nils Adermann 14000e7575 PoolBuilder: Ensure alias references get removed when unfixing a locked package
Use the last key + 1 for an index instead of count, since we unset elements somtimes
4 years ago
Nils Adermann c270d3cfa6 PoolBuilder: make io non-nullable, NullIO can be used instead 4 years ago
Nils Adermann 71c3c63b54 Remove unused variable assignment 4 years ago
Nils Adermann 9fb09049ff Rename and document constants for partial update behavior 4 years ago
Nils Adermann fc40fefa6f Make sure nameConstraints is always set when loading a name 4 years ago
Nils Adermann 443553423b Mark replaced packages for update when using --with-dependencies
This is necessary to allow the requiring of new packages which replace
packages currently locked without requiring explicitly listing them as
an argument, so simplifies the composer require command
4 years ago
Nils Adermann 392d0abd21 Rename test files and standardize on allow list rather than whitelist 4 years ago
Nils Adermann 01fe92905a The update allow list is now generated while building the pool
This reduces code complexity while making partial updates more
predictable. This also allows composer require to successfully run a
partial update for a new package with transitive dependency updates.
4 years ago
Nils Adermann da84763f03 Move partial update handling to pool builder 4 years ago
Jordi Boggiano cf5513f28d
Fix syntax error 4 years ago
Nils Adermann 8a6382d78d Remove unnecessary TODOs and skip EmptyConstraint like null 4 years ago
Nils Adermann bbdbb3517b PoolBuilder: Drop name constraints loop, already set earlier in same code 4 years ago
Nils Adermann 59bc957e76 Simplify loading of fixed and root require packages in pool builder
additionally mark all packages replaced by fixed packages as loaded as
there is no need to load those names at all, since the fixed package
will provide them
4 years ago
Jordi Boggiano d58653627a Optimize loading of deps from fixed packages 4 years ago
Jordi Boggiano 82e2a679bf Add TODO note 4 years ago
Jordi Boggiano d09daa8d5a
Merge pull request #8684 from naderman/dev-require-errors
Handle dev extraction exit codes instead of completing broken lock with errors
4 years ago
Nils Adermann 281d8930ff For dev extraction skip pool building, we already have a working package set
Also reduce getProviders back to just providers, and add some todos
4 years ago
Jordi Boggiano 73a5cc63cc
Always use Removing for consistency between dry-run and actual install 4 years ago
Nils Adermann 06f460c557 Remove trailing spaces from output 4 years ago
Nils Adermann 1f467046d7 Implement getProviders on reposet for all repo types and add replacers
This way errors during require dev extraction make more sense
4 years ago
Jordi Boggiano 589aa351a8
Change Uninstalling to Removing in lock operations 4 years ago
Jordi Boggiano a7a975ec1c
Alias dev-master/trunk/default to 9999999-dev instead of normalizing the version to that, fixes #8323 4 years ago
Jordi Boggiano 9cab8c10cc
Merge branch 'master' into 2.0 4 years ago
arai 1f08138379 Delete variable 4 years ago
Jordi Boggiano 835a91532d
Add PRE_POOL_CREATE event, fixes #8348 4 years ago
Jordi Boggiano 9609729de7
Change update to upgrade for package update operations which are upgrades, refs #8594 4 years ago
Jordi Boggiano be8dd528b8
Merge remote-tracking branch 'origin/master' into 2.0 4 years ago
Ion Bazan a180f48921 Distinguish between updates and downgrades in dry-run 4 years ago
Nils Adermann fdfdee03c1 Remove unused argument to pool->match 4 years ago
Nils Adermann 4f44b7b221 Remove unused policy function findUpdatePackages 4 years ago
Jordi Boggiano 189d5adab0
Fix reporting of replace conflicts to not mention provides 4 years ago
Jordi Boggiano ec90c17e3b
Fix conflict order to be more accurate 4 years ago
Jordi Boggiano c41df325d8
Remove RepositorySet from Solver and remove getPool from RepositorySet 4 years ago
Jordi Boggiano 1d4cdb60d0
Improve error reporting for conflicts/replaces of various kinds, fixes #7254 4 years ago
Jordi Boggiano 6c9d9e775c
Clean up and deduplicate the output of RULE_LEARNED 4 years ago
Jordi Boggiano 29efc473a1
Suggest which providers could be required to fulfill a virtual package requirement, fixes #2811 4 years ago
Jordi Boggiano 3fc7e10c5c
Improve error reporting of solver issues, refs #7779
Fixes #8525
Fixes #6513
4 years ago
Jordi Boggiano 8a41f1a5ca
Allow providers which are selected to be installed in place of existing packages which do not satisfy requirements, fixes #6753 4 years ago
Nils Adermann 8b877eb068 Remove superfluous check in Problem 5 years ago
Nils Adermann 0b4e8952f6 PHP5 disallows require as a function name, use requireName analog to fixPackage 5 years ago
Nils Adermann 5bdc0fc9c5 Request jobs replaced by root require / fixed package
The only type of request job remaining was "install" which is really a
root requirement. The only other kind of input for the solver is now a
set of fixed packages.

Rules have been updated to account for only two kinds of former job
reason: FIXED or ROOT_REQUIRE. The job property has always been
redundant and has been removed, since reasonData suffices.

Problem reasons are always rules, so the unnecessary wrapping in an
array has been removed.

We now only ever generate a single rule per root require or fixed
package, so there is no need for the solver to special handle disabling
"jobs" anymore, the rule can just be disabled as usual.

For consistency special handling of rules for jobs in problems has been
integrated into the rule class like all other rule reasons. As part of
this change the error message for root requirements has been improved a
bit to make it clearer where the package installation request came from.

The word job has also been removed from operations, which are called
operations, not jobs.
5 years ago
Jordi Boggiano 1d31190472
Keep track of unacceptable fixed packages for later to use in error reporting and make sure the pool state is consistent 5 years ago
Jordi Boggiano c6a3f48eaf
Remove some more remove request handling 5 years ago
Jordi Boggiano 7cc8a4aed8
Avoid checking stability on platform packages too 5 years ago
Jordi Boggiano 6dc576738a
Avoid partial updates from applying changes to packages which are not locked with an acceptable stability 5 years ago
Jordi Boggiano e162cc6f0a
Remove "remove" from request 5 years ago
Jordi Boggiano 304753ff69
Remove callback and pass stabilities all the way instead
This allows optimizing the loading of ~dev files, and cleans up a few things
5 years ago
Jordi Boggiano 8bb472a608
No need to alias platform packages before the repository set as the pool builder already does it 5 years ago
Jordi Boggiano 572ef1add1
Add comment for lockable 5 years ago
Jordi Boggiano cc91e9164a
Stop unrolling the root aliases 5 years ago
Jordi Boggiano 73bc137c3c
Avoid nameConstraints from being collected for fixed packages 5 years ago
Jordi Boggiano e50f78043a
Try to load packages from lock file only and avoid loading other versions for pinned packages 5 years ago
Jordi Boggiano e6749d8717
Add comment, fix 5.3 build 5 years ago
Jordi Boggiano dd556f989b
Use LockArrayRepository instead of RepositoryInterface to clearly indicate which type of repo it is in some places 5 years ago
Jordi Boggiano f68731e663
Remove package/repo priority concept as it is enforced by the pool builder now 5 years ago
Jordi Boggiano 47a94b3a88
Ensure packages that exist in a higher prio repo never get loaded in lower prio repos, fixes #5076 5 years ago
Yanick Witschi d1dc367d86 Removed the filters from the pool 5 years ago