extra/php to 8.3.9-1

This commit is contained in:
Kevin Mihelich 2024-07-03 00:31:08 +00:00
parent b16ed95cb0
commit 33f5189fec
3 changed files with 11 additions and 106 deletions

View file

@ -1,6 +1,6 @@
pkgbase = php
pkgver = 8.3.8
pkgrel = 2
pkgver = 8.3.9
pkgrel = 1
url = https://www.php.net/
arch = x86_64
license = PHP-3.01
@ -26,25 +26,23 @@ pkgbase = php
makedepends = freetds
makedepends = pcre2
makedepends = oniguruma
source = https://php.net/distributions/php-8.3.8.tar.xz
source = https://php.net/distributions/php-8.3.8.tar.xz.asc
source = https://php.net/distributions/php-8.3.9.tar.xz
source = https://php.net/distributions/php-8.3.9.tar.xz.asc
source = apache.patch
source = apache.conf
source = php-fpm.patch
source = php-fpm.tmpfiles
source = php.ini.patch
source = method-visibility.patch
validpgpkeys = 1198C0117593497A5EC5C199286AF1F9897469DC
validpgpkeys = AFD8691FDAEDF03BDF6E460563F15A9B715376CA
validpgpkeys = C28D937575603EB4ABB725861C0779DC5C0A9DE4
sha256sums = aea358b56186f943c2bbd350c9005b9359133d47e954cfc561385319ae5bb8d7
sha256sums = bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77
sha256sums = SKIP
sha256sums = 702b163c66c65af92dcad8d79f41bda84bcd5d863235fcf1497c33a86db9e4ca
sha256sums = 4a2add00d93fa991ccdf6356090264c1059c79935642afff6e8d4a2107fa037e
sha256sums = 78b8074461cdfc5d4e0ba428a8387f308d60720c8ad35c6176801e5088f02090
sha256sums = 640dba0d960bfeaae9ad38d2826d3f6b5d6c175a4d3e16664eefff29141faad5
sha256sums = bf1de5ae6014f0593dacca2c046eb5a2d7c179733859854713b6813ebc629b08
sha256sums = 083e2b17a49166fe6891a6d7f7baece9fce42f0db3192fdac1fd1975e226eba8
pkgname = php
pkgdesc = A general-purpose scripting language that is especially suited to web development
@ -55,7 +53,7 @@ pkgname = php
depends = argon2
depends = oniguruma
provides = php-interpreter=8.3
provides = php-intl=8.3.8
provides = php-intl=8.3.9
conflicts = php-intl
replaces = php-intl
backup = etc/php/php.ini

View file

@ -21,8 +21,8 @@ pkgname=('php'
'php-sqlite'
'php-tidy'
'php-xsl')
pkgver=8.3.8
pkgrel=2
pkgver=8.3.9
pkgrel=1
arch=('x86_64')
license=('PHP-3.01')
url='https://www.php.net/'
@ -31,16 +31,14 @@ makedepends=('apache' 'aspell' 'enchant' 'gd' 'gmp' 'icu' 'libsodium' 'libxslt'
'oniguruma')
checkdepends=('procps-ng')
source=("https://php.net/distributions/${pkgbase}-${pkgver}.tar.xz"{,.asc}
'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch'
'method-visibility.patch')
sha256sums=('aea358b56186f943c2bbd350c9005b9359133d47e954cfc561385319ae5bb8d7'
'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch')
sha256sums=('bf4d7b8ea60a356064f88485278bd6f941a230ec16f0fc401574ce1445ad6c77'
'SKIP'
'702b163c66c65af92dcad8d79f41bda84bcd5d863235fcf1497c33a86db9e4ca'
'4a2add00d93fa991ccdf6356090264c1059c79935642afff6e8d4a2107fa037e'
'78b8074461cdfc5d4e0ba428a8387f308d60720c8ad35c6176801e5088f02090'
'640dba0d960bfeaae9ad38d2826d3f6b5d6c175a4d3e16664eefff29141faad5'
'bf1de5ae6014f0593dacca2c046eb5a2d7c179733859854713b6813ebc629b08'
'083e2b17a49166fe6891a6d7f7baece9fce42f0db3192fdac1fd1975e226eba8')
'bf1de5ae6014f0593dacca2c046eb5a2d7c179733859854713b6813ebc629b08')
validpgpkeys=('1198C0117593497A5EC5C199286AF1F9897469DC'
'AFD8691FDAEDF03BDF6E460563F15A9B715376CA'
'C28D937575603EB4ABB725861C0779DC5C0A9DE4')
@ -52,8 +50,6 @@ prepare() {
patch -p0 -i "${srcdir}/apache.patch"
patch -p0 -i "${srcdir}/php-fpm.patch"
patch -p0 -i "${srcdir}/php.ini.patch"
# Fix https://gitlab.archlinux.org/archlinux/packaging/packages/php/-/issues/3
patch -p1 -i "${srcdir}/method-visibility.patch"
autoconf
# Disable failing tests

View file

@ -1,89 +0,0 @@
diff --git a/Zend/tests/gh14480.phpt b/Zend/tests/gh14480.phpt
new file mode 100644
index 0000000000..bab74785b6
--- /dev/null
+++ b/Zend/tests/gh14480.phpt
@@ -0,0 +1,60 @@
+--TEST--
+GH-14480: Method visibility issue
+--FILE--
+<?php
+trait PropertyHelperTrait
+{
+ protected function splitPropertyParts(): void
+ {
+ echo "OK\n";
+ }
+}
+
+trait OrmPropertyHelperTrait
+{
+ abstract protected function splitPropertyParts(): void;
+
+ protected function addJoinsForNestedProperty(): void
+ {
+ $this->splitPropertyParts();
+ }
+}
+
+trait SearchFilterTrait
+{
+ use PropertyHelperTrait;
+}
+
+abstract class AbstractFilter
+{
+ use OrmPropertyHelperTrait, PropertyHelperTrait;
+
+ public function apply(): void
+ {
+ $this->filterProperty();
+ }
+
+ abstract protected function filterProperty(): void;
+}
+
+class SearchFilter extends AbstractFilter
+{
+ use SearchFilterTrait;
+ protected function filterProperty(): void
+ {
+ $this->addJoinsForNestedProperty();
+ }
+}
+
+class FilterExtension
+{
+ public function applyToCollection(): void
+ {
+ (new SearchFilter())->apply();
+ }
+}
+
+(new FilterExtension)->applyToCollection();
+?>
+--EXPECT--
+OK
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 402354baa8..228c5b6e54 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -2018,12 +2018,14 @@ static void zend_add_trait_method(zend_class_entry *ce, zend_string *name, zend_
if (check_inheritance) {
/* Inherited members are overridden by members inserted by traits.
* Check whether the trait method fulfills the inheritance requirements. */
+ uint32_t flags = ZEND_INHERITANCE_CHECK_PROTO | ZEND_INHERITANCE_CHECK_VISIBILITY;
+ if (!(existing_fn->common.scope->ce_flags & ZEND_ACC_TRAIT)) {
+ flags |= ZEND_INHERITANCE_SET_CHILD_CHANGED |ZEND_INHERITANCE_SET_CHILD_PROTO |
+ ZEND_INHERITANCE_RESET_CHILD_OVERRIDE;
+ }
do_inheritance_check_on_method(
fn, fixup_trait_scope(fn, ce), existing_fn, fixup_trait_scope(existing_fn, ce),
- ce, NULL,
- ZEND_INHERITANCE_CHECK_PROTO | ZEND_INHERITANCE_CHECK_VISIBILITY |
- ZEND_INHERITANCE_SET_CHILD_CHANGED| ZEND_INHERITANCE_SET_CHILD_PROTO |
- ZEND_INHERITANCE_RESET_CHILD_OVERRIDE);
+ ce, NULL, flags);
}
}
/* }}} */