895 Commits (e3d99cac5928d72859fac8300255c9566a26e9d5)

Author SHA1 Message Date
Jordi Boggiano 7859fe72e8
Fix line wrapping 4 years ago
Jordi Boggiano 9dc125f79c
Fix cleanup of useless feature_versions 4 years ago
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 e6b45e853a
Fix status command handling of symlinks, and especially broken ones, fixes #9169 4 years ago
Yanick Witschi bd6f62c535 Consistently reuse the new PlatformRepository::isPlatformPackage() method 4 years ago
Jordi Boggiano 9a04ecefbf
Merge branch 'master' into filter-packages 4 years ago
Jordi Boggiano 05e9fe936f
Merge branch '1.10' 4 years ago
Jordi Boggiano b847c4dc3a
Validate licenses correctly even when proprietary is combined with some other license, fixes #9144 4 years ago
Jordi Boggiano 3577070efa
Fix docblocks 4 years ago
Yanick Witschi 6ba0f3adf9 Merge branch 'master' into filter-packages
* master: (59 commits)
  Update deps
  Reuse repository manager and others directly from the Composer instance, refs #9057
  Fix usage of create-project with local filesystem repos
  Fix return value
  Add support for multiple --repository additions in create-project, and make --add-repository delete the lock file, fixes #8853
  Remove cygwin php handling in UAC elevation
  Clean up a little to make impl less invasive and to handle replacers/providers
  Supply event dispatcher in Create Project Command
  Avoid attempting to use /etc/xdg as base config home, fixes #9053, refs #9045
  Create an issue @ Docker repository on tag
  Mark transaction classes internal, refs #8827
  Prepare 1.10.9 release
  Remove highest/lowest builds for 1.10 maintenance branch
  Fix bitbucket detection of redirects to login page, fixes #9041
  Fix doc comment
  Fixed spelling mistake
  Add Windows UAC elevation to self-update command
  GitLab: clarify interactive auth prompt
  Improve support for XDG and default to XDG config dir if both that and ~/.composer are available, fixes #9045
  Fix #9033 - inconsistent behavior with minor-only flag
  ...
4 years ago
Jordi Boggiano 5ef398ebb9
Fix 5.3 support 4 years ago
Jordi Boggiano bee91155a1
Fix guessing of default branch when HEAD is a non-feature-branch 4 years ago
Jordi Boggiano 6f9b39180c
Add phpdocs 4 years ago
Jordi Boggiano 05dacbdabb
Rename DEV_MASTER_ALIAS to DEFAULT_BRANCH_ALIAS 4 years ago
Jordi Boggiano 74d89d7110
Get rid of default branch handling in version guesser as it is way too time intensive at every initialization 4 years ago
Yanick Witschi ea0ce9dd7d Merge branch 'master' into filter-packages 4 years ago
Jordi Boggiano e76fc2dc39
Avoid blocking when guessing default branch name, fixes #9001 4 years ago
Jordi Boggiano 6349764c2d
Fix root package handling of default-branch 4 years ago
Jordi Boggiano 923f198a1f
Fix default-branch attribute on package files, and add it to schema 4 years ago
Jordi Boggiano 6f0e5996de
Treat default branch name as a non-feature-branch no matter what it is called 4 years ago
Jordi Boggiano ce368f8269
Store default branch info inside metadata 4 years ago
Jordi Boggiano 04381c70fe
Merge branch '1.10' 4 years ago
Jordi Boggiano cb1f3899bb
Revert "Store default branch info inside metadata"
This reverts commit 472a62152d.
4 years ago
Jordi Boggiano 93d4cf6f91
Add --no-show-signature where git supports it, fixes #8966 4 years ago
Jordi Boggiano 472a62152d
Store default branch info inside metadata 4 years ago
Jordi Boggiano 83c64a9d19
Reuse operation formatting logic in downloaders 4 years ago
Graham Campbell fa799970ad Replace whitelist with allow list 4 years ago
Jordi Boggiano 67a88880ec
Get rid of EmptyConstraint 4 years ago
Yanick Witschi bde9502473
Made the constraint argument in Link mandatory 4 years ago
Yanick Witschi 10555ecff3
Make sure there's always a constraint 4 years ago
Jordi Boggiano a4a617abb4
Reduce amount of Filesystem/ProcessExecutor instantiations, add lots of docblocks 4 years ago
Jordi Boggiano 5a4709c3d6
Optimize rule creation for alias packages
This mainly benefits projects running updates with minimum-stability: dev
4 years ago
Jordi Boggiano e85da00dff
Add a way to ignore only some packages in --ignore-platform-reqs, and make the platform check ignore those packages which were ignored as requirements, fixes #8861 4 years ago
Jordi Boggiano ba3df8faea
Merge pull request #8843 from FIDATA/feature/archive-name
Add (default) base name of archive into composer.json
4 years ago
Jordi Boggiano 419567ba6d
Update VersionSelector to take all platform requirements into account when selecting packages 4 years ago
Jordi Boggiano b11f43f59e
Merge remote-tracking branch 'origin/1.10' 4 years ago
Jordi Boggiano 92aed041e4
Make the VersionSelector take Composer API/Runtime versions into account, refs getsentry/sentry-php#1008 4 years ago
Jordi Boggiano 81bf47ffa2
Use fully qualified calls in hot classes 4 years ago
Basil Peace 6140897d08 feat: add archive.name config option 4 years ago
Markus Staab 3c09e4021e
fixed typo 4 years ago
Markus Staab 3819b02fea
added phpstan types to `CompletePackageInterface` (#8782) 4 years ago
Jordi Boggiano be1ddcf293
Fix handling of svn trunk in version guesser, fixes #8765 4 years ago
Jordi Boggiano 876136022b
Merge remote-tracking branch 'origin/1.10' 4 years ago
Carsten Brandt 960fa4b205
Allow duplicate dashes in package names
fixes #8749
1.10 implementation of #8750
4 years ago
Jordi Boggiano 64f907f93f
Fix handling of aliases to use consistent format everywhere 4 years ago
Markus Staab 593d5abf27
use more precise phpstan/psam return-types (#8744) 4 years ago
Markus Staab c30925e68d
extracted `VersionParser::DEV_MASTER_ALIAS` (#8742) 4 years ago
Jordi Boggiano 80505e745e
Fix phpstan issues 4 years ago
Adam Žurek 25cd2382cb
Raise phpstan level to 1 (#8027) 4 years ago
Jordi Boggiano 7cca451312
Fix more issues with dev-master normalization in aliases 4 years ago
Nils Adermann 4e3d989978 A package providing a name should not conflict with a package replacing it
Simplified whatProvides, mustMatchName is unused, removed unused
function from policy
4 years ago
Jordi Boggiano 87757de6bc
Merge branch '2.0' 4 years ago
Jordi Boggiano 22a52f5813
Apply suggestions from code review
Co-Authored-By: Andreas Möller <am@localheinz.com>
4 years ago
Andreas Möller 6e88683e35
Fix: Return early 4 years ago
Nils Adermann 392d0abd21 Rename test files and standardize on allow list rather than whitelist 4 years ago
Jordi Boggiano 0d2c2c044a
Avoid skipping feature branch detection if no branch-alias is defined at all 4 years ago
Jordi Boggiano a7a975ec1c
Alias dev-master/trunk/default to 9999999-dev instead of normalizing the version to that, fixes #8323 4 years ago
Jordi Boggiano 97e2a249e8
Merge branch 'master' into 2.0 4 years ago
Jordi Boggiano d271004b30
Also check for package requiring itself in require, not only require-dev 4 years ago
Jordi Boggiano 5c4ef1eb96
Make package name validation a hard failure, fixes #7875 4 years ago
Jordi Boggiano 9cab8c10cc
Merge branch 'master' into 2.0 4 years ago
Jordi Boggiano 0b9c658bef
Add plugin-api-version used to generate a lock file in itself 4 years ago
Jordi Boggiano bc002ae1fb
Merge branch 'master' into 2.0 4 years ago
Nils Adermann 5c4f524d6a
Add funding field to composer.json
You can specify a list of funding options each with a type and URL. The
type is used to specify the kind of funding or the platform through
which funding is possible.
4 years ago
Jordi Boggiano 39fb2cc51c
Fix case 4 years ago
Jordi Boggiano 292d4b3c8f
Make sure a lock file is always written and things work well even without any dependencies in the require/require-dev 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
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 dd556f989b
Use LockArrayRepository instead of RepositoryInterface to clearly indicate which type of repo it is in some places 5 years ago
Jordi Boggiano a5b178084c
Merge branch 'master' into 2.0 5 years ago
Jordi Boggiano c3d3d45903
Merge pull request #8331 from jimmy-ho/bug/issue-8330
8330 Correct issue where permission umask of files were not set when …
5 years ago
Jordi Boggiano 78217e2313
Merge branch '1.9' 5 years ago
Jordi Boggiano a2dadb91bf
Return two packages in PathRepository when on a feature branch, one for feature branch and one for the source branch it came from, fixes #8498, fixes #8477 5 years ago
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
5 years ago
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.
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 eaae360ce6 Correcting lock files in test cases and updating output 5 years ago
Tyson Andre 4c8e41d9a9 Fix misc phpdoc and strpos arg order nits
https://www.php.net/strpos has the signature
`strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : int`
(The needle is usually the constant)

`strpos('/', $suggestion)` would only be `false` for `''` and `'/'`

So the existing check would just not suggest **anything** that was
already installed (from pecl, built-in, or composer).

The intent seems to be to not suggest non-vendored php packages
that were already installed. (b20cc22ebb)
5 years ago
James Ho 91732eee55 8330 Correct issue where permission umask of files were not set when archiving in zip format with ZipArchiver 5 years ago
Nils Adermann a114e26841 Correctly load aliases in lockedRepository to fix alias install output 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 8dfadd99d1
Merge branch '2.0' into fix/unused 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
Nils Adermann d2fa1e1319 Merge branch 'master' into 2.0
* master: (48 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
Jordi Boggiano 79a300eaac
Merge branch '1.8' 5 years ago
Rob Bast bd6b758a1b
fixes #8159
expand interface and add missing methods to aliaspackage
5 years ago
Patrick Reimers 8ae8d131d5
Add deprecation warning for name attribute 5 years ago
Patrick Reimers 627a832cc1
Return non zero exit code on deprecation 5 years ago
Jordi Boggiano 2e204b0161
Remove support for the first version of the compression algo (#7906) 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 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
Jordi Boggiano 408df4b878 Avoid dumping null values for dist reference/shasum and source reference, fixes #7955 5 years ago
Jordi Boggiano 4517c00d40 Merge branch 'master' into 2.0 5 years ago
Jordi Boggiano acea4a4d4d Warn on invalid package name or require/provide/.., fixes #7874 5 years ago
Jordi Boggiano b89720b52a Merge branch 'master' into 2.0 6 years ago
Sascha Egerer 1845adcfbd Fix update whitelist pattern resolving and add more tests 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
Stephan Vock 59360983c6 Archive: cleanup temp dir on download error 6 years ago
Jordi Boggiano fd5c5ff6bc Fix implementation of whatProvides for older provider-only repos 6 years ago
Jordi Boggiano e8c6948770 Deduplicate link instances between versions of a given package 6 years ago
Jordi Boggiano f946d8eb5a More RemoteFilesystem usage removals and some repository/vcs driver refactorings 6 years ago
Jordi Boggiano 713bc4de1d Minor fixes and updated the rest of the code/tests to use HttpDownloader 6 years ago
Jordi Boggiano 411dd51f20 Merge branch 'master' into 2.0 6 years ago
Jordi Boggiano 66d84f60c6 Fix pattern matching for remove wildcard, refs #7715 6 years ago
Jordi Boggiano 85ec111dee Merge remote-tracking branch 'dmanners/add-chat-option-for-support' 6 years ago
Jordi Boggiano 2e0f31106a Merge remote-tracking branch 'origin/master' into 2.0 6 years ago
Jordi Boggiano 5a56bb6971 Remove BC event and constraint classes 6 years ago
Gabriel Caruso 2a13bb2649 Fixes from PHPStan (#7687)
* fix docblocks

* remove redundant conditional

* fix wrong variable name

* fix wrong namespaces

* add missing private members

* remove unused/redundant arguments

* move testcase class

* exclude TestCase.php

* Tweak RuleWatchGraph type hints

* Tweak doc comment
6 years ago
Jordi Boggiano 1898ad12ce Make sure we chdir back in case update dir is relative, refs #7519 6 years ago
David Manners 96347fbea1 composer/composer#7384: add chat to support options
- update schema documents to note that chat is allowed,
 - validate that chat must be a string and a url similar to forum options
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
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 3d01ef28fa Revert "Do not dump source and dist for metapackages"
The source/dist reference is needed to operate composer outdated and other functionality

Fixes #7546

This reverts commit 42739e7959.
6 years ago
Rafael Kassner 42739e7959 Do not dump source and dist for metapackages 6 years ago
Jordi Boggiano ff59bbdab0 CS fixer 6 years ago
Vladimir Reznichenko 6f6d59426d New finding by Static Code Analysis: revert uniqid() to comply long path requirements 6 years ago
Vladimir Reznichenko cd39efc72c New finding by Static Code Analysis 6 years ago
Gabriel Caruso 7d9f8e2247
Improvements
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Jordi Boggiano ef7252b358 Avoid relying on internal usort behavior 6 years ago
Jordi Boggiano c917865fe9 Fix handling of dev versions and consolidate logic, refs #7119 6 years ago
Jordi Boggiano 35ebb8b93f Merge branch '1.6' 6 years ago
Jordi Boggiano a51911f295 Merge commit 'b1a78b60fe552bc6e7df09cb1c0154797fea6f64' 6 years ago
Filippo Tessarotto 277f32d388 Lock _readme: remove outdated hashtag link part, closes #7096 6 years ago
Jordi Boggiano 2bd34c0534 Merge branch '1.6' 6 years ago
Jordi Boggiano 9041622b86 Fix version guessing regression and a few other issues, fixes #7127 6 years ago
Hector Prats 2413b55c60 LocalChanges for ArchiveFiles 6 years ago
Jordi Boggiano 1dc78c1ad9 Merge branch '1.6' 6 years ago
Jordi Boggiano 72476b62d4 Check for license validity only on newly updated branches, refs composer/packagist#866, refs composer/packagist#883 6 years ago
Jordi Boggiano 08f769220a Merge branch '1.6' 6 years ago
Jordi Boggiano f857da7c29 Remove deprecated license check from ValidatingArrayLoader, fixes #7026, fixes #7073 6 years ago
Jordi Boggiano 0fc6fb56a0 Fix validation of license field 6 years ago
Jordi Boggiano 96d07e6753 Merge branch '1.6' 7 years ago
Jordi Boggiano 842a7ea922 Fix dev-master not being normalized correctly for the root package, fixes #7007 7 years ago
Jordi Boggiano ea9b7ecbb0
Merge pull request #6982 from carusogabriel/phpstan
Fixes from PHPStan level 0
7 years ago
Jordi Boggiano 5a1765c838 Only warn for license deprecations for new releases/branches 7 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
Jordi Boggiano 188b3a35c8 Tweak license deprecation text to handle + more gracefully, fixes #6981 7 years ago
Jordi Boggiano 5cd0fef7ff Upgrade to SPDX License 3.0 and handle deprecations more gracefully, fixes #6951 7 years ago
Jordi Boggiano ab8437ce06 Merge remote-tracking branch 'swumao/feature-6892' 7 years ago
Gabriel Caruso 2ad6f611d7 Allow bin key to receive string 7 years ago
Andreas Möller 5e68566ce6
Fix: Typo / wording 7 years ago
Andreas Möller 6059acf0a3
Fix: Remove unused parameter and field 7 years ago
闫兴茂 1c0a494c72 Update findBestVersionForPackage method to support return package name 7 years ago
闫兴茂 354bd7f7e2 Update parse name version parirs name to lower 7 years ago
Jordi Boggiano 0a9abeef88 Merge branch '1.5' 7 years ago
Alessandro Lai fc6c12bd0a Fix pretty version guessing when non-dev branch 7 years ago
Gabriel Caruso 32a409a3ee Clean elses 7 years ago