0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #174555 from etu/php-drop-php74

php: Drop PHP 7.4
This commit is contained in:
Elis Hirwing 2022-06-10 10:43:31 +02:00 committed by GitHub
commit 7afff45088
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 39 additions and 187 deletions

View file

@ -9,7 +9,7 @@ wide variety of extensions and libraries available.
The different versions of PHP that nixpkgs provides are located under
attributes named based on major and minor version number; e.g.,
`php74` is PHP 7.4.
`php81` is PHP 8.1.
Only versions of PHP that are supported by upstream for the entirety
of a given NixOS release will be included in that release of
@ -23,7 +23,7 @@ NixOS - not necessarily the latest major release from upstream.
All available PHP attributes are wrappers around their respective
binary PHP package and provide commonly used extensions this way. The
real PHP 7.4 package, i.e. the unwrapped one, is available as
`php74.unwrapped`; see the next section for more details.
`php81.unwrapped`; see the next section for more details.
Interactive tools built on PHP are put in `php.packages`; composer is
for example available at `php.packages.composer`.

View file

@ -108,6 +108,12 @@
<literal>(with foo; isPower &amp;&amp; is32bit &amp;&amp; isBigEndian)</literal>.
</para>
</listitem>
<listitem>
<para>
PHP 7.4 is no longer supported due to upstream not supporting
this version for the entire lifecycle of the 22.11 release.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.11-notable-changes">

View file

@ -45,6 +45,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- The `isPowerPC` predicate, found on `platform` attrsets (`hostPlatform`, `buildPlatform`, `targetPlatform`, etc) has been removed in order to reduce confusion. The predicate was was defined such that it matches only the 32-bit big-endian members of the POWER/PowerPC family, despite having a name which would imply a broader set of systems. If you were using this predicate, you can replace `foo.isPowerPC` with `(with foo; isPower && is32bit && isBigEndian)`.
- PHP 7.4 is no longer supported due to upstream not supporting this
version for the entire lifecycle of the 22.11 release.
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View file

@ -177,7 +177,7 @@ in
services.phpfpm.pools.postfixadmin = {
user = user;
phpPackage = pkgs.php74;
phpPackage = pkgs.php81;
phpOptions = ''
error_log = 'stderr'
log_errors = on

View file

@ -293,9 +293,7 @@ in
inherit user;
group = webserver.group;
# Not yet compatible with php 8 https://www.dokuwiki.org/requirements
# https://github.com/splitbrain/dokuwiki/issues/3545
phpPackage = pkgs.php74;
phpPackage = pkgs.php81;
phpEnv = {
DOKUWIKI_LOCAL_CONFIG = "${dokuwikiLocalConfig hostName cfg}";
DOKUWIKI_PLUGINS_LOCAL_CONFIG = "${dokuwikiPluginsLocalConfig hostName cfg}";

View file

@ -115,9 +115,9 @@ in {
user = "grocy";
group = "nginx";
# PHP 7.4 is the only version which is supported/tested by upstream:
# https://github.com/grocy/grocy/blob/v3.0.0/README.md#how-to-install
phpPackage = pkgs.php74;
# PHP 8.0 is the only version which is supported/tested by upstream:
# https://github.com/grocy/grocy/blob/v3.3.0/README.md#how-to-install
phpPackage = pkgs.php80;
inherit (cfg.phpfpm) settings;

View file

@ -236,7 +236,7 @@ in
};
services.phpfpm = {
phpPackage = pkgs.php74;
phpPackage = pkgs.php81;
pools = mapAttrs' (hostName: cfg: (
nameValuePair "invoiceplane-${hostName}" {
inherit user;
@ -302,4 +302,3 @@ in
]);
}

View file

@ -56,7 +56,7 @@ let
mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql";
pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql";
phpExt = pkgs.php74.withExtensions
phpExt = pkgs.php81.withExtensions
({ enabled, all }: with all; [ iconv mbstring curl openssl tokenizer xmlrpc soap ctype zip gd simplexml dom intl json sqlite3 pgsql pdo_sqlite pdo_pgsql pdo_odbc pdo_mysql pdo mysqli session zlib xmlreader fileinfo filter opcache ]);
in
{

View file

@ -157,7 +157,7 @@ in {
};
phpPackage = mkOption {
type = types.package;
relatedPackages = [ "php74" "php80" "php81" ];
relatedPackages = [ "php80" "php81" ];
defaultText = "pkgs.php";
description = ''
PHP package to use for Nextcloud.
@ -632,7 +632,7 @@ in {
services.nextcloud.datadir = mkOptionDefault config.services.nextcloud.home;
services.nextcloud.phpPackage =
if versionOlder cfg.package.version "21" then pkgs.php74
if versionOlder cfg.package.version "24" then pkgs.php80
# FIXME: Use PHP 8.1 with Nextcloud 24 and higher, once issues like this one are fixed:
#
# https://github.com/nextcloud/twofactor_totp/issues/1192

View file

@ -344,7 +344,7 @@ in {
services.phpfpm.pools.snipe-it = {
inherit user group;
phpPackage = pkgs.php74;
phpPackage = pkgs.php81;
phpOptions = ''
post_max_size = ${cfg.maxUploadSize}
upload_max_filesize = ${cfg.maxUploadSize}

View file

@ -422,7 +422,6 @@ in {
pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {};
php = handleTest ./php {};
php74 = handleTest ./php { php = pkgs.php74; };
php80 = handleTest ./php { php = pkgs.php80; };
php81 = handleTest ./php { php = pkgs.php81; };
pict-rs = handleTest ./pict-rs.nix {};

View file

@ -1,52 +0,0 @@
{ callPackage, lib, stdenv, ... }@_args:
let
base = callPackage ./generic.nix (_args // {
version = "7.4.29";
sha256 = "sha256-fd5YoCsiXCUTDG4q4su6clS7A0D3/hcpFHgXbYZvlII=";
});
in
base.withExtensions ({ all, ... }: with all; ([
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sodium
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ lib.optionals (!stdenv.isDarwin) [ imap ]))

View file

@ -1,24 +0,0 @@
{ buildPecl, lib, pcre2, php }:
buildPecl {
pname = "apcu_bc";
version = "1.0.5";
sha256 = "0ma00syhk2ps9k9p02jz7rii6x3i2p986il23703zz5npd6y9n20";
peclDeps = [ php.extensions.apcu ];
buildInputs = [ pcre2 ];
postInstall = ''
mv $out/lib/php/extensions/apc.so $out/lib/php/extensions/apcu_bc.so
'';
meta = with lib; {
description = "APCu Backwards Compatibility Module";
license = licenses.php301;
homepage = "https://pecl.php.net/package/apcu_bc";
maintainers = teams.php.members;
broken = versionAtLeast php.version "8";
};
}

View file

@ -16,7 +16,6 @@ buildPecl {
configureFlags = [ "--with-couchbase" ];
buildInputs = [ libcouchbase zlib ];
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
patches = [
(substituteAll {

View file

@ -8,8 +8,6 @@ buildPecl {
buildInputs = [ pcre2 ];
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
meta = with lib; {
description = "An extension providing efficient data structures for PHP";
license = licenses.mit;

View file

@ -22,7 +22,6 @@ mkDerivation rec {
'';
meta = with lib; {
broken = versionOlder php.version "8.0";
description = "A PHP code-quality tool";
homepage = "https://github.com/phpro/grumphp";
license = licenses.mit;

View file

@ -1,4 +1,8 @@
{ buildPecl, lib, version, sha256, oracle-instantclient }:
{ buildPecl, lib, oracle-instantclient }:
let
version = "3.0.1";
sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914";
in
buildPecl {
pname = "oci8";

View file

@ -1,30 +0,0 @@
{ buildPecl, fetchurl, lib, libxl, php }:
let
pname = "php_excel";
phpVersion = "php7";
version = "1.0.2";
in
buildPecl {
inherit pname version;
src = fetchurl {
url = "https://github.com/iliaal/php_excel/releases/download/Excel-1.0.2-PHP7/excel-${version}-${phpVersion}.tgz";
sha256 = "0dpvih9gpiyh1ml22zi7hi6kslkilzby00z1p8x248idylldzs2n";
};
buildInputs = [ libxl ];
configureFlags = [
"--with-excel"
"--with-libxl-incdir=${libxl}/include_c"
"--with-libxl-libdir=${libxl}/lib"
];
meta = with lib; {
description = "PHP Extension interface to the Excel writing/reading library";
license = licenses.php301;
homepage = "https://github.com/iliaal/php_excel";
maintainers = lib.teams.php.members;
broken = lib.versionAtLeast php.version "8.0";
};
}

View file

@ -29,6 +29,5 @@ mkDerivation {
license = licenses.bsd3;
homepage = "https://phpmd.org/";
maintainers = teams.php.members;
broken = versionOlder php.version "7.4";
};
}

View file

@ -8,8 +8,6 @@ buildPecl {
internalDeps = with php.extensions; [
session
] ++ lib.optionals (lib.versionOlder php.version "8.0") [
json
];
meta = with lib; {

View file

@ -1,7 +1,6 @@
{ lib, stdenv, fetchFromGitHub, nixosTests, which
, pcre2
, withPython3 ? true, python3, ncurses
, withPHP74 ? false, php74
, withPHP80 ? true, php80
, withPerl532 ? false, perl532
, withPerl534 ? true, perl534
@ -24,7 +23,6 @@ let
fpmSupport = false;
};
php74-unit = php74.override phpConfig;
php80-unit = php80.override phpConfig;
in stdenv.mkDerivation rec {
@ -42,7 +40,6 @@ in stdenv.mkDerivation rec {
buildInputs = [ pcre2.dev ]
++ optionals withPython3 [ python3 ncurses ]
++ optional withPHP74 php74-unit
++ optional withPHP80 php80-unit
++ optional withPerl532 perl532
++ optional withPerl534 perl534
@ -60,12 +57,10 @@ in stdenv.mkDerivation rec {
++ optional withDebug "--debug";
# Optionally add the PHP derivations used so they can be addressed in the configs
usedPhp74 = optionals withPHP74 php74-unit;
usedPhp80 = optionals withPHP80 php80-unit;
postConfigure = ''
${optionalString withPython3 "./configure python --module=python3 --config=python3-config --lib-path=${python3}/lib"}
${optionalString withPHP74 "./configure php --module=php74 --config=${php74-unit.unwrapped.dev}/bin/php-config --lib-path=${php74-unit}/lib"}
${optionalString withPHP80 "./configure php --module=php80 --config=${php80-unit.unwrapped.dev}/bin/php-config --lib-path=${php80-unit}/lib"}
${optionalString withPerl532 "./configure perl --module=perl532 --perl=${perl532}/bin/perl"}
${optionalString withPerl534 "./configure perl --module=perl534 --perl=${perl534}/bin/perl"}

View file

@ -97,9 +97,7 @@ stdenv.mkDerivation rec {
substituteInPlace "$f" \
--replace pkg-config "$PKG_CONFIG"
done
${lib.optionalString (lib.versionAtLeast php.version "8") ''
sed -e "s/ + php_version//" -i plugins/php/uwsgiplugin.py
''}
sed -e "s/ + php_version//" -i plugins/php/uwsgiplugin.py
'';
configurePhase = ''

View file

@ -2,7 +2,7 @@
let
phpExt = php.withExtensions
({ enabled, all }: with all; [ json filter mysqlnd mysqli pdo pdo_mysql ]);
({ enabled, all }: with all; [ filter mysqlnd mysqli pdo pdo_mysql ]);
in stdenv.mkDerivation rec {
pname = "engelsystem";
version = "3.1.0";

View file

@ -1013,6 +1013,10 @@ mapAliases ({
phwmon = throw "phwmon has been removed: abandoned by upstream"; # Added 2022-04-24
# Obsolete PHP version aliases
php74 = throw "php74 has been dropped due to the lack of maintanence from upstream for future releases"; # Added 2022-05-24
php74Packages = php74; # Added 2022-05-24
php74Extensions = php74; # Added 2022-05-24
php73 = throw "php73 has been dropped due to the lack of maintanence from upstream for future releases"; # Added 2021-06-03
php73Packages = php73; # Added 2021-06-03
php73Extensions = php73; # Added 2021-06-03

View file

@ -1782,7 +1782,7 @@ with pkgs;
}) arangodb_3_3 arangodb_3_4 arangodb_3_5;
arangodb = arangodb_3_4;
arcanist = callPackage ../development/tools/misc/arcanist { php = php74; };
arcanist = callPackage ../development/tools/misc/arcanist { php = php81; };
arduino = arduino-core.override { withGui = true; };
@ -14408,13 +14408,6 @@ with pkgs;
php80Extensions = recurseIntoAttrs php80.extensions;
php80Packages = recurseIntoAttrs php80.packages;
# Import PHP74 interpreter, extensions and packages
php74 = callPackage ../development/interpreters/php/7.4.nix {
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
};
php74Extensions = recurseIntoAttrs php74.extensions;
php74Packages = recurseIntoAttrs php74.packages;
picoc = callPackage ../development/interpreters/picoc {};
@ -21718,7 +21711,7 @@ with pkgs;
dspam = callPackage ../servers/mail/dspam { };
engelsystem = callPackage ../servers/web-apps/engelsystem { php = php74; };
engelsystem = callPackage ../servers/web-apps/engelsystem { php = php81; };
envoy = callPackage ../servers/http/envoy {
jdk = openjdk11_headless;
@ -27899,7 +27892,7 @@ with pkgs;
lrzsz = callPackage ../tools/misc/lrzsz { };
lsp-plugins = callPackage ../applications/audio/lsp-plugins { php = php74; };
lsp-plugins = callPackage ../applications/audio/lsp-plugins { php = php81; };
ltex-ls = callPackage ../tools/text/ltex-ls { };

View file

@ -196,8 +196,6 @@ lib.makeScope pkgs.newScope (self: with self; {
apcu = callPackage ../development/php-packages/apcu { };
apcu_bc = callPackage ../development/php-packages/apcu_bc { };
ast = callPackage ../development/php-packages/ast { };
blackfire = pkgs.callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
@ -226,13 +224,7 @@ lib.makeScope pkgs.newScope (self: with self; {
mongodb = callPackage ../development/php-packages/mongodb { };
oci8 = callPackage ../development/php-packages/oci8 ({
version = "2.2.0";
sha256 = "0jhivxj1nkkza4h23z33y7xhffii60d7dr51h1czjk10qywl7pyd";
} // lib.optionalAttrs (lib.versionAtLeast php.version "8.0") {
version = "3.0.1";
sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914";
});
oci8 = callPackage ../development/php-packages/oci8 { };
openswoole = callPackage ../development/php-packages/openswoole { };
@ -260,8 +252,6 @@ lib.makeScope pkgs.newScope (self: with self; {
pdo_sqlsrv = callPackage ../development/php-packages/pdo_sqlsrv { };
php_excel = callPackage ../development/php-packages/php_excel { };
pinba = callPackage ../development/php-packages/pinba { };
protobuf = callPackage ../development/php-packages/protobuf { };
@ -345,13 +335,6 @@ lib.makeScope pkgs.newScope (self: with self; {
configureFlags = [
"--with-iconv${lib.optionalString stdenv.isDarwin "=${libiconv}"}"
];
patches = lib.optionals (lib.versionOlder php.version "8.0") [
# Header path defaults to FHS location, preventing the configure script from detecting errno support.
(fetchpatch {
url = "https://github.com/fossar/nix-phps/raw/263861a8c9bdafd7abe44db6db4ef0179643680c/pkgs/iconv-header-path.patch";
sha256 = "7GHnEUu+hcsQ4h3itDwk6p46ZKfib9JZ2XpWlXrdn6E=";
})
];
doCheck = false;
}
{
@ -365,7 +348,6 @@ lib.makeScope pkgs.newScope (self: with self; {
name = "intl";
buildInputs = [ icu64 ];
}
{ name = "json"; enable = lib.versionOlder php.version "8.0"; }
{
name = "ldap";
buildInputs = [ openldap cyrus_sasl ];
@ -381,9 +363,7 @@ lib.makeScope pkgs.newScope (self: with self; {
}
{
name = "mbstring";
buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [
pcre2
];
buildInputs = [ oniguruma pcre2 ];
doCheck = false;
}
{
@ -416,11 +396,9 @@ lib.makeScope pkgs.newScope (self: with self; {
'')
];
}
# oci8 (7.4, 7.3, 7.2)
# odbc (7.4, 7.3, 7.2)
{
name = "opcache";
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin && lib.versionAtLeast php.version "8.0") [
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [
valgrind.dev
];
zendExtension = true;
@ -443,14 +421,12 @@ lib.makeScope pkgs.newScope (self: with self; {
enable = (!stdenv.isDarwin);
doCheck = false;
}
# pdo_firebird (7.4, 7.3, 7.2)
{
name = "pdo_mysql";
internalDeps = with php.extensions; [ pdo mysqlnd ];
configureFlags = [ "--with-pdo-mysql=mysqlnd" "PHP_MYSQL_SOCK=/run/mysqld/mysqld.sock" ];
doCheck = false;
}
# pdo_oci (7.4, 7.3, 7.2)
{
name = "pdo_odbc";
internalDeps = [ php.extensions.pdo ];
@ -500,7 +476,7 @@ lib.makeScope pkgs.newScope (self: with self; {
'';
doCheck = false;
}
{ name = "session"; doCheck = lib.versionOlder php.version "8.0"; }
{ name = "session"; doCheck = false; }
{ name = "shmop"; }
{
name = "simplexml";
@ -558,15 +534,6 @@ lib.makeScope pkgs.newScope (self: with self; {
"--enable-xmlreader"
];
}
{
name = "xmlrpc";
buildInputs = [ libxml2 libiconv ];
# xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc
enable = lib.versionOlder php.version "8.0";
configureFlags = [
"--with-xmlrpc"
];
}
{
name = "xmlwriter";
buildInputs = [ libxml2 ];
@ -577,7 +544,7 @@ lib.makeScope pkgs.newScope (self: with self; {
{
name = "xsl";
buildInputs = [ libxslt libxml2 ];
doCheck = lib.versionOlder php.version "8.0";
doCheck = false;
configureFlags = [ "--with-xsl=${libxslt.dev}" ];
}
{ name = "zend_test"; }