658 Commits (152694b5740b0be0049e2eec15b13e368b494071)

Author SHA1 Message Date
Andrés De la Cruz 480a6439fd
Fix phpstan phpdocs issues (#9478) 4 years ago
Nils Adermann 27f200caf1 Create ROOT_ALIAS rules inside package rule generation 4 years ago
Nils Adermann 4215344c93 Rule generator cleanup: no need for 2 added package arrays, more specific root alias rule 4 years ago
Jordi Boggiano b7e1383083
Make sure the alias package gets added to conflict rules etc, and only add it if aliased package is actually added 4 years ago
Jordi Boggiano 7b183956d8
Make sure the root aliases always get installed when a package is updated, fixes #9448 4 years ago
Jordi Boggiano 769ce48289
Fix typo 4 years ago
Jordi Boggiano e770cb4dcf
Fix var name 4 years ago
Jordi Boggiano 2d4e1e0dce
Make sure Transaction sorts operations correctly to begin with 4 years ago
Jordi Boggiano b74afd772b
Merge pull request #9309 from naderman/fix-solver-9290
MultiConflictRule conflict analysis handling on level 1 decisions
4 years ago
Nils Adermann 9338401be7 CS: Typehint array, remove unnecessary docblock, call spl_object_hash once 4 years ago
Nils Adermann 7b4cb9c370 Solver: Prevent infinite recursion in analyzeUnsolvableRule
In complex scenarios reasons for learned rules can themselves be learned
rules caused by other learned rules which had the some of the same
reasons. In this situation iterating over all problem rules requires
keeping track of which rules have previously been analyzed to avoid and
endless loop.

Side effect is that the sorting of problems including learned rules
changes slightly.
4 years ago
Nils Adermann 9641ad6025 SolverProblemException: Hide learnt rules on output
Results in too much error output which is not helpful. Very repetitive
and hard to understand. In issue 8903 even leads to endless recursion
bug.
4 years ago
Nils Adermann 7f41698157 Solver: on analyze, when reaching last decision > l1 skip other multi rule literals 4 years ago
Jordi Boggiano 99a5469b5e
More hints 4 years ago
Jordi Boggiano 59acf9d4aa
Remove dev hint for 2.0, fixes #8738 4 years ago
Jordi Boggiano 8d0596163c
Rename abstract class back to the previously present SolverOperation, mark it internal, reintroduce some duplication 4 years ago
Bezpiatov 140de5480d Fixed variable usage 4 years ago
Bezpiatov 9a5121ed27 Refactor Operation classes to use constants instead of strings for comparison 4 years ago
Nils Adermann 8a2bae82ab Improve docblocks on fixed/locked/fixedLocked packages in request
Also fixes two small code review issues
4 years ago
Nils Adermann fdde9e5933 On composer install we fix locked packages, but consider them locked for error reporting 4 years ago
Nils Adermann 74fb313c39 Separate locked packages from fixed packages in request
Locked packages are basically like removable fixed packages, so we still
only load one version, but we do not require their installation unless
something the user needs requires their use. So they automatically get
removed if they are no longer needed on any update.
4 years ago
Nils Adermann 73e24ea9fb Partial updates should remove all unused dependencies
Instead of marking locked packages as fixed, we change the pool builder
to load only the locked version and treat it like a fixed package, but
removing the actual request fix, makes the solver treat it as a regular
optional dependency. As a consequence locked packages may be removed on
a partial update of another package, but they cannot be updated.
4 years ago
Nils Adermann 85eb007f4f Transaction: Define a total order on packages to keep behavior on PHP8
So far the ordering of alias packages with the same name was undefined
so the actual order was determined by implementation of the sorting
algorithm in PHP. As of PHP8 sort is stable by default which changes the
outcome in some of our test cases.

With the fully defined total order the order can longer change depending
on sorting algorithm used and remains the same across PHP versions.
4 years ago
Jordi Boggiano 24abd233ec
Merge branch 'master' into code-improvements 4 years ago
Jordi Boggiano 09ef026d43
Remove OperationInterface::getReason, closes #9230, closes #9263 4 years ago
Simon Berger 2223b93efd Several small code improvements 4 years ago
Simon Berger 80d71ccb3f Merged isset, unset and str_replace calls 4 years ago
Simon Berger 974e7ba296 Removed unneccesary elseifs 4 years ago
Simon Berger 33d7a64df9 Removed unused private functions 4 years ago
Simon Berger a6475a7118 Removed unused variables, properties and parameters of private functions 4 years ago
Simon Berger 002fd39bc6 Removed passing of parameters with default value 4 years ago
Markus Staab cf9786f112
Improve error message further 4 years ago
Jordi Boggiano 6cf4ba051c
Update messaging about plugin errors 4 years ago
Simon Berger bae227ec2d Changed all substr calls used to compare fragments of text to strpos
Some additional code cleanups in those classes

Reverted change causing issues
4 years ago
Jordi Boggiano 199696d120
Fix undefined method call 4 years ago
Jordi Boggiano b159e4da7e
Merge pull request #9172 from Toflar/platform-repo-cleanup
Consistently reuse new PlatformRepository::isPlatformPackage()
4 years ago
Yanick Witschi bd6f62c535 Consistently reuse the new PlatformRepository::isPlatformPackage() method 4 years ago
Nils Adermann 4ac9f44571 Clear up PoolBuilder comment after code move 4 years ago
Nils Adermann 7b990f3767 PoolBuilder: Move merging of constaints to be loaded into relevant section 4 years ago
Nils Adermann b2670945bd PoolBuilder: clear up comment, matching and identity are different for constraints 4 years ago
Yanick Witschi a1e1cd8fa4 Do not trigger Intervals::isSubsetOf() over and over again for platform packages 4 years ago
Jordi Boggiano 9a04ecefbf
Merge branch 'master' into filter-packages 4 years ago
Jordi Boggiano f516d36f6f
Make sure Request::requireName can not be called twice for the same name 4 years ago
Jordi Boggiano 448daea696
Add support for detecting packages not matching only due to minimum stability 4 years ago
Oleg Andreyev f262feebec
fixing error message for higher repository priority, when higher repo has only a dev-branch 4 years ago
Jordi Boggiano 00e268cdbf
Clear Intervals cache when we are done with it 4 years ago
Jordi Boggiano 2d3905157d
Merge branch '1.10' 4 years ago
Tyson Andre e5c7835d57 Properly support PHP 8.0 Named Arguments
See https://wiki.php.net/rfc/named_params#internal_functions
(implemented but not yet merged)

An ArgumentCountError will be thrown when passing variadic arguments to
a function with call_user_func_array() if extra unknown named arguments
are encountered.

Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///path/to/composer.phar/src/Composer/DependencyResolver/DefaultPolicy.php:84

(e.g. for `['phpunit/phpunit' => [72]]`)
4 years ago
Jordi Boggiano 071350286f
Compact constraints to avoid ending up with very long multi constraints 4 years ago
Jordi Boggiano 22367a68f9
Avoid loading same packages multiple times 4 years ago