summaryrefslogtreecommitdiff
path: root/Zend/tests/traits
Commit message (Collapse)AuthorAgeFilesLines
* Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-011-6/+6
| | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* Use IS_ALIAS_PTR to make distinct between aliasses and real classesDmitry Stogov2021-02-101-0/+16
|
* Rename zend-test to zend_testNikita Popov2021-01-191-1/+1
| | | | | | | | | | | The extension name should match the name of the ext/ directory, otherwise it will not get picked up by run-tests. It would be possible to remap this in run-tests, but I think it's better to rename the extension to follow the standard format. Other extensions also use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql). Of course, the ./configure option remains hyphenated. Closes GH-6613.
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-0921-0/+21
| | | | Closes GH-5958
* Improve output of tokens in Parse ErrorsRowan Tommins2020-07-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, unexpected tokens in the parser are shown as the text found, plus the internal token name, including the notorious "unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)". This commit replaces that with a more user-friendly format, with two main types of token: * Tokens which always represent the same text are shown like 'unexpected token "::"' and 'expected "::"' * Tokens which have variable text are given a user-friendly name, and show like 'unexpected identifier "foo"', and 'expected identifer'. A few tokens have special cases: * unexpected token """ -> unexpected double-quote mark * unexpected quoted string "'foo'" -> unexpected single-quoted string "foo" * unexpected quoted string ""foo"" -> unexpected double-quoted string "foo" * unexpected illegal character "_" -> unexpected character 0xNN (where _ is almost certainly a control character, and NN is the hexadecimal value of the byte) The \ token has a special case in the implementation just to stop bison making a mess of escaping it and it coming out as \\
* Review the usage of apostrophes in error messagesMáté Kocsis2020-07-105-5/+5
| | | | Closes GH-5590
* Fix treatment of "self" when validating against trait methodNikita Popov2020-04-233-0/+69
| | | | | | | If we're validating a class method against a trait method, we need to treat "self" in the trait method as the class where the method is used. To achieve this, we need to thread the proto scope through all methods, so it can be provided separately from proto.common->scope.
* Check abstract method signatures coming from traitsNikita Popov2020-03-269-2/+141
| | | | | | RFC: https://wiki.php.net/rfc/abstract_trait_method_validation Closes GH-5068.
* Enable better trait conflict error messageNikita Popov2020-03-109-9/+9
| | | | | | I don't think there is any reason to disable this anymore, at least all the messages generated in tests look correct and more useful.
* Require non-absolute trait method refs to be unambiguousNikita Popov2020-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Currently, when writing something like class X { use T1, T2 { func as otherFunc; } function func() {} } where both T1::func() and T2::func() exist, we will simply assume that func refers to T1::func(). This is surprising, and it doesn't really make sense that this particular method gets picked. This commit validates that non-absolute method references are unambiguous, i.e. refer to exactly one method. If there is ambiguity, it is required to write T1::func as otherFunc or similar. Closes GH-5232.
* Resolve trait alias refers to earlierNikita Popov2020-03-031-1/+1
| | | | | | Make sure all trait method references are converted to absolute method references in advance. This regresses one error message that I don't think is particularly valuable.
* Deprecate required param after optionalNikita Popov2020-02-181-2/+2
| | | | | | | | As an exception, we allow "Type $foo = null" to occur before a required parameter, because this pattern was used as a replacement for nullable types in PHP versions older than 7.1. Closes GH-5067.
* Reindent phpt filesNikita Popov2020-02-0363-355/+355
|
* Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-164-4/+4
|
* 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
| |
* | Remove support for legacy constructorsNikita Popov2019-01-298-272/+0
|/ | | | | This has been deprecated in PHP 7.0 by https://wiki.php.net/rfc/remove_php4_constructors.
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1557-70/+38
| | | | | | | | | | | | | | | | | | | | | | | 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-142-2/+2
|
* Trim trailing whitespace in testsGabriel Caruso2018-10-1469-108/+108
|
* Fix #76773 - Methods with a concrete scope need to be added againChris Wright2018-08-221-0/+33
|
* Fix #76700 - Methods with altered visibility need to be added againPedro Magalhães2018-08-071-0/+31
|
* Give a reason why the test was skippedGabriel Caruso2018-07-301-1/+1
|
* Added test case for bug #76539 for master only as the behavior has been restoredKalle Sommer Nielsen2018-07-041-0/+26
|
* Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2031-31/+31
| | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* Fix some misspellingsGabriel Caruso2018-02-064-6/+6
|
* Remove some references to E_STRICT in testsNikita Popov2018-02-039-20/+9
| | | | | | | 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.
* Merge branch 'PHP-7.2'Nikita Popov2017-12-162-0/+61
|\
| * Fix #75607 - Check if existing static trait property is a ref before comparingPedro Magalhães2017-12-162-0/+61
| |
* | 63911: Compare opcodes of the op_array to determine different functionsPedro Magalhães2017-11-221-0/+26
| |
* | Fix #74922 - Try to resolve constants when importing trait propertiesPedro Magalhães2017-11-025-0/+76
|/
* Fix bug #74607: Don't check for bi-directional compatibility in traitsPedro Magalhães2017-06-034-2/+46
|
* Fix SKIPIF conditionsNikita Popov2017-03-141-1/+1
|
* Fix CRLF line-endings in testsNikita Popov2016-11-209-225/+225
| | | | Also fix a single instance of CRLF in ibase_query.c.
* Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2016-09-224-9/+31
|\
| * Fix bug #69579John Boehr2016-09-224-9/+31
| |
* | Fix static method arg binding in traitsNikita Popov2016-04-081-0/+28
|/
* fix #71414 (Interface method override inherited method and implemented in a ↵Joe Watkins2016-03-261-1/+1
| | | | trait causes fatal error)
* Update exception names in tests after formatting changes.Aaron Piotrowski2015-05-176-6/+6
|
* Tweak uncaught exception message displayNikita Popov2015-05-176-6/+6
| | | | | | | | | | | | | 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.
* Display EngineExceptions like ordinary exceptionsNikita Popov2015-05-156-6/+25
| | | | | | | | | 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-015-13/+1
| | | | | | | 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-312-1/+4
|
* Removed parsing support traits to have extends and implements.Guilherme Blanco2015-01-092-2/+2
|
* Merge branch 'PHP-5.6'Julien Pauli2014-12-122-0/+64
|\ | | | | | | | | | | | | | | | | | | * PHP-5.6: Updated NEWS Updated NEWS Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor) Conflicts: Zend/zend_compile.c
| * Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)Kévin Dunglas2014-12-122-0/+64
| |
* | typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-191-1/+1
|/
* non living code related typo fixesVeres Lajos2013-08-041-1/+1
|