summaryrefslogtreecommitdiff
path: root/tests/classes
Commit message (Collapse)AuthorAgeFilesLines
* Implement enumsIlija Tovilo2021-03-171-1/+1
| | | | | | | | RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
* Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-016-31/+31
| | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* Run tidyNikita Popov2020-09-186-6/+6
| | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* Promote a few remaining errors in ext/standardMáté Kocsis2020-09-151-1/+1
| | | | Closes GH-6110
* Improve error messages mentioning parameters instead of argumentsMáté Kocsis2020-09-091-1/+1
| | | | Closes GH-5999
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-096-0/+6
| | | | Closes GH-5958
* Promote "undefined array key" notice to warningNikita Popov2020-08-032-4/+4
| | | | | | | This implements the last remaining part of the https://wiki.php.net/rfc/engine_warnings RFC. Closes GH-5927.
* Unify static/non-static check for magic methodsNikita Popov2020-07-201-76/+0
| | | | And promote it to be fatal.
* Ignore inheritance rules on private methodsPedro Magalhães2020-07-155-1/+103
| | | | Closes GH-5401
* Review the usage of apostrophes in error messagesMáté Kocsis2020-07-1047-50/+50
| | | | Closes GH-5590
* Improve type error messages when an object is givenMáté Kocsis2020-05-262-4/+4
| | | | | | | From now on, we always display the given object's type instead of just reporting "object". Additionally, make the format of return type errors match the format of argument errors. Closes GH-5625
* Slipt error messages while checking magic methods attributesGabriel Caruso2020-04-272-2/+2
| | | | Closes GH-5465
* Skip non-existing properties returned by __sleep()Nicolas Grekas2020-04-221-1/+1
|
* Improve error messages for magic methods by appending method's classGabriel Caruso2020-04-162-2/+2
| | | | Closes GH-5397.
* Improve undefined variable error messagesMáté Kocsis2020-03-311-1/+1
| | | | Closes GH-5312
* Improve error message of foreachMáté Kocsis2020-03-091-1/+1
| | | | Closes GH-5240
* Define Stringable with __toString():string methodNicolas Grekas2020-03-022-5/+5
|
* Change argument error message formatMáté Kocsis2020-02-269-14/+14
| | | | Closes GH-5211
* Make type error messages more consistentMáté Kocsis2020-02-179-14/+14
| | | | Closes GH-5092
* Make ASSIGN, ASSIGN_OP, INC and DEC opcodes to return IS_TMP_VAR instead of ↵Dmitry Stogov2020-02-071-1/+4
| | | | | | | | | IS_VAR. This helps to avoid unnecessary IS_REFERENCE checks. This changes some notices "Only variables should be passed by reference" to exception "Cannot pass parameter %d by reference". Also, for consistency, compile-time fatal error "Only variables can be passed by reference" was converted to exception "Cannot pass parameter %d by reference"
* Reindent phpt filesNikita Popov2020-02-03182-1794/+1794
|
* Make constant() error handling consistent with plain const lookupNikita Popov2020-01-102-8/+14
| | | | | | This means we get an Error exception and a much better error message indicating the root cause (e.g. accessing a private class constant).
* Fix #65274: Add class name to undef class constant errorNikita Popov2020-01-082-2/+2
|
* Only accept string as the format parameter of *printf() functionsMáté Kocsis2019-12-091-1/+1
|
* Clean DONE tags from testsFabien Villepinte2019-11-0738-73/+4
| | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* Merge branch 'PHP-7.4'Nikita Popov2019-10-101-5/+1
|\
| * Return error_zval form get_property_ptr_ptr on exceptionNikita Popov2019-10-101-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This goes in the reverse direction of 4463acb9513dfb62206760c49b3da1fe4d92f40a. After looking around a bit, it seems that we already check for Z_ISERROR_P() on the get_property_ptr_ptr return value in other places. So do this in zend_fetch_property_address() as well, and also make sure that EG(error_zval) is indeed returned on exception in get_property_ptr_ptr. In particular, this fixes the duplicate exceptions that we used to get because first get_property_ptr_ptr threw one and then read_property throws the same exception again.
* | Merge branch 'PHP-7.4'Nikita Popov2019-10-101-5/+8
|\ \ | |/
| * Explicitly check for exceptions in by-ref obj prop assignNikita Popov2019-10-101-5/+8
| | | | | | | | | | | | | | | | Relying on setting ERROR if an exception happened during the property address fetch is both a bit fragile and may pessimize other codepaths that will check for exceptions in the VM. Adding an extra exception check instead, which should also allow us to drop the use of ERROR in this area in master.
* | Convert some notices to warningsNikita Popov2019-10-024-4/+4
| | | | | | | | Part of https://wiki.php.net/rfc/engine_warnings.
* | Convert "Illegal offset type" warnings to exceptionsNikita Popov2019-09-271-5/+8
| |
* | Throw Error when writing property of non-objectNikita Popov2019-09-271-156/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes object auto-vivification support. This also means that we can remove the corresponding special handling for typed properites: We no longer need to check that a property is convertible to stdClass if such a conversion might take place indirectly due to a nested property write. Additionally OBJ_W style operations now no longer modify the object operand, and as such we no longer need to treat op1 as a def in SSA form. The next step would be to actually compile the whole LHS of OBJ_W operations in R rather than W mode, but that causes issues with SimpleXML, whose object handlers depend on the current compilation structure. Part of https://wiki.php.net/rfc/engine_warnings.
* | Merge branch 'PHP-7.4'Nikita Popov2019-09-123-3/+15
|\ \ | |/
| * Allow throwing exception while loading parent classNikita Popov2019-09-123-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-112-11/+2
|\ \ | |/
| * Register class before fetching parentNikita Popov2019-06-112-11/+2
| | | | | | | | | | We want the class declaration to be available while compiling the parent class.
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-053-28/+46
|\ \ | |/
| * Allow exceptions in __toString()Nikita Popov2019-06-053-28/+46
| | | | | | | | | | | | | | | | | | | | 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.
* | Always generate fatal error for LSP failuresNikita Popov2019-05-077-29/+12
| | | | | | | | RFC: https://wiki.php.net/rfc/lsp_errors
* | Merge branch 'PHP-7.4'Nikita Popov2019-03-2711-11/+11
|\ \ | |/
| * Fix lineno for more inheritance errorsNikita Popov2019-03-2712-12/+12
| | | | | | | | And also include explicit linenos in tests.
* | Merge branch 'PHP-7.4'Peter Kokot2019-03-156-6/+6
|\ \ | |/ | | | | | | * PHP-7.4: Replace dirname(__FILE__) by __DIR__ in tests
| * Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-156-6/+6
| |
* | Adjust tests for zpp TypeError changeNikita Popov2019-03-113-29/+38
| |
* | Merge branch 'PHP-7.4'Gabriel Caruso2019-03-111-1/+1
|\ \ | |/ | | | | | | | | * PHP-7.4: Use EXPECT when possible Fix tests filenames
| * Use EXPECT when possibleGabriel Caruso2019-03-111-1/+1
| | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | Merge branch 'PHP-7.4'Nikita Popov2019-02-201-0/+0
|\ \ | |/
| * Implement fine-grained conflict handlingNikita Popov2019-02-201-0/+0
| | | | | | | | | | | | Tests can specify conflict keys, either in --CONFLICTS-- or a per-directory CONFLICTS file. Non-conflicting tests may be run in parallel.
* | Merge branch 'PHP-7.4'Nikita Popov2019-02-181-0/+0
|\ \ | |/
| * run-tests.php: experimental parallel testing supportAndrea Faulds2019-02-181-0/+0
| |