1
0
Fork 0
Commit Graph

6386 Commits (ea0ce9dd7dbdab2a35c25b6ff0ba68d2a68fe321)

Author SHA1 Message Date
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
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