Jordi Boggiano
57b4016f8a
Show default value instead of optional, refs #9181
2020-09-08 12:01:10 +02:00
Jordi Boggiano
5555b04cea
Merge pull request #9181 from shrink/feature/create-project-package-prompt
...
✨ Ask for target directory when using `create-project`
2020-09-08 11:56:22 +02:00
Jordi Boggiano
7859fe72e8
Fix line wrapping
2020-09-08 11:15:24 +02:00
Jordi Boggiano
9dc125f79c
Fix cleanup of useless feature_versions
2020-09-08 11:14:13 +02:00
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
2020-09-07 21:08:34 +02:00
Jordi Boggiano
8694077564
Merge pull request #9177 from simonberger/reduce-requests
...
Re-Fetch cached packages only once in a run
2020-09-07 17:01:46 +02:00
Jordi Boggiano
cb3c71a18a
Always assume the cache file is fresh when loading a package again which was already loaded, even if it lacks a last-modified header.
2020-09-07 17:00:02 +02:00
Jordi Boggiano
943c7a6433
Merge pull request #9165 from bpesch/master
...
Performance improvements
2020-09-07 16:25:14 +02:00
Jordi Boggiano
b8ebc7be5f
Revert a few changes to ConfigCommand
2020-09-07 16:24:15 +02:00
Jordi Boggiano
b1cbc08ec0
Allow false as well as repository value, refs #9165
2020-09-07 16:22:28 +02:00
Jordi Boggiano
cc1874e21b
Merge pull request #9179 from simonberger/fix-duplicated-code
...
Moved duplicated table render code to a new method in BaseCommand
2020-09-07 15:52:17 +02:00
Jordi Boggiano
45653c55d8
Handle authentication for api domains of GitHub/Bitbucket, fixes #9173
2020-09-07 15:29:41 +02:00
Jordi Boggiano
e6b45e853a
Fix status command handling of symlinks, and especially broken ones, fixes #9169
2020-09-07 13:54:14 +02:00
Jordi Boggiano
199696d120
Fix undefined method call
2020-09-07 11:42:24 +02:00
Jordi Boggiano
070530534d
Merge pull request #9176 from glaubinix/t/remote-file-system-response-decode
...
Composer2 RemoteFileSystem: response decode for TransportException
2020-09-04 13:13:51 +02:00
Stephan
32a0563443
RemoteFileSystem: catch decode errors for content length mismatch
2020-09-04 11:33:36 +01:00
Jordi Boggiano
fc462ab978
Merge branch '1.10'
2020-09-04 12:18:24 +02:00
Jordi Boggiano
b159e4da7e
Merge pull request #9172 from Toflar/platform-repo-cleanup
...
Consistently reuse new PlatformRepository::isPlatformPackage()
2020-09-04 12:16:55 +02:00
Alexander M. Turek
fc961dce70
Call call_user_func_array() with a numeric arguments array.
2020-09-03 23:26:09 +02:00
Samuel Ryan
a66db48673
✨ Ask for target directory when using `create-project`
2020-09-03 17:40:09 +01:00
Simon Berger
687f886d56
Moved duplicated table render code to a new method in BaseCommand
2020-09-03 15:56:04 +02:00
Simon Berger
9516d0dc98
Re-Fetch cached packages only once in a run
2020-09-03 08:18:07 +02:00
Stephan
3b2d91975e
RemoteFileSystem: response decode for TransportException
2020-09-02 16:55:37 +01:00
Yanick Witschi
bd6f62c535
Consistently reuse the new PlatformRepository::isPlatformPackage() method
2020-09-01 17:19:19 +02:00
Nils Adermann
4ac9f44571
Clear up PoolBuilder comment after code move
2020-09-01 16:57:24 +02:00
Stephan
773635e355
ComposerRepository: avoid notice if includes do not provide a sha1
2020-09-01 12:21:36 +01:00
Nils Adermann
7b990f3767
PoolBuilder: Move merging of constaints to be loaded into relevant section
2020-09-01 12:28:22 +02:00
Nils Adermann
b2670945bd
PoolBuilder: clear up comment, matching and identity are different for constraints
2020-09-01 12:23:51 +02:00
username
fc87caf639
Provide correct parameter data type
2020-08-29 21:21:15 +02:00
username
113adbcd87
Sort conditions by cost
2020-08-29 21:20:30 +02:00
username
98462292c0
Sort conditions by cost
2020-08-29 21:19:52 +02:00
username
abedc0dc42
Sort conditions by cost
2020-08-29 21:19:20 +02:00
username
17ae93bc9c
Remove unnecessary method call
2020-08-29 21:18:31 +02:00
username
18009af023
Inline variable
2020-08-29 21:16:58 +02:00
username
e719be501e
Remove unnecessary method call
2020-08-29 21:15:52 +02:00
username
459e2473c8
Remove unused variable
2020-08-29 21:15:15 +02:00
username
3f09ae0737
Simplify duplicate case
2020-08-29 21:13:54 +02:00
username
46cc387598
Split workflows
2020-08-29 21:12:07 +02:00
Nils Adermann
1385412748
Merge branch 'master' into filter-packages
...
* master:
Add tests for edge cases of packages providing names which exist as real packages
Add another test verifying that a package may provide an incompatible version of sth that actually exists
Fix provider coexistence test, needs another requirement to install both
Fix test filename to end with .test extension so it gets run
Update config section to note required scope for GitLab tokens
Fix pre/post-package-install/update/uninstall events receiving a partial list of operations, fixes #9079
Also remove credentials from cache dirs in git/svn drivers, fixes #7439 , refs #9155
AuthHelper: Allow fall-through GitLab-specific HTTP headers for auth
Sanitize repo URLs to mask HTTP auth passwords from cache directory
Util/Zip: fix strpos args order
2020-08-28 14:52:58 +02:00
Yanick Witschi
a1e1cd8fa4
Do not trigger Intervals::isSubsetOf() over and over again for platform packages
2020-08-28 14:34:50 +02:00
Jordi Boggiano
f18d91bd58
Fix pre/post-package-install/update/uninstall events receiving a partial list of operations, fixes #9079
2020-08-27 11:25:43 +02:00
Jordi Boggiano
c3db4614c9
Also remove credentials from cache dirs in git/svn drivers, fixes #7439 , refs #9155
2020-08-27 10:19:23 +02:00
Jordi Boggiano
98862f5408
Merge pull request #9155 from Ayesh/hide-passwords-cache
...
Sanitize repo URLs to mask HTTP auth passwords from cache directory
2020-08-27 10:12:56 +02:00
Jordi Boggiano
9e77514764
Merge pull request #9156 from Ayesh/gitlab-repos
...
AuthHelper: Allow fall-through GitLab-specific HTTP headers for auth
2020-08-27 10:06:28 +02:00
Ayesh Karunaratne
931a1ff1f8
AuthHelper: Allow fall-through GitLab-specific HTTP headers for auth
...
Previously, `AuthHelper` consumed the authentication credentials for GitLab domains and added access tokens as GitLab-specific headers.
[Composer repositories now supported in GitLab](https://php.watch/articles/composer-gitlab-repositories ) require standard Authorization headers with a personal access to function, which failed to work due to out GitLab-specific headers.
With this commit, AuthHelper checks if the password is an access token, and falls through to HTTP basic authentication even if the domain name is a GitLab domain name.
2020-08-27 12:13:28 +07:00
Ayesh Karunaratne
87573aab27
Sanitize repo URLs to mask HTTP auth passwords from cache directory
...
When a Composer repository is cached, a directory name is generated created stored package meta information fetched from that repository.
The cache directory can contain HTTP basic auth tokens, or access_token query parameters that end up in the directory name of the cache directory.
Discovered when trying out [GitLab composer repository feature](https://php.watch/articles/composer-gitlab-repositories ), and the HTTP password was visible in a `composer update -vvv` command.
Using passwords/tokens in the URL is fundamentally a bad idea, but Composer already has `\Composer\Util\Url::sanitize()` that tries to mitigate such cases, and this same function is applied to the repo URL before deciding the name of the repo cache directory.
2020-08-26 23:01:00 +07:00
Iskander (Alex) Sharipov
dc1fd92b9b
Util/Zip: fix strpos args order
...
`strpos()` first argument is a haystack, not a needle.
`strpos('x', $s)` is identical to `$s === 'x'` which is probably not what we want here.
2020-08-26 17:23:10 +03:00
Jordi Boggiano
9a04ecefbf
Merge branch 'master' into filter-packages
2020-08-25 16:51:28 +02:00
Jordi Boggiano
f516d36f6f
Make sure Request::requireName can not be called twice for the same name
2020-08-25 15:37:28 +02:00
Jordi Boggiano
90332f1dbd
Add a readonly mode to the cache, fixes #9150
2020-08-25 13:55:32 +02:00
Jordi Boggiano
875a4784ed
Reorg config class a little
2020-08-25 13:54:29 +02:00
Jordi Boggiano
6186c7f36f
Fix handling of root aliases in partial updates, fixes #9110
2020-08-25 11:05:28 +02:00
Jordi Boggiano
05e9fe936f
Merge branch '1.10'
2020-08-25 08:59:07 +02:00
Jordi Boggiano
b847c4dc3a
Validate licenses correctly even when proprietary is combined with some other license, fixes #9144
2020-08-25 08:58:43 +02:00
Stephan
d140a842fa
RemoteFilesystem: avoid warning when setting max file size
2020-08-24 13:53:07 +01:00
Jordi Boggiano
2bd1bd4194
Merge pull request #9142 from oleg-andreyev/fixing-error-message-for-higher-priority-repo
...
fixing error message for higher repository priority when it provides only a dev-branch
2020-08-23 16:52:55 +02:00
Jordi Boggiano
448daea696
Add support for detecting packages not matching only due to minimum stability
2020-08-23 16:48:07 +02:00
Jordi Boggiano
e5ba99cf67
Merge branch '1.10'
2020-08-23 15:18:48 +02:00
Jordi Boggiano
9ea9d20b21
Merge pull request #9130 from glaubinix/t/max-file-size
...
Downloader: add a max_file_size option to prevent too big files to be downloaded
2020-08-23 13:37:12 +02:00
Stephan
a16f32484b
Downloader: add a max_file_size to prevent too big files to be downloaded
2020-08-22 19:37:42 +01:00
Oleg Andreyev
f262feebec
fixing error message for higher repository priority, when higher repo has only a dev-branch
2020-08-22 20:07:13 +03:00
Lars Strojny
a83588f568
The proper fix
2020-08-18 16:30:47 +02:00
Lars Strojny
4e06aa051a
Check if inet_pton() exists
2020-08-18 16:00:44 +02:00
johnstevenson
3be62a9fda
Fix openssl_free_key deprecation notice in PHP 8
2020-08-14 17:45:41 +01:00
Jordi Boggiano
00e268cdbf
Clear Intervals cache when we are done with it
2020-08-13 16:45:43 +02:00
Markus Staab
fdff3aeaba
emit github action formatted error messages ( #9120 )
2020-08-13 16:37:32 +02:00
Jordi Boggiano
c845d66818
Lowercase ext- package names, refs #9093
2020-08-13 15:48:41 +02:00
Jordi Boggiano
4d20e6f5d6
Move Version util to Platform namespace, fix CS nitpicks, make regexes case insensitive for robustness, refs #9093
2020-08-13 15:48:41 +02:00
Jordi Boggiano
7e1ef19a5a
Expand library version checking capabilities ( closes #9093 )
2020-08-13 15:48:41 +02:00
Wissem Riahi
657ae5519e
Add support for TAR in Artifact packages ( #9105 )
2020-08-12 20:30:58 +02:00
Jordi Boggiano
ff757e649c
Use pool to match packages to avoid getting packages without ids, fixes #9094
2020-08-12 12:41:19 +02:00
Jordi Boggiano
826db3db5e
Used locked repo only if it is present
2020-08-12 11:11:37 +02:00
Jordi Boggiano
c0eb9834fe
Merge pull request #9116 from ryanaslett/patch-1
...
Update PathDownloader.php
2020-08-11 09:54:09 +02:00
Jordi Boggiano
51b1a752e3
Merge pull request #9098 from GrahamCampbell/patch-1
...
Use consistent phpdoc nullable syntax
2020-08-11 09:52:09 +02:00
Jordi Boggiano
7649c8438d
Fix exception when using create-project in current directory, fixes #9073
2020-08-11 09:42:42 +02:00
Ryan Aslett
c0309f22d7
Update PathDownloader.php
...
If a path repository points at a directory that is managed by composer installers, the path that gets set ends up being relative, and this check fails to see that the source is already present, and therefore removes it.
Since ->install is already using realpath around the $path argument, remove should as well.
For an example repository that demonstrates this bug See: https://github.com/ryanaslett/pathrepotestcase
2020-08-10 12:51:48 -07:00
Graham Campbell
019febb5fa
Use consistent phpdoc nullable syntax
2020-08-02 15:10:54 +01:00
Jordi Boggiano
2d3905157d
Merge branch '1.10'
2020-07-30 21:06:51 +02:00
Jordi Boggiano
00f712a7c4
Revert "Allow specifying a version requirement for CLDR"
2020-07-30 21:00:43 +02:00
Jordi Boggiano
387e828993
Promote next major version when running stable self-update, and prevent self-update from automatically upgrading to the next major release
2020-07-30 16:32:29 +02:00
Jordi Boggiano
5bd61ac55c
Cache versions data to avoid redownloading it twice during self-update
2020-07-30 16:32:29 +02:00
Jordi Boggiano
7028d0ce27
Merge pull request #9077 from glaubinix/f/api-data-detection
...
Driver: only cache composer.json file without API data to disk
2020-07-30 15:32:10 +02:00
Jordi Boggiano
daae46e1e0
Merge pull request #9085 from lstrojny/lib-cldr
...
Allow specifying a version requirement for CLDR
2020-07-30 14:53:46 +02:00
Jordi Boggiano
12d6759888
Fail hard instead of skipping branches/tags quietly when parsing VCS repos if 401/403 are returned, fixes #9087
2020-07-30 14:38:49 +02:00
Jordi Boggiano
7bcde1481d
Fix git downloader syntax for windows cmd when updating packages, fixes #9089
2020-07-30 14:38:48 +02:00
Jordi Boggiano
79813b2f77
Fix detection of git refs to be more strict
2020-07-30 14:38:48 +02:00
Lars Strojny
5a02ea6a96
Check that class exists
2020-07-30 14:29:48 +02:00
Lars Strojny
404dea61c2
Allow specifying a version requirement for the relevant CLDR
2020-07-29 19:32:53 +02:00
Stephan
b25296ef74
Driver: only cache composer.json file without API data to disk
2020-07-27 13:26:57 +01:00
Tyson Andre
e5c7835d57
Properly support PHP 8.0 Named Arguments
...
See https://wiki.php.net/rfc/named_params#internal_functions
(implemented but not yet merged)
An ArgumentCountError will be thrown when passing variadic arguments to
a function with call_user_func_array() if extra unknown named arguments
are encountered.
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///path/to/composer.phar/src/Composer/DependencyResolver/DefaultPolicy.php:84
(e.g. for `['phpunit/phpunit' => [72]]`)
2020-07-26 15:28:47 -04:00
Andreas Möller
ac055e5718
Fix: Reference
2020-07-21 23:25:05 +02:00
Jordi Boggiano
d8fa746433
Merge pull request #9058 from Seldaek/zip-cleanup
...
Clean up Zip Util to be more strict about what is a valid package archive
2020-07-21 17:17:12 +02:00
Wissem Riahi
c353ac835c
Add exception for multiple composer.json files ( #3 )
2020-07-21 17:10:26 +02:00
Markus Staab
4e1dd4bfdf
added phpdocs in StreamContextFactory
2020-07-20 20:49:00 +02:00
Jordi Boggiano
750a92b4b7
Fix headers array format
2020-07-17 17:29:00 +02:00
Jordi Boggiano
8cec8bd546
Allow verify_peer/verify_peer_name http options to be handled by curl downloader
2020-07-17 17:22:41 +02:00
Jordi Boggiano
c3d40ae79a
Fix passing of repo http options in async requests
2020-07-17 17:16:19 +02:00
Jordi Boggiano
071350286f
Compact constraints to avoid ending up with very long multi constraints
2020-07-17 16:16:58 +02:00
Jordi Boggiano
22367a68f9
Avoid loading same packages multiple times
2020-07-17 16:16:58 +02:00
Jordi Boggiano
3577070efa
Fix docblocks
2020-07-17 16:15:19 +02:00