mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
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.
This commit is contained in:
parent
b50eb26740
commit
d51ef83a43
2 changed files with 50 additions and 4 deletions
|
@ -107,6 +107,28 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
|
|||
"vendor/baz": "qux"
|
||||
}
|
||||
}
|
||||
',
|
||||
),
|
||||
|
||||
|
||||
array(
|
||||
'{
|
||||
"require":
|
||||
{
|
||||
"foo": "bar",
|
||||
"vendor/baz": "baz"
|
||||
}
|
||||
}',
|
||||
'require',
|
||||
'vEnDoR/bAz',
|
||||
'qux',
|
||||
'{
|
||||
"require":
|
||||
{
|
||||
"foo": "bar",
|
||||
"vendor/baz": "qux"
|
||||
}
|
||||
}
|
||||
',
|
||||
),
|
||||
array(
|
||||
|
@ -127,6 +149,26 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
|
|||
"vendor/baz": "qux"
|
||||
}
|
||||
}
|
||||
',
|
||||
),
|
||||
array(
|
||||
'{
|
||||
"require":
|
||||
{
|
||||
"foo": "bar",
|
||||
"vendor\/baz": "baz"
|
||||
}
|
||||
}',
|
||||
'require',
|
||||
'vEnDoR/bAz',
|
||||
'qux',
|
||||
'{
|
||||
"require":
|
||||
{
|
||||
"foo": "bar",
|
||||
"vendor/baz": "qux"
|
||||
}
|
||||
}
|
||||
',
|
||||
),
|
||||
array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue