1712 Commits (5c98a2cf8e3df53172ed34130302a3d362f90631)

Author SHA1 Message Date
vitman ecc8331312
Add dev mode env var for scripts run (#9793)
Co-authored-by: Vitali Tsyrkin <vitalit@playtika.com>
3 years ago
Jordi Boggiano bf73a20bc0
Merge branch '2.0' 3 years ago
Brandon Kelly 7652408829
Only call sapi_windows_set_ctrl_handler() for CLI requests (#9771) 3 years ago
ochorocho 35210d99a9
Add --format json to search command (#9747)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
3 years ago
Jordi Boggiano 4940009f83
Bump phpstan to level 3 (#9734)
Clean up PackageInterface/CompletePackageInterface, add missing methods, type things in solver as BasePackage, added CompleteAliasPackage, ..
3 years ago
Jordi Boggiano d0b399b788
Merge branch '2.0' 3 years ago
John Stevenson 07f59a9162
Preserve file permissions on Windows self-update (#9733)
Windows file operations result in different file permissions depending
if the file is copied or moved. A copy operation applies permissions
from the destination folder (or file if it already exists and does not
use inheritance), while a move operation generally preserves the source
file permissions.

Windows PHP `rename` uses MoveFileEx so if the user is running as an
admin and the destination is in a common (non-user) location, then the
permission for other users will be replaced by the admin user. Likewise
for the UAC elevation feature, which uses the cmd.exe `move` command.

This fix uses copy and delete operations on Windows, so that other users
can continue to run composer.phar
3 years ago
Jordi Boggiano 4851f65318
Remove version argument from why and enforce it for why-not command, refs #9693 3 years ago
Jordi Boggiano 40800df6bd
Fix CS 3 years ago
Julian c78850ab98
Show a warning if require key changes for dependency (#9542)
Fixes #9516

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
3 years ago
Jordi Boggiano d806013091
Add more details when require/init fails to find a matching package due to the platform requirements 3 years ago
Jordi Boggiano d0aac44ed2
Auto-detect dev-mode in autoload-dump and deprecate dump-autoload --no-dev (#9714) 3 years ago
ochorocho 91b6ff27ac
Add --format option to `composer fund` command (#9678)
* Add --format option to `composer fund` command

Co-authored-by: Jochen Roth <jochen.roth@b13.com>
3 years ago
Jordi Boggiano 8f7597da22
Use a different way to suppress output than changing output verbosity in exec command, fixes #9711 3 years ago
Jordi Boggiano 4a740e3e61
Add warnings when running updates without curl enabled, fixes #9558 4 years ago
Jordi Boggiano bad4e4edbc
Fix some more wording 4 years ago
Ali Shaikh 6f5c4fcf3e Improving Composer self-update (version upto date) info message 4 years ago
Jordi Boggiano eb9616a82b
Debug info improvements 4 years ago
Jordi Boggiano b7d770659b
CS fixes 4 years ago
Andrés De la Cruz 480a6439fd
Fix phpstan phpdocs issues (#9478) 4 years ago
Jordi Boggiano 9e279740cd
Go go phpstan 🤞 4 years ago
Jordi Boggiano 742c2a9e93
Avoid swallowing exceptions 4 years ago
Jordi Boggiano 35b403b266
Make sure a version not found issue is reported as such for clarity, fixes #9500 4 years ago
Jordi Boggiano f567fd69eb
List both unzip and zip ext presence in diagnose 4 years ago
Jordi Boggiano e5a009ed80
Make sure empty objects are not left behind when removing requires/.. fixes #9462 4 years ago
Jordi Boggiano 6a2f9870a7
Warn when init is being used non-interactively without any args passed in, instead of silently overwriting the file 4 years ago
Jordi Boggiano 87006774b1
Avoid requiring a lock file to run composer remove, fixes #9439 4 years ago
Jordi Boggiano f31564ef5b
Fix check-platform-reqs --no-dev to not require lock anymore 4 years ago
Jordi Boggiano 3f6899946b
Avoid using curl when it has been disabled, fixes #9423 4 years ago
Jordi Boggiano 6c31744c04
Disable full platform-check for extensions by default, now set to php-only, refs #9412 4 years ago
Jordi Boggiano fc0d724938
Allow configuring gitlab deploy tokens via config command, refs #9373 4 years ago
Jordi Boggiano e0e4d60166
Fix check-platform-reqs to be more clear about what is going on, and add a --lock flag to allow explicitly checking from lock 4 years ago
Jordi Boggiano f2f3b03fec
Fix config/create-project handling of repositories to prepend them by default as this is most likely the goal, fixes #9371 4 years ago
Jordi Boggiano ffc0f86fc0
Fix warnings in composer require to show when repo prio is at fault, refs #9371 4 years ago
Jordi Boggiano 34bdc6cbf2
Detect and hint for solutions for common curl errors, fixes #9376 4 years ago
johnstevenson 095d133d6b Remove fulluri checks and tidy diagnose output 4 years ago
Jordi Boggiano 90a6aa7ec0
Make sure we compare packages to their latest without aliases, fixes #9357 4 years ago
Jordi Boggiano 5d4bcde454
Allow using --locked with the outdated command directly, fixes #8025 4 years ago
Nils Adermann 289972a177 Remove useless null check, follow up to #9345 4 years ago
Nils Adermann cbcc3a3080
Remove trailing commas for function calls 4 years ago
Fabien Potencier d5245387f3 Fix error message 4 years ago
Nils Adermann b72dc7bb78
Clarify --lock option on update further
Specifically state packages do not get updated to new versions, only metadata is updated.
4 years ago
Jordi Boggiano 860a67b776
Update --lock docs, fixes #9315 4 years ago
Jordi Boggiano 4b8c2aa121
Fix default version to be semver parseable, fixes #9342 4 years ago
Helmut Hummel d1dfd394c1 Correctly avoid partial updates in require commands
The installer does not support partial updates, when
no lock file is present. The check in require command
to prevent a partial update however does not check whether
a lock file is present, but whether a lock file should be written,
which most likely always is true.

This check is now changed to check if a lock file is actually present.
4 years ago
Jordi Boggiano 0d236858ec
Merge branch '1.10' 4 years ago
Jordi Boggiano 25496c199d
Update link to composer 2 release notes 4 years ago
Jordi Boggiano 49a28f606c
Merge branch '1.10' 4 years ago
terry.kern 0466add822 Also use channel string for update message
https://github.com/composer/composer/pull/9305#issuecomment-714381153
4 years ago
TerryKern e68b52697b Improve readability of version info message
Instead of:

> You are already using composer version 1.10.15 (1 channel).

it shows:

> You are already using composer version 1.10.15 (1.x channel).
4 years ago
Jordi Boggiano 14ec957e96
Fix composer show -a usage, fixes #9304 4 years ago
Jordi Boggiano 99a5469b5e
More hints 4 years ago
Jordi Boggiano 743d551399
Fix using show command to show platform packages, and allow using it to show replacers too by using the replaced name, fixes #7628 4 years ago
Jordi Boggiano e7d99c37b3
Fix show --locked to avoid listing all the things 4 years ago
Jordi Boggiano da1357c663
Avoid showing alias versions in show command, show the original version 4 years ago
Jordi Boggiano 34dd9e19e1
Add curl/zip ext info to diagnose command 4 years ago
Jordi Boggiano 9ca7457698
Check whether remove command successfully removed the target packages, fixes #6998 4 years ago
Jordi Boggiano badd1f2146
Remove silly default values of false on Installer class, refs #9204 4 years ago
Jordi Boggiano 24abd233ec
Merge branch 'master' into code-improvements 4 years ago
Jordi Boggiano 0775e261c5
Merge remote-tracking branch 'lstrojny/apcu-prefix' 4 years ago
Jordi Boggiano adeabdbd56
Merge branch '1.10' 4 years ago
Jordi Boggiano bc1cb1636d
Remove dead code, fixes #9277 4 years ago
Jordi Boggiano d204eb4814
Merge branch '1.10' 4 years ago
Jordi Boggiano 6bf136489f
Ignore the COMPOSER env var when executing global scope commands, fixes #9259 4 years ago
Jordi Boggiano 9c4b00be67
Add -w/-W to docs, refs #9257 4 years ago
Jordi Boggiano de3de0697e
Merge pull request #9257 from flavioheleno/improv/short-with-deps
With-dependencies alias
4 years ago
Jordi Boggiano 03b8c3db3f
Merge branch '1.10' 4 years ago
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)
4 years ago
Flavio Heleno 9d544d98b3 Added short flags for 'with-dependencies' and 'with-all-dependencies' 4 years ago
Simon Berger 80d71ccb3f Merged isset, unset and str_replace calls 4 years ago
Jordi Boggiano d6b39b4c55
Fix syntax error & improve handling 4 years ago
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.
4 years ago
Michael Telgmann a4509d28e7
Introduce constants for Composer\Package\Link types 4 years ago
Simon Berger 974e7ba296 Removed unneccesary elseifs 4 years ago
Simon Berger 80a75e9959 Minor code improvements 4 years ago
Simon Berger a6475a7118 Removed unused variables, properties and parameters of private functions 4 years ago
Simon Berger 002fd39bc6 Removed passing of parameters with default value 4 years ago
Simon Berger 6b3b51e299 Fixed $this usage on static functions 4 years ago
Lars Strojny 696f27ca83
Enable APCu if prefix is set 4 years ago
Lars Strojny 6899060f6e
Remove superfluous use 4 years ago
Lars Strojny 7db8b33a9e
Restore 4 years ago
Lars Strojny 0b6abf3b96
APCu prefix as a separate option 4 years ago
Lars Strojny dafd225a35
Allow to pass a string for apcu-autoloader to set the APCu prefix 4 years ago
Jordi Boggiano 57b4016f8a
Show default value instead of optional, refs #9181 4 years ago
Jordi Boggiano 5555b04cea
Merge pull request #9181 from shrink/feature/create-project-package-prompt
 Ask for target directory when using `create-project`
4 years ago
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
4 years ago
Jordi Boggiano 943c7a6433
Merge pull request #9165 from bpesch/master
Performance improvements
4 years ago
Jordi Boggiano b8ebc7be5f
Revert a few changes to ConfigCommand 4 years ago
Jordi Boggiano cc1874e21b
Merge pull request #9179 from simonberger/fix-duplicated-code
Moved duplicated table render code to a new method in BaseCommand
4 years ago
Samuel Ryan a66db48673
Ask for target directory when using `create-project` 4 years ago
Simon Berger 687f886d56 Moved duplicated table render code to a new method in BaseCommand 4 years ago
Yanick Witschi bd6f62c535 Consistently reuse the new PlatformRepository::isPlatformPackage() method 4 years ago
username fc87caf639 Provide correct parameter data type 4 years ago
username 113adbcd87 Sort conditions by cost 4 years ago
username 98462292c0 Sort conditions by cost 4 years ago
username abedc0dc42 Sort conditions by cost 4 years ago
username 17ae93bc9c Remove unnecessary method call 4 years ago
username 18009af023 Inline variable 4 years ago
username e719be501e Remove unnecessary method call 4 years ago
username 459e2473c8 Remove unused variable 4 years ago
username 3f09ae0737 Simplify duplicate case 4 years ago
username 46cc387598 Split workflows 4 years ago
Jordi Boggiano 90332f1dbd
Add a readonly mode to the cache, fixes #9150 4 years ago
Jordi Boggiano e5ba99cf67
Merge branch '1.10' 4 years ago
johnstevenson 3be62a9fda Fix openssl_free_key deprecation notice in PHP 8 4 years ago
Jordi Boggiano ff757e649c
Use pool to match packages to avoid getting packages without ids, fixes #9094 4 years ago
Jordi Boggiano 2d3905157d
Merge branch '1.10' 4 years ago
Jordi Boggiano 387e828993
Promote next major version when running stable self-update, and prevent self-update from automatically upgrading to the next major release 4 years ago
Jordi Boggiano c3028c02d9
Merge branch '1.10' 4 years ago
Jordi Boggiano a474dee236
Merge remote-tracking branch 'johnstevenson/elevate2' into 1.10 4 years ago
Jordi Boggiano eac03e16e7
Reuse repository manager and others directly from the Composer instance, refs #9057 4 years ago
Jordi Boggiano 433968de17
Fix usage of create-project with local filesystem repos 4 years ago
Jordi Boggiano a2ab6f2b54
Add support for multiple --repository additions in create-project, and make --add-repository delete the lock file, fixes #8853 4 years ago
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.
4 years ago
Jordi Boggiano 37b1e0fffd
Merge pull request #8955 from tlamy/OutdatedNoDevOption
Outdated/Show: no dev option
4 years ago
Jordi Boggiano 6869a1a5cb
Clean up a little to make impl less invasive and to handle replacers/providers 4 years ago
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.
4 years ago
Jordi Boggiano 8b934a415f
Merge branch '1.10' 4 years ago
johnstevenson 57f91d01c7
Fix doc comment 4 years ago
johnstevenson 272654d6e2
Fixed spelling mistake 4 years ago
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.
4 years ago
Tomek 23c32ed6d3 Fix #9033 - inconsistent behavior with minor-only flag 4 years ago
Jordi Boggiano d7b1248508
Create pool before reading package ids as the pool creation reassigns package ids, fixes #9034 4 years ago
Jordi Boggiano ee4afa29e7
Include dev packages in locked package listings for show command 4 years ago
Jordi Boggiano 70f211923b
Add support for list URL in composer repos, fixes #9009 4 years ago
Jordi Boggiano 4a2ea3c67a
Fix var name 4 years ago
Jordi Boggiano a133e694d0
Speed up fund command fetching of latest data and make sure it uses default branch info 4 years ago
Jordi Boggiano 05dacbdabb
Rename DEV_MASTER_ALIAS to DEFAULT_BRANCH_ALIAS 4 years ago
Jonas Drieghe eea7564c9e Revert accidental rename of $dependencies variable in unrelated code branch 4 years ago
Jonas Drieghe d5d956df4d Use correct variable name 4 years ago
Jonas Drieghe 73a721c7e5 Add the missing summary format to command-line help text 4 years ago
Jonas Drieghe ec6e05d55f Sort licenses so that the most used license will appear first 4 years ago
Jonas Drieghe 668655c21a Rename variable for clarity 4 years ago
Thomas Lamy 722bbce72f Merge remote-tracking branch 'upstream/master' into OutdatedNoDevOption 4 years ago
Jordi Boggiano c8731598cc
Merge branch '1.10' 4 years ago
Jordi Boggiano da572f1fdc
Merge remote-tracking branch 'GrahamCampbell/allow-list' into 1.10 4 years ago
Jordi Boggiano 085fe4e7e5
Add --no-progress support and a few more fixes 4 years ago
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
4 years ago
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.
4 years ago
Graham Campbell a97d13fc6d
Fixed typo
Co-authored-by: ZhangWei <zhwei.yes@gmail.com>
4 years ago
Graham Campbell fa799970ad Replace whitelist with allow list 4 years ago
Thomas Lamy caa5545478 #8945 Add "--no-dev" to outdated/show commands 4 years ago
Jordi Boggiano 29ec10d95c
Fix output formatting 4 years ago
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 4 years ago
Jordi Boggiano a4a617abb4
Reduce amount of Filesystem/ProcessExecutor instantiations, add lots of docblocks 4 years ago
Jordi Boggiano 816d8e9d1b
Fix phpstan error 4 years ago
Jordi Boggiano 396ad87fd0
Add handling of ctrl-C on windows for php 7.4+ 4 years ago
Jordi Boggiano ccea1b95a8
Fix pretty constraint for --with overrides 4 years ago
Jordi Boggiano 7507b87fb3
Remove stray var_dump 4 years ago
Jordi Boggiano c8efb50d39
Change the single requirement ignore from --ignore-platform-reqs=xx to --ignore-platform-req=xx to avoid BC issues 4 years ago