1
0
Fork 0
Commit Graph

121 Commits (09e616fa1d50f8c6129124a2b424c0ab93f73715)

Author SHA1 Message Date
Krzysztof Ciszewski 4d7476ca30
composer#11852 fix: ability to remove autoload* keys (#11967) 2024-05-08 11:19:05 +02:00
Jordi Boggiano 80631d2fc8
Fix one more case of unsetting a key in an object 2024-04-29 11:19:52 +02:00
Jordi Boggiano 232f4e7a5c
Fix config command issue handling objects in some conditions, fixes #11945 2024-04-29 10:59:35 +02:00
Jordi Boggiano 92f641ac3d
Fix show command output to remove v prefixes on versions, making for more uniform output, fixes #11925 2024-04-15 13:23:25 +02:00
Jordi Boggiano b12a88b7f3
Fix call 2024-03-22 09:29:43 +01:00
Jordi Boggiano 54870a78c4
Add a new test to confirm that show --direct <name> works with direct dependents/dev-dependents 2024-03-21 16:59:41 +01:00
Jordi Boggiano 94fe294545
Fix self-update tests on releases 2024-03-11 17:32:50 +01:00
Pol Dellaiera a0d474f75c
Add a warning message when Composer is not able to guess the root package version (#11858)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-02-23 10:47:36 +01:00
Yuto Takakura 1b7a71f7e7
Add tests for SelfUpdateCommand (#11816)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2024-02-21 20:59:50 +01:00
theoboldalex 7a6bb18e21
Adds a test for no dev (#11833) 2024-02-08 11:06:34 +01:00
Jordi Boggiano 67d80e1c9d
Fix php7.2 2024-02-07 22:44:22 +01:00
Jordi Boggiano df8f9f05a3
Update tests 2024-02-07 22:37:22 +01:00
theoboldalex 338bc16a11
test: Covers audit of pkg with no sec advisories (#11789) 2024-02-07 11:40:29 +01:00
Jordi Boggiano 55db88f51b
Add error when composer show --direct <transient-dependency> is used to show a dependency which is not direct, fixes #11728 2024-01-11 09:53:00 +01:00
Jordi Boggiano 284821543a
Merge branch '2.6' 2024-01-08 16:10:20 +01:00
Jordi Boggiano 534bc20beb
Add support for combining show --self with --installed or --locked (#11785) 2024-01-08 14:14:44 +01:00
theoboldalex 3be0ca8467
Adds a test for invalid arg combo (#11783) 2024-01-08 11:03:34 +01:00
Jordi Boggiano 53a1f32061
Add --sort-by-age to show/outdated commands, and also release date for latest package in --latest mode (#11762) 2023-12-20 15:37:27 +01:00
Jordi Boggiano 9b0f9b40a4
Show package source in very verbose updates, fixes #11733 (#11763) 2023-12-19 17:17:48 +01:00
Jordi Boggiano 4a209b7d3d
Fix bump command not bumping versions with a v prefix e.g. ^v2.4, fixes #11723 (#11764) 2023-12-19 17:17:32 +01:00
theoboldalex aaff0ae4df
Adds a test for UpdateCommand (#11724)
* test: Interactive mode should throw if no package

* PHPStan fix. Missing return type on test method
2023-12-08 18:26:05 +01:00
Travis Carden aefa46dfba
Add support for "scripts-aliases" in composer.json (#11666) 2023-10-27 11:36:59 +02:00
Dan Wallis 8c0f1e10dc
Display error instead of throwing exception when unable to update with temporary constraint (#11692) 2023-10-26 11:38:02 +02:00
Dan Wallis 81b662d388
Suggest running 'require' not 'update' if a root req fails to update (#11691) 2023-10-26 11:08:03 +02:00
Jesper Skytte Marcussen 9a407b5ad3
10796 Increase coverage of ShowCommand (#11677)
* Added more tests for ShowCommand class

By doing so, my local setup shows increase in coverage from some 38% to
67%.

* PHP-CS-Fixer

* PHPStan fixes
2023-10-11 13:43:30 +02:00
Pol Dellaiera b608b8e87e
feat: improve Composer's output reproducibility (#11663)
* AutoloadGenerator: add `Locker` parameter to the `dump` method
* AutoloadGenerator: do not create a random hash, re-use the one from the lock file if it exists
* FileSystem: make sure `safeCopy` copy also the file time metadata
2023-09-28 11:43:52 +02:00
Alex Theobold 218b9041c9
Test status command (#11522) 2023-09-14 11:45:18 +02:00
Damien Carrier e0abc40ded
Add test for `ArchiveCommand` with package name (#11551)
* test(ArchiveCommand): Add test for ArchiveCommand with package name

* fix : using explicit variable name for eventDispatcher Mock

---------

Co-authored-by: Damien Carrier <damien.carrier@alximy.io>
2023-08-31 13:46:43 +02:00
Martin Herndl 6fd145f01e
Allow --strict-psr in `DumpAutoloadCommand` also with --classmap-authoritative (#11607) 2023-08-30 21:43:16 +02:00
Martin Herndl 02e4a2d1a3
Add test case for `DumpAutoloadCommand` with failing --strict-psr check (#11606) 2023-08-30 21:42:45 +02:00
Martin Herndl 879524d8e3
Add tests for DumpAutoloadCommand (#11581) 2023-08-30 16:09:05 +02:00
Rober Díaz 4137bf38ad
Tests for base dependency command (#11547)
* add a test case for "not provided a required parameter"

* add a test cases for "not provided locked file"

* cleanup for case provider

* add a test case for "package existence"

* add a test case for "warning when dependencies are not installed"

* fix the test case for "warning when dependencies are not installed"

* add a test case for "package was not found in the project"

* add a test cases for `why-not` command

- also they were fixed docblocks

* add a test cases for `why` command

* versions were added to dependency objects

* it was avoided HEREDOC due it seems to be failing in PHP 7.2

* it was avoided mismatches due different platforms EOL

* it was used full output instead of an array of messages (to avoid EOL isues)

* it increased code coverage to 97%

* All test case docblocks were corrected according to CR feedback

* ensure that `why-not` should say that an installed package requires an incompatible version of the inspected package
2023-08-29 15:06:19 +02:00
David Zülke 3e9c148b63
Fix trailing whitespace in 'composer show -N' (#11536)
The name column was always padded to maximum width, even if no other columns were printed.

This makes it difficult to use the output e.g. in pipelines.

Fixed for all possible columns, and with tests for two cases (regular show and show outdated).
2023-07-21 11:29:38 +02:00
David Zülke 07f706e57d
Fix 'composer show --platform <package>' erroring if no composer.json is present (#11533)
Sort of related to #11046 (although this is not a regression, but didn't work before, either)
2023-07-21 11:28:36 +02:00
Athos Ribeiro 4b210d916e
Add support for phpunit 10 (#11532)
* Use static test data providers

Using non-static methods as a data providers was deprecated in phpunit
10.

* Rename abstract test class

Abstract test case classes with Test suffix are deprecated in PHPUnit
10. We also change the ArchiverTest file name to match the new class
name (ArchiverTestCase).

* https://github.com/sebastianbergmann/phpunit/issues/5132
2023-07-21 10:39:20 +02:00
Alex Theobold bc28582723
Reinstall command test (#11502) 2023-06-23 09:47:36 +02:00
Alex Theobold 7528c86e58
Test json format on failed platform reqs (#11477)
* test: Adds case for json format arg

* test: A failed platofrm requirement

* chore: style fix

* chore: removes redundant test case
2023-05-28 15:15:21 +02:00
Jordi Boggiano 0d68dabb5f
Add more tests for install command, refs #11277 2023-05-15 21:54:40 +02:00
Alex Theobold fb2c17d696
Test install command (#11277)
* Adds test class boilerplate

* test: Tests warning returned with dev flag

* test: warning returned with no-suggest flag

* test: packages passed is invalid

* test: no-install flag passed

---------

Co-authored-by: alex.theobold <alex.theobold@sykescottages.co.uk>
2023-05-14 14:15:44 +02:00
Jordi Boggiano f6f972a699
Fix require regression with --fixed, fixes #11247 2023-01-19 21:42:22 +01:00
Jordi Boggiano 0d96fd8149
Warn when require ends up auto-selecting a feature branch, fixes #11264 (#11270) 2023-01-19 21:42:09 +01:00
Alex Theobold 2431b12230
Test home command (#11254)
Co-authored-by: alex.theobold <alex.theobold@sykescottages.co.uk>
2023-01-13 09:34:03 +01:00
Dan Barrett ca9fb64691
Added tests for the Suggests command 2023-01-06 12:38:47 +11:00
Dan Barrett 7560873740
Added tests for the Remove command 2023-01-06 12:38:47 +11:00
Dan Barrett 29ae7b632a
Add "missing lockfile" test for the Audit command 2023-01-06 12:38:40 +11:00
Jeffrey Cafferata da611e089a
Docs: fix documention deep links (#11233)
* Docs: Fixed the deep links to the documentation website.

Search scope: `src/Composer/Command`.

* Docs: Fixed the deep links to the documentation website.
2022-12-21 09:32:50 +01:00
Ion Bazan 8ff237afb6
[Tests] Use static data providers (#11197) 2022-11-24 14:39:08 +01:00
Jordi Boggiano 36bc30ffab
Make the require command guess versions more accurately by delegating to the solver (except with --no-update) (#11160) 2022-11-01 15:48:52 +01:00
Jordi Boggiano 6e55cb36d8
Add support for adding Command classes as scripts, (#11151)
* Add support for adding Command classes as scripts, fixes #11134

* Allow all options to be forwarded and allow using references to other scripts with args

* Fix build

* Add more checks

* Ensure exceptions are not swallowed, and remove naming restriction by using a single-command app

* Update docs

* Add tests, fix issue merging params when combining nested scripts and CLI params
2022-10-28 14:24:55 +02:00
Jordi Boggiano a63ce7cf96
Add message when doing composer outdated --direct and there is nothing to show, fixes #11152 (#11156) 2022-10-27 16:21:53 +02:00