41 Commits (71c3c63b545b1fd812d5883146b651f40ba960cb)

Author SHA1 Message Date
Nils Adermann 71c3c63b54 Remove unused variable assignment 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 835a91532d
Add PRE_POOL_CREATE event, fixes #8348 4 years ago
Jordi Boggiano 3fc7e10c5c
Improve error reporting of solver issues, refs #7779
Fixes #8525
Fixes #6513
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
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 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 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 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 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
Jordi Boggiano d12c20db4b
Remove async repo interface, closes #7902 5 years ago
Nils Adermann 6925005ac9 Implement update mirrors/nothing/lock as its own installer mode
These special commands no longer (ab)use the partial update mechanism
but rather create a special install request for all current lock file
contents and later override any modified code references to the
originals. This leads to up to date remote metadata but no other
changes.
5 years ago
Nils Adermann 0ff07015a1 Only load package info from lock file for fixed packages
As a result some lock file packages are no longer in the pool, so the
former installed map, now present map cannot use package ids anymore

Need to revisit some more code later to simplify this, todo notes left
5 years ago
Nils Adermann 4481cc4a88 Allow an install request for a package name which is already fixed
Ensures packages get loaded from locked repo correctly. We may not want
to support this particular use-case at all, but for now it fixes the
existing test, so we may want to revisit this later.
5 years ago
Nils Adermann f1e4ccbe1d Fix handling of reference updates and root references 5 years ago
Nils Adermann 9053d74282 Merge branch '2.0' into solve-without-installed
* 2.0: (101 commits)
  SVN: hide passwords for debug output
  Free $solver asap
  fixes #8179
  [minor] Fixed a typo in the CHANGELOG.md.
  Update deps
  Update changelog
  Revert "Allow overriding self-update target file with envvar COMPOSER_SELF_UPDATE_TARGET" Revert "Add docs for COMPOSER_SELF_UPDATE_TARGET, refs #8151"
  Add docs for COMPOSER_SELF_UPDATE_TARGET, refs #8151
  Fix display of HHVM warning appearing when HHVM is not in use, fixes #8138
  Read classmap-authoritative and apcu-autoloader from project config when installing via create-project, fixes #8155
  Use possessive quantifiers
  Update xdebug-handler to 1.3.3
  fixes #8159
  Allow overriding self-update target file with envvar COMPOSER_SELF_UPDATE_TARGET
  flag should come before script name
  use full command name, not abbreviated/alias
  modify text
  Document the alternatives to disable the default script timeout
  Anchor pattern
  Fix URL resolution for Composer repositories
  ...
5 years ago
Matthew Brown 65903aacfd Fix type issues (#7996)
* Fix type issues found by Psalm
5 years ago
CZechBoY a062cd1a31
added phpstan on level 0 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
Nils Adermann 537f4fbc3b Prune unreachable required versions correctly for aliased packages
In trials this seems pointless, so maybe better to skip aliases and
reduce memory and cpu wasted on looking these things up
6 years ago
Nils Adermann 83efeaec5c Attempt to prune versions which are impossible to install during pool building 6 years ago
Nils Adermann 902cb290e7 Only load package versions which fit the root composer.json constraints 6 years ago
Nils Adermann 81bb8f81ad Set all package ids only once the pool is created
They all get set in one place only and at a specific time when nothing
else will possibly change them anymore
6 years ago
Nils Adermann 261efe1e8e Implement loadPackages on Composer repositories with providers 6 years ago
Nils Adermann c0f19f6c57 Move construction of pool from repo set into a pool builder
Pool construction depends on the install request now, so only required
packages get loaded, add some structure for future asynchronously
loading composer repositories
6 years ago