Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-support/php: set COMPOSER_ROOT_VERSION environment variable #285828

Merged
merged 15 commits into from
Feb 26, 2024

Conversation

drupol
Copy link
Contributor

@drupol drupol commented Feb 2, 2024

This PR:

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch from 43051b4 to 7a00b38 Compare February 2, 2024 17:03
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Feb 2, 2024
@ofborg ofborg bot requested review from aanderse, talyz, Ma27 and etu February 2, 2024 17:25
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 labels Feb 2, 2024
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch 10 times, most recently from 42afe31 to 1906977 Compare February 5, 2024 20:10
@drupol drupol marked this pull request as ready for review February 5, 2024 20:21
@drupol drupol requested a review from globin as a code owner February 5, 2024 20:21
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch 2 times, most recently from ff5289a to 1492411 Compare February 5, 2024 20:37
@drupol drupol marked this pull request as draft February 8, 2024 09:48
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch from 1492411 to 5d7f6d1 Compare February 8, 2024 11:03
@drupol drupol changed the title build-support/php: remove COMPOSER_ROOT_VERSION environment variable build-support/php: set COMPOSER_ROOT_VERSION environment variable Feb 8, 2024
@drupol drupol mentioned this pull request Feb 10, 2024
13 tasks
@drupol drupol marked this pull request as ready for review February 10, 2024 22:57
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch 2 times, most recently from f9dd491 to 4797bc9 Compare February 19, 2024 09:18
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch 3 times, most recently from ffc6ea2 to 3482d54 Compare February 25, 2024 09:31
@LeSuisse
Copy link
Contributor

LeSuisse commented Feb 25, 2024

The broken ofborg-eval is somehow "normal" since we are throwing a warning for phpcs and phpcbf.

I do not think we can we use this pattern for packages. It is probably good enough to remove the packages and to set an alias to give some information. The phpcs and phpcbf derivations will need to be dropped at some point so might as well do it now.

diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index 5647ccfd349c..310c9417fef4 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -204,10 +204,6 @@ lib.makeScope pkgs.newScope (self: with self; {
 
     php-parallel-lint = callPackage ../development/php-packages/php-parallel-lint { };
 
-    phpcbf = lib.warn "`phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`." (callPackage ../development/php-packages/phpcbf { });
-
-    phpcs = lib.warn "`phpcs` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`." (callPackage ../development/php-packages/phpcs { });
-
     phpmd = callPackage ../development/php-packages/phpmd { };
 
     phpspy = callPackage ../development/php-packages/phpspy { };
@@ -217,6 +213,9 @@ lib.makeScope pkgs.newScope (self: with self; {
     psalm = callPackage ../development/php-packages/psalm { };
 
     psysh = callPackage ../development/php-packages/psysh { };
+  } // lib.optionalAttrs config.allowAliases {
+    phpcbf = throw "`phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`."; # Added 25-02-2024
+    phpcs = throw "`phpcs` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`."; # Added 25-02-2024
   };

@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch from 3482d54 to f180800 Compare February 25, 2024 12:11
@ofborg ofborg bot requested a review from apeschar February 25, 2024 12:35
@drupol drupol force-pushed the php/remove-COMPOSER-ROOT-VERSION-env branch from f180800 to ddb92f0 Compare February 25, 2024 16:35
@drupol drupol mentioned this pull request Feb 25, 2024
13 tasks
@drupol
Copy link
Contributor Author

drupol commented Feb 25, 2024

@ofborg build phpPackages.psalm phpPackages.php-parallel-lint phpPackages.php-codesniffer phpPackages.phpcs phpPackages.phpcbf phpPackages.deployer phpPackages.phan phpPackages.phing phpPackages.phive phpPackages.php-cs-fixer phpPackages.phpmd phpPackages.n98-magerun phpPackages.n98-magerun2

Copy link
Contributor

@LeSuisse LeSuisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good, no unexpected failure.

Result of nixpkgs-review pr 285828 run on x86_64-linux 1

3 packages failed to build:
  • php81Packages.php-codesniffer
  • php81Packages.psalm
  • php83Packages.deployer
59 packages built:
  • adminer
  • bookstack
  • composer-require-checker
  • librenms
  • movim
  • n98-magerun
  • n98-magerun2
  • paratest
  • pdepend
  • pest
  • phel
  • php81Packages.box (php82Packages.box ,php83Packages.box)
  • php81Packages.castor
  • php81Packages.composer
  • php81Packages.deployer
  • php81Packages.grumphp
  • php81Packages.phan
  • php81Packages.phing
  • php81Packages.phive
  • php81Packages.php-cs-fixer
  • php81Packages.php-parallel-lint
  • php81Packages.phpmd
  • php81Packages.phpstan
  • php81Packages.psysh
  • php82Packages.castor
  • php82Packages.composer
  • php82Packages.deployer
  • php82Packages.grumphp
  • php82Packages.phan
  • php82Packages.phing
  • php82Packages.phive
  • php82Packages.php-codesniffer
  • php82Packages.php-cs-fixer
  • php82Packages.php-parallel-lint
  • php82Packages.phpmd
  • php82Packages.phpstan
  • php82Packages.psalm
  • php82Packages.psysh
  • php83Packages.castor
  • php83Packages.composer
  • php83Packages.grumphp
  • php83Packages.phan
  • php83Packages.phing
  • php83Packages.phive
  • php83Packages.php-codesniffer
  • php83Packages.php-cs-fixer
  • php83Packages.php-parallel-lint
  • php83Packages.phpmd
  • php83Packages.phpstan
  • php83Packages.psalm
  • php83Packages.psysh
  • phpactor
  • phpdocumentor
  • phpunit
  • pixelfed
  • platformsh
  • robo
  • snipe-it
  • vimPlugins.phpactor

@LeSuisse LeSuisse merged commit 3a19a72 into NixOS:master Feb 26, 2024
27 checks passed
@drupol drupol deleted the php/remove-COMPOSER-ROOT-VERSION-env branch February 26, 2024 19:38
@drupol drupol mentioned this pull request Mar 4, 2024
13 tasks
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Backport failed for release-23.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-23.11
git worktree add -d .worktree/backport-285828-to-release-23.11 origin/release-23.11
cd .worktree/backport-285828-to-release-23.11
git switch --create backport-285828-to-release-23.11
git cherry-pick -x f43fb4c110836bcbbbb5e6265f0d05293b819d7d f4c31eb9c516d2df638fe82ffac2b2dffac2e00c 5949927f4d48b1fd6c27340029a50b861c99624c 8d0197fe1e40da9365a3e2af51309feb52de0f6f 7491aa43a777881766e02f32c0e42b263d0a2469 d653d7800fef3b6b43aa695bdb7382eebb9990d2 b7f3d0df8fb5cc7994aa04ca7552dff6dcd98cf1 dae4e32f4b046943e3913f9dde7bebbcc2b1821b 68866194354da5cc7cf69914049c30b57c93f02b ee4ecc331b0b691500ec293959a88da9d5e2873a 42be235ec004c9fe3579ca9ef3ea29f47e92f673 b453c845f6fbf9053a046d44406d987bc1613c7e 7e3f284f13d90495963017c4b9d333b7440256c1 6addd0822026c2d1f406d8c9b5d0398c6ec382d9 ddb92f079f20a7d67c018ae3dd0a38fd1318753f

@drupol drupol mentioned this pull request Mar 5, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants