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
Alex Theobold
97f4fbc4b0
Adds test coverage to the Fund Command ( #11150 )
...
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2022-10-26 13:40:01 +02:00
Alex Theobold
b5b4e15876
test: Create test for CheckPlatformReqsCommand ( #10932 )
2022-10-25 19:42:42 +02:00
Giulio
1b3a2ed6f6
test: Coverage for ValidateCommand ( #11133 )
...
Co-authored-by: giulio-Joshi <me@joshi.it>
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2022-10-25 16:38:01 +02:00
Leo Viezens
13e673df76
#10796 Add test for ExecCommand ( #11094 )
2022-10-13 11:21:19 +02:00
Gaëtan Faugère
52f91b2dd9
Add test and documentation regarding audit command when no packages are required ( #11092 )
2022-10-13 10:53:26 +02:00
Jesper Skytte Marcussen
b52e6b4a74
Add tests for BumpCommand ( #11097 )
...
I've added tests for the BumpCommand to increase the test coverage.
See #10796
Signed-off-by: Jesper Skytte <jesper@skytte.it>
Signed-off-by: Jesper Skytte <jesper@skytte.it>
2022-10-13 10:42:03 +02:00
Jesper Skytte Marcussen
d1bf685ea8
Added lots of new tests for `InitCommand` ( #11106 )
...
This commit adds tests for all the different input options.
2022-10-13 10:39:51 +02:00
Jesper Skytte Marcussen
c728569d33
Added new `LicensesCommandTest` class ( #11105 )
2022-10-12 17:25:28 +02:00
Mauro Bonfietti
d8a0127c0c
Added tests for Clear Cache Command. ( #11066 )
...
* Added tests for Clear Cache Command.
* Fix side-effects breaking other tests
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2022-10-12 17:19:58 +02:00
Abdullahi Temidayo Jimoh
05aecfbe8b
Test for About command ( #11078 )
2022-10-12 14:22:28 +02:00
Jordi Boggiano
822fd640d0
Add warning when outdated command rejects an existing version due to platform requirements, fixes #11016 ( #11113 )
2022-10-12 13:57:14 +02:00
Kuba Werłos
e870206c4a
Add "--dry-run" to bump command ( #11047 )
2022-09-19 08:45:49 +02:00
Jordi Boggiano
ec8bbe9056
Fix package filter on bump command, fixes #11053
2022-09-14 14:00:27 +02:00
Jordi Boggiano
4164b30236
Fix show --platform regression failing if no composer.json exists, fixes #11046
2022-09-13 14:49:25 +02:00
Jordi Boggiano
3177b21324
Fix handling for double-zero prefix, refs #11032
2022-08-31 09:47:59 +02:00
Jordi Boggiano
2d48c7dbb0
Fix handling of zero-major versions in outdated --major-only flag, fixes #11032
2022-08-30 20:45:07 +02:00
Thomas Landauer
ceb8bef778
Adding hint what "Direct dependencies" means ( #11013 )
2022-08-20 09:24:25 +02:00
Jordi Boggiano
131da999ac
Fix CS ( #11003 )
2022-08-17 14:20:07 +02:00
Jordi Boggiano
f95471f221
Show/outdated command fixes ( #11000 )
...
* Fix show command showing the split of direct/transitive deps from outdated, fixes #10999
* Fix a few minor edge cases in show command, add tests for show and outdated commands
2022-08-17 12:08:59 +02:00
Ion Bazan
74a045783b
Add SearchCommand tests ( #10982 )
...
Signed-off-by: Ion Bazan <ion.bazan@gmail.com>
2022-08-16 10:52:01 +02:00
Jordi Boggiano
135ca98eb0
Remove workaround for upstream bug
2022-08-16 10:46:07 +02:00
Jordi Boggiano
a6d872191c
Disable packagist.org loading by default in initTempComposer test cases if other repos are provided
2022-08-16 10:41:58 +02:00
Jordi Boggiano
7377d1f003
Uniformize command description format, fixes #10971
2022-08-16 10:41:07 +02:00
Jordi Boggiano
eba49147e7
Add warning when the latest version of a package cannot be auto-selected in require/init/create-project, fixes #10884 ( #10896 )
2022-06-23 14:37:04 +02:00
Guy Sartorelli
d93239ddd9
Add audit command to check for security issues ( #10798 )
...
Closes #10329
2022-06-22 15:15:01 +02:00
Jordi Boggiano
d132b9e6fd
Fixup
2022-06-22 13:11:28 +02:00
Jordi Boggiano
70f2dd6edd
Add bump command to bump requirements to the currently installed version, fixes #7273 ( #10829 )
2022-06-09 11:43:59 +02:00
Jordi Boggiano
ab1de96fcb
Do not verify rate limit OK as part of test as these might randomly fail
2022-06-06 17:01:31 +02:00
Jordi Boggiano
3c11895c1e
Command tests
2022-06-06 10:48:42 +02:00
Jordi Boggiano
5888945c30
Fix tests on windows
2022-06-01 22:10:48 +02:00
Jordi Boggiano
556450b15b
Allow using temporary update constraints on all packages (incl non-root), fixes #10436 ( #10773 )
2022-05-27 14:51:46 +02:00
Jordi Boggiano
fdab6657c7
Add command testing utilities to TestCase, add tests for ConfigCommand
2022-05-11 16:08:39 +02:00
Michael Babker
58e135181d
Restore the ability to list the scripts in the 'run-script' command without providing a script ( #10710 )
2022-04-07 13:17:28 +02:00
Jordi Boggiano
6a466a120a
Enable strict types on all files
2022-02-24 13:24:34 +01:00
Jordi Boggiano
0db443ba5f
Add visibility to all consts, fixes #10550
2022-02-23 14:28:04 +01:00
Jordi Boggiano
7abc8da7d3
Add more types
2022-02-23 11:37:32 +01:00
Jordi Boggiano
6da38f83a0
Add parameter types to all the things
2022-02-22 16:48:53 +01:00
Alexander Schranz
e9b60580f5
Add return types to tests ( #10 )
2022-02-21 13:42:28 +01:00
Jordi Boggiano
a16ed3d0ed
Add return types to private/internal methods
2022-02-18 11:22:01 +01:00
Jordi Boggiano
abdc6893a6
Add void types where no return statement is present
2022-02-18 10:38:54 +01:00
Jordi Boggiano
63b5f2737b
Merge branch '2.2' into main
2022-02-16 13:44:40 +01:00
Jordi Boggiano
5c98a2cf8e
Add phpstan-symfony to get type info about console InputInterface, fix many errors ( #10476 )
...
Extract common init/require commands functionality into PackageDiscoveryTrait
Extract some helper methods into BaseCommand for better types
2022-02-16 13:24:57 +01:00
Jordi Boggiano
28ec4fa7b0
Fix handling of invalid emails
2022-02-16 13:24:15 +01:00
Jordi Boggiano
96486d81cb
Fix many PHPStan issues and update baseline
2022-01-01 14:54:21 +01:00
Jordi Boggiano
6ed3aeb343
Remove setExpectedException wrapper
2022-01-01 14:54:21 +01:00
Christian
4071125172
Added return type docs ( #10221 )
2021-10-26 21:05:03 +02:00
Jordi Boggiano
d3c176ec69
PHPStan Level 5 ( #10070 )
...
* Bump PHPStan to level 5
* Update seld/phar-utils to latest
* Add phpstan-setup / phpstan scripts
2021-08-21 17:41:52 +02:00
Jordi Boggiano
4c9e75c6e5
Fix CS
2021-06-03 10:38:38 +02:00
Andreas Scheibel
bb1bb022e4
"composer init --autoload" - Interactive generates PSR-4 autoloader in composer.json ( #9829 )
...
- Generates PSR-4 autoload entry in composer.json.
- Run dump-autoload, if no dependencies are set
2021-04-20 21:58:38 +02:00
Jordi Boggiano
b7d770659b
CS fixes
2020-11-22 14:52:39 +01:00
Jordi Boggiano
fc5682ed9f
Fix build
2020-02-11 11:41:31 +01:00
Jordi Boggiano
be8dd528b8
Merge remote-tracking branch 'origin/master' into 2.0
2020-02-11 11:33:52 +01:00
Ion Bazan
11ae757e99
fix risky tests
2020-02-11 17:27:56 +08:00
Adriano Ferreira
97d077c43b
Uses config data from Composer object whenever possible on ArchiveCommand
...
It was previously blindly getting a new instance from the factory thus ignoring what is on Composer object config data.
2020-02-10 13:15:58 -02:00
Jordi Boggiano
21ab2f85bb
Fix 7.4 build
2020-02-07 23:21:48 +01:00
Gabriel Caruso
2a13bb2649
Fixes from PHPStan ( #7687 )
...
* fix docblocks
* remove redundant conditional
* fix wrong variable name
* fix wrong namespaces
* add missing private members
* remove unused/redundant arguments
* move testcase class
* exclude TestCase.php
* Tweak RuleWatchGraph type hints
* Tweak doc comment
2018-11-12 15:23:32 +01:00
Jordi Boggiano
ff59bbdab0
CS fixer
2018-07-24 14:32:52 +02:00
Jordi Boggiano
066351c5b9
Remove use of deprecated getMock method
2018-04-12 10:24:56 +02:00
Jose Miguel Pérez Ruiz
b2f62bc06c
Fix Init Command to accept author names with Unicode combining diacritical marks
2017-03-16 01:43:54 +01:00
Jordi Boggiano
122e422682
CS fixes
2017-03-08 15:16:44 +01:00
Den Girnyk
41eb297248
Add tests
2016-09-12 17:20:58 +02:00
Matthew "Juniper" Barlett
ac41bb0615
Fix for issue #5631
...
- Add " ( and ) as valid characters in author name
- Add relavent unit tests
2016-09-02 18:59:10 +02:00
Rob Bast
b99d9465c1
Added testcase
2015-04-20 13:09:18 +02:00
Jordi Boggiano
38917c2047
Add parallel build to travis script
2013-09-25 10:23:48 +02:00
Przemysław Piechota
95cbb177dd
Init command - diacritical marks in author name
2013-07-25 22:40:41 +02:00
Jordi Boggiano
8d0b7f278e
CS fixes
2013-06-13 13:28:24 +02:00
Jordi Boggiano
1dd8bffce5
CS fixes
2013-05-27 10:41:50 +02:00
Francesc Rosàs
7c273d1ee4
Test parseAuthorString() actual result
2013-05-26 15:10:17 +01:00
Francesc Rosàs
991b4fe208
Fix namespace
2013-05-26 12:44:26 +01:00
Francesc Rosàs
9aa0aba77c
Extract email validation into a method
2013-05-25 17:01:14 +01:00
Francesc Rosàs
e3b9dd10c2
Test InitCommand::parseAuthorString()
2013-05-25 16:56:02 +01:00