Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ jobs:
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
# Buggy FFI test in Symfony, see https://github.com/symfony/symfony/issues/47668
php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("public function testCastNonTrailingCharPointer()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);'
# Causes massive amounts of system calls with USE_ZEND_ALLOC=0, exceeding the timeout
if [ -e 'src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php' ]; then
php -r '$c = file_get_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php"); $c = str_replace("public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testReadWithPasteDetectionAbortsBeyondMaxBytes()", $c); file_put_contents("src/Symfony/Component/Console/Tests/Helper/FileInputHelperTest.php", $c);'
fi
export SYMFONY_DEPRECATIONS_HELPER=max[total]=999
X=0
for component in $(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n'); do
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ PHP NEWS
. Fixed bug GH-22665 (Out-of-bounds write when the ODBC driver reports a
diagnostic message length beyond the error buffer). (iliaal)

- Phar:
. Fixed grammatical issues and outdated terminology in Phar error messages.
(Weilin Du)

- Reflection:
. Fixed bug GH-22681 (Reflection*::__toString() truncates on null bytes).
(DanielEScherzer)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/first_class_callable/constexpr/gh22782.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload={PWD}/gh22782.inc
opcache.file_cache_only=0
--SKIPIF--
<?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
Expand Down
8 changes: 8 additions & 0 deletions ext/gd/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ if test "$PHP_GD" != "no"; then
AC_DEFINE([HAVE_GD_PNG_GET_VERSION_STRING], [1],
[Define to 1 if GD library has the 'gdPngGetVersionString' function.])

dnl Some systems (e.g. Solaris) declare iconv_t in <iconv.h> as something
dnl other than 'void *'. The bundled libgd/gdkanji.c only falls back to its
dnl own 'typedef void *iconv_t' when HAVE_ICONV_T_DEF is undefined, so detect
dnl the system definition to avoid a conflicting typedef.
AC_EGREP_HEADER([typedef.*iconv_t], [iconv.h],
[AC_DEFINE([HAVE_ICONV_T_DEF], [1],
[Define to 1 if <iconv.h> defines iconv_t.])])

dnl Various checks for GD features
PHP_SETUP_ZLIB([GD_SHARED_LIBADD])
PHP_GD_PNG
Expand Down
4 changes: 1 addition & 3 deletions ext/gd/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ if (PHP_GD != "no") {
heif_location = false;
}
if (heif_location && heif_location.match(/heif_a\.lib$/)) {
if (!(CHECK_LIB("libde265_a.lib", "gd", PHP_GD) &&
CHECK_LIB("x265_a.lib", "gd", PHP_GD) &&
CHECK_LIB("aom_a.lib", "gd", PHP_GD) &&
if (!(CHECK_LIB("aom_a.lib", "gd", PHP_GD) &&
CHECK_LIB("dav1d_a.lib", "gd", PHP_GD))) {
WARNING("static libheif not enabled; codec libraries not found");
heif_location = false;
Expand Down
2 changes: 1 addition & 1 deletion ext/phar/phar_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -4136,7 +4136,7 @@ ZEND_ATTRIBUTE_NONNULL static zend_result phar_extract_file(bool overwrite, phar
}

if (php_check_open_basedir(fullpath)) {
spprintf(error, 4096, "Cannot extract \"%s\" to \"%s\", openbasedir/safe mode restrictions in effect", ZSTR_VAL(entry->filename), fullpath);
spprintf(error, 4096, "Cannot extract \"%s\" to \"%s\", open_basedir restrictions in effect", ZSTR_VAL(entry->filename), fullpath);
efree(fullpath);
efree(new_state.cwd);
return FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion ext/phar/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ static int phar_tar_writeheaders_int(phar_entry_info *entry, void *argument) /*

if (sizeof(header) != php_stream_write(fp->new, (const char *) &header, sizeof(header))) {
if (fp->error) {
spprintf(fp->error, 4096, "tar-based phar \"%s\" cannot be created, header for file \"%s\" could not be written", ZSTR_VAL(entry->phar->fname), ZSTR_VAL(entry->filename));
spprintf(fp->error, 4096, "tar-based phar \"%s\" cannot be created, header for file \"%s\" could not be written", ZSTR_VAL(entry->phar->fname), ZSTR_VAL(entry->filename));
}
return ZEND_HASH_APPLY_STOP;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/phar/tests/dir.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Warning: mkdir(): phar error: cannot create directory "fails" in phar "%sok.phar

Warning: mkdir(): phar error: cannot create directory "sub" in phar "%sok.phar", directory already exists in %sdir.php on line %d

Warning: mkdir(): phar error: cannot create directory "sub/directory.txt" in phar "%sok.phar", phar error: path "sub/directory.txt" exists and is a not a directory in %sdir.php on line %d
Warning: mkdir(): phar error: cannot create directory "sub/directory.txt" in phar "%sok.phar", phar error: path "sub/directory.txt" exists and is not a directory in %sdir.php on line %d

Warning: mkdir(): internal corruption of phar "%soops.phar" (truncated manifest at stub end) in %sdir.php on line %d

Expand Down
4 changes: 2 additions & 2 deletions ext/phar/tests/mkdir.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Warning: mkdir(): phar error: cannot create directory "phar://", no phar archive

Warning: mkdir(): phar error: cannot create directory "" in phar "foo.phar", phar error: invalid path "" must not be empty in %smkdir.php on line %d

Warning: mkdir(): phar error: cannot create directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is a not a directory in %smkdir.php on line %d
Warning: mkdir(): phar error: cannot create directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is not a directory in %smkdir.php on line %d

Warning: rmdir(): phar error: cannot remove directory "phar://", no phar archive specified, or phar archive does not exist in %smkdir.php on line %d

Warning: rmdir(): phar error: cannot remove directory "" in phar "foo.phar", directory does not exist in %smkdir.php on line %d

Warning: rmdir(): phar error: cannot remove directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is a not a directory in %smkdir.php on line %d
Warning: rmdir(): phar error: cannot remove directory "a" in phar "%smkdir.phar.php", phar error: path "a" exists and is not a directory in %smkdir.php on line %d
Cannot create a directory in magic ".phar" directory
Cannot create a directory in magic ".phar" directory
bool(true)
4 changes: 2 additions & 2 deletions ext/phar/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, si
if (!entry->is_dir && dir == 2) {
/* user requested a directory, we must return one */
if (error) {
spprintf(error, 4096, "phar error: path \"%s\" exists and is a not a directory", path);
spprintf(error, 4096, "phar error: path \"%s\" exists and is not a directory", path);
}
return NULL;
}
Expand Down Expand Up @@ -1290,7 +1290,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, si
efree(test);
/* user requested a directory, we must return one */
if (error) {
spprintf(error, 4096, "phar error: path \"%s\" exists and is a not a directory", path);
spprintf(error, 4096, "phar error: path \"%s\" exists and is not a directory", path);
}
return NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/phar/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{
}

if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, false)) {
spprintf(p->error, 0, "unable to seek to start of file \"%s\" to zip-based phar \"%s\"", ZSTR_VAL(entry->filename), ZSTR_VAL(entry->phar->fname));
spprintf(p->error, 0, "unable to seek to start of file \"%s\" while creating zip-based phar \"%s\"", ZSTR_VAL(entry->filename), ZSTR_VAL(entry->phar->fname));
return ZEND_HASH_APPLY_STOP;
}

Expand Down Expand Up @@ -1008,7 +1008,7 @@ static int phar_zip_changed_apply_int(phar_entry_info *entry, void *arg) /* {{{

if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, false)) {
php_stream_filter_free(filter);
spprintf(p->error, 0, "unable to seek to start of file \"%s\" to zip-based phar \"%s\"", ZSTR_VAL(entry->filename), ZSTR_VAL(entry->phar->fname));
spprintf(p->error, 0, "unable to seek to start of file \"%s\" while creating zip-based phar \"%s\"", ZSTR_VAL(entry->filename), ZSTR_VAL(entry->phar->fname));
return ZEND_HASH_APPLY_STOP;
}

Expand Down