Jordi Boggiano
ff74d0e686
Fix lock file generation with dev-master aliases to be compatible with Composer 1, fixes #9337
4 years ago
Nils Adermann
7bc2112f2b
InstallerTest: Add a test for partial updates
...
Needs to take constraints of locked packages into account
4 years ago
Jordi Boggiano
447416a357
Fix typo
4 years ago
Nils Adermann
1d6c0865ca
Test: Verify replacing a package required by the same package satisfies the dep
4 years ago
Nils Adermann
290450214e
Test: Verify require for package provided by pkg itself is used
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
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
853305063d
Add test case for github issue 9290
4 years ago
Jordi Boggiano
99a5469b5e
More hints
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
Nils Adermann
43093d0eeb
Add tests for edge cases of packages providing names which exist as real packages
4 years ago
Nils Adermann
140665eadd
Add another test verifying that a package may provide an incompatible version of sth that actually exists
4 years ago
Nils Adermann
85950f8e9a
Fix provider coexistence test, needs another requirement to install both
4 years ago
Nils Adermann
cf8ff2a75d
Fix test filename to end with .test extension so it gets run
4 years ago
Jordi Boggiano
6186c7f36f
Fix handling of root aliases in partial updates, fixes #9110
4 years ago
Jordi Boggiano
448daea696
Add support for detecting packages not matching only due to minimum stability
4 years ago
Jordi Boggiano
4d83783641
Fix test to avoid network usage
4 years ago
Oleg Andreyev
e745e59656
updated repositories-priorities4.test
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
212fbc516e
Fix test issues
4 years ago
Nils Adermann
3d2d33dd58
Solver: Add missing rules and replace some with %A for pcre length limit
4 years ago
Nils Adermann
de3931c742
Revert "Remove unnecessary duplicate rule output from expected test result"
...
This reverts commit c78eb49b5e
.
4 years ago
Nils Adermann
c78eb49b5e
Remove unnecessary duplicate rule output from expected test result
4 years ago
Nils Adermann
2cfb60e683
Solver: Add test case for github issue 7051
4 years ago
Jordi Boggiano
05dacbdabb
Rename DEV_MASTER_ALIAS to DEFAULT_BRANCH_ALIAS
4 years ago
Jordi Boggiano
7a37e78a30
Speed up installer tests by avoiding lots of bootstrapping and git processes
4 years ago
Jordi Boggiano
d19f5db568
Fix tests to use default-branch prop
4 years ago
Jordi Boggiano
e5fe35d554
Update test description
4 years ago
Jordi Boggiano
c8731598cc
Merge branch '1.10'
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
a66a939b76
Merge pull request #8937 from Seldaek/optim-rules
...
Optimize rule creation for alias packages
4 years ago
Jordi Boggiano
fafa959933
Add test to assert prefer-lowest behavior when conflicting branches prevent absolute lowest version from being installed, closes #7408
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
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
dfccf8c091
Add failing test reproducing the problem of #8902
4 years ago
Jordi Boggiano
98e5f81a5f
Fix detection of fixed package problems to include more cases, fixes #8910
4 years ago
Jordi Boggiano
f73c8c419c
Merge pull request #8869 from naderman/replace-semver-test
...
Adding a test to verify replace version overlap with unbound constraints and single versions
4 years ago
Nils Adermann
d15447c454
Add test for replace version overlap
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
d89342dc43
Fix tests
4 years ago
Jordi Boggiano
df0cada93f
Add test for #8669
4 years ago
Jordi Boggiano
34801239f1
Tweak problem wording slightly
4 years ago
Jordi Boggiano
1000d49145
Fix error reporting when the root version changed since the last update, and does not match circular deps in lock file anymore
5 years ago
Jordi Boggiano
bf39fab82d
Add test for root alias presence in lock
5 years ago
Jordi Boggiano
ba9d4793bc
Fix transaction order
5 years ago
Jordi Boggiano
17ed09be2e
Add failing test showing that packages fail to be installed if they match a previous alias which was not removed yet
5 years ago
Jordi Boggiano
3f338ee8d9
Make sure versions are sorted before they get trimmed in error output
5 years ago
Jordi Boggiano
80a7c40c76
Shorten long lists of similar versions in problem output, fixes #8743
5 years ago
Jordi Boggiano
b6bad4eef6
Add options to configure repository priorities
5 years ago
Jordi Boggiano
e09dd9c10d
Detect packages which are only available in lock file and warn appropriately
5 years ago
Jordi Boggiano
8945936dbd
Deduplicate solver problems which list problems for dev-master AND 9999999-dev
5 years ago
Nils Adermann
f38e969b02
Update test expected output to different formatting
5 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
5 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
5 years ago
Nils Adermann
8072ec9b7c
Number 2: Adjust forgotten error message in test to new language
5 years ago
Nils Adermann
ce0c2d44cd
Adjust forgotten error message in test to new language
5 years ago
Nils Adermann
4fab2c7759
Error wording use "thus cannot" instead of "can thus not"
5 years ago
Nils Adermann
88e3f24b91
Fix description of test case
5 years ago
Nils Adermann
9858718ef6
Give a clearer error message explaining how to update a conflicting locked dependency
5 years ago
Nils Adermann
f7b5cbd1fc
Lock file should not contain new aliases for packages which were not updated
5 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
5 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.
5 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
5 years ago
Nils Adermann
ef42d323b1
Test: partial update adding a new dep on a locked package should mark it for update
5 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
5 years ago
Nils Adermann
17b50157e4
Test: composer update new/plg --with-dependencies updates locked transitive deps
5 years ago
Nils Adermann
392d0abd21
Rename test files and standardize on allow list rather than whitelist
5 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.
5 years ago
Jordi Boggiano
70f23e42f3
Fix tests
5 years ago
Jordi Boggiano
e15f7d6bb7
Merge branch 'master' into 2.0
5 years ago
Aaron Johnson
33479f00ab
Add backticks to test.
5 years ago
Jordi Boggiano
08cee4c3e9
Implement getProviders equally on all repos
5 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
5 years ago
Nils Adermann
ee8df484c4
Separate createPool and createPoolWithAllPackages, fix test description
5 years ago
Nils Adermann
3ec59204fc
Update test: require-dev is now allowed to satisfy providers from require
5 years ago
Jordi Boggiano
73a5cc63cc
Always use Removing for consistency between dry-run and actual install
5 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
5 years ago
Jordi Boggiano
589aa351a8
Change Uninstalling to Removing in lock operations
5 years ago
Jordi Boggiano
a7a975ec1c
Alias dev-master/trunk/default to 9999999-dev instead of normalizing the version to that, fixes #8323
5 years ago
Jordi Boggiano
97e2a249e8
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
ffac8646fc
Fix tests
5 years ago
Jordi Boggiano
3e82542812
Fix test
5 years ago
Jordi Boggiano
c033644f8b
Present lock changes alphabetically, with uninstalls first, then all install/updates mixed
5 years ago
Jordi Boggiano
0ad322e51f
Fix tests
5 years ago
Jordi Boggiano
bc002ae1fb
Merge branch 'master' into 2.0
5 years ago
Nils Adermann
d665ea7ea9
After update and install commands display how many packages want funding
5 years ago
Jordi Boggiano
44d1e15294
Simplify suggester output when updating, refactor suggest command to reuse SuggestedPackagesReporter and make smarter defaults, fixes #6267
5 years ago
Jordi Boggiano
9609729de7
Change update to upgrade for package update operations which are upgrades, refs #8594
5 years ago
Jordi Boggiano
be8dd528b8
Merge remote-tracking branch 'origin/master' into 2.0
5 years ago
Ion Bazan
a180f48921
Distinguish between updates and downgrades in dry-run
5 years ago
Jordi Boggiano
189d5adab0
Fix reporting of replace conflicts to not mention provides
5 years ago
Jordi Boggiano
ec90c17e3b
Fix conflict order to be more accurate
5 years ago
Jordi Boggiano
f982a10447
Update after rebase
5 years ago