1
0
Fork 0
Commit Graph

5913 Commits (355f71eaa8e660f2046ad447a9102f10336f110b)

Author SHA1 Message Date
Jordi Boggiano 28fe3baf9c
Disable secure-http automatically when disable-tls is enabled, fixes #9235 2020-10-12 07:57:14 +02:00
Jordi Boggiano 791bbc80a4
Backport some fixes from 2.0, and fix sorting to sort remote branches after local ones, refs #9270 2020-10-08 14:26:04 +02:00
Jordi Boggiano 6698e0bafa
Merge remote-tracking branch 'naderman/version-guess-remotes' into 1.10 2020-10-08 14:01:25 +02:00
Nils Adermann b3c465d55a VersionGuesser: local branches still need to be considered 2020-10-07 15:10:20 +02:00
Nils Adermann ad643d9957 VersionGuesser: Analyze remote origin and upstream branches too 2020-10-07 14:21:22 +02:00
Grégoire Pineau bfb4abfb56
Fixed description of StatusCommand: It do list all changes in vendor, not only for "source" ones
I tested it, and even with "dist" packages, the status command is able to find modified vendor 
(And that's amazing, thanks)
2020-10-02 10:11:47 +02:00
Jordi Boggiano d6b39b4c55
Fix syntax error & improve handling 2020-09-24 11:35:38 +02:00
Christophe Coevoet bcd8a73e8c
Fix support for running diagnose without openssl
The diagnose command already warns when openssl is not available. But the command was failing later when displaying the Openssl version.
2020-09-22 18:49:53 +02:00
Jordi Boggiano 4a02768591
Fail hard if an invalid root alias is detected 2020-09-09 11:44:05 +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
Alexander M. Turek fc961dce70 Call call_user_func_array() with a numeric arguments array. 2020-09-03 23:26:09 +02:00
Stephan 773635e355 ComposerRepository: avoid notice if includes do not provide a sha1 2020-09-01 12:21:36 +01: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
johnstevenson 3be62a9fda Fix openssl_free_key deprecation notice in PHP 8 2020-08-14 17:45:41 +01: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
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 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
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
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 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 d2d3aa8494
Fix parsing of # in funding links, fixes composer/packagist#1097, closes #9035 2020-07-07 21:12:04 +02:00
Stephan Vock 52332d994e GitDriver: use authentication for supports check 2020-06-23 13:06:30 +01: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
Jordi Boggiano da572f1fdc
Merge remote-tracking branch 'GrahamCampbell/allow-list' into 1.10 2020-06-16 16:52:54 +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
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 6630519882
Fix #8298 for COMPOSER_DEV_MODE 2020-06-05 16:01:39 +02:00
azjezz 30f994e424 fix deprecations in PHP 8 2020-05-21 18:16:19 +01:00
Timo Webler 541692bbfe
Use "getInitialWorkingDirectory" instead of "getWorkingDirectory"
Follow-up 8d24b61bef
2020-05-19 15:47:51 +02:00
Jean-Michel DELEHAYE 42fc372e52
Add function_exists() for 'pcntl_signal' 2020-05-08 20:53:43 +02:00
Jordi Boggiano 4ce492d01d
Fix detection of gitlab URLs, fixes #8402, closes #8868 2020-05-06 10:18:53 +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
Jordi Boggiano bfe71fb952
Fix support for --self --name-only, fixes #8844 2020-05-01 18:03:22 +02:00
Alessandro Lai ff05150c4e Add composer-runtime-api version constant 2020-04-29 09:02:51 +02:00
Alessandro Lai 270c7c3262
Backport validation support for composer-runtime-api (#8842)
Fixes #8841
2020-04-28 16:04:00 +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
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 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 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 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
Matthias Van Woensel 067101dbf5
Only send GitHub API token to api.github.com domain (#8747) 2020-04-09 09:58:34 +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 11999118a5
Avoid failing on malformed funding info, fixes #8731 2020-04-07 16:04:58 +02:00
Jordi Boggiano 96c1ba279a
Add infos about plugin install failure 2020-04-07 15:55:59 +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
Christian Raue b644f63a93
fixed help URL for ClearCacheCommand 2020-03-24 22:47:11 +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
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
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
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
Stephan Vock 55d252b9c3 GitLab: properly handle token which has Guest only access 2020-03-11 13:35:28 +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 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