summaryrefslogtreecommitdiff
path: root/tests/classes
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-02-123-10/+14
|\
| * Fixed bug #75546DanielCiochiu2019-02-123-10/+14
| | | | | | | | | | By respecting the SILENT flag when checking the visibility of a class constant.
| * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1565-79/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14132-323/+323
| |
| * Trim trailing whitespace in source code filesPeter Kokot2018-10-132-2/+2
| |
| * Req #74963 (Improved error message on fetching property of non-object)Xinchen Hui2017-07-311-9/+9
| |
* | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1565-79/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14131-319/+319
| |
* | Fixed bug #72635Nikita Popov2018-09-291-1/+4
| | | | | | | | | | | | This seems to be a simple oversight, where we did not enable exceptions. Other constexpr conditions already throw, so there is no particular reason to stick to a fatal error here.
* | Fixed bug #76509Nikita Popov2018-06-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | In PHP static properties are shared between inheriting classes, unless they are explicitly overwritten. However, because this functionality was implemented using reference, it was possible to break the implementation by reassigning the static property reference. This is fixed by switching the implementation from using references to using INDIRECTs, which cannot be affected by userland code.
* | Remove duplicated testsGabriel Caruso2018-02-221-37/+0
| |
* | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2071-71/+71
| | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | Remove trailing whitespace in inc filesGabriel Caruso2018-02-102-2/+2
| |
* | Use int instead of integer in type errorsGabriel Caruso2018-02-042-11/+11
| | | | | | | | | | | | | | 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 superfluous SKIPIF sections in testsGabriel Caruso2018-02-035-10/+0
| |
* | Fix #75765 Exception on extend of undefined classtimurib2018-01-122-1/+26
| | | | | | | | | | | | As the parent class is fetched prior to binding, there are no safety concerns in this case and we can replace the fatal error with an Error exception.
* | Req #74963 (Improved error message on fetching property of non-object)Xinchen Hui2017-07-311-9/+9
|/
* Implement object type annotationMichał Brzuchalski2017-06-254-94/+94
| | | | RFC: https://wiki.php.net/rfc/object-typehint
* Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecationRowan Collins2017-03-232-2/+2
| | | | | Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings" [https://wiki.php.net/rfc/deprecate-bareword-strings]
* Implement Parameter Type Widening RFCNiklas Keller2017-02-041-14/+0
|
* Deprecate each()Nikita Popov2017-02-031-4/+3
|
* Deprecate __autoload()Nikita Popov2017-02-0321-208/+188
|
* Remove zend_version() checks from testsNikita Popov2017-01-30111-216/+0
|
* Remove more PHP 6 leftovers from testsNikita Popov2016-11-247-43/+43
|
* Implement \ArgumentCountError exceptionDavey Shafik2016-08-301-1/+1
|
* Fixed testsXinchen Hui2016-08-232-4/+0
|
* Show "or null" in TypeErrors for nullable arg_infosAndrea Faulds2016-08-111-3/+3
|
* Merge branch 'PHP-7.0'Nikita Popov2016-07-141-4/+2
|\
| * Fix test outputNikita Popov2016-07-141-4/+2
| | | | | | | | | | The error is now detected earlier, so the message ends up being different.
* | Implemented RFC: Replace "Missing argument" warning with "Too few arguments" ↵Dmitry Stogov2016-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exception Squashed commit of the following: commit 8b45fa2acb8cd92542a39e1e4720fe1f4fabc26c Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Jun 16 01:52:50 2016 +0300 Separate slow path of ZEND_RECV into a cold function. commit 9e18895ee59c64c93a96b1ba3061355c4663e962 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 23:26:28 2016 +0300 Required argument can't be IS_UNDEF anymore. commit 662db66e3943d4455c65e4f987bb54abf724ecb2 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 31 17:14:50 2016 +0300 Replace "Missing argument" warning by "Too few arguments" exception.
* | Implemented RFC: Fix inconsistent behavior of $this variableDmitry Stogov2016-06-162-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit bdd3b6895c3ce3eacfcf7d4bf4feb8dfa61801fd Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Jun 16 00:19:42 2016 +0300 Fixed GOTO VM commit 2f1d7c8b89ce821086d357cf65f629f040a85c03 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 21:01:57 2016 +0300 Removed unused variable commit cf749c42b0b1919f70b1e7d6dcbfff76899506af Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 19:06:16 2016 +0300 Protection from $this reassign through mb_parse_str() commit 59a9a6c83c66b666971e57f1173b33a422166efd Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 18:14:50 2016 +0300 Added type inference rule for FETCH_THIS opcode commit 73f8d14a856f14a461430b3c7534ab2ce870cbf6 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 18:11:18 2016 +0300 Restored PHP-7 behavior of isset($this->foo). It throws exception if not in object context. Removed useless opcode handlers. commit fa0881381e8ae97e022ae5d1ec0851c952f33c82 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 31 12:25:47 2016 +0300 Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context". commit e32cc528c0f2c97963d8ec83eff0269f1f45af18 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 24 02:02:43 2016 +0300 Throw exception on attempt to re-assign $this through extract() and parse_str(). commit 41f1531b52113ec8a4c208aa6b9ef50f1386bb3f Author: Dmitry Stogov <dmitry@zend.com> Date: Mon May 23 22:18:36 2016 +0300 Fixed inconsistent $this behavior
* | Implemented the RFC `Support Class Constant Visibility`.Dmitry Stogov2015-12-0815-0/+272
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit f11ca0e7a57793fa0e3e7f6d451720e6c42bb0b9 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Dec 8 12:38:42 2015 +0300 Fixed test expectation commit 211f873f542504d0a0f72b6b5cb23908a1c99a2d Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Dec 8 12:28:38 2015 +0300 Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags commit 51deab84b2cdbf9cdb1a838cf33b2ee45c61748b Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Dec 7 11:18:55 2015 +0300 Fixed issues found by Nikita commit 544dbd5b47e40d38a8ccb96bc5583e9cb7fdd723 Author: Dmitry Stogov <dmitry@zend.com> Date: Sat Dec 5 02:41:05 2015 +0300 Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility @reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
* Fixed Bug #70967 (Weird error handling for __toString when Error is thrown)Xinchen Hui2015-11-281-1/+1
|
* Switch code on thrown TypeError and ParseError to 0, update related testsAaron Piotrowski2015-07-071-6/+6
|
* Restored old behaviorDmitry Stogov2015-06-291-1/+1
|
* Fixed last previously broken testsBob Weinand2015-06-291-1/+1
|
* Show full signature upon inheritance mismatchBob Weinand2015-06-298-8/+8
|
* Drop duplicate object-to-type noticesNikita Popov2015-06-221-1/+0
| | | | | We already generate a recoverable fatal for these earlier, no need to throw an additional notice.
* Merge branch 'master' into throwable-interfaceAaron Piotrowski2015-06-144-4/+4
|\ | | | | | | | | | | | | # Conflicts: # Zend/zend_language_scanner.c # Zend/zend_language_scanner.l # ext/simplexml/tests/SimpleXMLElement_xpath.phpt
| * Show argument causing TypeException in traceNikita Popov2015-05-204-4/+4
| | | | | | | | Not sure why that check was there, did I miss something?
* | Update exception names in tests after formatting changes.Aaron Piotrowski2015-05-1746-47/+47
| |
* | Merge branch 'master' into throwable-interfaceAaron Piotrowski2015-05-1746-50/+67
|\ \ | |/
| * Display TypeExceptions like normal exceptionsNikita Popov2015-05-175-8/+25
| | | | | | | | | | | | | | We currently don't show the argument at which the error actually occured in the trace - should probably either add it or don't display args on incomplete frames altogether, otherwise this'll probably be confusing.
| * Tweak uncaught exception message displayNikita Popov2015-05-1741-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
* | Updated tests to reflect exception class changes.Aaron Piotrowski2015-05-1644-65/+65
|/
* Display EngineExceptions like ordinary exceptionsNikita Popov2015-05-1541-41/+180
| | | | | | | | | TypeException stays as-is for now because it uses messages that are incompatible with the way exception messages are displayed. closure_038.phpt and a few others now show that we're generating too many exceptions for compound operations on undefined properties -- this needs to be fixed in a followup.
* Reclassify E_STRICT noticesNikita Popov2015-04-0111-16/+21
| | | | | | | Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
* Finish PHP 4 constructor deprecationNikita Popov2015-03-317-7/+19
|
* Deprecate PHP 4 constructorsAndrea Faulds2015-03-314-8/+8
|
* Errors converted to exceptions are not "recoverable" anymore.Dmitry Stogov2015-03-106-11/+11
|