1
0
Fork 0
Commit Graph

6188 Commits (e23710f92d6c6403ffe2c11a61f581035cb31c08)

Author SHA1 Message Date
Andreas Möller 6e88683e35
Fix: Return early 2020-03-29 12:18:56 +02:00
Jordi Boggiano 800491175b
Avoid failing cleanup when a package gets uninstalled 2020-03-28 20:50:49 +01:00
Jordi Boggiano 6e45a53e76
Add support for relative paths in handling of install-path for the installed.json 2020-03-28 20:39:11 +01:00
Jordi Boggiano 1b1d59ee6c
Make FileDownloader always download file first in vendor-dir/composer/$tmp instead of next to install path to avoid issues with custom installers not being loaded when downloading on first install, and use cleanup method properly 2020-03-28 20:38:50 +01:00
Jordi Boggiano 918768fc54
Make sure we get a temporary dir which is unique 2020-03-28 20:37:09 +01:00
Jordi Boggiano 73251691a0
Avoid emptying the directory before extracting an archive into it, check that it is empty instead 2020-03-28 20:36:55 +01:00
Nils Adermann fc40fefa6f Make sure nameConstraints is always set when loading a name 2020-03-27 23:13:21 +01:00
Nils Adermann 443553423b Mark replaced packages for update when using --with-dependencies
This is necessary to allow the requiring of new packages which replace
packages currently locked without requiring explicitly listing them as
an argument, so simplifies the composer require command
2020-03-27 22:59:00 +01:00
Nils Adermann 392d0abd21 Rename test files and standardize on allow list rather than whitelist 2020-03-27 22:15:04 +01:00
Nils Adermann 01fe92905a The update allow list is now generated while building the pool
This reduces code complexity while making partial updates more
predictable. This also allows composer require to successfully run a
partial update for a new package with transitive dependency updates.
2020-03-27 21:41:49 +01:00
Nils Adermann da84763f03 Move partial update handling to pool builder 2020-03-26 12:03:52 +01:00
Christian Raue b644f63a93
fixed help URL for ClearCacheCommand 2020-03-24 22:47:11 +01:00
Jordi Boggiano 6679dde713
Merge pull request #8693 from enumag/patch-2
Add --dry-run to composer require
2020-03-24 14:01:47 +01:00
Jordi Boggiano 7e679656a4
Keep absolute path repos symlinks absolute, fixes #8700 2020-03-24 12:35:18 +01:00
Jordi Boggiano 86677ad172
Avoid scanning files twice when generating optimized autoloaders, fixes #8683 2020-03-13 18:28:27 +01:00
Jáchym Toušek 3bf46a77f9
Update RequireCommand.php 2020-03-13 18:18:13 +01:00
Jáchym Toušek bbb781b1ed
Add --dry-run to composer require 2020-03-13 14:40:25 +01:00
Jordi Boggiano cbdf74eb34
Merge remote-tracking branch 'naderman/optimize-fixed-pkg-loading' into 2.0 2020-03-13 11:57:56 +01:00
Jordi Boggiano cf5513f28d
Fix syntax error 2020-03-13 11:50:35 +01:00
Jordi Boggiano 0d2c2c044a
Avoid skipping feature branch detection if no branch-alias is defined at all 2020-03-13 11:39:19 +01:00
Jordi Boggiano c2d0fed06b
Tweak lock repo name 2020-03-13 11:20:58 +01:00
Jordi Boggiano 3a9b786400
Bring suggest output in line with the rest of update/install output 2020-03-13 11:18:41 +01:00
Jordi Boggiano e15f7d6bb7
Merge branch 'master' into 2.0 2020-03-13 11:18:23 +01:00
Aaron Johnson b41e768e1f
Put backticks around command for readability.
Helps to promote the command to discern it from the sentence. :)
2020-03-12 23:17:14 -04:00
Nils Adermann 8a6382d78d Remove unnecessary TODOs and skip EmptyConstraint like null 2020-03-12 18:12:05 +01:00
Nils Adermann bbdbb3517b PoolBuilder: Drop name constraints loop, already set earlier in same code 2020-03-12 16:45:09 +01:00
Nils Adermann 59bc957e76 Simplify loading of fixed and root require packages in pool builder
additionally mark all packages replaced by fixed packages as loaded as
there is no need to load those names at all, since the fixed package
will provide them
2020-03-12 16:43:08 +01:00
Jordi Boggiano d58653627a Optimize loading of deps from fixed packages 2020-03-12 16:40:30 +01:00
Jordi Boggiano 82e2a679bf Add TODO note 2020-03-12 16:40:30 +01:00
Jordi Boggiano 08cee4c3e9
Implement getProviders equally on all repos 2020-03-12 15:39:26 +01:00
Jordi Boggiano 8a83d5cc35
Fix create-project command 2020-03-12 13:50:40 +01:00
Jordi Boggiano d09daa8d5a
Merge pull request #8684 from naderman/dev-require-errors
Handle dev extraction exit codes instead of completing broken lock with errors
2020-03-12 13:20:55 +01:00
Nils Adermann ee8df484c4 Separate createPool and createPoolWithAllPackages, fix test description 2020-03-12 13:17:04 +01:00
Nils Adermann 281d8930ff For dev extraction skip pool building, we already have a working package set
Also reduce getProviders back to just providers, and add some todos
2020-03-12 12:19:46 +01:00
Jordi Boggiano 3d0d71367d
Doc updates 2020-03-12 08:37:01 +01:00
Jordi Boggiano 73a5cc63cc
Always use Removing for consistency between dry-run and actual install 2020-03-12 08:12:12 +01:00
Mathias Berchtold 1ebeb143ae
Fix PHP 8 warnings
The PR fixes this PHP 8 warning:
PHP Deprecated:  Required parameter $ambiguousClasses follows optional parameter $blacklist in phar://.../composer.phar/src/Composer/Autoload/AutoloadGenerator.php on line 339
2020-03-11 23:00:04 -05:00
Nils Adermann 06f460c557 Remove trailing spaces from output 2020-03-11 21:32:55 +01:00
Nils Adermann 1f467046d7 Implement getProviders on reposet for all repo types and add replacers
This way errors during require dev extraction make more sense
2020-03-11 17:38:16 +01:00
Nils Adermann ddb1e79bef Handle dev extraction exit codes instead of completing broken lock with errors 2020-03-11 17:31:49 +01:00
Jordi Boggiano 9c84f4d79f
Make sure InstalledRepository itself can be added too but requires allowing installed repos in reposet 2020-03-11 17:02:25 +01:00
Jordi Boggiano 589aa351a8
Change Uninstalling to Removing in lock operations 2020-03-11 16:44:08 +01:00
Jordi Boggiano ba04a46cae
Fix 5.3 issue 2020-03-11 16:20:35 +01:00
Jordi Boggiano d13ce20b6e
Fix handling of composer repos with v1 version_normalized format 2020-03-11 16:11:12 +01:00
Jordi Boggiano a453792d6b
Merge pull request #8682 from glaubinix/f/gitlab-guest-token-access
GitLab: properly handle token which has Guest only access
2020-03-11 15:34:25 +01:00
Jordi Boggiano d559bf5387
Allow configuring a path repo to an empty path as long as using wildcards and the wildcard root exists, fixes #8679 2020-03-11 15:33:14 +01:00
Stephan 402c64c271
Update src/Composer/Repository/Vcs/GitLabDriver.php
Co-Authored-By: Jordi Boggiano <j.boggiano@seld.be>
2020-03-11 15:17:12 +01:00
Jordi Boggiano a7a975ec1c
Alias dev-master/trunk/default to 9999999-dev instead of normalizing the version to that, fixes #8323 2020-03-11 15:04:18 +01:00
Stephan Vock 55d252b9c3 GitLab: properly handle token which has Guest only access 2020-03-11 13:35:28 +01:00
Jordi Boggiano 97e2a249e8
Merge branch 'master' into 2.0 2020-03-11 09:34:55 +01:00
Jordi Boggiano d271004b30
Also check for package requiring itself in require, not only require-dev 2020-03-10 17:00:28 +01:00
Jordi Boggiano 5c4ef1eb96
Make package name validation a hard failure, fixes #7875 2020-03-10 16:57:34 +01:00
Jordi Boggiano c033644f8b
Present lock changes alphabetically, with uninstalls first, then all install/updates mixed 2020-03-10 16:08:40 +01:00
Jordi Boggiano 24a5a0dacb
Skip invalid PSR-0/4 classes from optimized autoloader, fixes #8403 2020-03-10 15:40:45 +01:00
Jordi Boggiano 94e6cfc521
Only show direct dependencies suggestions by default, add --all flag to see all in suggest command, fixes #8660 2020-03-10 15:09:28 +01:00
Jordi Boggiano 2445ef5e1f
Refactor check-platform-reqs to use InstalledRepository and look for providers as well as platform packages, fixes #8645, closes #8676
Co-authored-by: Ellis <eantaya@nuglif.com>
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2020-03-10 14:53:42 +01:00
Jordi Boggiano d63eb8179e
Merge branch 'master' into 2.0 2020-03-10 14:05:33 +01:00
Jordi Boggiano f964b83018
Add bearer support in config command and add to docs/schema, refs #8671 2020-03-10 13:39:26 +01:00
Jordi Boggiano 0b993ba4b9
Merge pull request #8671 from ethanclevenger91/ethanclevenger91/explicit-bearer-support
Bearer support.
2020-03-10 13:33:02 +01:00
Jordi Boggiano 479414d8bd
Move bearer auth to be first to make sure it does not get shadowed by github/gitlab/.. configs 2020-03-10 13:26:53 +01:00
Jordi Boggiano 9d72c92f07
Avoid looping endlessly for invalid GitLab tokens in git config, fixes #8667 2020-03-10 11:25:45 +01:00
Jordi Boggiano 34fb609aad
Merge pull request #8652 from clxmstaab/more-ambiguous
report ambiguous classes across all classmaps
2020-03-10 10:47:37 +01:00
Jordi Boggiano beb64914a3
Retrieve latest funding info for all packages in fund command 2020-03-06 17:01:59 +01:00
Ethan Clevenger cbec8ceb53 Bearer support. 2020-03-04 15:01:35 -08:00
Markus Staab cc5c5dbee1 merge fix from https://github.com/composer/composer/pull/8651 2020-03-02 13:28:10 +01:00
Markus Staab 04a18c72ba fix CS 2020-03-02 13:25:54 +01:00
Markus Staab 883a179dec removed superflous code 2020-03-02 13:24:06 +01:00
Markus Staab 61e0bf1cb5 fix typo 2020-03-02 13:23:33 +01:00
Jordi Boggiano 6d3d7c39ac
Merge pull request #8621 from remorhaz/master
Fix incorrect --no-dev handling of replaced packages
2020-02-28 23:49:09 +01:00
Jordi Boggiano 6cf54170cc
Avoid mixing write/writeError which causes issues on some terminals, fixes #8656 2020-02-28 22:42:52 +01:00
Jordi Boggiano 2285a79c63
Merge pull request #8641 from souweb22/delete_return
delete 'return' and 'spaces' in Filesystem.php
2020-02-28 22:28:14 +01:00
Jordi Boggiano c5ce4de89e
Consistently return void 2020-02-28 22:27:53 +01:00
Jordi Boggiano eb56c8dcd4
Merge pull request #8640 from souweb22/fix_doc
add 'array' to document in ConfigSourceInterface.php
2020-02-28 22:04:28 +01:00
Jordi Boggiano 5d970022e8
Normalize output of create-project target path, refs #8609, refs #8412 2020-02-28 17:02:15 +01:00
Jordi Boggiano 919fa60579
Merge pull request #8611 from ol0lll/fix/create-project-with-absolute-path
Create project with absolute path(fixes #8609)
2020-02-28 16:59:29 +01:00
Jordi Boggiano c6969756e8
Make sure $_SERVER is updated when putenv updates environment variables, fixes #8298 2020-02-28 16:27:06 +01:00
Jordi Boggiano 7a270955f5
Fix issues handling branch names with pipes in them 2020-02-28 16:00:45 +01:00
Jordi Boggiano 80875e896d
Merge branch 'master' into 2.0 2020-02-28 14:54:09 +01:00
Jordi Boggiano 05737a46fb
Improve funding info parsing 2020-02-28 14:52:29 +01:00
Jordi Boggiano 9cab8c10cc
Merge branch 'master' into 2.0 2020-02-28 13:31:56 +01:00
Jordi Boggiano 0b9c658bef
Add plugin-api-version used to generate a lock file in itself 2020-02-28 10:21:24 +01:00
Jordi Boggiano c4f19e51d8
Rework the funding info parsing to avoid requiring graphql permissions 2020-02-28 09:09:23 +01:00
remorhaz 339ee953e5 Fix incorrect --no-dev handling of replaced packages 2020-02-26 17:39:26 +02:00
Markus Staab 30b1dfb8a9 report ambiguous classes across all classmaps 2020-02-25 16:09:36 +01:00
arai e61b559eb2 delete 'return' in Filesystem.php 2020-02-23 21:38:14 +09:00
arai 766c8d448c add 'array' to document in ConfigSourceInterface.php 2020-02-23 21:31:28 +09:00
Jordi Boggiano a2eb0bab12
Abort loop correctly when package is a match 2020-02-18 08:28:35 +01:00
Jordi Boggiano 5b41b78809
Optimize findPackagesWithReplacersAndProviders to avoid multiple loops over replace/provide links 2020-02-18 08:10:54 +01:00
Jordi Boggiano 20e4cc3b6f
Fix finding replacers/providers to check constraints correctly 2020-02-17 11:23:15 +01:00
arai 1f08138379 Delete variable 2020-02-16 13:34:08 +09:00
Volker Killesreiter e532e70b22 Revert "Chore: Use consistent directory path"
This reverts commit 43e0321ee7.
2020-02-14 19:54:18 +01:00
Jordi Boggiano 2e82e34fe0
Merge branch 'master' into 2.0 2020-02-14 17:03:29 +01:00
Jordi Boggiano 4f59162827
Fix class name of caught exception 2020-02-14 17:03:22 +01:00
Jordi Boggiano 0ad322e51f
Fix tests 2020-02-14 16:55:21 +01:00
Jordi Boggiano ee2252c6ac
Add lint check after phar is built
The initial 1.10.0-RC build (593b8dfb29)
had what looks like a bit flip of one > into a :, causing a parse error as $foo->bar became $foo-:bar in some class.

This is quite unpleasant and easy to miss as it requires including the file in question before the error is spotted.

It was quite lucky I ran a composer install with the new phar right after to do something else and spotted the error.

Linting all files covers this problem mostly, at least for the PHP files.
2020-02-14 16:36:14 +01:00
Jordi Boggiano bc002ae1fb
Merge branch 'master' into 2.0 2020-02-14 15:42:17 +01:00
Jordi Boggiano 055a179cc5
Merge pull request #8453 from naderman/funding
Add funding field to composer.json and composer fund command
2020-02-14 14:27:12 +01:00
Jordi Boggiano 8dc055bec7
Fix 5.3 syntax 2020-02-14 14:18:26 +01:00
Jordi Boggiano 653e62f201
Merge pull request #8605 from guilliamxavier/fix-validate-strict-warnings
Fix validate strict warnings
2020-02-14 14:14:21 +01:00
Jordi Boggiano 4ebc318510
Fix 5.3/5.4 builds 2020-02-14 14:10:42 +01:00
Jordi Boggiano 77a477fb57
Add FundCommand 2020-02-14 14:08:38 +01:00
Jordi Boggiano f171d1fd89
Avoid requiring auth for the funding API access 2020-02-14 11:50:56 +01:00
Guilliam Xavier a17e7e9bd3
ValidateCommand: fix array syntax for PHP 5.3 2020-02-14 10:57:19 +01:00
Jordi Boggiano b033a2ae81
Retrieve funding info from github into composer.json if not declared there 2020-02-14 10:55:22 +01:00
Jordi Boggiano ff8bf0ab82
Clarify code
Co-Authored-By: Guilliam Xavier <guilliamxavier@users.noreply.github.com>
2020-02-14 10:45:35 +01:00
Guilliam Xavier a222ec5b36
ValidateCommand: remove actually unused code 2020-02-14 10:19:27 +01:00
Nils Adermann d665ea7ea9
After update and install commands display how many packages want funding 2020-02-14 10:08:36 +01:00
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.
2020-02-14 10:08:35 +01:00
Jordi Boggiano 8fd70d2dc4
Target ClassMapGenerator ignoring of invalid PSR classes for 2.0 2020-02-14 10:07:51 +01:00
Jordi Boggiano fe5b4fa4cc
Merge pull request #8597 from glaubinix/t/log-git-sync-mirror-error
Git: log error for sync mirror with existing local copy
2020-02-14 09:58:28 +01:00
Jordi Boggiano 850bfcddfa
Fix json manipulation fallback handling of empty objects, fixes #8600 2020-02-14 09:33:53 +01:00
Jordi Boggiano 71005091f0
Fix invalid access to private prop 2020-02-13 22:19:32 +01:00
Jordi Boggiano 2d8a8ed7e3
Add InstalledRepository to clean up some concepts and usages, remove BaseRepository 2020-02-13 21:44:24 +01:00
Jordi Boggiano 78885c556a
Add missing use statement 2020-02-13 18:05:04 +01:00
Jordi Boggiano c5c6d44a0b
Refactor away some unnecessary RepositorySet usages 2020-02-13 17:51:22 +01:00
Jordi Boggiano f35cd8948a
Minor refactoring of RootPackageRepo 2020-02-13 16:29:57 +01:00
Jordi Boggiano 44d1e15294
Simplify suggester output when updating, refactor suggest command to reuse SuggestedPackagesReporter and make smarter defaults, fixes #6267 2020-02-13 16:13:29 +01:00
Guilliam Xavier 35562dcd49
ValidateCommand: add a comment that we didn't forget $lockErrors 2020-02-13 15:48:36 +01:00
Guilliam Xavier 2f4bd85219
ValidateCommand: de-invert if-elseif-else to reduce code duplication 2020-02-13 14:57:38 +01:00
Guilliam Xavier 901d177179
ValidateCommand: factorize $printSchemaUrl code 2020-02-13 14:46:50 +01:00
Guilliam Xavier b5e41d6792
ValidateCommand: always display all warnings, independently of --strict 2020-02-13 14:43:26 +01:00
Guilliam Xavier 7e2679ffc1
ValidateCommand: pass $isStrict to outputResult() of with-dependencies too 2020-02-13 14:37:08 +01:00
Jordi Boggiano d52ce3c37f
Replace pre/post-dependencies-solving by a pre-operations-exec event happening only on install from lock 2020-02-12 14:35:31 +01:00
Stephan Vock 243ee9b1e4 Git: log error for sync mirror with existing local copy 2020-02-12 10:17:21 +00:00
Jordi Boggiano 835a91532d
Add PRE_POOL_CREATE event, fixes #8348 2020-02-12 10:41:04 +01:00
Jordi Boggiano 71855e6430
Restore PRE/POST_DEPENDENCY_SOLVING events 2020-02-12 10:41:03 +01:00
Jordi Boggiano 4d74f5ba95
Fix exclude-from-classmap handling to avoid foo matching foo* directories, fixes #8563, refs #8575 2020-02-12 10:23:03 +01:00
Jordi Boggiano 7e142b5d6b
Use Upgrading for package installs too 2020-02-11 17:51:02 +01:00
Jordi Boggiano 02433c3659
Merge pull request #8565 from glaubinix/t/create-project-add-repository
Create project: add option to add the repository to the composer.json
2020-02-11 13:47:34 +01:00
Jordi Boggiano 9609729de7
Change update to upgrade for package update operations which are upgrades, refs #8594 2020-02-11 13:43:38 +01:00
Jordi Boggiano be8dd528b8
Merge remote-tracking branch 'origin/master' into 2.0 2020-02-11 11:33:52 +01:00
Jordi Boggiano ef249ef6b6
Add support for lib-zip platform package 2020-02-11 11:01:20 +01:00
Ion Bazan a180f48921 Distinguish between updates and downgrades in dry-run 2020-02-11 16:35:35 +08:00
Stephan Vock 2a564a9f36 Create project: add option to add the repository to the composer.json 2020-02-10 16:46:28 +00:00
Jordi Boggiano 5843a282bc
Merge pull request #8562 from adrianosferreira/fix-archive-format-cli
Uses config data from Composer object whenever possible on ArchiveCommand
2020-02-10 17:26:26 +01:00
Adriano Ferreira 97d077c43b Uses config data from Composer object whenever possible on ArchiveCommand
It was previously blindly getting a new instance from the factory thus ignoring what is on Composer object config data.
2020-02-10 13:15:58 -02:00
Jordi Boggiano 589abb06a3
PHPStan fixes 2020-02-07 23:10:10 +01:00
Jordi Boggiano c56886ac36
Avoid checking for .dockerenv if open_basedir is set, fixes #8585 2020-02-07 22:33:39 +01:00
Jordi Boggiano 45ecbae8f5
Merge branch 'master' into 2.0 2020-02-07 22:20:51 +01:00
Ion Bazan 2ff73a8797 respect `notify-on-install` option 2020-02-05 15:52:14 +08:00
Jordi Boggiano 4e4304ae7d
Fix 2020-02-04 13:22:46 +01:00
Jordi Boggiano 0b4763e6c7
Make it clear which package the error is for when detecting uncommitted changes 2020-02-04 13:06:20 +01:00
Jordi Boggiano 006c3de542
Fix tests and make TTY usage on ProcessExecutor cleaner 2020-01-31 16:33:34 +01:00
Jordi Boggiano f572636628
Add support for TTY mode on Linux/OSX in script handlers when running in interactive mode, fixes #5856, fixes #3299, closes #4036 2020-01-31 15:45:33 +01:00
Jérôme Billiras 58e2956b95
Allow referencing scripts to extends @composer 2020-01-31 14:56:22 +01:00
Jordi Boggiano d14d411fa4
Add --dry-run to require and remove commands, fixes #7793 2020-01-31 14:34:10 +01:00
Nils Adermann fdfdee03c1 Remove unused argument to pool->match 2020-01-30 22:54:59 +01:00
Nils Adermann 4f44b7b221 Remove unused policy function findUpdatePackages 2020-01-30 22:49:15 +01:00
Jordi Boggiano a1fe64152d
Minor Installer cleanups 2020-01-30 21:03:35 +01:00
Jordi Boggiano 2f4ea3a463
Fix show command, refactor RepositorySet constructor 2020-01-30 20:21:17 +01:00