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
php80: init at 8.0.0 #104159
php80: init at 8.0.0 #104159
Conversation
Btw, php-8.0.0 tarballs are now on the mirrors in the expected locations. They haven't released any changelogs yet. But it's worth to start targeting that in this PR. |
@etu Should I mark all php80Packages and extensions as broken or should I leave them? |
I think it's better to leave them for now, just make sure that the php80 attribute builds with the default set. Then we can test things more and easier when it's cached. json seems excluded from your default list of extensions, howcome? Is it builtin now or some other reason? |
json is now always active as extension |
Then we should disable json as extension if it's newer than 8.0 to not cause build errors there :) |
So I have built 8.0.0 and included the Build Fix for Opcache from php/php-src@4633e70 ( I guess will be released with 8.0.1) @etu I have no glue how to remove json only in php80 attribute 🙈 . Can you help me here? |
That's easy! { name = "json"; enable = lib.versionOlder php.version "8.0"; } |
Done :) |
So now things that depends on the json extension is failing, because it's built in and therefore doesn't exist as a separate extension. Example in couchbase we have this: {
internalDeps = [ php.extensions.json ];
} Thinking we could do something like: {
internalDeps = [] ++ lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
} In places where we use |
I think the |
@aanderse We can start with optionals, we've used it before. @shyim Could you add this diff: diff --git a/pkgs/development/php-packages/couchbase/default.nix b/pkgs/development/php-packages/couchbase/default.nix
index abe4b7efdea..58c276c1a4e 100644
--- a/pkgs/development/php-packages/couchbase/default.nix
+++ b/pkgs/development/php-packages/couchbase/default.nix
@@ -16,7 +16,7 @@ buildPecl {
configureFlags = [ "--with-couchbase" ];
buildInputs = with pkgs; [ libcouchbase zlib ];
- internalDeps = [ php.extensions.json ];
+ internalDeps = [] ++ lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
peclDeps = [ php.extensions.igbinary ];
patches = [
diff --git a/pkgs/development/php-packages/redis/default.nix b/pkgs/development/php-packages/redis/default.nix
index 41ff8f38689..a61ae1194ff 100644
--- a/pkgs/development/php-packages/redis/default.nix
+++ b/pkgs/development/php-packages/redis/default.nix
@@ -7,8 +7,9 @@ buildPecl {
sha256 = "1cfsbxf3q3im0cmalgk76jpz581zr92z03c1viy93jxb53k2vsgl";
internalDeps = with php.extensions; [
- json
session
+ ] ++ lib.optionals (lib.versionOlder php.version "8.0") [
+ json
] ++ lib.optionals (lib.versionOlder php.version "7.4") [
hash
]; This will fix the eval, then I think we can merge this and start testing it. |
|
We could mark couchbase as broken until there is a upstream version of it |
Yeah, that's fine :) |
Should we update extensions that have new version supporting PHP 8 here? E.g. XDebug. Even though it might have API changes like Couchbase 3? |
@jtojnar XDebug 3 contains also complete new configuration. Maybe build a own package of it? |
xdebug 3.0 is already updated in #105332 |
@shyim The optional for json in couchbase is still needed to fix eval And a rebase on master should give us xdebug 3 to test with. |
Rebased, added json as optional and marked as broken for php 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say that this is good to go for now.
We don't break eval. We have a building package with all default extensions that existed since before in the default install.
We can always touch up things later when it's easier to test with binary caches etc.
Marking packages that doesn't build as broken is a common practice before next release if we don't get to it before then.
🎉 thanks everyone! |
Motivation for this change
Amazing new major version of PHP
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)