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
Yanick Witschi
6ba0f3adf9
Merge branch 'master' into filter-packages
...
* master: (59 commits)
Update deps
Reuse repository manager and others directly from the Composer instance, refs #9057
Fix usage of create-project with local filesystem repos
Fix return value
Add support for multiple --repository additions in create-project, and make --add-repository delete the lock file, fixes #8853
Remove cygwin php handling in UAC elevation
Clean up a little to make impl less invasive and to handle replacers/providers
Supply event dispatcher in Create Project Command
Avoid attempting to use /etc/xdg as base config home, fixes #9053 , refs #9045
Create an issue @ Docker repository on tag
Mark transaction classes internal, refs #8827
Prepare 1.10.9 release
Remove highest/lowest builds for 1.10 maintenance branch
Fix bitbucket detection of redirects to login page, fixes #9041
Fix doc comment
Fixed spelling mistake
Add Windows UAC elevation to self-update command
GitLab: clarify interactive auth prompt
Improve support for XDG and default to XDG config dir if both that and ~/.composer are available, fixes #9045
Fix #9033 - inconsistent behavior with minor-only flag
...
4 years ago
Jordi Boggiano
89d35af83d
Mark transaction classes internal, refs #8827
4 years ago
Nils Adermann
3f5dde9873
Solver: Ensure multi conflict rules still get added to learned pool
4 years ago
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