342 Commits (f509c41280768b1d3047271ec5b50da33184d98d)

Author SHA1 Message Date
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
Pete Cooper ea48bad401
Fix spelling mistake on Cygwin 6 years ago
Nils Adermann 019ebee185 Add missing use statement to package event to fix install --no-dev 6 years ago
Nils Adermann 6ef65e5319 Add a new RepositorySet class and restrict pool usage to the solver
Breaking change for the plugin interface so bumping the version of
composer-plugin-api to 2.0.0

First step for a refactoring of the package metadata loading mechanism
6 years ago
Jordi Boggiano 16af52be8a Merge remote-tracking branch 'origin/1.6' 6 years ago
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Théo FIDRY 87646ae689
Hide suggest reason when there is not one 6 years ago
Jordi Boggiano 4ebb747e12 Merge branch '1.6' 6 years ago
Jordi Boggiano e697293cd9 Handle broken symlinks more cleanly, fixes #7255 6 years ago
Jordi Boggiano ef46a8afa4 Merge branch '1.6' 6 years ago
Patrick Rose b90987fdeb Fix permissions when using the PearBinaryInstaller
The PearBinaryInstaller is old and not used by many people, so the
world writable permissions weren't caught
6 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
johnstevenson 3511edc9e8 Fix shell proxy to allow user-defined cygdrive 7 years ago
Tom Klingenberg 1bc5163d34 mute first cd in win proxy stub for sh shell, fixes #6567
in the sh script, the first cd command did output the directory it cd'ed
into did output the path itself.

fix for me is to redirect it's standard output to /dev/null

using git bash on a windows 10 box.

w/o this fix, the workaround is to invoke the .bat file which is created
as well (but this is not so handy as a non windows user for me).
7 years ago
Martin Hasoň 88ec172bd8 Fix CS 7 years ago
Alexander M. Turek 20050dd984 Remove console formatting as well. 7 years ago
Alexander M. Turek 401ef69ae3 Remove ANSI control characters from suggested packages output. 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Fabien Potencier 07cbb73184 fixed deprecated class usages 8 years ago
Jordi Boggiano 2d8251b7ad Fix handling of local binaries on windows, refs #5612 8 years ago
Jordi Boggiano 59596ff012 Make sure we do not overwrite binaries but only re-create missing ones, refs #5127 8 years ago
Jordi Boggiano 88d5b74c74 Merge remote-tracking branch 'j0k3r/re-install-binaries' 8 years ago
Jeremy Benoist 4f7fbbc879 Introduce InstallerBinaryInterface
This is an interface for Installer which should support installing binary.
ATM there is only the `LibraryInstaller`.

It eases the check for supported method when installing binaries for all packages
8 years ago
Sami Jawhar 9d2db57f65 BinaryInstaller::generateWindowsProxyCode() now trims both single and double quotes from $binPath when creating windows .bat file. 8 years ago
Jordi Boggiano 3b0a1c6f70 Run cs fixer and update config to latest master 8 years ago
Niels Keurentjes eb77c0b7f5 phpDoc cleanup, removed unused imports, variables and parameters. 8 years ago
Niels Keurentjes 818c3e707a Ton of phpDoc fixes. 8 years ago
Niels Keurentjes 63d3964ab5 Rollback installation of plugins if corrupted, fixes #5130 8 years ago
Jeremy Benoist e9fc0e6548 Re-install binaries on update/install
Binaries are re-installed after an update/install (ie: removed and then installed)
8 years ago
Jordi Boggiano 9af645ef50 Fix missing var ref, refs #5117 8 years ago
Jordi Boggiano 6a88d49ffb Add support for the new binary installer in PEAR installer, fixes #5117 8 years ago
Jordi Boggiano ace88fa986 Rename LibraryBinariesHandler and reorganize constructor args, refs #5100 8 years ago
Helmut Hummel b1ec99faed Extract binary installation and removal to own class
The functionality to install binaries might be useful
for other installers.
Create API for that by extracting this functionality from
the LibraryInstaller class.
8 years ago
Haralan Dobrev cc389d6c1a List project suggestions in create-project command
Resolves https://github.com/composer/composer/issues/2752
8 years ago
Jordi Boggiano 9d95456bb0 Fix bug in handling of special chars in proxy .bat files for binaries, fixes #4990 8 years ago
Jos 51d4c930ef Fix for cygwin if $dir contains spaces
Without the quotes cygpath will interpret the filename (containing spaces) as two or more different files. This results in the value of $dir being incorrect.
8 years ago
Niels Keurentjes 72a3563f1e Removed some 3 year old backward compatibility code. 8 years ago
Niels Keurentjes 0dab63e050 Unified all Windows tests throughout the code. 9 years ago
Jordi Boggiano 49d7d65933 Add verbosity input support to IOInterface 9 years ago
Niels Keurentjes 18cd4f966b Added silencer utility to more gracefully handle error suppression without hiding errors or worse. Fixes #4203, #4683 9 years ago
Jordi Boggiano 966a982738 CS fixes 9 years ago
Jordi Boggiano d98b134dc3 Fix removal of packages installed in custom path with custom installers not overriding uninstall, fixes #2232 9 years ago
Jordi Boggiano 615638c7c3 Simplify bin-compat by removing the nosymlink option, refs #3704 9 years ago
Jordi Boggiano c9b51a5751 Merge remote-tracking branch 'kocsismate/feature-bin-compat' 9 years ago
Jordi Boggiano ebe0c8d79c Fix issue #3229, refs #3184 9 years ago
Jordi Boggiano 90a90e22de Merge remote-tracking branch 'Wirone/unixy-proxy'
Conflicts:
	src/Composer/Installer/LibraryInstaller.php
9 years ago
Jordi Boggiano 3d9daea6a0 CS fixes 9 years ago
Boris Momčilović b05b52ff7e InstallationManager: notifyInstalls: append authorization header for repository 9 years ago
Jordi Boggiano ce08582671 Fix CS 9 years ago
Gavin Staniforth c1e60a0abd Ensure the bin directory exists before checking empty
Line 130 has similar logic so avoided doing the check withiin `isDirEmpty()`
9 years ago
Jordi Boggiano 80f1e4372a Remove empty bin dir after all binaries have been removed from it, fixes #3451 9 years ago
Kocsis Máté 87c16073ec Merge branch 'master' of https://github.com/composer/composer into feature-bin-compat 9 years ago