Jordi Boggiano
62fda2ed85
Reorg ComposerRepository to fix tests
2020-04-13 12:10:31 +02:00
Jordi Boggiano
048781c268
Fix whatProvides function declaration
2020-04-13 12:02:59 +02:00
Jordi Boggiano
3dd6dbe14a
Merge pull request #8774 from Ayesh/https
...
Update HTTP URLs to their HTTPS if they already redirect automatically
2020-04-13 11:52:21 +02:00
Jordi Boggiano
4ea6b1ef55
Make all params non-optional
2020-04-13 11:49:51 +02:00
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.
2020-04-13 07:12:35 +07:00
Ayesh Karunaratne
280f02b4bc
Update HTTP URLs to their HTTPS if they already redirect automatically
2020-04-13 06:22:02 +07:00
Fabien Villepinte
c718579623
Dispatch POST_STATUS_CMD even when there is no changes
2020-04-12 14:35:23 +02:00
Carsten Brandt
960fa4b205
Allow duplicate dashes in package names
...
fixes #8749
1.10 implementation of #8750
2020-04-10 19:01:06 +02:00
Jordi Boggiano
40a35abb94
Resolve options when creating requests to fix 5.3 build
2020-04-10 12:24:43 +02:00
Jordi Boggiano
4cb74d33e6
Forward default HttpDownloader options to RemoteFilesystem/CurlDownloader, fixes #8757
2020-04-10 12:10:30 +02:00
Jordi Boggiano
86cfbdc541
Merge branch '1.10'
2020-04-10 11:45:48 +02:00
Jordi Boggiano
2f7e901940
Fix #8748 in an alternative way to avoid messing with PATH for other binaries, fixes #8758
2020-04-10 11:42:52 +02:00
Jordi Boggiano
b3dbd95332
Fix PHP <5.6 syntax, fixes #8759 , closes #8760
2020-04-10 11:34:00 +02:00
Jordi Boggiano
a7ad186c89
Return early in case a call to the wrapped repo is unnecessary
2020-04-09 17:12:35 +02:00
Jordi Boggiano
096b507050
Merge branch '1.10'
2020-04-09 17:07:58 +02:00
Jordi Boggiano
e121de35a3
Fix variable used for symlinking absolute paths, refs #8700
2020-04-09 17:01:48 +02:00
Jordi Boggiano
f70b3b0152
Avoid warning about --2 usage when no channel is requested
2020-04-09 16:25:10 +02:00
Jordi Boggiano
8e664a37f5
Merge branch '1.10'
2020-04-09 16:13:15 +02:00
Jordi Boggiano
b79f2b5e0f
Make sure scripts calling composer call the correct composer binary even if the project requires composer/composer, fixes #8748
2020-04-09 15:43:47 +02:00
Jordi Boggiano
ccc8829ed9
Allow forcing self-update to stick to 1.x or 2.x using --1 and --2 flags, fixes #8753
2020-04-09 15:17:30 +02:00
Jordi Boggiano
28d26bd3a4
Merge pull request #8755 from Seldaek/repo-filtering
...
Add options to configure repository priorities
2020-04-09 14:02:33 +02:00
Markus Staab
6f6974df70
added phpdocs ( #8754 )
2020-04-09 13:44:30 +02:00
Jordi Boggiano
b6bad4eef6
Add options to configure repository priorities
2020-04-09 13:39:06 +02:00
Jordi Boggiano
59c831c2f8
Add docs to loadPackages
2020-04-09 11:50:37 +02:00
Jordi Boggiano
e34a2a9f45
Remove unused used vars
2020-04-09 11:23:25 +02:00
Jordi Boggiano
8b0da77a1d
Make sure cleanup is called for every package in case any operation fails to execute
2020-04-09 10:48:48 +02:00
Jordi Boggiano
55f122008b
Make sure we avoid cleanup running more than once per package on VcsDownloader
2020-04-09 10:32:59 +02:00
Matthias Van Woensel
067101dbf5
Only send GitHub API token to api.github.com domain ( #8747 )
2020-04-09 09:58:34 +02:00
Jordi Boggiano
0aaa815268
Merge branch '1.10'
2020-04-09 09:51:35 +02:00
Bingqing Wang
46db638678
fix typo
2020-04-09 09:50:38 +02:00
Bingqing Wang
63eb178297
compatible with symfony/console 5.0.0 getVerticalBorderChars() method
2020-04-09 09:50:19 +02:00
Jordi Boggiano
aa6be02c64
Allow COMPOSER_DISABLE_NETWORK to work with GitHubDriver by doing a cache priming pass first
2020-04-08 17:53:15 +02:00
Jordi Boggiano
9575c7623f
Update changelog, add upgrade guide
2020-04-08 16:44:32 +02:00
Jordi Boggiano
ee09b75be3
Clean ups
2020-04-08 15:55:51 +02:00
Jordi Boggiano
8930f1b824
Add color to lock operations and dry run output
2020-04-08 15:18:28 +02:00
Jordi Boggiano
2e64e8dc2e
Avoid generating duplicate aliases in lock file if several aliased packages are installed
2020-04-08 14:18:38 +02:00
Jordi Boggiano
64f907f93f
Fix handling of aliases to use consistent format everywhere
2020-04-08 12:31:02 +02:00
Jordi Boggiano
a695f686c3
Add some docblocks and make sure RepositorySet/PoolBuilder accept regular rootAliases and not pre-normalized ones
2020-04-08 11:46:06 +02:00
Markus Staab
593d5abf27
use more precise phpstan/psam return-types ( #8744 )
2020-04-08 10:01:09 +02:00
Jordi Boggiano
736af4cb58
Add with-all-dependencies and update-with-all-dependencies args to remove command
2020-04-07 16:13:56 +02:00
Jordi Boggiano
52d1b52eb6
Merge branch '1.10'
2020-04-07 16:07:05 +02:00
Jordi Boggiano
11999118a5
Avoid failing on malformed funding info, fixes #8731
2020-04-07 16:04:58 +02:00
Jordi Boggiano
a8eec36931
Merge branch '1.10'
2020-04-07 16:00:11 +02:00
Jordi Boggiano
96c1ba279a
Add infos about plugin install failure
2020-04-07 15:55:59 +02:00
Markus Staab
c30925e68d
extracted `VersionParser::DEV_MASTER_ALIAS` ( #8742 )
2020-04-07 15:49:07 +02:00
Jordi Boggiano
b166ef4b58
Fix more phpstan errors
2020-04-07 14:57:37 +02:00
Jordi Boggiano
bbc4854452
Merge pull request #8740 from renanbr/patch-1
...
Remove duplicated `dry-run` option
2020-04-07 14:43:41 +02:00
Jordi Boggiano
80505e745e
Fix phpstan issues
2020-04-07 14:40:51 +02:00
Adam Žurek
25cd2382cb
Raise phpstan level to 1 ( #8027 )
2020-04-07 14:13:50 +02:00
Nils Adermann
cb68fc3134
Merge pull request #8690 from Seldaek/solver-problems
...
Error reporting improvements
2020-04-07 13:27:46 +02:00
Jordi Boggiano
d34ea60c48
canonicalize providers api url
2020-04-07 13:09:22 +02:00
Jordi Boggiano
3e19e3b0f1
Show alias of version in package lists in problems
2020-04-07 13:06:05 +02:00
Jordi Boggiano
7cca451312
Fix more issues with dev-master normalization in aliases
2020-04-07 13:06:04 +02:00
Jordi Boggiano
e09dd9c10d
Detect packages which are only available in lock file and warn appropriately
2020-04-07 13:06:04 +02:00
Jordi Boggiano
8945936dbd
Deduplicate solver problems which list problems for dev-master AND 9999999-dev
2020-04-07 13:06:03 +02:00
Renan
c4a3e912a1
Remove duplicated `dry-run` option
2020-04-07 12:28:17 +02:00
Nils Adermann
415b36a1a1
Remove match types from Pool as these are no longer used
2020-04-07 11:11:18 +02:00
Nils Adermann
80a5fdf398
Remove obsolete rules and their generation
...
The only automatic conflict we have results from packages using the same name
either by literally having the same name and being different versions or they
replace the same name, so
- removed all types of obsolete rules
- simplified rule generation significantly
- got rid of provide filtering in the pool
- fixed some language in error handling
2020-04-07 11:11:18 +02:00
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
2020-04-07 11:08:47 +02:00
Jordi Boggiano
2b86df4003
Add a hint about being on v2 when things go wrong
2020-04-07 10:05:53 +02:00
Jordi Boggiano
87757de6bc
Merge branch '2.0'
2020-04-07 09:39:00 +02:00
Jordi Boggiano
1c73f078f7
Remove repository field from getProviders result
2020-04-06 21:17:03 +02:00
Nils Adermann
4fab2c7759
Error wording use "thus cannot" instead of "can thus not"
2020-04-02 16:02:17 +02:00
Jordi Boggiano
51c48b1519
Merge pull request #8729 from naderman/t/partial-update-always-update-replace
...
Give a clearer error message explaining how to update a conflicting locked dependency
2020-04-02 15:54:45 +02:00
Nils Adermann
9858718ef6
Give a clearer error message explaining how to update a conflicting locked dependency
2020-04-02 15:32:02 +02:00
Jordi Boggiano
4e7ff690c6
Revert lock file as well when a require command operation failed to complete
2020-04-02 14:39:53 +02:00
Nils Adermann
1b55b466fb
require: Add with-dependencies and with-all-dependencies as alternative option names
2020-04-02 14:19:36 +02:00
Jordi Boggiano
379baa1560
Merge pull request #8717 from naderman/t/pool-builder-allow-list
...
Move processing of partial update argument list into the pool builder
2020-04-02 12:53:02 +02:00
Nils Adermann
f7b5cbd1fc
Lock file should not contain new aliases for packages which were not updated
2020-04-02 01:12:34 +02:00
Nils Adermann
5ad93959cf
PoolBuilder: On partial update of a new dep with mutual replace, unfix replacer
...
Test also verifies provider does not get uninstalled in partial update
for another package name
2020-04-02 00:54:49 +02:00
Nils Adermann
613450e58a
PoolBuilder: properly clean up alias packages when unfixing packages
...
Prevent aliases to be duplicated: no need to apply root aliases from
composer.json on packages currently locked, they should have their
aliases in the lock file, otherwise request an update.
2020-04-02 00:08:53 +02:00
Nils Adermann
2dfbf3692a
PoolBuilder: Remove null default for io
2020-04-01 16:42:12 +02:00
Nils Adermann
14000e7575
PoolBuilder: Ensure alias references get removed when unfixing a locked package
...
Use the last key + 1 for an index instead of count, since we unset elements somtimes
2020-04-01 16:40:45 +02:00
Nils Adermann
c270d3cfa6
PoolBuilder: make io non-nullable, NullIO can be used instead
2020-04-01 15:27:51 +02:00
Nils Adermann
71c3c63b54
Remove unused variable assignment
2020-03-30 16:37:31 +02:00
Nils Adermann
9fb09049ff
Rename and document constants for partial update behavior
2020-03-30 16:21:27 +02:00
Jordi Boggiano
22a52f5813
Apply suggestions from code review
...
Co-Authored-By: Andreas Möller <am@localheinz.com>
2020-03-29 16:59:07 +02:00
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