Skip to content

Commit

Permalink
php84: init at 8.4.0beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Aug 26, 2024
1 parent 409015a commit 536658f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
strategy:
matrix:
php:
- branch: '8.4'
- branch: '8.3'
- branch: '8.2'
- branch: '8.1'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following versions are currently available:
- `php81`
- `php82`
- `php83`
- `php84`

There is also a `php` package which is the alias of the default PHP version in Nixpkgs.

Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
};
in rec {
packages = {
inherit (pkgs) php php56 php70 php71 php72 php73 php74 php80 php81 php82 php83;
inherit (pkgs) php php56 php70 php71 php72 php73 php74 php80 php81 php82 php83 php84;
};

checks = import ./checks.nix {
Expand Down
29 changes: 28 additions & 1 deletion pkgs/package-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,16 @@ in
} // lib.optionalAttrs (lib.versionOlder prev.php.version "7.2" && pkgs.stdenv.cc.isClang) {
NIX_CFLAGS_COMPILE = (attrs.NIX_CFLAGS_COMPILE or "") + " -Wno-implicit-function-declaration -Wno-int-conversion";
})
else if lib.versionAtLeast prev.php.version "8.4" then
prev.extensions.redis.overrideAttrs (attrs: {
patches = [
# Fix build with PHP 8.4.
(pkgs.fetchpatch {
url = "https://github.com/phpredis/phpredis/commit/a51215ce2b22bcd1f506780c35b6833471e0b8cb.patch";
hash = "sha256-DoGPMyuI/IZdF+8jG5faoyG2aM+WDz0obH6S7HoOMX8=";
})
];
})
else
prev.extensions.redis;

Expand Down Expand Up @@ -840,7 +850,24 @@ in

xdebug =
# xdebug versions were determined using https://xdebug.org/docs/compat
if lib.versionAtLeast prev.php.version "8.0" then
if lib.versionAtLeast prev.php.version "8.4" then
prev.extensions.xdebug.overrideAttrs (attrs: {
name = "xdebug-3.4.0alpha1";
version = "3.4.0alpha1";
src = pkgs.fetchurl {
url = "https://xdebug.org/files/xdebug-3.4.0alpha1.tgz";
hash = "sha256-S4oizwlhom50uV+ToV6ctdWka8d2CKnAPb2YmWOytOc=";
};

patches = [
# Fix missing ZEND_EXIT
(pkgs.fetchpatch {
url = "https://github.com/xdebug/xdebug/commit/6ecd35f898e67cbe7f9257e7cb3a4c602a3dc8ec.patch";
hash = "sha256-IYc1KKPBYek4AXEijoM9RaTwp51J0Gz/CQ1HgmTct3Q=";
})
];
})
else if lib.versionAtLeast prev.php.version "8.0" then
prev.extensions.xdebug
else if lib.versionAtLeast prev.php.version "7.2" then
prev.extensions.xdebug.overrideAttrs (attrs: {
Expand Down
4 changes: 4 additions & 0 deletions pkgs/phps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,8 @@ in
php83 = prev.php83.override {
inherit packageOverrides;
};

php84 = prev.php84.override {
inherit packageOverrides;
};
}

0 comments on commit 536658f

Please sign in to comment.