Alexander Kurilo
5a22a4f1f3
Make surrogate sequences in JSON work on PHP 5.3
...
Fixes #7510
6 years ago
Jordi Boggiano
ff59bbdab0
CS fixer
6 years ago
Gabriel Caruso
7d9f8e2247
Improvements
...
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
Jordi Boggiano
0ab843a058
Fix setting of scripts from config command, refs #7225
6 years ago
Gabriel Caruso
3d262bd637
Fixes from PHPStan level 0
...
More fixes from PHPStan level 0
7 years ago
Andreas Möller
de07f588c1
Fix: Use array_key_exists() instead of isset()
7 years ago
Vladimir Reznichenko
c8615358cb
SCA with PHP Inspections (EA Extended)
7 years ago
Jordi Boggiano
802849d52c
Wording tweaks
7 years ago
Deamon
5b29b7c8e3
delete last coma if deleting last element before 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
d7b2e42fa9
Do not split repo names on dots, fixes #6424
7 years ago
Christophe Coevoet
6daa2afdd3
Fix the handling of references in JSON schemas when validating
...
References must be resolved when loading the schema, otherwise they will fail
when using them.
The easiest way is actually to let the JsonSchema library load the file itself.
8 years ago
Jordi Boggiano
5ee22f25ba
Rework JSON matching to use a properly recursive pattern, fixes #5771
8 years ago
Jordi Boggiano
135783299a
Add support for editing top level properties and extra values, replaces #2415 , fixes #1411 , fixes #2384
8 years ago
Jordi Boggiano
a5f86b6ea0
Fix all other instances of addcslashes that might have issues with $ signs in strings, refs #5221
8 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.
8 years ago
Jordi Boggiano
3b0a1c6f70
Run cs fixer and update config to latest master
8 years ago
Niels Keurentjes
818c3e707a
Ton of phpDoc fixes.
8 years ago
Jordi Boggiano
edebbef98a
Add test and fix for very large repos, moar possessive quantifiers, fixes #5104
8 years ago
Jordi Boggiano
2217f4e09e
Add support for PREG_JIT_STACKLIMIT_ERROR, refs #5104
8 years ago
Jordi Boggiano
cb53bd04cb
Remove a few instances of RemoteFilesystem that were not needed
9 years ago
Jordi Boggiano
ce08582671
Fix CS
9 years ago
Possum
29ca21f30e
PHP version checks tweaking
9 years ago
Possum
2e99b9fdf5
Use https where possible
9 years ago
Jordi Boggiano
ab02867015
Use natural sort to sort packages, refs #3872
9 years ago
Jordi Boggiano
06fb00bfe5
Fix handling of platform packages to be future proof, refs #3872
9 years ago
Jordi Boggiano
081e26f4d7
Merge remote-tracking branch 'localheinz/feature/sort-packages'
9 years ago
Jordi Boggiano
fa398e14c7
Fix indent detection in json files when an empty line starts the object
9 years ago
Jordi Boggiano
32a479a1e7
Fix subkey manipulation when the main key does not exist yet
9 years ago
Andreas Möller
32538a21a2
Enhancement: Sort packages by importance, then alphabetically
9 years ago
Hugo Fonseca
e79d067690
Make parseJson safer
9 years ago
Hugo Fonseca
1bb871dca8
Add docBlock and fix CS
9 years ago
Jordi Boggiano
d9b5c884ba
Detect and warn JSON encoding failures, refs #3786
9 years ago
Francis Besset
16578d1d01
Simplified syntax
10 years ago
Jordi Boggiano
6c971c3028
Fix regex matching and add more tests for addSubNode, refs #3721 , fixes #3716
10 years ago
Jordi Boggiano
e172cd81a1
Fix lax validation of packages when loading them, fixes #3606 , fixes #3605
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
Christophe Coevoet
b0f13e0ab6
Fix typo
10 years ago
Christophe Coevoet
c571ccafd3
Restrict the JSONC fix to affected versions
10 years ago
Christophe Coevoet
f3d8323a71
Fixed the json formatting when using JSONC
10 years ago
Jordi Boggiano
94926218e8
CS fixes
10 years ago
Jordi Boggiano
109f4ffd5e
Normalize json across all php versions, fixes #3226
10 years ago
Jordi Boggiano
fc14d33491
Fix json nesting issue, fixes #3323
10 years ago
Jordi Boggiano
55a6a1c3d4
Add support for nested arrays in the json manipulator, fixes #3296
10 years ago
Jordi Boggiano
ac497feaba
CS fixes
10 years ago
Jordi Boggiano
7131607ad1
Fix regression in handling github-oauth settings in auth.json
10 years ago
Jordi Boggiano
534bd64cd1
Add support for manipulating empty json files
10 years ago
Jordi Boggiano
af6ef235e1
Update json schema
10 years ago
Jordi Boggiano
4392be4d29
Fix some more inconsistencies in json manipulation
10 years ago
Jordi Boggiano
d742ffca4f
Fix removal of missing keys
10 years ago
Jordi Boggiano
0df9c803a5
Merge pull request #2718 from sndpl/issue/2613
...
Fix for #2613
11 years ago
Jordi Boggiano
41afc8324e
Workaround for json schema bug, fixes #2726
11 years ago
Sandy Pleyte
3a2815b778
Added extra unit test from the example in the ticket.
11 years ago
Sandy Pleyte
f92f2f45a9
Fix for #2613 , when using php < 5.4 there was an unnecessary backslash before each utf-8 char. The problem was that the regexp matched all utf-8 encoded chars (included the ones that where escaped). The new regexp uses the lookbehind feature to check if the backslash isn't prefixed with an other backslash.
11 years ago
Sandy Pleyte
7a902ed96d
Fix for #2613 , when using php < 5.4 there was an unnecessary backslash before each utf-8 char. The problem was that the regexp matched all utf-8 encoded chars (included the ones that where escaped). The new regexp uses the lookbehind feature to check if the backslash isn't prefixed with an other backslash.
11 years ago
Jordi Boggiano
99f5b5a238
Fix backtracking issue in json manipulations, fixes #2583
11 years ago
Nicolas Bastien
52711d121c
Remove unused use statement.
11 years ago
Jordi Boggiano
46e82cb38d
Retry json file writing 3 times before failing, fixes #2286
11 years ago
bronze1man
9a1f4e4458
fix some files mode bug 755->644
11 years ago
Jordi Boggiano
8d0b7f278e
CS fixes
11 years ago
Pavel Savinov
831bd844bd
Almost PHPDoc problems fixed
11 years ago
Jordi Boggiano
df7114869b
Fix handling of multilines in previous commit
11 years ago
Jordi Boggiano
20ef3e3c5b
Clarify usage of addcslashes
11 years ago
Jordi Boggiano
3b48a1fea6
Fix JsonManipulator handling of package links, fixes #1465
11 years ago
Jordi Boggiano
3bd6af690d
Allow JsonManipulator::addMainKey to update top level keys as well
11 years ago
Jordi Boggiano
3d953384fa
Fix indenting detection in JsonManipulator, fixes #1788
11 years ago
Jordi Boggiano
02f6a32d08
Fix undef var issue when removing a json config key
11 years ago
Jordi Boggiano
c7ed20e9d8
Fix minor issues in json code
12 years ago
Jordi Boggiano
27898c4c31
Suppress errors from mkdir calls that are checked for failure
12 years ago
Jordi Boggiano
e348642aa7
Fix json manipulator handling of escaped backslashes, fixes #1588
12 years ago
deguif
1b5229dc04
Fixed phpdoc
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
c0e5736ae7
Add support for one-file-per-provider composer repositories
12 years ago
Jordi Boggiano
dc033e33d6
Pick longest match always
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
a54bf6269e
Improve error messages when network failures occur
12 years ago
Adel
d3b9f5c33f
Fix phpdocs
12 years ago
Jordi Boggiano
db16f68fbf
Tweak exception messages
12 years ago
Robert Schönthal
0cd453449b
minor changes to JsonFile::parseJson for Drivers
12 years ago
Robert Schönthal
c517ac6404
fixed issue #347 added file to json validation exception
12 years ago
Jordi Boggiano
66e9dcddf4
CS fixes
12 years ago
Jordi Boggiano
31330a739f
Fix CS
12 years ago
Jordi Boggiano
8ffe3c2e26
Cosmetic fixes
12 years ago
Jordi Boggiano
27f8019dbd
Refactor init & require commands
12 years ago
Jordi Boggiano
f5e0918104
Add JsonManipulator class for doing raw manipulation of json strings
12 years ago
Jordi Boggiano
b33496c853
Merge remote-tracking branch 'jeremyFreeAgent/master'
...
Conflicts:
doc/03-cli.md
12 years ago
Jordi Boggiano
c440b4594a
More PSR-2 goodness
12 years ago
Jordi Boggiano
1bd4ccbd54
php-cs-fixer magic
12 years ago
Jordi Boggiano
f516c1de48
Add license info for code snippet we reused
12 years ago
Jordi Boggiano
a30e6109bf
Fix 5.4.0 interop in formatting of empty array/objects
12 years ago
Jordi Boggiano
69864aeb13
Make check more explicit
12 years ago
Jordi Boggiano
3bdee3aabe
Detect and report UTF8 encoding errors in json files
12 years ago
Jordi Boggiano
b14366ed08
Fix exception when a json file can not be downloaded
12 years ago
Jérémy Romey
260d7d434f
Add a command for adding package to composer.json
...
Updated doc for require command
12 years ago
Jordi Boggiano
7f65dd7409
Use RemoteFilesystem everywhere we do http requests
12 years ago
Martin Hasoň
947d429c61
Removed definition of global constants reserved for PHP >=5.4 and fixed tests
12 years ago
Jordi Boggiano
7ceca9b789
Suppress relaxed schema and build it on the fly in php, refs #151
13 years ago