293 Commits (6cf4ba051c858a31371462d6e16cc479a7ff9ac2)

Author SHA1 Message Date
Simon Berger bae227ec2d Changed all substr calls used to compare fragments of text to strpos
Some additional code cleanups in those classes

Reverted change causing issues
4 years ago
Jordi Boggiano f18d91bd58
Fix pre/post-package-install/update/uninstall events receiving a partial list of operations, fixes #9079 4 years ago
Jordi Boggiano 83c64a9d19
Reuse operation formatting logic in downloaders 4 years ago
Jordi Boggiano aea074308c
Update batching to install plugin deps before the plugin (alone an own batch) 4 years ago
Jordi Boggiano 085fe4e7e5
Add --no-progress support and a few more fixes 4 years ago
Jordi Boggiano 87a0fc5506
Execute operations in batches to make sure plugins install in the expected order 4 years ago
Jordi Boggiano 9f380d606c
Add basic progress bar capability while waiting for jobs to complete 4 years ago
Jordi Boggiano 8f6e82f562
Add support for aborting running promises cleanly 4 years ago
Jordi Boggiano a4a617abb4
Reduce amount of Filesystem/ProcessExecutor instantiations, add lots of docblocks 4 years ago
Jordi Boggiano 5761228068
Make installer classes forward promises from downloaders to InstallationManager 4 years ago
Jordi Boggiano 816d8e9d1b
Fix phpstan error 4 years ago
Jordi Boggiano 396ad87fd0
Add handling of ctrl-C on windows for php 7.4+ 4 years ago
Jordi Boggiano a07f9ffba9
Catch SIGINT/Ctrl+C during installs and run cleanups on all packages before exiting 4 years ago
Jordi Boggiano cdc6a87e8d
Fix docblock 4 years ago
Jordi Boggiano 9b8694bc0b
Show suggestions from root package in suggest, and lists them in count only on first install of a project, fixes #8805 4 years ago
Jordi Boggiano fa14cd1353
Show number of additional suggestions when not using --all, fixes #8788 4 years ago
Jordi Boggiano 0d1922dc27
Add a Composer\Versions class which is available in all projects at runtime to query installed packages/versions 4 years ago
Jordi Boggiano 44a4429978
Remove PEAR installer/downloader/repos/..., fixes #8778 4 years ago
Ayesh Karunaratne fdb35a6a06
Fix \Composer\Installer\PackageEvent::__construct() and \Composer\Repository\ComposerRepository::isVersionAcceptable() required arguments used after optional, which is deprecated in PHP 8.0
1. `Deprecated: Required parameter $name follows optional parameter $constraint in src\Composer\Repository\ComposerRepository.php on line 745`

2. `Deprecated: Required parameter $operation follows optional parameter $operations in src\Composer\Installer\PackageEvent.php on line 73`

Optional parameters with a type declared, and a default value of `null` is excepted from this deprecation. See https://php.watch/versions/8.0/deprecate-required-param-after-optional. This is the case in `ComposerRepository::isVersionAcceptable`, which still has two optional parameters as first two parameters, but this will not raise a deprecation notice.
4 years ago
Jordi Boggiano e34a2a9f45
Remove unused used vars 4 years ago
Jordi Boggiano 8b0da77a1d
Make sure cleanup is called for every package in case any operation fails to execute 4 years ago
Jordi Boggiano a8eec36931
Merge branch '1.10' 4 years ago
Jordi Boggiano 96c1ba279a
Add infos about plugin install failure 4 years ago
Jordi Boggiano 80505e745e
Fix phpstan issues 4 years ago
Jordi Boggiano 3a9b786400
Bring suggest output in line with the rest of update/install output 4 years ago
Jordi Boggiano 44d1e15294
Simplify suggester output when updating, refactor suggest command to reuse SuggestedPackagesReporter and make smarter defaults, fixes #6267 4 years ago
Jordi Boggiano d52ce3c37f
Replace pre/post-dependencies-solving by a pre-operations-exec event happening only on install from lock 4 years ago
Jordi Boggiano 71855e6430
Restore PRE/POST_DEPENDENCY_SOLVING events 4 years ago
Jordi Boggiano 7e142b5d6b
Use Upgrading for package installs too 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.
5 years ago
Adam Žurek 406a28708f updated phpstan to 0.12 5 years ago
Jordi Boggiano f2058680a7
Remove unused use statements 5 years ago
Jordi Boggiano 5c62c7d566
Simplify promise handling 5 years ago
Jordi Boggiano f288acb1ca
Execute alias operations still 5 years ago
Jordi Boggiano 5725a2db57
Allow all prepare/cleanup/install/update/uninstall operations to return promises to be executed in parallel as well 5 years ago
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
5 years ago
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
  ...
5 years ago
Jordi Boggiano 53d2ab2253
Split up steps on VCS downloaders to allow doing network operations before touching the filesystem on GitDownloader, fixes #7903 5 years ago
Jordi Boggiano 300a888470
Merge pull request #7995 from Seldaek/plugin-deactivation
Plugin deactivation/uninstall support
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
Jordi Boggiano 3fc9ede24b
Add plugin callbacks for deactivation and uninstall, fixes #3000 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 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
5 years ago
johnstevenson f4b9bbbf42 Make unixy proxy code POSIX compatible 5 years ago
Jordi Boggiano 4517c00d40 Merge branch 'master' into 2.0 5 years ago
Jordi Boggiano 79af9d45af Merge branch '1.8' 5 years ago
Jordi Boggiano 98a15bc93c Add output for metapackage installs/updates/.. fixes #7586 6 years ago
Jordi Boggiano 0b928b2a42 Merge branch 'master' into 2.0 6 years ago
Jordi Boggiano 3dfcae99a9 Add parallel download capability to FileDownloader and derivatives 6 years ago