1
0
Fork 0
Commit Graph

337 Commits (54a3beda470c57dd7f65dc98707cd3271442ced5)

Author SHA1 Message Date
Ion Bazan a180f48921 Distinguish between updates and downgrades in dry-run 2020-02-11 16:35:35 +08:00
Jordi Boggiano 189d5adab0
Fix reporting of replace conflicts to not mention provides 2020-01-30 17:13:12 +01:00
Jordi Boggiano ec90c17e3b
Fix conflict order to be more accurate 2020-01-30 15:55:37 +01:00
Jordi Boggiano f982a10447
Update after rebase 2020-01-30 14:52:47 +01:00
Jordi Boggiano 1d4cdb60d0
Improve error reporting for conflicts/replaces of various kinds, fixes #7254 2020-01-30 14:43:56 +01:00
Jordi Boggiano 6c9d9e775c
Clean up and deduplicate the output of RULE_LEARNED 2020-01-30 14:43:56 +01:00
Jordi Boggiano e6029d725a
Add individual test checking for clashes between requirements at root and transitive dependency level 2020-01-30 14:43:55 +01:00
Jordi Boggiano 3fc7e10c5c
Improve error reporting of solver issues, refs #7779
Fixes #8525
Fixes #6513
2020-01-30 14:43:54 +01:00
Jordi Boggiano 8a41f1a5ca
Allow providers which are selected to be installed in place of existing packages which do not satisfy requirements, fixes #6753 2020-01-30 14:09:55 +01:00
Jordi Boggiano 3f48acf56a
Add test checking references update to latest and remove TODO 2020-01-28 16:01:17 +01:00
Jordi Boggiano 292d4b3c8f
Make sure a lock file is always written and things work well even without any dependencies in the require/require-dev 2020-01-28 15:14:58 +01:00
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.
2020-01-19 23:21:07 +01:00
Jordi Boggiano ebe910c3a5
Tweak test to follow changes 2020-01-17 15:16:01 +01:00
Jordi Boggiano 6f44350c01
Remove problem reporting for locked package not being found, needs to be fixed in #7779 later 2020-01-17 14:01:01 +01:00
Jordi Boggiano 47a94b3a88
Ensure packages that exist in a higher prio repo never get loaded in lower prio repos, fixes #5076 2020-01-15 12:02:12 +01:00
Yanick Witschi d1dc367d86 Removed the filters from the pool 2019-11-27 17:57:24 +01:00
Nils Adermann a732ea5dd8 Display source/dist refs if updates do not change the version
We now output an update when only a source or dist ref changes even if
it's a stable version so in these cases the output needs to contain the
ref to make it clear to users what changed
2019-11-23 12:33:58 +01:00
Jordi Boggiano 438c45e991
Change UpdateOperation::show to match what the installers output, fixes the dry-run output to be more like real output 2019-11-14 15:41:23 +01:00
Jordi Boggiano 006985a0ea
Execute all operations at once which lets us download all packages in parallel then install only once all downloads succeeded, fixes #2847
This also changes the PRE/POST_PACKAGE_INSTALL/UPDATE/UNINSTALL events to have less information available on them, repositorySet, request and policy are gone
2019-11-14 15:21:28 +01:00
Nils Adermann 3cbe91983c Display Locking instead of Installing for lock file install operations 2019-11-08 16:57:52 +01:00
Nils Adermann 25de5218c3 Reunify lock and local repo transaction code and apply the same sorting 2019-11-08 15:56:46 +01:00
Nils Adermann ff5ec54f04 Correctly use install and update commands in our installer tests 2019-11-08 12:31:26 +01:00
Nils Adermann 97ec2d7b61 Merge remote-tracking branch 'github-composer/2.0' into solve-without-installed
* github-composer/2.0: (63 commits)
  Fix PSR warnings for optimized autoloader, refs #8397, refs #8403
  Prepare 1.9.1 changelog
  Output a hint that maybe you are not in the right directory, fixes #8404
  Fix PSR warnings for optimized autoloader, refs #8397, refs #8403
  Fix tests for PSR-fix in optimized autoloader, refs #8397
  Fix tests for PSR-fix in optimized autoloader, refs #8397
  Change PSR-fix for optimized autoloader to only warn for now, refs #8397
  Fix output of dump-autoload command to avoid interfering with warnings, refs #8397
  Remove credentials from git remotes in cache and vendor dirs
  Avoid overwriting credentials with existing ones from git repos, refs #8293
  Fix github auth to try https with pwd also, fixes #8356
  Fix gitlab support for basic-auth fallback from ssh URLs
  Avoid clearing the error output during removeDirectory execution, losing git error output, fixes #8351
  Move test file parsing into try/catch block to avoid phpunit swallowing errors
  make optimized autoloader respect PSR standards
  Validate composer show with --tree and --path options set (#8390)
  Don't show root warning for docker containers
  Added phpdoc for ComposerAutoloaderInit$SHA1::getLoader() (#8393)
  Validate schema name, type and version
  Fix require command to allow working on network mounts, fixes #8231
  ...
2019-11-08 12:27:13 +01:00
Nils Adermann e308f043b9 Fully switch to spl_object_hash in lock transaction
The pool builder tries to be minimal so it's fine for present/locked
packages not be assigned a solver/pool id. Adding a test to verify
correct creation of uninstall jobs
2019-11-07 21:18:09 +01:00
Nils Adermann c50d236378 Correctly load branch aliases from lock file
Root aliases are also stored in the lock file, so on install do not read
them from composer.json.
2019-11-07 20:40:28 +01:00
Nils Adermann 2d37bb4116 Outated lock files now trigger an error requesting removal rather than being ignored silently 2019-11-07 17:38:16 +01:00
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.
2019-11-07 17:35:44 +01:00
Jordi Boggiano bc2a1d762a
Merge branch 'master' into 2.0 2019-10-30 08:54:44 +01:00
Nils Adermann eaae360ce6 Correcting lock files in test cases and updating output 2019-10-30 00:55:11 +01:00
Nils Adermann e6e317bc27 Fix test configurations, missing lock files, invalid ones
aliased alias test is failing because double alias is improperly
resolved now
2019-10-30 00:40:36 +01:00
Nils Adermann 94d45a980c Update lock syntax in tests and verify installed version does not impact lock generation
Particularly the test

tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-whitelisted-unstable.test

is interesting because it verifies that an older version will be
installed on update if the new one is only present in the installed repo
or vendor dir. This was the cause of a lot of weird edge cases and
unreliable update behavior in Composer v1
2019-10-30 00:32:23 +01:00
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
2019-10-30 00:24:25 +01:00
Nils Adermann 48ae45e5fe Correct github issue test to include a lock file, still fails because of real bug now 2019-10-29 23:16:38 +01:00
Nils Adermann 5c129be5e7 Partial updates without a lock file are no longer possible, update test 2019-10-29 23:12:54 +01:00
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.
2019-10-29 22:28:36 +01:00
Arnout Boks 22caa0f097 Add tests for installer with lock: false
https://github.com/composer/composer/issues/8354
2019-10-20 10:51:59 +02:00
Nils Adermann 995b4f923e Fix more tests which were lacking lock files for partial updates, display fix jobs in problems 2019-09-07 09:32:06 +02:00
Nils Adermann 3989a1b8ee Restore dev package extraction
New approach is to use only the solved set of packages as input and then
to resolve with only the non-dev requirements and to mark everything as
dev that is not part of the result set, rather than transitioning a
temporary local repo state by uninstalling dev packages.
2019-09-07 08:52:10 +02:00
Nils Adermann 33ff67abf3 Update tests for new output and for required lock file on partial update 2019-09-07 07:53:31 +02:00
Nils Adermann a114e26841 Correctly load aliases in lockedRepository to fix alias install output 2019-09-07 07:43:23 +02:00
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
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
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
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.
2016-03-02 13:03:26 +01:00
Jordi Boggiano 7b404c4717 Add failing test for #3990 2016-02-29 14:45:35 +00:00
Rob Bast 5db0f623b0 enable test again 2016-02-05 13:36:53 +01:00
Rob Bast baa84d9be1 adjust test and assertion to be more flexible 2016-02-05 13:34:21 +01:00
Rob Bast baabc612f6 adjust message, skip test
currently we have no way to put dynamic values or wildcards in EXPECT-OUTPUT
2016-02-05 13:21:30 +01:00
Rob Bast 94daeca57b add test and adjust rule error message 2016-02-05 11:59:05 +01:00
Rob Bast df23153932 fix output 2016-02-04 12:45:55 +01:00
Rob Bast be5719eb53 Merge remote-tracking branch 'upstream/master' into repro-4795
* upstream/master: (98 commits)
  Fallback to zlib extension to unpack gzip on non Windows systems
  Zip extension does not provide zlib support
  Unified all Windows tests throughout the code.
  Added Platform utility and unit test for it.
  Remove warnings for non-writable dirs, refs #3588
  [doc] add -H flag to sudo commands
  use full json content to determine reference, closes #4859
  typos
  Make sure COMPOSER_AUTH is also loaded in Config, refs #4546
  Use proper defaults for IO authentications
  Add verbosity input support to IOInterface
  Update SolverTest.php
  Update broken-deps-do-not-replace.test
  Update SolverProblemsException.php
  Cleaned up check+conversion that was no longer required.
  Cleaner notation for expected exceptions in fixtures.
  Introduced more generic, less invasive way to test for exceptions in fixtures, more in line with how phpunit works.
  Included unit test for circular root dependencies.
  Expanded InstallerTest to support expecting Exceptions by supplying "EXCEPTION" as "--EXPECT--"
  Clarified error message and added braces.
  ...
2016-02-04 12:43:37 +01:00
Jordi Boggiano 8771eca527 Merge remote-tracking branch 'curry684/issue-4767' 2016-02-03 17:00:30 +00:00
Rob Bast 0e584aa980 resolve issue 2016-02-02 10:45:57 +01:00
Jordi Boggiano 49d7d65933 Add verbosity input support to IOInterface 2016-01-29 10:14:12 +00:00
Jefferson Carpenter 087b901545 Update broken-deps-do-not-replace.test 2016-01-28 20:12:51 -06:00
Niels Keurentjes 523362c7c5 Cleaner notation for expected exceptions in fixtures. 2016-01-27 13:46:14 +01:00
Niels Keurentjes 639ee0701c Introduced more generic, less invasive way to test for exceptions in fixtures, more in line with how phpunit works. 2016-01-27 13:19:08 +01:00
Niels Keurentjes bd241cb896 Included unit test for circular root dependencies. 2016-01-27 10:05:10 +01:00
Rob Bast 17d6b98707 add A to root requirements 2016-01-21 18:40:33 +01:00
Rob Bast 0f09982858 add a test attempting to reproduce composer/composer#4795 2016-01-21 16:18:00 +01:00
Matthias Pigulla 3c08318ea0 Add test 2015-09-18 15:31:54 +02:00
Jordi Boggiano e8572ca6f9 Merge pull request #3998 from SpacePossum/use_https
Use HTTPS where possible
2015-05-05 16:42:33 +01:00
Jordi Boggiano 0e0cb62fb8 Add test for replace 2015-05-05 11:07:11 +01:00
Possum 2e99b9fdf5 Use https where possible 2015-05-04 19:37:57 +02:00
Cees-Jan Kiewiet c9d9b5085a Replaced <error> with <warning> for abandoned package as it reflects the intention of this feature better 2015-04-30 23:34:26 +02:00
Nils Adermann 258fdcb44d Merge pull request #3986 from Seldaek/partial-update-keep-lock
Partial updates should not corrupt the lock if the installed repo is not up to date with it
2015-04-30 17:54:58 +02:00
Jordi Boggiano 137c551247 Check if package URLs are up to date after an update op is done, fixes #3214 2015-04-30 16:41:28 +01:00
Jordi Boggiano 4507805508 Partial updates should not corrupt the lock if the installed repo is not up to date with it, fixes #3439, closes #3553 2015-04-30 16:39:08 +01:00
Jordi Boggiano d6620195e5 Prioritize repository over package versions in the default policy, fixes #3509 2015-04-30 10:43:04 +01:00
Jordi Boggiano a57c51e8d7 Finalize platform override feature
- Added tests, docs
- Persist to lock file
- Add support in config command
- Added to json schema
2015-04-29 22:38:07 +01:00
Jordi Boggiano 5d3c7ab6b7 Rename test files and descriptions 2015-02-17 14:43:09 +00:00
Jordi Boggiano b4698568d2 Adjust tests and fix installer code to create the pool using locked requirements and not the composer.json reqs 2015-02-17 14:37:33 +00:00
Matthias Derer 1425bb7fc3 added tests to reproduce the bug 2015-02-16 13:46:59 +01:00
Matthias Derer c9cff6387a removed requirements from the root package should we install from the lock file 2015-02-13 16:15:34 +01:00
Jordi Boggiano 901fd838f3 Merge pull request #3450 from nicolas-grekas/prefer-lowest-stable
add --prefer-lowest and --prefer-stable to update command
2014-12-14 13:02:06 +00:00
Nicolas Grekas e821ac2772 Persist prefer-lowest in composer.lock 2014-12-14 10:29:41 +01:00
Nicolas Grekas 98b254a3ec split update --prefer-lowest and --prefer-stable 2014-12-13 11:51:30 +01:00
Nicolas Grekas 4a0feb0189 add --prefer-lowest-stable to update command 2014-12-13 11:51:30 +01:00
Nils Adermann 540dfacfa0 Add test to verify that depency packages get deleted when no longer in lock file 2014-11-26 20:24:30 +01:00
Nils Adermann d884b26aa3 Add test case for removing unused dependencies on whitelisted update 2014-11-26 20:19:37 +01:00
Chris Smith 2e40f5f586 Add failing test case 2014-11-20 16:54:38 +00:00
Nils Adermann 6f4be698a5 Merge pull request #3325 from rdohms/implementing-abandoned-packages
Abandoned Package Warnings
2014-11-20 13:09:18 +01:00
Jordi Boggiano ec0463a400 Add tests for platform packages required by root and avoid creating rules altogether instead of disabling them, refs #3320 2014-10-17 15:30:27 +01:00
alu b7fa302b90 add ignore-platform-package-requirements for update/install commands. 2014-10-08 14:20:36 +09:00
Rafael Dohms 346133d2a1 PR Review
- reverted comma removal
- made getReplacementPackage consistent
- removed abandoned flag if false
2014-10-03 15:12:16 +02:00
Rafael Dohms f9f2bbac59 Abandoned packages support
Added warning to the installer process.
If any installed packages are flagged, the user will get a warning at the end
of the install/update process.
2014-10-03 14:48:28 +02:00
Jordi Boggiano 62b5062146 Improve sorting of plugin packages, fixes #3109, refs #2972 2014-09-22 17:04:58 +01:00
David Zuelke d47d9eb253 remember prefer-stable setting in composer.lock 2014-07-07 21:20:46 +02:00
Mátyás Somfai 2ed0bfc1ba added tests for not updating packages referenced by specific commit hash 2014-05-27 14:23:31 +02:00
Jordi Boggiano e23665be59 Fix replacers being picked if whatProvide was called before building the package whitelist, fixes #2991, fixes #2962 2014-05-23 15:22:53 +02:00
Jordi Boggiano d99212da52 Fix integration tests 2014-04-07 11:10:57 +02:00
Christian Flothmann 2241328934 fix "replace-alias.test" test 2014-03-12 16:35:04 +01:00
Christophe Coevoet b639005f29 Added a failing test for #2626 2014-03-12 15:10:25 +01:00
Nils Adermann ec12b8a675 Add tests for the changes in #2690 2014-02-21 13:15:07 +01:00
Nils Adermann 3148ffd355 Whitelist packages with names matching those specified before generating rules
Addresses #2690 doesn't do any performance optimisations yet which we
could do now
2014-02-21 12:25:15 +01:00
Phillip Look 07a7284ffc Change dependency processing for update with whitelisted packages
By default dependencies of white listed packages are no longer installed automaticaly.
To Install dependencies of whitelisted packages use --with-dependencies.
- rework after review comments
- precise documentation of option
- add missing punctuation marks
2013-10-16 09:37:14 +02:00
Nils Adermann 01a08a2ff3 As preparation for composer plugins, rename custom installers to plugins 2013-08-30 12:51:40 +02:00
Jordi Boggiano 21299e0bc4 Make sure all installers are installed first unless they have requirements, refs #2107, fixes #1147 2013-08-12 00:28:33 +02:00
Jordi Boggiano 9d948eb795 Merge branch 'disjunctive' 2013-05-04 10:48:14 +02:00
Jordi Boggiano 9d814c948e Adjust circular dep test 2013-04-30 10:34:58 +02:00
Marco Pivetta d7e8aa49a5 Adding failing test to show the current failure in circular deps resolution 2013-04-29 23:35:44 +02:00
Jordi Boggiano faa419cc0e Merge remote-tracking branch 'hason/alias' 2013-04-28 12:54:59 +02:00
Jordi Boggiano 0cccafbe81 Add disjunctive multi-constraints with |, refs #643, fixes #1342 2013-04-27 15:20:35 +02:00
Jordi Boggiano db4055b778 Put a higher prio on replacers of the same vendor as the required package 2013-04-17 15:39:42 +02:00
Martin Hasoň 02f92e678f Fixed update alias packages in dry-run mode 2013-04-11 13:20:35 +02:00
Martin Hasoň 753a8345cb Added support for the alias of an aliased package 2013-04-11 13:20:34 +02:00
Jordi Boggiano bf307de1d6 Fix tests 2013-03-28 20:42:25 +01:00
Jordi Boggiano ee60df708d Handle stability changes correctly, fixes #877
On update, packages that are less stable than the minimum-stability allows will
now be downgraded to their correct versions, even if they were installed as
unstable already.
2013-03-10 19:55:26 +01:00
Jordi Boggiano 636aa965f7 Fix tests 2013-03-07 09:40:22 +01:00
Jordi Boggiano ea7d79ab03 Make sure platform requirements of the root package are enforced when installing from lock, fixes #1611 2013-03-03 20:05:46 +01:00
Jordi Boggiano 4207fc3b19 Refactor require-dev handling to use one single repository and a one pass solving, fixes #719, fixes #1185, fixes #1330, fixes #789, fixes #640 2013-03-03 00:41:12 +01:00
Jordi Boggiano c29f3c698e Fix support of aliases combined with reference locked packages, fixes #1631 2013-02-28 10:51:21 +01:00
Jordi Boggiano c31f4be112 Add test to verify url and and hash are updated, fixes #1460 2013-01-07 20:27:52 +01:00
Aurélien Thieriot e264282ac7 Allowed only * wildcard 2012-12-13 14:06:06 +00:00
Aurélien Thieriot 159badb06b Add ability to use a Regexp when updating packages 2012-12-13 12:24:42 +00:00
Jordi Boggiano f1f1ddb66b Fix updates when dev packages have new dependencies (no more double updates needed), fixes #1105 2012-11-22 22:47:19 +01:00
Jordi Boggiano 5b1782970f Fix test for new lock format 2012-09-27 18:44:53 +02:00
Jordi Boggiano a9afa8bc1f Merge remote-tracking branch 'mheleniak/prefer_dist' and fix dists
Conflicts:
	src/Composer/Installer.php
	src/Composer/Package/Locker.php
2012-09-27 18:36:55 +02:00
Jordi Boggiano 418e876e8a Use only the locked repository when possible for better performance 2012-09-14 17:42:12 +02:00
Jordi Boggiano 83239aa338 Update lock file to contain the complete package info, fixes #890 2012-09-14 16:43:56 +02:00
Christophe Coevoet 9e372b1d8b Simplified the code 2012-09-05 22:56:59 +02:00
Christophe Coevoet f181dc84e2 Added tests for the suggestions
The test about replaced packages is failing because of #752.
2012-09-05 20:54:00 +02:00
Mateusz Heleniak d0829adfee added test case 2012-09-01 00:30:48 +02:00
Jordi Boggiano 5a247ca9a5 Fix regression in updating dev packages to latest ref, fixes #1030 2012-08-27 12:03:07 +02:00
Jordi Boggiano c97720c607 Fix picking of new dev packages for updates to latest source ref 2012-08-24 12:06:29 +02:00
Jordi Boggiano 5818d51af0 Refactor functional tests to fit existing tests better 2012-08-14 01:16:40 +02:00
Jordi Boggiano 2d19cf2a00 Fix hijacking possibility via provide bug 2012-07-11 19:31:30 +02:00
Jordi Boggiano 37ef2037cf Add test case to ensure replace does not allow hijacking packages 2012-07-11 13:01:16 +02:00
Jordi Boggiano e6f7150196 Change default minimum-stability to "stable", fixes #744 2012-07-04 14:22:09 +02:00
Jordi Boggiano 2ede0a3b54 Merge remote-tracking branch 'naderman/fix-duplicate-alias' 2012-07-01 19:07:14 +02:00
Nils Adermann 297bc914fc Merge pull request #859 from Seldaek/whitelist_fix
Fix update whitelist behavior, fixes #782
2012-07-01 09:55:58 -07:00
Nils Adermann 3c7fbe9264 Add a test which verifies that aliases do not get duplicated on update 2012-07-01 18:28:33 +02:00
Jordi Boggiano 5c30fcb777 Fix update whitelist behavior, fixes #782 2012-07-01 18:03:01 +02:00
Nils Adermann 0da71001e3 Add test for updating an aliased package to a non-aliased one 2012-07-01 17:41:16 +02:00
Nils Adermann 67fde90666 Correctly sort operations within transactions using DFS
Fixes #655
2012-06-05 01:06:35 +02:00
Jordi Boggiano 5bfbff867c Root requires are not taken into account in locked installs, fixes #669 2012-05-28 18:57:59 +02:00
Nils Adermann c7250917e8 Skip dependency packages required in composer.json in update whitelist 2012-05-28 12:06:43 +02:00
Nils Adermann dfe366152c Add an update whitelist test for a dependency specified in composer.json 2012-05-28 11:55:16 +02:00
Nils Adermann 90c515522a Change whitelist integration test to check it doesn't update unrelated packages 2012-05-28 01:25:34 +02:00
Jordi Boggiano 734317b812 Add test and fix update whitelist feature 2012-05-28 00:11:47 +02:00
Jordi Boggiano 43150b88a2 Refactor integration tests to accept any run command 2012-05-28 00:11:18 +02:00
Nils Adermann 41215a0e47 Require first version of a root package alias, rather than alias
This makes sure that the alias will always be installed, even if it isn't
technically needed.
2012-05-24 23:29:08 +02:00
Jordi Boggiano 9857145830 Add failing test when aliasing a feature to an aliased version 2012-05-24 20:53:13 +02:00
Jordi Boggiano ba29b4bf94 Added references for dev versions, fixes #599
dev-<branch> and <n.m>.x-dev versions can now have a #<reference> appended
to them. This reference being a git/hg commit hash, or svn revision.
2012-05-17 04:07:14 +02:00
Jordi Boggiano 5e8418a4f5 Add test for aliases and overrides between repos 2012-05-13 22:43:07 +02:00
Jordi Boggiano 4505df29df Add functional tests for the installer, fixes #580 2012-05-13 21:42:43 +02:00