1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00
Commit Graph

1015 Commits

Author SHA1 Message Date
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
0ebf2bdba0 Convert "Illegal offset type" warnings to exceptions 2019-09-27 13:00:07 +02:00
Nikita Popov
f61f122b9a Merge branch 'PHP-7.4' 2019-09-12 16:41:45 +02:00
Nikita Popov
4b9ebd837b Allow throwing exception while loading parent class
This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed
  (and we will also throw one if the class is simply not found).
* If this happens, the bucket key for the class is reset, so
  it's possibly to try registering the same class again.
* However, if the class has already been used due to a variance
  obligation, the exception is upgraded to a fatal error, as we
  cannot safely unregister the class stub anymore.
2019-09-12 16:41:18 +02:00
Nikita Popov
fc4e73b383 Merge branch 'PHP-7.4' 2019-09-09 17:30:07 +02:00
Nikita Popov
51fd8bd3ee Merge branch 'PHP-7.3' into PHP-7.4 2019-09-09 17:29:49 +02:00
Nikita Popov
3f2d5c612e Merge branch 'PHP-7.2' into PHP-7.3 2019-09-09 17:29:39 +02:00
CHU Zhaowei
1ac6b0251b Fix bug #72884 isCloneable() on SplFileObject should return false 2019-09-09 17:27:17 +02:00
Nikita Popov
e28cb9d04e Merge branch 'PHP-7.4' 2019-08-26 11:10:07 +02:00
Nikita Popov
9483c50772 Fixed bug #78456 2019-08-26 11:08:42 +02:00
Nikita Popov
51905cd212 Merge branch 'PHP-7.4' 2019-08-23 15:37:07 +02:00
Nikita Popov
9173c21a35 Support variable element size in spl heap implementation
This allows us to drop the intermediate allocation for
spl_pqueue_elem.

This fixes GC for SplPriorityQueue, because we can now directly
return a well-formed GC child buffer.
2019-08-23 15:29:53 +02:00
Nikita Popov
38ed1e6353 Merge branch 'PHP-7.4' 2019-08-23 15:27:55 +02:00
Nikita Popov
13e92223c0 Fixed bug #78436 2019-08-23 15:27:28 +02:00
Nikita Popov
deceafbe63 Merge branch 'PHP-7.4' 2019-08-15 10:40:45 +02:00
Nikita Popov
34885408db Fixed bug #78409
This removes an incorrect optimization (I think this code used to be
necessary to properly handle references in the Serializable based
implementation, but now this code just avoids an array duplication
in a way that is not sound).
2019-08-15 10:40:28 +02:00
Nikita Popov
be4b66a369 Merge branch 'PHP-7.4' 2019-08-13 12:35:02 +02:00
Nikita Popov
bc690d63f6 Adjust GC count in SPL test 2019-08-13 12:34:48 +02:00
Nikita Popov
36db71df47 Merge branch 'PHP-7.4' 2019-07-22 12:28:40 +02:00
Nikita Popov
3121b7174f Deprecate Reflection export() methods
And remove the Reflector::export() interface method.
2019-07-22 11:39:52 +02:00
Nikita Popov
0ba7c3eadf Deprecate array_key_exists() on objects 2019-07-22 11:39:52 +02:00
Peter Kokot
68c0c812c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for always enabled spl and pcre
2019-07-13 14:49:00 +02:00
Peter Kokot
f5e4771824 Remove checks for always enabled spl and pcre
Closes GH-4397
2019-07-13 14:47:37 +02:00
Nikita Popov
0146bab449 Merge branch 'PHP-7.4' 2019-07-12 12:55:21 +02:00
Nikita Popov
2e56e14e39 Swap implode() argument order in some tests 2019-07-12 12:54:10 +02:00
Nikita Popov
106f71cc94 Merge branch 'PHP-7.4' 2019-07-10 12:05:24 +02:00
Nikita Popov
c42b7dd6d3 Throw notice on array access on illegal type
No notice is thrown for list() accesses, because we did not come
to an agreement regarding patterns like

    while ([$key, $value] = yield $it->next()) { ... }

where silent null access may be desirable.

No effort is made to suppress multiple notices in access chains
likes $x[0][0][0], because the technical complexity this causes
does not seem worthwhile.

RFC: https://wiki.php.net/rfc/notice-for-non-valid-array-container
2019-07-10 12:02:14 +02:00
Nikita Popov
fe02725ac9 Merge branch 'PHP-7.4' 2019-06-17 15:09:22 +02:00
Nikita Popov
4e9a65447f Fix file conflicts in SplFileObject fputcsv tests 2019-06-17 15:08:52 +02:00
Nikita Popov
c413b1fca6 Remove bogus quieting in AppendIterator::append() 2019-06-17 11:46:23 +02:00
Nikita Popov
4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Nikita Popov
e4fae9c061 Merge branch 'PHP-7.4' 2019-06-11 13:16:38 +02:00
Nikita Popov
89b2d88659 Register class before fetching parent
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
401e5ebf24 Merge branch 'PHP-7.4' 2019-06-05 10:06:04 +02:00
Nikita Popov
46d5a9bef9 Avoid concurrent directory writes in FilesystemIterator test
The test directory is often used for temporary files, let's use
the source directory, which should be more stable. If that doesn't
work we need to create a temporary directory.
2019-06-05 09:58:59 +02:00
Christoph M. Becker
2e91a90f0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Make more tests run on Windows
2019-05-27 10:52:25 +02:00
Gabriel Caruso
4bb6f9ba99 Make more tests run on Windows 2019-05-27 10:51:53 +02:00
Nikita Popov
f17931a8bb Merge branch 'PHP-7.4' 2019-05-22 09:06:23 +02:00
Jaroslav Hanslík
d6c0c5ef8e Fixed some arg infos to match documentation 2019-05-22 09:05:32 +02:00
Peter Kokot
4b595655eb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix comment to match the future zts configuration option
2019-05-11 15:03:27 +02:00
Peter Kokot
8ef2121ee1 Fix comment to match the future zts configuration option 2019-05-11 15:03:17 +02:00
Peter Kokot
91a91c6c8b Merge branch 'PHP-7.4'
* PHP-7.4:
  Convert CRLF line endings to LF
  Convert CRLF line endings to LF
2019-05-07 04:40:23 +02:00
Peter Kokot
c453196be4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Convert CRLF line endings to LF
2019-05-07 04:35:43 +02:00
Peter Kokot
d153fbc5a9 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2019-05-07 04:34:37 +02:00
Peter Kokot
aa1e3af43f Merge branch 'PHP-7.4'
* PHP-7.4:
  Update NEWS
  Update NEWS
  Fix #77024: SplFileObject::__toString() may return array
2019-04-28 00:51:53 +02:00
Peter Kokot
74e72496fa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS
  Update NEWS
  Fix #77024: SplFileObject::__toString() may return array
2019-04-28 00:51:38 +02:00
Peter Kokot
1bdd97a601 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fix #77024: SplFileObject::__toString() may return array
2019-04-28 00:50:54 +02:00
Craig Duncan
91c6fb881e Fix #77024: SplFileObject::__toString() may return array
- Correct the behaviour of casting spl files to strings
- Add a test for Bug 77024
2019-04-28 00:44:48 +02:00