Jordi Boggiano
99300f6dc0
Merge pull request #9206 from staabm/patch-3
...
Improve error message further
2020-09-14 21:25:21 +02:00
Markus Staab
cf9786f112
Improve error message further
2020-09-12 11:13:37 +02:00
Simon Berger
74e02193a8
Do not hard fail on lazy repository when network is disabled and no package cache exists
2020-09-11 21:35:20 +02:00
Jordi Boggiano
6cf4ba051c
Update messaging about plugin errors
2020-09-11 13:43:32 +02:00
Jordi Boggiano
bb96b04f4a
Remove dead code
2020-09-10 16:05:31 +02:00
Jordi Boggiano
2a82371adf
Rename available-package-regexes to available-package-patterns and switch negated function around, refs #9197
2020-09-10 14:58:05 +02:00
Mike Baynton
66a767c065
specify covered names with regexes in 2.x repos
...
This supplements the available-packages list so that repositories may
rule themselves out of a given name (and thus not be probed with lazy
load requests) by regex, as well as by exact name match.
The use case is sizeable and varying supplemental Composer repositories
such as packages.drupal.org, which otherwise must either maintain a list
of over 10k package names in their root packages.json or accept lots of
lazy-load requests for unrelated packages that will 404.
2020-09-09 21:43:46 -05:00
Jordi Boggiano
0408207e35
Merge branch '1.10'
2020-09-09 11:49:04 +02:00
Jordi Boggiano
4a02768591
Fail hard if an invalid root alias is detected
2020-09-09 11:44:05 +02:00
Jordi Boggiano
6f91e038ea
Merge branch '1.10'
2020-09-08 17:04:03 +02:00
Jordi Boggiano
c6d0309d48
Merge pull request #9188 from simonberger/fix-php53-closure-self-usage
...
Fix self usage in closures results in fatal error on PHP 5.3
2020-09-08 12:12:59 +02:00
Simon Berger
7ef87626ac
Fixed self usage in closure fails on PHP 5.3
2020-09-08 12:01:51 +02:00
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
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
...
2020-07-17 14:30:12 +02:00
Jordi Boggiano
c3028c02d9
Merge branch '1.10'
2020-07-17 13:18:02 +02:00
Jordi Boggiano
a474dee236
Merge remote-tracking branch 'johnstevenson/elevate2' into 1.10
2020-07-17 13:01:24 +02:00
Jordi Boggiano
eac03e16e7
Reuse repository manager and others directly from the Composer instance, refs #9057
2020-07-17 12:05:07 +02:00
Jordi Boggiano
433968de17
Fix usage of create-project with local filesystem repos
2020-07-17 11:30:03 +02:00
Jordi Boggiano
201533e16f
Fix return value
2020-07-17 11:05:57 +02:00
Jordi Boggiano
a2ab6f2b54
Add support for multiple --repository additions in create-project, and make --add-repository delete the lock file, fixes #8853
2020-07-17 10:38:46 +02:00
johnstevenson
8ddbae358d
Remove cygwin php handling in UAC elevation
...
When called from a native shell and using cygwin PHP, cygpath translates
`/tmp` to `User\AppData\Local\Temp`, rather than `/cygdrive/.../tmp`.
This change does not affect using windows PHP from a Cygwin shell.
2020-07-16 17:20:12 +01:00
Jordi Boggiano
942562c382
Clean up Zip Util to be more strict about what is a valid package archive, fixes #8931
2020-07-16 17:36:46 +02:00
Jordi Boggiano
37b1e0fffd
Merge pull request #8955 from tlamy/OutdatedNoDevOption
...
Outdated/Show: no dev option
2020-07-16 15:40:09 +02:00
Jordi Boggiano
6869a1a5cb
Clean up a little to make impl less invasive and to handle replacers/providers
2020-07-16 15:37:12 +02:00
Shaun Johnston
b4ecca5d0b
Supply event dispatcher in Create Project Command
...
This update allows composer plugins to intercept the
create-project command to inject additional functionality such as
providing additional remote filesystem handling.
2020-07-16 23:34:30 +10:00
Jordi Boggiano
7cecc6ad3f
Avoid attempting to use /etc/xdg as base config home, fixes #9053 , refs #9045
2020-07-16 14:59:49 +02:00
Jordi Boggiano
89d35af83d
Mark transaction classes internal, refs #8827
2020-07-16 13:59:49 +02:00
Jordi Boggiano
8b934a415f
Merge branch '1.10'
2020-07-16 12:27:00 +02:00
Jordi Boggiano
6cb4dc41b8
Fix bitbucket detection of redirects to login page, fixes #9041
2020-07-16 12:26:48 +02:00
johnstevenson
57f91d01c7
Fix doc comment
2020-07-16 11:53:55 +02:00
johnstevenson
272654d6e2
Fixed spelling mistake
2020-07-16 11:53:55 +02:00
johnstevenson
cae913c434
Add Windows UAC elevation to self-update command
...
If self-update fails on Windows due to file permission issues, a .vbs
script is used to elevate a call to the cmd.exe `move` command.
Unfortunately it is not possible to know if the user cancelled the UAC
prompt using this method - it is possible using a Powershell script, but
flashing hidden windows make this a less desirable option.
The only downside is that a UAC invoked process is asynchronous, so a
300 millisecond timeout is used to allow cmd.exe to do its stuff.
Therefore if the OS is busy the script may finish first and incorrectly
report that the file has not been written.
2020-07-16 11:53:55 +02:00
Stephan
fb0ad7c900
GitLab: clarify interactive auth prompt
2020-07-15 16:18:21 +01:00
Jordi Boggiano
870fdc59df
Merge remote-tracking branch 'tomekpryjma/fix-issue-9033'
2020-07-15 17:02:16 +02:00
Jordi Boggiano
10590dc519
Improve support for XDG and default to XDG config dir if both that and ~/.composer are available, fixes #9045
2020-07-15 10:56:13 +02:00
Tomek
23c32ed6d3
Fix #9033 - inconsistent behavior with minor-only flag
2020-07-14 23:06:20 +01:00
Jordi Boggiano
92ef439666
Merge branch '1.10'
2020-07-07 21:12:27 +02:00
Jordi Boggiano
d2d3aa8494
Fix parsing of # in funding links, fixes composer/packagist#1097, closes #9035
2020-07-07 21:12:04 +02:00
Jordi Boggiano
d7b1248508
Create pool before reading package ids as the pool creation reassigns package ids, fixes #9034
2020-07-04 12:00:37 +02:00
Jordi Boggiano
1fa6f4c83c
Add a default signal handler to avoid having the SIGINTs ignored, fixes #9027
2020-07-01 11:37:38 +02:00
Jordi Boggiano
ee4afa29e7
Include dev packages in locked package listings for show command
2020-07-01 11:17:52 +02:00
Jordi Boggiano
70f211923b
Add support for list URL in composer repos, fixes #9009
2020-07-01 11:16:38 +02:00
Jordi Boggiano
1824637dab
Merge pull request #8999 from naderman/fix-solver-bug-exception-7051
...
Fix solver bug exception 7051
2020-06-27 23:50:55 +02:00
Nils Adermann
3f5dde9873
Solver: Ensure multi conflict rules still get added to learned pool
2020-06-26 22:04:17 +02:00
Nils Adermann
edef748169
Solver: Clarify when/why undecided literals can get skipped in analyze
2020-06-26 21:55:03 +02:00
Nils Adermann
851050e85c
Solver: multiconflict analyze handles positive decision same as regular literal
2020-06-26 21:51:02 +02:00
Nils Adermann
6e05345be7
Solver: Move analyze handling of multiconflict rule to clearer location
...
This way we're not looking at the previous decision at the top of the
loop but working with the current decision at the bottom
2020-06-26 21:51:02 +02:00
Nils Adermann
b34f916470
Solver: No need to check previous decision if we reached the first one
2020-06-26 21:51:02 +02:00
Nils Adermann
2631210493
Solver: analyze multi conflict rules in conflict resolution correctly
2020-06-26 21:51:02 +02:00
Jordi Boggiano
5ef398ebb9
Fix 5.3 support
2020-06-26 16:58:02 +02:00
Jordi Boggiano
bee91155a1
Fix guessing of default branch when HEAD is a non-feature-branch
2020-06-26 16:16:16 +02:00
Jordi Boggiano
4a2ea3c67a
Fix var name
2020-06-25 09:16:23 +02:00
Jordi Boggiano
86af5e5c6e
Remove conflict between trunk and master, as they do not normalize anymore
2020-06-25 08:58:08 +02:00
Jordi Boggiano
e2f1e8aed6
Allow optimizing fetching of dev versions only if no other stability is needed
2020-06-25 08:57:42 +02:00
Jordi Boggiano
a133e694d0
Speed up fund command fetching of latest data and make sure it uses default branch info
2020-06-25 08:57:18 +02:00
Jordi Boggiano
6f9b39180c
Add phpdocs
2020-06-25 08:56:46 +02:00
Jordi Boggiano
05dacbdabb
Rename DEV_MASTER_ALIAS to DEFAULT_BRANCH_ALIAS
2020-06-25 08:56:14 +02:00
Jordi Boggiano
821e575658
Merge branch '1.10'
2020-06-24 21:35:38 +02:00
Jordi Boggiano
74d89d7110
Get rid of default branch handling in version guesser as it is way too time intensive at every initialization
2020-06-24 21:16:16 +02:00
Jordi Boggiano
a5e608fb73
Merge pull request #9008 from Ayesh/strtr-improvements
...
Replace cascading str_replace() calls with strtr()
2020-06-24 15:06:52 +02:00
Jonas Drieghe
eea7564c9e
Revert accidental rename of $dependencies variable in unrelated code branch
2020-06-24 07:28:22 +02:00
Jonas Drieghe
d5d956df4d
Use correct variable name
2020-06-23 19:50:27 +02:00
Jonas Drieghe
73a721c7e5
Add the missing summary format to command-line help text
2020-06-23 19:45:26 +02:00
Jonas Drieghe
ec6e05d55f
Sort licenses so that the most used license will appear first
2020-06-23 19:44:12 +02:00
Jonas Drieghe
668655c21a
Rename variable for clarity
2020-06-23 19:43:27 +02:00
Stephan Vock
52332d994e
GitDriver: use authentication for supports check
2020-06-23 13:06:30 +01:00
Ayesh Karunaratne
e3c75b3e87
Replace cascading str_replace() calls with strtr()
...
Replaces cascading str_replace() calls with a single strtr() call that makes it mode readable and provides a micro performance improvement.
Some instances of cascading str_replace() calls were not refactored due to the potential recurring replacement patterns.
2020-06-23 04:10:26 +07:00
Yanick Witschi
ea0ce9dd7d
Merge branch 'master' into filter-packages
2020-06-22 18:38:16 +02:00
Jordi Boggiano
e76fc2dc39
Avoid blocking when guessing default branch name, fixes #9001
2020-06-22 10:48:15 +02:00
Nils Adermann
edd2aa27db
Add missing isVerbose argument to problem formatting call
2020-06-19 23:31:11 +02:00
Jordi Boggiano
7a37e78a30
Speed up installer tests by avoiding lots of bootstrapping and git processes
2020-06-19 17:56:13 +02:00
Jordi Boggiano
6349764c2d
Fix root package handling of default-branch
2020-06-19 15:34:28 +02:00
Jordi Boggiano
923f198a1f
Fix default-branch attribute on package files, and add it to schema
2020-06-19 15:33:25 +02:00
Jordi Boggiano
6f0e5996de
Treat default branch name as a non-feature-branch no matter what it is called
2020-06-19 14:12:44 +02:00
Jordi Boggiano
4682efcf77
Support also default_branch flag in cached versions
2020-06-19 09:45:39 +02:00
Jordi Boggiano
52afa5ef16
Fix handling of default branches
2020-06-17 17:54:06 +02:00
Jordi Boggiano
f70d527f4f
Fix git tests
2020-06-17 17:53:00 +02:00
Jordi Boggiano
ce368f8269
Store default branch info inside metadata
2020-06-17 17:41:38 +02:00
Jordi Boggiano
04381c70fe
Merge branch '1.10'
2020-06-17 17:37:39 +02:00
Jordi Boggiano
cb1f3899bb
Revert "Store default branch info inside metadata"
...
This reverts commit 472a62152d
.
2020-06-17 17:32:26 +02:00
Michael Stucki
0278e7453d
Clean Git repos during discard
2020-06-17 17:00:35 +02:00
Jordi Boggiano
8c0ecf7337
Clarify why a dev tag was ignored, fixes #8951
2020-06-17 16:41:33 +02:00
Jordi Boggiano
93d4cf6f91
Add --no-show-signature where git supports it, fixes #8966
2020-06-17 16:37:06 +02:00
Jordi Boggiano
472a62152d
Store default branch info inside metadata
2020-06-17 16:09:38 +02:00
Thomas Lamy
722bbce72f
Merge remote-tracking branch 'upstream/master' into OutdatedNoDevOption
2020-06-17 13:03:15 +02:00
Jordi Boggiano
83c64a9d19
Reuse operation formatting logic in downloaders
2020-06-17 12:33:02 +02:00
Jordi Boggiano
aaef3ff5ff
Improve error reporting when unzip fails due to race condition in unhandled Promise, refs #8988
2020-06-17 10:44:50 +02:00
Jordi Boggiano
d1fedc3bd6
Restore old behavior of wiping dir contents before installing, fixes #8988
2020-06-17 10:42:05 +02:00
Jordi Boggiano
80d1b1a34c
Merge pull request #8987 from GrahamCampbell/patch-2
...
Marked getRootAliasesPerPackage as static
2020-06-17 09:22:18 +02:00
Jordi Boggiano
5ec6b81157
Merge pull request #8986 from GrahamCampbell/patch-1
...
Phpdoc tweaks
2020-06-17 09:22:04 +02:00
Jordi Boggiano
c8731598cc
Merge branch '1.10'
2020-06-16 17:16:42 +02:00
Jordi Boggiano
da572f1fdc
Merge remote-tracking branch 'GrahamCampbell/allow-list' into 1.10
2020-06-16 16:52:54 +02:00
Jordi Boggiano
09fc263d37
Fix status command bug
2020-06-16 16:27:36 +02:00
Graham Campbell
643852a2b0
Marked getRootAliasesPerPackage as static
2020-06-16 13:48:59 +01:00
Graham Campbell
a4f4101346
Phpdoc tweaks
2020-06-16 13:46:20 +01:00
Jordi Boggiano
0d369c87bc
Merge pull request #8975 from ffraenz/pr
...
Composer 2: Allow plugins to override the URL before triggering the download
2020-06-16 14:44:03 +02:00
Jordi Boggiano
5aae7f4f20
Merge remote-tracking branch 'jderusse/optimize-compile'
2020-06-16 14:18:03 +02:00
Jordi Boggiano
aea074308c
Update batching to install plugin deps before the plugin (alone an own batch)
2020-06-16 14:07:30 +02:00
Jordi Boggiano
085fe4e7e5
Add --no-progress support and a few more fixes
2020-06-16 14:00:24 +02:00
Jordi Boggiano
9c78eda7db
Fix FileDownloader::update impl to handle promises
2020-06-16 14:00:23 +02:00
Jordi Boggiano
87a0fc5506
Execute operations in batches to make sure plugins install in the expected order
2020-06-16 14:00:22 +02:00
Jordi Boggiano
9f380d606c
Add basic progress bar capability while waiting for jobs to complete
2020-06-16 14:00:22 +02:00
Jordi Boggiano
b1e15c7725
Fix a couple async bugs
2020-06-16 14:00:21 +02:00
Jordi Boggiano
3af617efe8
Parallelize zip extraction using async unzip processes
2020-06-16 14:00:20 +02:00
Jordi Boggiano
8f6e82f562
Add support for aborting running promises cleanly
2020-06-16 14:00:20 +02:00
Jordi Boggiano
0dad963cd8
Add executeAsync to ProcessExecutor and allow Loop class to wait on it in addition to HttpDownloader
2020-06-16 14:00:19 +02:00
Jordi Boggiano
d5286d0cb8
Add a way for FileDownloader subclasses to add paths to the cleanup stage
2020-06-16 14:00:18 +02:00
Jordi Boggiano
a797ee1322
Fix inline aliases not being loaded when extracting dev requirements, fixes #8954
2020-06-16 13:50:29 +02:00
Jordi Boggiano
da6c0635d2
Merge pull request #8980 from stucki/discard-using-git-clean
...
Discard changes is incomplete if Git project has additional folders
2020-06-16 11:08:44 +02:00
Jonas Drieghe
8da2811dc3
Add new summary format for licenses ( #8973 )
...
* Add new summary format to render the number of dependencies for each used license
* Array dereferencing wasn't available on php 5.3
* Add summary format to documentation
2020-06-16 10:07:53 +02:00
Michael Chekin
6d9bf42655
Additional Util\RemoteFileSystem tests ( #8960 )
...
* RemoteFilesystemTest: simplifying some mock expectations calls
- will($this->returnValue()) to willReturn()
- will($this->returnCallBack()) to willReturnCallback()
* RemoteFilesystemTest: extracting identical mocks for IOInterface into a separate getIOInterfaceMock() method
* RemoteFilesystemTest: converting protected helper methods to private.
* RemoteFilesystemTest: moving getConfigMock() private method after the public methods (with other private methods)
* adding RemoteFileSystemTest::testCopyWithRetryAuthFailureFalse() unit test.
* Allow optional injecting of AuthHelper into RemoteFilesystem constructor.
* adding RemoteFileSystemTest::testCopyWithSuccessOnRetry() unit test.
* using backward compatible @expectedException in RemoteFilesystemTest.php
* RemoteFilesystemTest: extracting RemoteFilesystem with mocked method creation into a separate method.
* RemoteFilesystemTest: extracting AuthHelper with mocked method creation into a separate method.
2020-06-16 09:35:33 +02:00
Fränz Friederes
5c13c97428
Implement type and context properties in PreFileDownloadEvent
2020-06-15 21:43:41 +02:00
Michael Stucki
ae59047166
Clean Git repos during discard
2020-06-15 21:42:41 +02:00
Fränz Friederes
907367ff43
Fix PHPDoc issue
2020-06-15 21:28:27 +02:00
johnstevenson
54debe8210
Respect disable-tls in Versions::getLatest
...
Use http to get the latest version when disable-tls is true and error-
trap DiagnoseCommand::checkVersion so that all checks can complete.
Fixes #8657 .
2020-06-15 13:08:38 +02:00
Jordi Boggiano
a17bbec842
Avoid double warnings about composer.json when running outdated, fixes #8958
2020-06-15 13:04:02 +02:00
Fränz Friederes
13bdf8553a
Add setProcessedUrl method to PreFileDownloadEvent
2020-06-11 21:53:31 +02:00
Graham Campbell
a97d13fc6d
Fixed typo
...
Co-authored-by: ZhangWei <zhwei.yes@gmail.com>
2020-06-08 09:33:40 +01:00
Graham Campbell
fa799970ad
Replace whitelist with allow list
2020-06-07 22:15:09 +01:00
Jordi Boggiano
2fa58ccf96
Reduce amount of packages loaded by avoiding extensions of the constraint beyond the root constraint
2020-06-06 17:18:42 +02:00
Jordi Boggiano
4b9b499ce5
Fix issue loading aliases and fix markPackageNameForLoading when called twice in a row for same package it would overwrite the constraint the second time
2020-06-06 17:16:54 +02:00
Jordi Boggiano
f2befc46c9
Avoid storing duplicate packages when loading the same package twice
2020-06-05 17:13:39 +02:00
Jordi Boggiano
67a88880ec
Get rid of EmptyConstraint
2020-06-05 16:52:24 +02:00
Jordi Boggiano
cb19347031
Update to latest master
2020-06-05 16:52:24 +02:00
Yanick Witschi
b6c436598b
Updated to latest semver intervals
2020-06-05 16:52:24 +02:00
Yanick Witschi
6ef47baca1
Added a todo for package dupes
2020-06-05 16:52:24 +02:00
Yanick Witschi
014e9d5dd1
Fixed last remaining pool builder test
2020-06-05 16:52:24 +02:00
Yanick Witschi
5097ed6480
Fixed another test
2020-06-05 16:52:24 +02:00
Yanick Witschi
5a835db24d
Fixed another partial update test
2020-06-05 16:52:24 +02:00
Yanick Witschi
7be24dccd9
Fixed some of the partial update tests
2020-06-05 16:52:24 +02:00
Yanick Witschi
225a6a0a82
Improved variable naming
2020-06-05 16:52:24 +02:00
Yanick Witschi
0955d38374
Simplify package loading
2020-06-05 16:52:24 +02:00
Yanick Witschi
779b56ab2b
Fixed psalm annotations
2020-06-05 16:52:24 +02:00
Yanick Witschi
b00291cf21
CS
2020-06-05 16:52:24 +02:00
Yanick Witschi
00500f83c0
Using the current subset branch of @Seldaek to fix subset tests
2020-06-05 16:52:24 +02:00
Yanick Witschi
26877285ad
Filter duplicate packages
2020-06-05 16:52:24 +02:00
Yanick Witschi
bde9502473
Made the constraint argument in Link mandatory
2020-06-05 16:52:24 +02:00
Yanick Witschi
2427bef238
Typo
2020-06-05 16:52:24 +02:00
Yanick Witschi
bca88bdd4b
Fixed PoolBuilder running endlessly when packages do not exist
2020-06-05 16:52:24 +02:00
Yanick Witschi
b87fc5bbfd
Added more poolbuilder test
2020-06-05 16:52:24 +02:00
Yanick Witschi
d78c37edd2
Cleanup and added some more improvements, tests still failing
2020-06-05 16:52:24 +02:00
Nils Adermann
5dd4b456b9
PoolBuilder: Do not load any alternatives to pkgs replaced by fixed pkg
2020-06-05 16:52:24 +02:00
Nils Adermann
bb4cabc0b9
PoolBuilder: Avoid loading any alternatives to fixed packages
2020-06-05 16:52:24 +02:00
Yanick Witschi
1c8865a5d1
Comment
2020-06-05 16:52:24 +02:00
Yanick Witschi
10555ecff3
Make sure there's always a constraint
2020-06-05 16:52:24 +02:00
Yanick Witschi
912aecb666
Removed name constraints
2020-06-05 16:52:24 +02:00
Yanick Witschi
af7feade8f
POC
2020-06-05 16:52:24 +02:00
Thomas Lamy
caa5545478
#8945 Add "--no-dev" to outdated/show commands
2020-06-05 16:48:10 +02:00
Jordi Boggiano
9d5051faac
Merge branch '1.10'
2020-06-05 16:02:02 +02:00
Jordi Boggiano
6630519882
Fix #8298 for COMPOSER_DEV_MODE
2020-06-05 16:01:39 +02:00
Jordi Boggiano
29ec10d95c
Fix output formatting
2020-06-05 13:43:42 +02:00
Nils Adermann
f15b9c258e
Merge pull request #8949 from Seldaek/cleanups
...
Cleanups / docblocks
2020-06-05 10:48:29 +02:00
Ayesh Karunaratne
71ddc487fe
Platform Check: Add a special case for `zend-opcache`.
...
Ref #8946
The platform-check feature maps `ext-X` to `extension_loaded('X')` calls.
While most of the extensions can be tested this way, the `zend-opcache`
extension requires `zend opcache` to be probed instead of the `zend-opcache`
name.
This commit adds a special case for `zend-opcache` to use the correct name
in `extension_loaded()` calls in generated `platform_check.php` file.
2020-06-05 02:09:31 +07:00
Jordi Boggiano
c9571f90b4
Run phpstan with regular output and then run again to cs2pr if there was an error, to keep usable output in CI logs
2020-06-04 16:11:02 +02:00
Jordi Boggiano
a4a617abb4
Reduce amount of Filesystem/ProcessExecutor instantiations, add lots of docblocks
2020-06-04 16:08:23 +02:00
Jordi Boggiano
5761228068
Make installer classes forward promises from downloaders to InstallationManager
2020-06-04 10:34:16 +02:00
Jordi Boggiano
816d8e9d1b
Fix phpstan error
2020-06-03 15:41:47 +02:00
Jordi Boggiano
90bd351b8b
Allow downgrades to go through even though the target dir for archive extraction exists
2020-06-03 15:37:36 +02:00
Jordi Boggiano
63041fbf50
Add missing class
2020-06-03 15:28:10 +02:00
Jordi Boggiano
02059d96e7
Fail early if an archive extraction is going to fail at install/update stage to avoid leaving the vendor dir in a half up to date state
2020-06-03 15:19:02 +02:00
Jordi Boggiano
396ad87fd0
Add handling of ctrl-C on windows for php 7.4+
2020-06-03 15:18:27 +02:00
Jordi Boggiano
a66a939b76
Merge pull request #8937 from Seldaek/optim-rules
...
Optimize rule creation for alias packages
2020-06-03 14:17:13 +02:00
Jordi Boggiano
5ef7765cbd
Merge pull request #8923 from staabm/glob-classmap
...
Autoload-Generator: support glob patterns in classmaps
2020-06-03 13:12:44 +02:00
Jordi Boggiano
ccea1b95a8
Fix pretty constraint for --with overrides
2020-06-03 10:43:18 +02:00
Jordi Boggiano
7507b87fb3
Remove stray var_dump
2020-06-03 10:40:44 +02:00
Jordi Boggiano
8d3ec0f718
Do not reverse sorted packages, fixes #8320
2020-06-03 09:42:21 +02:00
Jordi Boggiano
1055be7936
Fix unfixing of packages when a replacer gets unfixed before a replacee, refs #8882
2020-06-02 17:03:41 +02:00
Jordi Boggiano
4d75d524f1
Fix class name case, refs #8939
2020-06-02 16:20:31 +02:00
Graham Campbell
462dc5a933
Fix for HHVM 3
2020-06-02 14:52:38 +01:00
Nils Adermann
86e79fcce3
Merge pull request #8938 from Seldaek/drop-dead-code
...
Remove some dead code from RuleSetGenerator
2020-06-02 15:49:24 +02:00
Jordi Boggiano
718021724c
Deduplicate more content in complex problem output
2020-06-02 15:46:12 +02:00
Jordi Boggiano
9bd255d8f1
Remove some dead code from RuleSetGenerator
2020-06-02 14:41:18 +02:00
Jordi Boggiano
5a4709c3d6
Optimize rule creation for alias packages
...
This mainly benefits projects running updates with minimum-stability: dev
2020-06-02 13:44:56 +02:00
Jordi Boggiano
8a7f3a9a09
Avoid rendering problem output for dev-master aliases which is useless
2020-06-02 13:21:06 +02:00
Jordi Boggiano
5e5f9f8142
Remove unused RULE_INTERNAL_ALLOW_UPDATE
2020-06-02 11:22:35 +02:00
Jordi Boggiano
c8efb50d39
Change the single requirement ignore from --ignore-platform-reqs=xx to --ignore-platform-req=xx to avoid BC issues
2020-06-02 11:22:09 +02:00
Jordi Boggiano
2ddf4346ef
Improve error reporting for RULE_PACKAGE_ALIAS
2020-06-02 10:35:04 +02:00
Jordi Boggiano
0ea9eafcaf
Add rules for aliased packages when an alias is added, fixes #8902
2020-06-02 10:07:20 +02:00
Jordi Boggiano
c0f5c13516
RuleSetGenerator instance does not need to be kept around anymore
2020-06-02 09:45:19 +02:00
Jordi Boggiano
1e08097a17
Fix phpstan warning
2020-06-01 16:05:13 +02:00
Jordi Boggiano
a9affa8413
Add missing use statement
2020-06-01 15:58:34 +02:00
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
2020-06-01 15:43:24 +02:00
Jordi Boggiano
21e708f2c4
Remove upper bound PHP version checks from platform-check as there is not enough value added and it risks causing issues
2020-06-01 09:39:44 +02:00
Jérémy Derussé
95e6e16b78
Use Semver compiled constraints
2020-05-26 21:35:30 +02:00
Markus Staab
6a0e02db1b
Autoload-Generator: support glob patterns in classmaps
2020-05-23 21:22:07 +02:00
Jordi Boggiano
a07f9ffba9
Catch SIGINT/Ctrl+C during installs and run cleanups on all packages before exiting
2020-05-22 13:24:30 +02:00
Jordi Boggiano
385655f02a
Mark temp files as such for clarity in case any gets left over
2020-05-22 13:23:14 +02:00
Jordi Boggiano
acf2b15982
Merge branch '1.10'
2020-05-22 10:30:51 +02:00
azjezz
30f994e424
fix deprecations in PHP 8
2020-05-21 18:16:19 +01:00
Jordi Boggiano
c7fb15faf4
Update to MatchAllConstraint
2020-05-21 16:12:41 +02:00
Jordi Boggiano
45d3e133a4
Avoid checking for unbounded constraints in platform checks
2020-05-19 17:15:08 +02:00
Jordi Boggiano
62d0443e07
Avoid checking for readline in non-CLI contexts, fixes #8909
2020-05-19 16:46:33 +02:00
Jordi Boggiano
d42e12c514
Make config non optional, fixes #8896
2020-05-19 16:34:51 +02:00
Jordi Boggiano
b27c4b2472
Merge branch '1.10'
2020-05-19 15:48:19 +02:00
Timo Webler
541692bbfe
Use "getInitialWorkingDirectory" instead of "getWorkingDirectory"
...
Follow-up 8d24b61bef
2020-05-19 15:47:51 +02:00
Jordi Boggiano
1d2df5ef55
Add output to remove/require command to highlight the fact it is running an update command, refs #8910
2020-05-19 14:48:58 +02:00
Jordi Boggiano
af6444353f
Refactor hint generation and whitespace handling in SolverProblemsException
2020-05-19 12:17:57 +02:00
Jordi Boggiano
98e5f81a5f
Fix detection of fixed package problems to include more cases, fixes #8910
2020-05-19 12:17:25 +02:00
Jordi Boggiano
beded906ba
Merge branch '1.10'
2020-05-08 21:05:07 +02:00
Jean-Michel DELEHAYE
42fc372e52
Add function_exists() for 'pcntl_signal'
2020-05-08 20:53:43 +02:00
Matěj Kmínek
a074819a51
Add support for gitlab deploy token ( #8867 )
...
* feat: Added ability to work with GitLab deploy tokens: https://docs.gitlab.com/ee/user/project/deploy_tokens/
Deploy tokens can be specified two ways:
1) GIT CONFIG:
git config --add gitlab.deploytoken.user USERNAME && git config --add gitlab.deploytoken.token TOKEN
2) Auth.json:
"gitlab-token": {
"gitlab.com": {"username": "USERNAME", "token": "TOKEN"}
}
2020-05-08 17:43:07 +02:00
Jordi Boggiano
1ef352751c
Fix display issue in create-project when installing dev-master
2020-05-06 13:45:31 +02:00
Jordi Boggiano
ba3df8faea
Merge pull request #8843 from FIDATA/feature/archive-name
...
Add (default) base name of archive into composer.json
2020-05-06 11:06:28 +02:00
Jordi Boggiano
dd0c8b4278
Merge pull request #8723 from helhum/fix-package-sorting
...
Fix package sorting
2020-05-06 10:47:01 +02:00
Jordi Boggiano
3134466b42
Merge branch '1.10'
2020-05-06 10:30:53 +02:00
Jordi Boggiano
4ce492d01d
Fix detection of gitlab URLs, fixes #8402 , closes #8868
2020-05-06 10:18:53 +02:00
Nils Adermann
5d5515348a
Merge pull request #8860 from Seldaek/update-with
...
Add --with to update command to allow downgrading to a specific version / applying custom temporary constraints
2020-05-05 17:03:49 +02:00
Nils Adermann
ff0717ad66
Merge pull request #8859 from Seldaek/deduplicate-problems
...
Deduplicate require/conflict rules which are the same but for different versions of the same package
2020-05-05 16:19:07 +02:00
Nils Adermann
678abdbc9f
Merge pull request #8873 from Seldaek/version_selector_platform
...
Use all PlatformRepo packages in VersionSelector checks
2020-05-04 22:20:11 +02:00
Jordi Boggiano
1d68e85433
Fix usage
2020-05-04 22:04:57 +02:00
Jordi Boggiano
ef3797cdd6
Cache successful requests to make sure subsequent loadPackages calls do not do the same requests for nothing
2020-05-04 21:58:33 +02:00
Jordi Boggiano
8a2dd1baef
Adjust all usages of VersionSelector to the new API
2020-05-04 21:48:48 +02:00
Jordi Boggiano
419567ba6d
Update VersionSelector to take all platform requirements into account when selecting packages
2020-05-04 21:16:41 +02:00
Jordi Boggiano
b11f43f59e
Merge remote-tracking branch 'origin/1.10'
2020-05-04 20:27:34 +02:00
Jordi Boggiano
92aed041e4
Make the VersionSelector take Composer API/Runtime versions into account, refs getsentry/sentry-php#1008
2020-05-04 13:51:34 +02:00
Markus Staab
11930001fb
Added phpdoc types for PoolBuilder ( #8862 )
2020-05-04 13:34:05 +02:00
Ayesh Karunaratne
aa20413990
Improve regex in \Composer\Downloader\SvnDownloader::getCommitLogs() by removing unnecessary greedy operator
2020-05-04 01:03:15 +07:00
Ayesh Karunaratne
d4c8478df5
Improve regex in \Composer\Repository\ComposerRepository::fetchFile() by removing unnecessary greedy operator
2020-05-04 00:38:53 +07:00
Helmut Hummel
7c891701e6
Fix package sorting
...
PackageSorter weighs the importance of a package
by counting how many times it is required by other packages.
This works by calculating the weight for each package name.
However currently the package index of the package array
is currently passed the weigh function, which basically
disables package sorting.
The reason for that is, that a package repository previously
returned the package list as associative array with package name as keys,
but currently just as an array with integer keys.
Therefore we must extract the package name from the package
before passing it to the weigh function.
2020-05-03 16:31:47 +02:00
Jordi Boggiano
1d077ede70
Merge branch '1.10'
2020-05-01 18:08:22 +02:00
Jordi Boggiano
bfe71fb952
Fix support for --self --name-only, fixes #8844
2020-05-01 18:03:22 +02:00
Jordi Boggiano
4ce3836f51
Fix creation of a php: dir when running create-project, fixes #8849
2020-05-01 17:23:32 +02:00
Jordi Boggiano
7f308d986e
Add --with to update command to allow downgrading to a specific version/applying custom temporary constraints, fixes #8756
2020-05-01 16:56:17 +02:00
Jordi Boggiano
3a64acb53e
Make sure versions are ordered also in the satisfied by package lists
2020-05-01 15:54:01 +02:00
Jordi Boggiano
56a11b9c2c
Deduplicate require/conflict rules which are the same but for different versions of the same package, fixes #8851
2020-05-01 15:41:54 +02:00
Jordi Boggiano
56811b4c8f
Exclude platform require/provides from InstalledVersions as concrete ones are also not listed
2020-05-01 13:10:50 +02:00
Jordi Boggiano
557fb873ee
Add a way to retrieve the Loop instance from Composer to be able to wait on promises to integrate things
2020-05-01 09:54:41 +02:00
Jordi Boggiano
3c593b0d12
Remove duplicate use statement
2020-04-30 21:36:17 +02:00
Jordi Boggiano
74a63b4d6b
Merge branch '1.10'
2020-04-30 21:31:29 +02:00
Jordi Boggiano
81bf47ffa2
Use fully qualified calls in hot classes
2020-04-30 21:28:05 +02:00
Alessandro Lai
ff05150c4e
Add composer-runtime-api version constant
2020-04-29 09:02:51 +02:00
Basil Peace
6140897d08
feat: add archive.name config option
2020-04-29 01:01:48 +03:00
Alessandro Lai
270c7c3262
Backport validation support for composer-runtime-api ( #8842 )
...
Fixes #8841
2020-04-28 16:04:00 +02:00
Nils Adermann
56edd53046
Remove unnecessary implementation of interface method in abstract class
2020-04-28 11:57:03 +02:00
Jordi Boggiano
a63913c245
Merge pull request #8836 from kbacia7/master
...
close #8784 , Added --locked option to composer show command. Displaying locked packages with --all option
2020-04-28 08:54:16 +02:00
Kamil Bacia
0779308076
close #8784 , Added --locked option to composer show command. Displaying locked packages with --all option
2020-04-27 21:53:12 +02:00
Nils Adermann
994a5b41c2
Provide default impl for abstract method in interface for PHP < 5.3.9 ( #8837 )
2020-04-26 09:15:15 +02:00
Jordi Boggiano
d173af2d7a
Fix check-platform-reqs command to take into account provide/replace from the root package
2020-04-24 13:46:18 +02:00
Jordi Boggiano
6a6ea6057f
Handle provider/replacer packages and avoid checking extensions which are provided by packages, refs #8546
2020-04-24 13:38:50 +02:00
Jordi Boggiano
d494df61ff
Make sure platform-check returns a non-0 exit code if it fails
2020-04-24 13:25:13 +02:00
Jordi Boggiano
755a73baa9
Only check for pcntl on cli SAPI, fixes #8828
2020-04-23 20:44:14 +02:00
PirxDanford
3a7ea25289
Introduce --no-install option for the update, require and remove commands
...
Closes #8669 , fixes #8551
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2020-04-23 14:55:07 +02:00
effulgentsia
46efcefefa
Added --json and --merge options to ConfigCommand ( #8779 )
2020-04-23 14:27:14 +02:00
Jordi Boggiano
1d4185b844
Recommend ocramius/package-versions fork if needed to solve dependencies
2020-04-23 13:51:57 +02:00
Jordi Boggiano
34801239f1
Tweak problem wording slightly
2020-04-23 13:17:34 +02:00
Jordi Boggiano
cdc6a87e8d
Fix docblock
2020-04-23 11:01:44 +02:00
Jordi Boggiano
9b8694bc0b
Show suggestions from root package in suggest, and lists them in count only on first install of a project, fixes #8805
2020-04-23 10:53:24 +02:00
Jordi Boggiano
6529fabb24
Add isFresh to InstalledRepositoryInterface and make sure local repo is always an InstalledRepositoryInterface
2020-04-23 10:52:33 +02:00
Jordi Boggiano
fa14cd1353
Show number of additional suggestions when not using --all, fixes #8788
2020-04-23 10:23:56 +02:00
Jordi Boggiano
d6a9d78309
Merge pull request #8810 from heddn/8809_expand_context_post_file_download
...
#8809 : expand context for post file download event
2020-04-22 17:14:45 +02:00
Jordi Boggiano
7049bbb714
Switch require_once to require for autoload_static as the once variant seems unnecessary
2020-04-22 17:05:37 +02:00
Jordi Boggiano
c2f77d80bd
Remove usage of 5.6+ constant
2020-04-22 16:40:42 +02:00
Jordi Boggiano
1000d49145
Fix error reporting when the root version changed since the last update, and does not match circular deps in lock file anymore
2020-04-22 14:02:09 +02:00
Jordi Boggiano
0ab48a1773
Add composer-runtime-api platform package
2020-04-22 12:10:09 +02:00
Jordi Boggiano
0d1922dc27
Add a Composer\Versions class which is available in all projects at runtime to query installed packages/versions
2020-04-22 12:10:09 +02:00
Jordi Boggiano
4ba958f08e
Merge pull request #8816 from staabm/patch-2
...
fixed typo in phpdocs
2020-04-22 07:38:54 +02:00
Pierre Grimaud
a42c6ceff3
Fix typos
2020-04-22 00:43:34 +02:00
Jordi Boggiano
2c8a4a1b93
Add platform-check config option to disable platform_check.php generation, and disable it for Composer
2020-04-21 15:25:35 +02:00
Markus Staab
3c09e4021e
fixed typo
2020-04-21 15:04:47 +02:00
Jordi Boggiano
af18c2bd7d
Update semver, fix poolbuilder usage and optimize creation of filtering nameConstraints
2020-04-21 14:50:11 +02:00
Jordi Boggiano
c9846d4d3c
Merge pull request #8812 from nicolas-grekas/ext-check
...
Optimize extension checks
2020-04-21 11:45:26 +02:00
Nils Adermann
75f4116417
Merge pull request #8811 from Seldaek/fix-transaction-order
...
Fix transaction order
2020-04-21 11:38:59 +02:00
Jordi Boggiano
c41bb909ff
Add platform check file in phars, fixes #8813
2020-04-21 11:18:02 +02:00
Nicolas Grekas
6463ab9e49
Optimize extension checks
2020-04-21 09:35:34 +02:00
Yanick Witschi
e23710f92d
Implemented php version check in autoload.php ( #8546 )
2020-04-21 08:59:36 +02:00
Lucas D Hedding
2bf2e9fc60
fix failing tests
2020-04-20 14:40:25 -06:00
Jordi Boggiano
ba9d4793bc
Fix transaction order
2020-04-20 22:24:00 +02:00
Lucas D Hedding
3e2163de5c
#8809 : expand context for post file download event
2020-04-20 13:50:42 -06:00
Jordi Boggiano
3f338ee8d9
Make sure versions are sorted before they get trimmed in error output
2020-04-19 15:51:30 +02:00
Jordi Boggiano
424c08d6b2
Fix bug loading ~dev in some circumstances
2020-04-19 15:51:29 +02:00
Jordi Boggiano
b3f46979b0
Merge pull request #8802 from kubawerlos/command-validate-no-check-version
...
Add "no-check-version" option to ValidateCommand
2020-04-18 14:41:38 +02:00
Jordi Boggiano
c12a1a6d64
Update flag description
2020-04-18 14:41:04 +02:00
Kuba Werłos
a54bf0e2d4
Use flags instead of boolean in ConfigValidator for checking version field
2020-04-18 09:24:54 +02:00
Kuba Werłos
4ec73874cb
Add "no-check-version" option to ValidateCommand
2020-04-17 22:38:14 +02:00
Jérôme Tamarelle
bd34ff1328
Remove unused property $httpDownloader
2020-04-16 01:14:56 +02:00
Jordi Boggiano
80a7c40c76
Shorten long lists of similar versions in problem output, fixes #8743
2020-04-15 16:47:44 +02:00
Jordi Boggiano
5b54a93751
Fix phpstan build
2020-04-15 00:33:52 +02:00
Jordi Boggiano
44a4429978
Remove PEAR installer/downloader/repos/..., fixes #8778
2020-04-15 00:24:13 +02:00
Nils Adermann
5e9bf532c1
Merge pull request #8786 from Seldaek/unused-flag
...
Add --unused flag to remove command
2020-04-14 23:51:19 +02:00
Lucas Hedding
1883832ddc
Provides a post download event ( #8655 )
2020-04-14 23:48:18 +02:00
Jordi Boggiano
11765ddfea
Add --unused flag to remove command, fixes #8283
2020-04-14 23:42:49 +02:00
Jordi Boggiano
6bed9d8f13
Implement count and search correctly in FilterRepository
2020-04-14 22:55:53 +02:00
Jordi Boggiano
a0c5d519e9
Restore --no-suggest but mark it deprecated, remove --no-custom-installers and mark --dev also deprecated with stronger wording
2020-04-14 22:35:13 +02:00
Markus Staab
3819b02fea
added phpstan types to `CompletePackageInterface` ( #8782 )
2020-04-14 22:05:58 +02:00
Alexandre D'Eschambeault
e0e2bb11a5
Fix typo: directory instead of directoy
2020-04-13 19:45:35 -04:00
Jordi Boggiano
be1ddcf293
Fix handling of svn trunk in version guesser, fixes #8765
2020-04-13 12:48:43 +02:00
Jordi Boggiano
876136022b
Merge remote-tracking branch 'origin/1.10'
2020-04-13 12:41:30 +02:00
Jordi Boggiano
19902ba6a9
Merge pull request #8772 from villfa/fix/8771
...
Dispatch POST_STATUS_CMD even when there is no changes
2020-04-13 12:41:02 +02:00
Jordi Boggiano
2e7ace238a
Merge pull request #8767 from cebe/package-name-double-dash
...
Allow duplicate dashes in package names (1.10)
2020-04-13 12:37:41 +02:00
Jordi Boggiano
7d3f45cf04
Avoid errors in cleanup, fixes #8766 , fixes #8764
2020-04-13 12:15:17 +02:00
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