Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
This commit is contained in:
Niels Dossche 2023-11-10 00:12:47 +01:00
commit e6fef2944b
6 changed files with 34 additions and 7 deletions

7
NEWS
View File

@ -2,9 +2,16 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.0
- PCRE:
. Fixed bug GH-12628 (The gh11374 test fails on Alpinelinux). (nielsdos)
- Standard:
. Fix memory leak in syslog device handling. (danog)
- SQLite3:
. Fixed bug GH-12633 (sqlite3_defensive.phpt fails with sqlite 3.44.0).
(SakiTakamachi)
09 Nov 2023, PHP 8.3.0RC6
- Core:

View File

@ -1,5 +1,11 @@
--TEST--
GH-11374 (PCRE regular expression without JIT enabled gives different result)
--EXTENSIONS--
zend_test
--SKIPIF--
<?php
if (!zend_test_is_pcre_bundled() && (PCRE_VERSION_MAJOR == 10 && PCRE_VERSION_MINOR <= 42)) die("skip old pcre version");
?>
--FILE--
<?php

View File

@ -20,7 +20,6 @@ var_dump($db->exec('CREATE TABLE test (a, b);'));
// This does not generate an error!
var_dump($db->exec('PRAGMA writable_schema = ON;'));
var_dump($db->querySingle('PRAGMA writable_schema;'));
// Should be 1
var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
@ -35,7 +34,6 @@ var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
bool(true)
bool(true)
int(1)
int(1)
Warning: SQLite3::querySingle(): Unable to prepare statement: table sqlite_master may not be modified in %s on line %d
bool(false)

View File

@ -655,6 +655,16 @@ static ZEND_FUNCTION(get_open_basedir)
}
}
static ZEND_FUNCTION(zend_test_is_pcre_bundled)
{
ZEND_PARSE_PARAMETERS_NONE();
#if HAVE_BUNDLED_PCRE
RETURN_TRUE;
#else
RETURN_FALSE;
#endif
}
static zend_object *zend_test_class_new(zend_class_entry *class_type)
{
zend_object *obj = zend_objects_new(class_type);

View File

@ -239,6 +239,8 @@ namespace {
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
function zend_test_override_libxml_global_state(): void {}
#endif
function zend_test_is_pcre_bundled(): bool {}
}
namespace ZendTestNS {

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: fe312caaaedac29794ab90e4210eaaad667c391c */
* Stub hash: 1ac529029c01af5d6698f06c7e5f74b7149ea749 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
@ -141,16 +141,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global
ZEND_END_ARG_INFO()
#endif
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_pcre_bundled, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()
#define arginfo_ZendTestNS2_namespaced_func arginfo_zend_test_is_pcre_bundled
#define arginfo_ZendTestNS2_namespaced_deprecated_func arginfo_zend_test_void_return
#define arginfo_ZendTestNS2_namespaced_aliased_func arginfo_zend_test_void_return
#define arginfo_ZendTestNS2_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
#define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_ZendTestNS2_namespaced_func
#define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_zend_test_is_pcre_bundled
#define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func arginfo_zend_test_void_return
@ -179,9 +181,9 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_ZendAttributeTest_testMethod arginfo_ZendTestNS2_namespaced_func
#define arginfo_class_ZendAttributeTest_testMethod arginfo_zend_test_is_pcre_bundled
#define arginfo_class__ZendTestTrait_testMethod arginfo_ZendTestNS2_namespaced_func
#define arginfo_class__ZendTestTrait_testMethod arginfo_zend_test_is_pcre_bundled
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
@ -258,6 +260,7 @@ static ZEND_FUNCTION(get_open_basedir);
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
static ZEND_FUNCTION(zend_test_override_libxml_global_state);
#endif
static ZEND_FUNCTION(zend_test_is_pcre_bundled);
static ZEND_FUNCTION(ZendTestNS2_namespaced_func);
static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func);
static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func);
@ -329,6 +332,7 @@ static const zend_function_entry ext_functions[] = {
#if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state)
#endif
ZEND_FE(zend_test_is_pcre_bundled, arginfo_zend_test_is_pcre_bundled)
ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func)
ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func)
ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func)