Jordi Boggiano
b021647e6f
Fix JSON manipulation issue with large files and jit enabled, fixes #9595
4 years ago
Jordi Boggiano
b7d770659b
CS fixes
4 years ago
Jordi Boggiano
152694b574
Fix tests
4 years ago
Jordi Boggiano
e5a009ed80
Make sure empty objects are not left behind when removing requires/.. fixes #9462
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
Ion Bazan
a2137d5263
use Symfony PHPUnit Bridge
5 years ago
Jordi Boggiano
ee3fd0f745
Merge remote-tracking branch 'adrianosferreira/package-install-method-cli'
...
Fixed formatting, and handling of config command to be preferred-install.foo value
Refs #8517
5 years ago
Adriano Ferreira
607d491921
Implemented way to add packages into suggest through CLI
5 years ago
Adriano Ferreira
5ea6fd0bcb
Implemented way to use preferred-install for defining granular preferences through CLI
...
Currently, preferred-install accepts the hash of patterns as the value in the composer.json. I've followed the same approach as used in extra and platform for letting the user define install preferences through CLI in the format: `composer config preferred-install my-organization/stable-package.dist`.
5 years ago
Jordi Boggiano
14f2a6dd9a
Fix remove command not working with escaped slashes (e.g. foo\/bar), fixes #8249
5 years ago
Rob Bast
080b0f27e9
add missing testcase
5 years ago
Andreas Möller
79828f7543
Enhancement: Assert that key is removed when value is null
7 years ago
Jordi Boggiano
c8aea719b1
CS fixes
7 years ago
Gabriel Caruso
afc9a7643e
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
7 years ago
Deamon
3d753b117b
add test on remove mainkey at end of file
7 years ago
Sven Münnich
d51ef83a43
Fix case insensitivity of ‘require’ command
...
When currently executing the `require` command for a package that is already listed in `require(-dev)`, one must use the exact same, case matching package name as written in `composer.json`. That is, if one changes the case of a character in the package name, the `require` command will add a new entry to `require(-dev)`, instead of updating the existing one.
This commit fixes the described behaviour to make it consistent with other commands like `update` that are already case insensitive.
7 years ago
Jordi Boggiano
122e422682
CS fixes
8 years ago
Jordi Boggiano
e38ebefc7e
Update packagist default repo to be packagist.org
8 years ago
Jordi Boggiano
5ee22f25ba
Rework JSON matching to use a properly recursive pattern, fixes #5771
8 years ago
Jordi Boggiano
092dec9596
Add failing test for #5771
8 years ago
Jordi Boggiano
135783299a
Add support for editing top level properties and extra values, replaces #2415 , fixes #1411 , fixes #2384
9 years ago
Daniel Iancu
3bdb0ee5fd
Fix addMainKey method of JsonManipulator with content having $n
...
This will store correctly passwords having a dolloar sign followed by a digit in the auth.json file.
If the content variable has "$n" (where n consists of digits) it will match as a replacement reference for preg_replace and thus it will get stripped because there's no such parenthesized pattern.
9 years ago
Jordi Boggiano
edebbef98a
Add test and fix for very large repos, moar possessive quantifiers, fixes #5104
9 years ago
Jordi Boggiano
ce08582671
Fix CS
9 years ago
Jordi Boggiano
27aac31970
Fix tests for autocrlf=true checkouts, fixes #4049
9 years ago
Jordi Boggiano
ab02867015
Use natural sort to sort packages, refs #3872
10 years ago
Jordi Boggiano
081e26f4d7
Merge remote-tracking branch 'localheinz/feature/sort-packages'
10 years ago
Jordi Boggiano
fa398e14c7
Fix indent detection in json files when an empty line starts the object
10 years ago
Jordi Boggiano
32a479a1e7
Fix subkey manipulation when the main key does not exist yet
10 years ago
Andreas Möller
32538a21a2
Enhancement: Sort packages by importance, then alphabetically
10 years ago
Jordi Boggiano
6c971c3028
Fix regex matching and add more tests for addSubNode, refs #3721 , fixes #3716
10 years ago
Rob Bast
fb54429941
solve edge case for `composer remove vendor/pkg`
10 years ago
Jordi Boggiano
bef89604e2
Fix parsing of strings, fixes #3543
10 years ago
Andreas Möller
6ddd8d4ec7
Enhancement: Add sort-packages option which allows sorting of packages
10 years ago
Jordi Boggiano
55a6a1c3d4
Add support for nested arrays in the json manipulator, fixes #3296
10 years ago
Jordi Boggiano
7131607ad1
Fix regression in handling github-oauth settings in auth.json
10 years ago
Jordi Boggiano
4392be4d29
Fix some more inconsistencies in json manipulation
11 years ago
Jordi Boggiano
d742ffca4f
Fix removal of missing keys
11 years ago
Jordi Boggiano
99f5b5a238
Fix backtracking issue in json manipulations, fixes #2583
11 years ago
Jordi Boggiano
3b48a1fea6
Fix JsonManipulator handling of package links, fixes #1465
12 years ago
Jordi Boggiano
3bd6af690d
Allow JsonManipulator::addMainKey to update top level keys as well
12 years ago
Jordi Boggiano
3d953384fa
Fix indenting detection in JsonManipulator, fixes #1788
12 years ago
Jordi Boggiano
b4d691e46d
Add test for escape sequences
12 years ago
Jordi Boggiano
e348642aa7
Fix json manipulator handling of escaped backslashes, fixes #1588
12 years ago
Jordi Boggiano
a7c950cddd
Add support for github-oauth in config command
12 years ago
Jordi Boggiano
dea4bdf8f0
Expand {} into a new line before manipulating json, fixes #1481
12 years ago
Jordi Boggiano
24963fb4c8
Fix handling of arrays in json manipulator
12 years ago
Jordi Boggiano
5cb9a6ead7
Write in the json directly without reformatting the whole file - skip validation since that is not really the job of the config command
12 years ago
Jordi Boggiano
f5e0918104
Add JsonManipulator class for doing raw manipulation of json strings
13 years ago