39 Commits (6a466a120a404d1c5d492e5ca715841c491517fc)

Author SHA1 Message Date
Jordi Boggiano 6a466a120a
Enable strict types on all files 2 years ago
Jordi Boggiano 6da38f83a0
Add parameter types to all the things 2 years ago
Alexander Schranz 1321bfca36
Add return types to closures (#9) 2 years ago
Jordi Boggiano a16ed3d0ed
Add return types to private/internal methods 2 years ago
Jordi Boggiano abdc6893a6
Add void types where no return statement is present 2 years ago
immeëmosol 50d738eeee
Reaching phpstan level 6 in Composer/DependencyResolver (refs #10159) (#10178) 3 years ago
Jordi Boggiano 4bcd860b65
Add more type annotations 3 years ago
Jordi Boggiano b7d770659b
CS fixes 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
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 09ef026d43
Remove OperationInterface::getReason, closes #9230, closes #9263 4 years ago
Yanick Witschi bd6f62c535 Consistently reuse the new PlatformRepository::isPlatformPackage() method 4 years ago
Jordi Boggiano 89d35af83d
Mark transaction classes internal, refs #8827 4 years ago
Jordi Boggiano 0ab48a1773
Add composer-runtime-api platform package 4 years ago
Jordi Boggiano ba9d4793bc
Fix transaction order 4 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.
4 years ago
Nils Adermann 4e7702598e Always treat changes in dist and source references as updates 5 years ago
Nils Adermann aa6bc75af2 Add a test case for transactions to verify correct sorting 5 years ago
Nils Adermann 3cbe91983c Display Locking instead of Installing for lock file install operations 5 years ago
Nils Adermann 25de5218c3 Reunify lock and local repo transaction code and apply the same sorting 5 years ago
Nils Adermann 10ada7bf82 Refactor Installer class into separate install and update processes
- Introduce separate Lock and LocalRepo transactions, one for changes
  to the lock file, one for changes to locally installed packages based
  on lock file
- Remove various hacks to keep dev dependencies updated and
  incorporated the functionality into the transaction classes
- Remove installed repo, there are now local repo, locked repo and
  platform repo
- Remove access to local repo from solver, only supply locked packages
- Update can now be run to modify the lock file but not install packages
  to local repo
5 years ago
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Vladimir Reznichenko c8615358cb SCA with PHP Inspections (EA Extended) 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Nils Adermann 4af74b54e0 Ignore self references when anlaysing independent root requirements
When creating a transaction we try to identify all requirements that are
not themselves required by any other package. If a package references
itself this should not mark it as being required by another package.
8 years ago
Nils Adermann c6af09b1da Make project id public
Reduction of rougly 1.3 million function calls on packagist update
10 years ago
Jordi Boggiano 94926218e8 CS fixes 10 years ago
Jordi Boggiano ac497feaba CS fixes 10 years ago
Nils Adermann 78f2ad95a9 Correctly add decision reason to transaction 10 years ago
Nils Adermann f0345f0592 Aliases cannot be updated, they must be uninstalled, fixes #803 12 years ago
Nils Adermann 67fde90666 Correctly sort operations within transactions using DFS
Fixes #655
12 years ago
Nils Adermann 26e051cb76 Decisions are now encapsulated in a separate object 12 years ago
Jordi Boggiano 1bd4ccbd54 php-cs-fixer magic 12 years ago
Jordi Boggiano 4ea9b33a6c Merge remote-tracking branch 'naderman/solver-refactor' 12 years ago
Nils Adermann 451bab1c2c Get rid of Literal object / literal id mix, use literals only to save memory 12 years ago
Nils Adermann 83c499cf29 Remove unecessary use statement in Transaction class 12 years ago
Nils Adermann 8fc09afbae Move transaction generation to a separate class 12 years ago