diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-06 11:18:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 11:18:25 +0100 |
commit | 8fbd325e42054a69fa28b9a840868f502dc562ac (patch) | |
tree | f8115b8f1b276fdd18168da8340e25564aed9d14 | |
parent | d981756c13790babc8e6323cbee427c2a6ba47fc (diff) | |
parent | adab75b8d1e58956fc26d3f1558590b5f8a9b0b6 (diff) |
Merge pull request #293712 from NixOS/backport-293582-to-release-23.11
[Backport release-23.11] build-support/php: update `composer validate` steps
-rw-r--r-- | pkgs/build-support/php/hooks/php-script-utils.bash | 23 | ||||
-rw-r--r-- | pkgs/development/php-packages/phpstan/default.nix | 10 |
2 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/build-support/php/hooks/php-script-utils.bash b/pkgs/build-support/php/hooks/php-script-utils.bash index 60afacbed0af1..9b5978865634f 100644 --- a/pkgs/build-support/php/hooks/php-script-utils.bash +++ b/pkgs/build-support/php/hooks/php-script-utils.bash @@ -13,7 +13,28 @@ setComposeRootVersion() { } checkComposerValidate() { - if ! composer validate --strict --no-ansi --no-interaction; then + if ! composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --no-check-lock; then + if [ "1" == "${composerStrictValidation-}" ]; then + echo + echo -e "\e[31mERROR: composer files validation failed\e[0m" + echo + echo -e '\e[31mThe validation of the composer.json failed.\e[0m' + echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m' + echo + exit 1 + else + echo + echo -e "\e[33mWARNING: composer files validation failed\e[0m" + echo + echo -e '\e[33mThe validation of the composer.json failed.\e[0m' + echo -e '\e[33mMake sure that the file composer.json is valid.\e[0m' + echo + echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' + echo + fi + fi + + if ! composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock; then if [ "1" == "${composerStrictValidation-}" ]; then echo echo -e "\e[31mERROR: composer files validation failed\e[0m" diff --git a/pkgs/development/php-packages/phpstan/default.nix b/pkgs/development/php-packages/phpstan/default.nix index 63b223b888c11..63ced11f23517 100644 --- a/pkgs/development/php-packages/phpstan/default.nix +++ b/pkgs/development/php-packages/phpstan/default.nix @@ -2,20 +2,22 @@ php.buildComposerProject (finalAttrs: { pname = "phpstan"; - version = "1.10.37"; + version = "1.10.59"; src = fetchFromGitHub { owner = "phpstan"; repo = "phpstan-src"; rev = finalAttrs.version; - hash = "sha256-y55bfwE3H/oDCwDq3wrClyX8dhk0p6vEl/CMhqN6LkA="; + hash = "sha256-2+CQtpmh2r2+87zLhx7UkYlZ7sDQdDh4S8v67PGNjLM="; }; - vendorHash = "sha256-hjCfrmpn2rYgApenZkHX8fXqPXukh7BVKENkvwIk8Dk="; + vendorHash = "sha256-6Wea4iUSFq0xSWFq4er4lzFn2mgeoYBXG1zMGM3Y390="; + composerStrictValidation = false; meta = { changelog = "https://github.com/phpstan/phpstan/releases/tag/${finalAttrs.version}"; description = "PHP Static Analysis Tool"; + homepage = "https://github.com/phpstan/phpstan"; longDescription = '' PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write @@ -24,7 +26,7 @@ php.buildComposerProject (finalAttrs: { before you run the actual line. ''; license = lib.licenses.mit; - homepage = "https://github.com/phpstan/phpstan"; + mainProgram = "phpstan"; maintainers = lib.teams.php.members; }; }) |