fix: php: package names ensure lowercase

This commit is contained in:
Martin Toman 2022-09-21 15:05:08 -07:00
parent f1888d4763
commit 2f499eb8eb
3 changed files with 7 additions and 5 deletions

View File

@ -98,7 +98,7 @@
url = "${root}/vendor/${name}"; url = "${root}/vendor/${name}";
options = { options = {
versions = { versions = {
"${name}" = "${version}"; "${l.strings.toLower name}" = "${version}";
}; };
symlink = false; symlink = false;
}; };
@ -125,7 +125,7 @@
(repositories ++ [{packagist = false;}]); (repositories ++ [{packagist = false;}]);
dependenciesString = l.toJSON (l.listToAttrs ( dependenciesString = l.toJSON (l.listToAttrs (
map (dep: { map (dep: {
inherit (dep) name; name = l.strings.toLower dep.name;
value = dep.version; value = dep.version;
}) })
(dependencies (dependencies

View File

@ -111,7 +111,7 @@
url = "${cleanDependency dep.name dep.version}"; url = "${cleanDependency dep.name dep.version}";
options = { options = {
versions = { versions = {
"${dep.name}" = "${dep.version}"; "${l.strings.toLower dep.name}" = "${dep.version}";
}; };
symlink = false; symlink = false;
}; };
@ -123,7 +123,7 @@
dependenciesString = l.toJSON (l.listToAttrs ( dependenciesString = l.toJSON (l.listToAttrs (
map (dep: { map (dep: {
inherit (dep) name; name = l.strings.toLower dep.name;
value = dep.version; value = dep.version;
}) })
dependencies dependencies

View File

@ -60,7 +60,9 @@
jq \ jq \
"(.config.lock = true) | \ "(.config.lock = true) | \
(.config.\"platform-check\" = false)" \ (.config.\"platform-check\" = false) | \
(.require = ((.require // {}) | with_entries(.key |= ascii_downcase))) | \
(.\"require-dev\" = ((.\"require-dev\" // {}) | with_entries(.key |= ascii_downcase)))" \
composer.json.orig > composer.json composer.json.orig > composer.json
if [ "$(jq '.project.subsystemInfo.noDev' -c -r $jsonInput)" == "true" ]; then if [ "$(jq '.project.subsystemInfo.noDev' -c -r $jsonInput)" == "true" ]; then