summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-05 11:14:09 +0200
committerRemi Collet <remi@php.net>2023-07-05 11:14:09 +0200
commit6c237a9a0f483e575da86d8f0ba19bc450cefdd7 (patch)
tree4e4b88c8cb5e82f6542f0b650b6baf3d4261e809
parent6a8672b7f0c5e607de04968c46d911feef4004fb (diff)
update to 8.3.0alpha3
switch to nikic/php-parser version 5
-rw-r--r--failed.txt2
-rw-r--r--php-8.3.0-parser.patch (renamed from php-8.2.0-parser.patch)6
-rw-r--r--php-pgsql92.patch170
-rw-r--r--php.spec12
4 files changed, 11 insertions, 179 deletions
diff --git a/failed.txt b/failed.txt
index 4a71e93..a41ee4d 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,4 +1,4 @@
-===== 8.3.0alpha2 (2023-06-22)
+===== 8.3.0alpha3 (2023-07-06)
$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
diff --git a/php-8.2.0-parser.patch b/php-8.3.0-parser.patch
index dcfe617..27ff2f1 100644
--- a/php-8.2.0-parser.patch
+++ b/php-8.3.0-parser.patch
@@ -6,11 +6,11 @@ diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php
$isInitialized = true;
+
-+ if (file_exists('/usr/share/php/PhpParser4/autoload.php')) {
-+ require_once '/usr/share/php/PhpParser4/autoload.php';
++ if (file_exists('/usr/share/php/PhpParser5/autoload.php')) {
++ require_once '/usr/share/php/PhpParser5/autoload.php';
+ return;
+ }
+
- $version = "4.15.1";
+ $version = "5.0.0alpha3";
$phpParserDir = __DIR__ . "/PHP-Parser-$version";
if (!is_dir($phpParserDir)) {
diff --git a/php-pgsql92.patch b/php-pgsql92.patch
deleted file mode 100644
index d091e7f..0000000
--- a/php-pgsql92.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From e1e23d83fa7717db8ef913dc9e5829224811abe3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 21 Jun 2023 07:37:11 +0200
-Subject: [PATCH] check PQsetErrorContextVisibility availability (libpq >= 9.6)
-
----
- UPGRADING | 3 ++-
- ext/pgsql/config.m4 | 1 +
- ext/pgsql/pgsql.c | 2 ++
- ext/pgsql/pgsql.stub.php | 5 ++++-
- ext/pgsql/pgsql_arginfo.h | 14 +++++++++++++-
- ext/pgsql/tests/07optional.phpt | 8 +++++---
- 6 files changed, 27 insertions(+), 6 deletions(-)
-
-diff --git a/UPGRADING b/UPGRADING
-index df3d0396620d..c981849a6012 100644
---- a/UPGRADING
-+++ b/UPGRADING
-@@ -219,7 +219,8 @@ PHP 8.3 UPGRADE NOTES
- . Added posix_eaccess call to check the effective user id's permission for a path.
-
- - PGSQL:
-- . Added pg_set_error_context_visilibity to set the visibility of the context in error messages.
-+ . Added pg_set_error_context_visilibity to set the visibility of the context
-+ in error messages (with libpq >= 9.6).
-
- - Random:
- . Added Randomizer::getBytesFromString().
-diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4
-index 5291b2612070..669a9f7b61aa 100644
---- a/ext/pgsql/config.m4
-+++ b/ext/pgsql/config.m4
-@@ -65,6 +65,7 @@ if test "$PHP_PGSQL" != "no"; then
- AC_CHECK_LIB(pq, PQlibVersion,, AC_MSG_ERROR([Unable to build the PostgreSQL extension: at least libpq 9.1 is required]))
- AC_CHECK_LIB(pq, pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is compiled with --enable-multibyte]))
- AC_CHECK_LIB(pq, lo_truncate64, AC_DEFINE(HAVE_PG_LO64,1,[PostgreSQL 9.3 or later]))
-+ AC_CHECK_LIB(pq, PQsetErrorContextVisibility, AC_DEFINE(HAVE_PG_CONTEXT_VISIBILITY,1,[PostgreSQL 9.6 or later]))
- LIBS=$old_LIBS
- LDFLAGS=$old_LDFLAGS
-
-diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
-index 9779193bd0ea..c72837ce38d2 100644
---- a/ext/pgsql/pgsql.c
-+++ b/ext/pgsql/pgsql.c
-@@ -2834,6 +2834,7 @@ PHP_FUNCTION(pg_set_error_verbosity)
- }
- /* }}} */
-
-+#ifdef HAVE_PG_CONTEXT_VISIBILITY
- PHP_FUNCTION(pg_set_error_context_visibility)
- {
- zval *pgsql_link = NULL;
-@@ -2856,6 +2857,7 @@ PHP_FUNCTION(pg_set_error_context_visibility)
- RETURN_THROWS();
- }
- }
-+#endif
-
- /* {{{ Set client encoding */
- PHP_FUNCTION(pg_set_client_encoding)
-diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php
-index 1b5356bd7be9..46c82e324ac2 100644
---- a/ext/pgsql/pgsql.stub.php
-+++ b/ext/pgsql/pgsql.stub.php
-@@ -463,6 +463,7 @@
- const PGSQL_PIPELINE_ABORTED = UNKNOWN;
- #endif
-
-+#ifdef HAVE_PG_CONTEXT_VISIBILITY
- /* For pg_set_error_context_visibility() */
-
- /**
-@@ -480,7 +481,7 @@
- * @cvalue PQSHOW_CONTEXT_ALWAYS
- */
- const PGSQL_SHOW_CONTEXT_ALWAYS = UNKNOWN;
--
-+#endif
-
- function pg_connect(string $connection_string, int $flags = 0): PgSql\Connection|false {}
-
-@@ -971,7 +972,9 @@ function pg_pipeline_sync(PgSql\Connection $connection): bool {}
- function pg_pipeline_status(PgSql\Connection $connection): int {}
- #endif
-
-+#ifdef HAVE_PG_CONTEXT_VISIBILITY
- function pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int {}
-+#endif
- }
-
- namespace PgSql {
-diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h
-index 26e0777b1cbf..8eb1b43d56b1 100644
---- a/ext/pgsql/pgsql_arginfo.h
-+++ b/ext/pgsql/pgsql_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: a37be19da43ac0838655b0ba7e34382e9c7424f5 */
-+ * Stub hash: fb57575ac2153c888b95c18a7bf6d6a7e200f5dc */
-
- ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)
-@@ -472,10 +472,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_pipeline_status, 0, 1, IS_LON
- ZEND_END_ARG_INFO()
- #endif
-
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_set_error_context_visibility, 0, 2, IS_LONG, 0)
- ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
- ZEND_ARG_TYPE_INFO(0, visibility, IS_LONG, 0)
- ZEND_END_ARG_INFO()
-+#endif
-
-
- ZEND_FUNCTION(pg_connect);
-@@ -579,7 +581,9 @@ ZEND_FUNCTION(pg_pipeline_sync);
- #if defined(LIBPQ_HAS_PIPELINING)
- ZEND_FUNCTION(pg_pipeline_status);
- #endif
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- ZEND_FUNCTION(pg_set_error_context_visibility);
-+#endif
-
-
- static const zend_function_entry ext_functions[] = {
-@@ -709,7 +713,9 @@ static const zend_function_entry ext_functions[] = {
- #if defined(LIBPQ_HAS_PIPELINING)
- ZEND_FE(pg_pipeline_status, arginfo_pg_pipeline_status)
- #endif
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- ZEND_FE(pg_set_error_context_visibility, arginfo_pg_set_error_context_visibility)
-+#endif
- ZEND_FE_END
- };
-
-@@ -842,9 +848,15 @@ static void register_pgsql_symbols(int module_number)
- #if defined(LIBPQ_HAS_PIPELINING)
- REGISTER_LONG_CONSTANT("PGSQL_PIPELINE_ABORTED", PQ_PIPELINE_ABORTED, CONST_PERSISTENT);
- #endif
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_NEVER", PQSHOW_CONTEXT_NEVER, CONST_PERSISTENT);
-+#endif
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ERRORS", PQSHOW_CONTEXT_ERRORS, CONST_PERSISTENT);
-+#endif
-+#if defined(HAVE_PG_CONTEXT_VISIBILITY)
- REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ALWAYS", PQSHOW_CONTEXT_ALWAYS, CONST_PERSISTENT);
-+#endif
- }
-
- static zend_class_entry *register_class_PgSql_Connection(void)
-diff --git a/ext/pgsql/tests/07optional.phpt b/ext/pgsql/tests/07optional.phpt
-index 41f89ca6c8c3..ac57cd424009 100644
---- a/ext/pgsql/tests/07optional.phpt
-+++ b/ext/pgsql/tests/07optional.phpt
-@@ -21,9 +21,11 @@ if (function_exists('pg_set_error_verbosity')) {
- pg_set_error_verbosity($db, PGSQL_ERRORS_VERBOSE);
- pg_set_error_verbosity($db, PGSQL_ERRORS_SQLSTATE);
- }
--pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_NEVER);
--pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ERRORS);
--pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ALWAYS);
-+if (function_exists('pg_set_error_context_visibility')) {
-+ pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_NEVER);
-+ pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ERRORS);
-+ pg_set_error_context_visibility($db, PGSQL_SHOW_CONTEXT_ALWAYS);
-+}
- echo "OK";
- ?>
- --EXPECT--
diff --git a/php.spec b/php.spec
index a82049c..772b2db 100644
--- a/php.spec
+++ b/php.spec
@@ -123,7 +123,7 @@
%global gh_owner php
%global gh_project php-src
%global upver 8.3.0
-%global rcver alpha2
+%global rcver alpha3
%global lower %(echo %{rcver} | tr '[:upper:]' '[:lower:]')
Summary: PHP scripting language for creating dynamic web sites
@@ -175,7 +175,7 @@ Patch10: php-8.2.0-curl.patch
# Functional changes
# Use system nikic/php-parser
-Patch41: php-8.2.0-parser.patch
+Patch41: php-8.3.0-parser.patch
# use system tzdata
Patch43: php-8.1.0-systzdata-v23.patch
# See http://bugs.php.net/53436
@@ -192,7 +192,6 @@ Patch47: php-8.1.0-phpinfo.patch
Patch91: php-7.2.0-oci8conf.patch
# Upstream fixes (100+)
-Patch100: php-pgsql92.patch
# Security fixes (200+)
@@ -440,7 +439,7 @@ Requires: pcre2-devel%{?_isa} >= 10.30
%endif
Requires: zlib-devel%{?_isa}
%if 0%{?fedora} || 0%{?rhel} >= 8
-Recommends: php-nikic-php-parser4 >= 4.13.1
+Recommends: php-nikic-php-parser5 >= 5.0.0~alpha3
%endif
%description devel
@@ -974,7 +973,6 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in
%patch -P91 -p1 -b .remi-oci8
# upstream patches
-%patch -P100 -p1 -b .pgsql92
# security patches
@@ -1856,6 +1854,10 @@ fi
%changelog
+* Wed Jul 5 2023 Remi Collet <remi@remirepo.net> - 8.3.0~alpha3-1
+- update to 8.3.0alpha3
+- switch to nikic/php-parser version 5
+
* Wed Jun 21 2023 Remi Collet <remi@remirepo.net> - 8.3.0~alpha2-1
- update to 8.3.0alpha2
- fix build with old libpq on EL-7 using patch from