summaryrefslogtreecommitdiff
path: root/ext/standard/tests/class_object
Commit message (Collapse)AuthorAgeFilesLines
* Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-012-4/+4
| | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* Consolidate new union type ZPP macro namesMáté Kocsis2020-09-113-53/+53
| | | | | | | They will now follow the canonical order of types. Older macros are left intact due to maintaining BC. Closes GH-6112
* Cleanup argument handling of Zend functions and methodsMáté Kocsis2020-07-213-82/+82
| | | | Closes GH-5847
* Use correct ZPP mechanism in get_class_methods()codinghuang2020-07-022-29/+37
| | | | | | | From now on, instead of returning null, an exception is thrown when not a string or an object is passed to the function. Closes GH-5792
* Add ZPP macros for class name or object parametersMáté Kocsis2020-06-301-57/+61
| | | | Closes GH-5647
* Remove unnecessary PHPDoc-alike blocks from testsMáté Kocsis2020-06-2438-232/+0
| | | | Closes GH-5759
* Fix #79462: method_exists and property_exists incoherent behaviorChristoph M. Becker2020-04-091-23/+27
| | | | | Both functions are closely related, so should behave the same for wrong input types, i.e. both should throw a TypeError.
* Promote some warnings to Errors in Zend basic functionsGeorge Peter Banyard2020-03-311-5/+8
| | | | Closes GH-5325
* Improve undefined variable error messagesMáté Kocsis2020-03-317-14/+14
| | | | Closes GH-5312
* Change argument error message formatMáté Kocsis2020-02-261-26/+26
| | | | Closes GH-5211
* Make type error messages more consistentMáté Kocsis2020-02-171-26/+26
| | | | Closes GH-5092
* Improve generated names for anonymous classesNikita Popov2020-02-172-1/+1
| | | | | | | | | | | | | | | | In order of preference, the generated name will be: new class extends ParentClass {}; // -> ParentClass@anonymous new class implements FirstInterface, SecondInterface {}; // -> FirstInterface@anonymous new class {}; // -> class@anonymous This is intended to display a more useful class name in error messages and stack traces, and thus make debugging easier. Closes GH-5153.
* Reindent phpt filesNikita Popov2020-02-0325-208/+208
|
* Implemented FR #78638 (__PHP_Incomplete_Class should be final)Xinchen Hui2019-12-241-0/+9
| | | | This should be minor and won't impact anyone
* Clean DONE tags from testsFabien Villepinte2019-11-075-10/+0
| | | | | | | 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-041-3/+3
|\
| * Fixed bug #78632Nikita Popov2019-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | I'm going for a very conservative fix here, where the previous logic is restored for the case where an object is passed to method_exists(). We might want to check against EG(scope) instead, but this seems like a safer choice. This means that behavior in PHP 7.4 changes only for method_exists('C', 'privateMethodNotOnC'), which should be sensible.
* | Convert some notices to warningsNikita Popov2019-10-027-49/+49
| | | | | | | | Part of https://wiki.php.net/rfc/engine_warnings.
* | Merge branch 'PHP-7.4'Nikita Popov2019-09-031-4/+4
|\ \ | |/
| * Report false for inherited private methods in method_exists()Nikita Popov2019-09-031-4/+4
| | | | | | | | | | These shadow methods only exist as internal implementation markers. This mirrors the behavior of property_exists().
* | Throw TypeError from VM implementation of get_class()Nikita Popov2019-08-271-82/+34
| | | | | | | | | | | | The normal function already throws TypeError through the usual zpp mechanism, but the VM implementation handles this manually and has not been updated.
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-052-7/+4
|\ \ | |/
| * Allow exceptions in __toString()Nikita Popov2019-06-052-7/+4
| | | | | | | | | | | | | | | | | | | | 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.
* | Adjust tests for zpp TypeError changeNikita Popov2019-03-111-22/+1
| |
* | Merge branch 'PHP-7.4'Nikita Popov2019-03-0715-706/+0
|\ \ | |/
| * More zpp error/variation test removalsNikita Popov2019-03-0715-706/+0
| |
* | Remove $errcontext argument to error handlersNikita Popov2019-02-055-5/+5
|/ | | | | | | | | I'm removing the argument entirely here, but we might want to change this to passing null or and empty array instead, if the impact of dropping it entirely turns out to be too large. This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2 as a doc-only deprecation.
* Remove zpp variation testsNikita Popov2019-02-0510-1883/+0
|
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1530-33/+29
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in *.phptPeter Kokot2018-10-1461-84/+84
|
* Trim trailing whitespace in testsGabriel Caruso2018-10-1462-99/+99
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-144-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2030-30/+30
| | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* Remove trailing whitespace in inc filesGabriel Caruso2018-02-101-2/+2
|
* Use bool instead of boolean while throwing a type errorGabriel Caruso2018-02-047-28/+28
| | | | | | | | | | PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
* Use int instead of integer in type errorsGabriel Caruso2018-02-042-10/+10
| | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
* Remove some references to E_STRICT in testsNikita Popov2018-02-034-9/+1
| | | | | | | run-tests.php enforces error_reporting=E_ALL (including E_STRICT), setting this explicitly in not necessary. Conversely, after the removal of some E_STRICT errors, explicitly excluding it is no longer necessary in some places.
* Remove superfluous semicolonsTom Van Looy2017-06-263-3/+3
|
* Deprecate __autoload()Nikita Popov2017-02-0320-148/+144
|
* Remove zend_version() checks from testsNikita Popov2017-01-301-2/+0
|
* add skipifAnatol Belski2016-11-301-0/+0
|
* Fix get_class_vars() fast-path/slow-path discrepanciesNikita Popov2016-11-222-0/+0
| | | | | | | | Normalize to the fast-path behavior. In particular, make sure that the the property visibility check is correct for property names that are formatted like mangled private properties (but are not). This is done by only calling zend_check_property_access() for INDIRECT properties.
* Fixed ext/standard test that calls get_class()Danack2016-08-131-4/+4
|
* Replace zend_ce_error with NULL and replace more E_ERROR with thrown ErrorAaron Piotrowski2016-06-131-1/+6
|
* Fixed bug #71442 (forward_static_call crash)Xinchen Hui2016-01-251-0/+37
|
* Use "float" and "integer" in typehint and zpp errorsAndrea Faulds2014-12-212-10/+10
|
* Fixed testsDmitry Stogov2013-12-022-10/+0
|
* typo fixes (argument)Veres Lajos2013-06-104-4/+4
|
* Merge branch 'PHP-5.3' into PHP-5.4Xinchen Hui2012-10-103-0/+0
|\
| * Remove executable permission on phptXinchen Hui2012-10-103-0/+0
| |