1
0
Fork 0
Commit Graph

164 Commits (3e0e5dc1fab534fd0e139208faea32b4a4e4660a)

Author SHA1 Message Date
Nils Adermann 3e0e5dc1fa Fix test expectation: Install and update operations are now alphabetical 2019-09-07 07:17:41 +02:00
Nils Adermann c16ab6174e Fix tests: Alias install now always right after origin package, partial update requires lock file 2019-09-07 07:16:43 +02:00
Nils Adermann f5e18250e6 Merge remote-tracking branch 'github-composer/2.0' into solve-without-installed
* github-composer/2.0: (48 commits)
  Fix missing use/undefined var
  Split up steps on VCS downloaders to allow doing network operations before touching the filesystem on GitDownloader, fixes #7903
  Fix use statement
  Deduplicate findHeaderValue code
  Add install-path to the installed.json for every package, fixes #2174, closes #2424
  Remove unnecessary config from phpstan
  Make sure the directory exists and will not block installation later when downloading
  Avoid wiping the whole target package if download of the new one fails, refs #7929
  Only empty dir before actually installing packages, fixes #7929
  Improve output when installing packages
  Show best possible version in diagnose command
  Remove extra arg
  Allow path repos to point to their own source dir as install target, resulting in noop, fixes #8254
  Fix use of decodeJson
  Fix update mirrors to also update transport-options, fixes #7672
  Fix updating or URLs to include dist type and shasum, fixes #8216
  Fix origin computation
  Improve handling of non-standard ports for GitLab and GitHub installs, fixes #8173
  Load packages from the lock file for check-platform-reqs if no dependencies have been installed yet, fixes #8058
  Fix error_handler return type declaration
  ...
2019-09-07 02:55:21 +02:00
Nils Adermann 06d11f2f38 Fix calculation of lock transaction updates and start updating output in tests 2019-09-07 02:33:50 +02:00
Nils Adermann f1e4ccbe1d Fix handling of reference updates and root references 2019-09-07 01:58:12 +02:00
Jordi Boggiano 1002fb12fc
Merge branch 'master' into 2.0 2019-08-02 13:26:03 +02:00
Jordi Boggiano 362ebe4f68
Fix update mirrors to also update transport-options, fixes #7672 2019-07-31 18:43:18 +02:00
Jordi Boggiano db6882b57f
Fix updating or URLs to include dist type and shasum, fixes #8216 2019-07-31 18:36:27 +02:00
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
2019-02-11 01:00:02 +01:00
Nils Adermann 287419f6a0 Merge branch 'master' into 2.0
* master:
  Follow up to #7946 test: add solver flag to assert path execution
  Fix tests
  Make sure config command output is also output on --quiet so that warnings can be hidden, fixes #7963
  Recognize composer-plugin-api as a platform package, fixes #7951
  Quote wildcards to avoid issues in some shells, fixes #7960
  Avoid dumping null values for dist reference/shasum and source reference, fixes #7955
  Soften hard exit after revert of composer file
  Make unixy proxy code POSIX compatible
  Update aliases.md
  Same but for Problem.php
  Better error message for present but incompatible versions
  Fix inconsistent casing
  Don't do (new Foo())->bar() - not 5.3-compatible
  Support identifying the HHVM version when not running with HHVM
2019-02-10 20:28:24 +01:00
Jordi Boggiano c66bb0b1d0 Fix tests 2019-02-10 13:07:42 +01:00
Nils Adermann 728e57b9e0 Merge branch 'master' into 2.0
* master:
  Fix solver problem exceptions with unexpected contradictory "Conclusions"
  Also load config into IO if not freshly created
  Only load configuration into IO if IO is available
  Fix defaultRepos fallback does not use auth config
  Add warning/info msg when tweaking disable-tls setting to avoid confusion, fixes #7935
2019-02-05 15:35:51 +01:00
Nils Adermann 6b2edeae56 Fix solver problem exceptions with unexpected contradictory "Conclusions"
This 5 character fix comes with a solver test as well as a functional
installer test essentially verifying the same thing. The solver test is
more useful when working on the solver. But the functional test is less
likely to be accidentally modified incorrectly during refactoring, as
every single package, version and link in the rather complex test
scenario is essential, and a modified version of the test may very well
still result in a successful installation but no longer verify the bug
described below.

Background:

In commit 451bab1c2c from May 19, 2012 I
refactored literals from complex objects into pure integers to reduce
memory consumption. The absolute value of an integer literal is the id
of the package it refers to in the package pool. The sign indicates
whether the package should be installed (positive) or removed (negative),

So a major part of the refactoring was swapping this call:

$literal->getPackageId()

For this:

abs($literal)

Unintentionally in line 554/523 I incorrectly applied this change to the
line:

$this->literalFromId(-$literal->getPackageId());

It was converted to:

-abs($literal);

The function literalFromId used to create a new literal object. By using
the abs() function this change essentially forces the resulting literal
to be negative, while the minus sign previously inverted the literal, so
positive into negative and vice versa.

This particular line is in a function meant to analyze a conflicting
decision during dependency resolution and to draw a conclusion from it,
then revert the state of the solver to an earlier position, and attempt
to solve the rest of the rules again with this new "learned" conclusion.

Because of this bug these conclusions could only ever occur in the
negative, e.g. "don't install package X". This is by far the most likely
scenario when the solver reaches this particular line, but there are
exceptions.

If you experienced a solver problem description that contained a
statement like "Conclusion: don't install vendor/package 1.2.3" which
directly contradicted other statements listed as part of the problem,
this could likely have been the cause.
2019-02-03 16:33:55 +01:00
Jordi Boggiano 4517c00d40 Merge branch 'master' into 2.0 2019-01-29 14:01:28 +01:00
Jordi Boggiano acea4a4d4d Warn on invalid package name or require/provide/.., fixes #7874 2019-01-29 13:46:23 +01:00
Jordi Boggiano b89720b52a Merge branch 'master' into 2.0 2019-01-28 18:00:52 +01:00
Sascha Egerer 1845adcfbd Fix update whitelist pattern resolving and add more tests 2019-01-28 17:34:24 +01:00
Sascha Egerer 50cb5fe3da Update all whitelist matching root dependencies
The update command can receive a pattern like `vendor/prefix-*`
to update all matching packages.
This has not worked if multiple packages, depending on each other,
where matched to the given pattern. No package has been updated
in this case as only the first package matching the pattern was
added to the whitelist.
2019-01-28 17:34:08 +01:00
Nils Adermann 902cb290e7 Only load package versions which fit the root composer.json constraints 2018-09-12 16:48:17 +02:00
Christophe Coevoet 8c3898aa57 Update tests for replace conflicts
This reverts the test changes done in b4698568d2 to the original tests added
in 1425bb7fc3.
2018-08-27 12:14:34 +02:00
Jordi Boggiano 0b3bc4ccb9 Merge branch '1.5' 2017-11-28 18:09:36 +01:00
Nils Adermann 7dffe79a0f Update tests of solver problem message to match new message 2017-11-16 12:41:41 +01:00
Matthew Grasmick 11db6f90c2 Cleaning up comments 2017-09-11 12:56:51 -04:00
Matthew Grasmick ad465aa769 Updating var names. 2017-09-11 11:47:33 -04:00
Matthew Grasmick 21722f6e42 Fixing test version constraints. 2017-09-11 11:32:19 -04:00
Matthew Grasmick f29e98cdf9 Fixes #6661: Allow a given package and its dependencies (including siblings) to be updated. 2017-09-11 11:16:15 -04:00
Jordi Boggiano 34dbde3873 Merge branch '1.4' 2017-07-03 17:00:48 +02:00
Rob Bast 422a9adb07
images related to new trusty images 2017-06-22 15:20:19 +02:00
Stephen Beemsterboer 06bb6c7530 Move plugins with no dependencies to the front, followed by plugins with their dependencies 2017-05-23 20:28:32 -04:00
Stephen 6c4800b8d2 Update corresponding test for plugin moving 2017-04-22 16:43:07 -04:00
David Zuelke 2d36324e99 streamline install progress messages 2017-01-24 20:51:37 +01:00
Jordi Boggiano a1b468ea50 Fix git shortening, it is sunday.. 2016-12-11 17:04:24 +01:00
Jordi Boggiano 4d082f77b8 Simplify composer output to take less lines 2016-12-07 01:09:06 +01:00
Fabien Potencier 57ec0d1815 added more information in the output 2016-10-29 11:37:23 -07:00
Jordi Boggiano 59596ff012 Make sure we do not overwrite binaries but only re-create missing ones, refs #5127 2016-07-02 16:35:09 +01:00
Jordi Boggiano 88d5b74c74 Merge remote-tracking branch 'j0k3r/re-install-binaries' 2016-07-02 16:15:33 +01:00
Lucas CHERIFI 7e34d9ab97 Typo fix ;-) 2016-05-10 21:45:39 +02:00
Jordi Boggiano 72362a085a Fix #refs handling, fixes #5291 2016-05-10 17:17:08 +01:00
Jordi Boggiano ac75680b1e Make sure the abandoned state is copied over even if the packages are installed already 2016-04-22 23:41:15 +01:00
Jordi Boggiano 4de17cef6b Always resolve dev packages even when doing an update with --no-dev, fixes #5016 2016-04-20 12:34:04 +01:00
Jordi Boggiano 11daebcb3a Merge pull request #5210 from Seldaek/fix_partial_updates_from_dirty_state
Fix partial updates from a dirty state and apply exactly the locked state
2016-04-19 20:07:52 +01:00
Jordi Boggiano c7c8335b8b Fix updating of dev refs if they are not whitelisted 2016-04-19 20:03:14 +01:00
Jordi Boggiano de5bfcb4c5 Fix partial updates from a dirty state and apply exactly the locked state, fixes #3468 2016-04-18 23:33:04 +01:00
Jordi Boggiano feda2a283f Improve error reporting some more, fixes #4310 2016-04-18 23:03:00 +01:00
Jordi Boggiano 6d20146d08 Normalize URL updates to point to the correct reference and always update URLs consistently, fixes #3849, fixes #4126 2016-04-18 09:34:23 +01:00
Jordi Boggiano 23af589076 Add test case for solver problem improvements 2016-04-01 00:38:00 +01:00
Jeremy Benoist e9fc0e6548 Re-install binaries on update/install
Binaries are re-installed after an update/install (ie: removed and then installed)
2016-03-28 23:15:13 +02:00
Jordi Boggiano 55b0ed8c8b Change installs into updates if there is no lock file, simplify some code, fixes #5034 2016-03-15 14:05:07 +00:00
Rob Bast dfdcfab822 simplified existing test, added a new test 2016-03-15 11:11:18 +01:00
Jordi Boggiano 76450cc2a1 Merge pull request #4989 from naderman/t/fix-self-reference-transaction-root
Ignore self references when anlaysing independent root requirements
2016-03-02 13:26:18 +00:00