1
0
mirror of https://github.com/php/php-src.git synced 2026-04-07 16:13:32 +02:00
Commit Graph

64702 Commits

Author SHA1 Message Date
Niels Dossche
0b9702c9ed Implement GH-11934: Allow to pass CData into struct and/or union fields
Co-authored-by: KapitanOczywisty <44417092+KapitanOczywisty@users.noreply.github.com>

Closes GH-11935.
2023-08-29 17:01:10 +02:00
Ilija Tovilo
d1a38e8b8e Fix variable resource ids in odbc test
Ids may vary when using persistent resources. We're not actually interested in
the exact ids anyway.
2023-08-29 12:05:24 +02:00
Máté Kocsis
2f9f2928ce Improve test for odbc_columns()
Hopefully, intermittent test failures will be fixed by creating and using a separate database.

Furthermore, more meaningful test cases are added which also assert the output, as well as wildcard character based searching.
2023-08-29 00:26:25 +02:00
Máté Kocsis
9dcdfa5e3f Use correct format specifier 2023-08-29 00:26:24 +02:00
Jakub Zelenka
4e7ab1478d Small tyding up of filestat code 2023-08-28 22:22:54 +01:00
Jakub Zelenka
31833e6c4c Expand file path in file stat only for wrapper path (#12068) 2023-08-28 22:14:32 +01:00
Jakub Zelenka
766cac072f Fix bug #76857: Can read "non-existant" files
This change makes checked and opened file consistent in a way that it is
using real path for stat operation in the same way like it is used for
open.

Closes GH-12067
2023-08-28 16:53:28 +01:00
Ilija Tovilo
4e963bc99f Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Fix trailing data in unserialize in soap test
2023-08-28 17:25:15 +02:00
Ilija Tovilo
c128dbdd69 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix trailing data in unserialize in soap test
2023-08-28 17:25:07 +02:00
Ilija Tovilo
c8f6ee8c6f [skip ci] Fix trailing data in unserialize in soap test 2023-08-28 17:24:45 +02:00
Remi Collet
13d3564a51 Fix #12063 convert PHP single-quote to C double-quote string 2023-08-28 14:48:49 +02:00
Jakub Zelenka
ba9650d697 Fix bug #52335 (fseek() on memory stream behavior different then file)
This changes memory stream to allow seeking past end which makes it the
same as seeking on files. It means the position is allowed to be higher
than the string length. The size only increases if data is appended to
the past position. The space between the previous string and position
is filled with zero bytes.

Fixes GH-9441
Closes GH-12058
2023-08-28 13:32:34 +01:00
Jakub Zelenka
5ea14a20a9 Merge branch 'PHP-8.2' 2023-08-28 12:18:21 +01:00
Jakub Zelenka
038bbd2d2f Merge branch 'PHP-8.1' into PHP-8.2 2023-08-28 12:15:33 +01:00
Jakub Zelenka
e1396a314d Fix flaky file stat tests due to changing nature of atime 2023-08-28 12:14:55 +01:00
Jakub Zelenka
aff46d75e1 Fix GH-11982: str_getcsv returns null byte for unterminated quoted string
Closes GH-12047
2023-08-28 11:28:34 +01:00
Máté Kocsis
c934e24197 Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs 2023-08-26 21:35:31 +02:00
Niels Dossche
b365fbd014 Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing EXTENSIONS section to DOM tests
2023-08-26 18:42:29 +02:00
Niels Dossche
ab2cc6e50e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing EXTENSIONS section to DOM tests
2023-08-26 18:40:02 +02:00
Niels Dossche
bffc74474b Add missing EXTENSIONS section to DOM tests 2023-08-26 18:37:42 +02:00
David CARLIER
e648d39e3b libxml set error structure simplification proposal (#12054) 2023-08-26 12:11:50 +01:00
Jorg Adam Sowa
58ae26a2a7 Fix round() tests for different modes (#12049)
* Fix tests round() with different modes

* Fix test results for  round() with different modes
2023-08-26 10:16:00 +01:00
Alex Dowad
81faab9235 Improve mb_detect_encoding accuracy for text containing vowels with macrons
Among other world languages, the Māori language commonly uses vowels
with macrons.
2023-08-25 12:09:55 +02:00
Kamil Tekiela
649872f105 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix param name in implode() error message
2023-08-24 21:07:50 +01:00
Kamil Tekiela
ec82927d25 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix param name in implode() error message
2023-08-24 21:07:18 +01:00
Kamil Tekiela
b1ce1d1f21 Fix param name in implode() error message 2023-08-24 21:05:26 +01:00
Niels Dossche
e1cb721679 Improve warning when returning null from the resolver set by libxml_set_external_entity_loader
Fixes GH-11952.
Closes GH-12022.
2023-08-24 21:23:29 +02:00
ju1ius
3e0e7e3f90 releases property attributes of internal classes (#11980)
* adds test case for internal class property attribute

* releases property attributes of internal classes
2023-08-24 16:07:00 +02:00
HypeMC
f25474f7f2 Add before_needle argument to strrchr()
Closes GH-11430
2023-08-24 14:26:46 +01:00
Jakub Zelenka
53aa53f42f Introduce Zend guard recursion protection
This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves
perf for jsonSerializable in some cases. More info can be found in
GH-10020.

Closes GH-11812
2023-08-24 13:03:14 +01:00
Jorg Adam Sowa
6ee2a63476 Tests improvement for round() modes (#11996)
* Improved the tests for round() function

* Add EOL on the file ending
2023-08-24 11:34:37 +01:00
Niels Dossche
0fd226c277 Update DOM test to work around libxml2 bug
As reported in GH-12024, the test fails in the encoding part of the test
file. This is due to a libxml2 bug (that's been fixed in modern
versions, but of course various systems and distros are always behind).
The goal of this part of the test is to check if an encoding declaration
is outputted. So the actual encoding used doesn't matter.
Switch to UTF-8, which seems to always work, to work around the issue.
2023-08-23 21:52:53 +02:00
Máté Kocsis
462792ee51 Expose PDO_ODBC_TYPE to userland 2023-08-23 21:20:41 +02:00
Máté Kocsis
8726ae0601 Improve and fix ext/odbc tests
Some test failures are fixed, parallelization is enabled, section order is fixed.
2023-08-23 21:20:41 +02:00
Máté Kocsis
66acaba9db Add more test coverage for ext/odbc 2023-08-23 21:20:41 +02:00
Remi Collet
94e26dc895 [ci skip] bump zip version 2023-08-23 18:01:20 +02:00
Cristian Rodríguez
782ffd761b Use a single version of strnlen (#12015)
* Zend: Make zend_strnlen available for use outside zend_compile

* exif: remove local php_strnlen, use zend_strnlen instead

* main: remove local strnlen, use zend_strnlen instead

* phar: remove local strnlen, use zend_strnlen
2023-08-22 17:40:24 +02:00
Peter Kokot
9026596fe9 Sync --enable-mysqlnd-compression-support option (#12006)
This syncs the style of the --enable-mysqlnd-compression-support option
name, otherwise in Autoconf both --enable-foo_bar and --enable-foo-bar
work.

Also the configure output message is synced to match the check
information.
2023-08-21 16:38:04 +02:00
Ayesh Karunaratne
1887f02b0b Add class constant types to Phar extension (#11826) 2023-08-21 07:14:45 +02:00
Niels Dossche
807a05ee55 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix memory leak when setting an invalid DOMDocument encoding
2023-08-20 14:07:44 +02:00
Niels Dossche
767697c4ae Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix memory leak when setting an invalid DOMDocument encoding
2023-08-20 14:07:25 +02:00
Niels Dossche
20ac42e1b0 Fix memory leak when setting an invalid DOMDocument encoding
Because the failure path did not release the string, there was a memory
leak.
As the only valid types for this function are IS_NULL and IS_STRING, we
and IS_NULL is always rejected in practice, solve the issue by not using
a function that increments the refcount in the first place.

Closes GH-12002.
2023-08-20 14:05:26 +02:00
David Carlier
0d65f726c8 Merge branch 'PHP-8.2' 2023-08-19 23:11:23 +01:00
David Carlier
f995c0df36 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-19 23:09:41 +01:00
David Carlier
fc8d5c72e5 ext/iconv: fix build for netbsd.
NetBSD still adopts the old iconv signature for buffer inputs.
The next release will too so we can assume it will remain that way for
a while.

Close GH-12001
2023-08-19 23:09:22 +01:00
Peter Kokot
c180e9b48a Remove unused call to Makefile.frag in ext/zip
The Makefile.frag has been removed in ext/zip.
2023-08-19 17:41:05 +02:00
ju1ius
7f1c3bf09b Adds support for DNF types in internal functions and properties (#11969)
Note that this does not add support for items generated by gen_stubs,
only for items registered dynamically via the Zend API.

Closes GH-10120
2023-08-19 00:11:06 +01:00
Niels Dossche
4ff93f779c Remove unnecessary invalidation from processing instructions
These invalidations only need to happen when elements are added,
removed, or manipulated. Processing instructions are not elements and
their contents are just text.
2023-08-18 18:06:04 +02:00
Kamil Tekiela
ee82c94208 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix failing test on nightly
2023-08-17 18:46:28 +01:00
Kamil Tekiela
6d039d282a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix failing test on nightly
2023-08-17 18:45:49 +01:00