summaryrefslogtreecommitdiff
path: root/Zend/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #78239Nikita Popov2019-07-031-0/+30
|
* simple ignore arguments in exceptions implementationJoe Watkins2019-07-021-0/+18
|
* Generate less code in compile time binary op testNikita Popov2019-07-011-4/+7
| | | | Don't generate try {} blocks for the operations that don't throw.
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-06-281-0/+17
|\
| * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-06-281-0/+17
| |\
| | * Fix bugs in AST printersunnyeo2019-06-281-0/+17
| | | | | | | | | | | | Closes GH-4324.
* | | Set up asan+ubsan scheduled build on azureNikita Popov2019-06-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also adds an --asan flag to run-tests.php to setup all the necessary environment variables. Some tests are marked as skipped because they are incompatible with asan or too slow. I'm basing this on the DEBUG_ZTS build, which seems to give us the most mileage.
* | | Fixed variance check for abstract constructor during erlay bindingDmitry Stogov2019-06-251-0/+18
| | |
* | | Fixed bug #78182Nikita Popov2019-06-191-0/+15
| | |
* | | Implement numeric literal separatorsTheodore Brown2019-06-149-0/+83
| | | | | | | | | | | | RFC: https://wiki.php.net/rfc/numeric_literal_separator
* | | Fixed bug #78154Nikita Popov2019-06-131-0/+23
| | |
* | | test for bug #78151Joe Watkins2019-06-121-0/+23
| | |
* | | Support full variance if autoloading is usedNikita Popov2019-06-1113-6/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolved method compatibility (because the necessecary classes aren't available yet) or open parent/interface dependencies. The latter occur because we allow the use of not fully linked classes as parents/interfaces now. An important aspect of the implementation is we do not require classes involved in variance checks to be fully linked in order for the class to be fully linked. Because the involved types do have to exist in the class table (as partially linked classes) and we do check these for correct variance, we have the guarantee that either those classes will successfully link lateron or generate an error, but there is no way to actually use them until that point and as such no possibility of violating the variance contract. This is important because it ensures that a class declaration always either errors or will produce an immediately usable class afterwards -- there are no cases where the finalization of the class declaration has to be delayed until a later time, as earlier variants of this patch did. Because variance checks deal with classes in various stages of linking, we need to use a special instanceof implementation that supports this, and also introduce finer-grained flags that tell us which parts have been linked already and which haven't. Class autoloading for variance checks is delayed into a separate stage after the class is otherwise linked and before delayed variance obligations are processed. This separation is needed to handle cases like A extends B extends C, where B is the autoload root, but C is required to check variance. This could end up loading C while the class structure of B is in an inconsistent state.
* | | Add get_mangled_object_vars() functionNikita Popov2019-06-111-0/+49
| | |
* | | Deprecate ReflectionType::__toString()Nikita Popov2019-06-053-7/+7
| | | | | | | | | | | | | | | | | | | | | We weren't able to do this in 7.1 because the deprecation notice may be converted to an exception and __toString() can't throw, which means that it ultimately become a fatal error. This issue is resolved now, so we can mark the method as deprecated.
* | | Allow exceptions in __toString()Nikita Popov2019-06-0513-80/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Revert "Fix bug #62397 - disable_functions does not work with eval."Joe Watkins2019-06-031-14/+0
| | | | | | | | | | | | This reverts commit 050d299364ded5cb7b878bc515aa763c9c623c4b.
* | | Deprecate use of parent where no parent existsNikita Popov2019-05-242-0/+4
| | | | | | | | | | | | This deprecation is part of the covariance RFC.
* | | Implement basic variance supportNikita Popov2019-05-2411-13/+166
| | | | | | | | | | | | | | | | | | | | | This is a minimal variance implementation: It does not support any cyclic type dependencies. Additionally the preloading requirements are much more restrictive than necessary. Hopefully we can relax these in the future.
* | | Avoid early-binding on unresolved typesNikita Popov2019-05-244-0/+40
| | | | | | | | | | | | | | | | | | Fixes bug #76451, and more importantly lays necessary groundwork for covariant/contravariant types. Bug #76451 is just an edge case, but once covariance is introduced this will become a common problem instead.
* | | Forbid use of not fully linked classesNikita Popov2019-05-232-1/+21
| | |
* | | Revert "Rename *.l files to *.re"Joe Watkins2019-05-201-1/+1
| | | | | | | | | | | | This reverts commit 969047749d33bb88a0573aa91a57e2070335111a.
* | | Rename *.l files to *.rePeter Kokot2019-05-171-1/+1
| | | | | | | | | | | | | | | This syncs PHP lexer files to all use *.re extension. The *.re files are processed with the RE2C tool.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-151-4/+8
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-151-4/+8
| |\ \ | | |/
| | * Fixed bug #76980Nikita Popov2019-05-151-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | If we perform a class fetch that is not marked as exception safe, convert exceptions thrown by autoloaders into a fatal error. Ideally fetching the interfaces would be exception safe, but as it isn't right now, we must abort at this point.
* | | Fix bug #62397 - disable_functions does not work with eval.Benjamin Eberlei2019-05-141-0/+14
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-05-141-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix test case
| * | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-05-141-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix test case
| | * Fix test caseChristoph M. Becker2019-05-141-1/+1
| | | | | | | | | | | | | | | stderr is supposed to be redirected to NUL (which is roughly equivalent to /dev/null on POSIX), but actually was redirected to a file.
* | | Convert CRLF to LFPeter Kokot2019-05-143-182/+182
| | |
* | | Implement spread operator in arraysCHU Zhaowei2019-05-1310-0/+305
| | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/spread_operator_for_array Closes GH-3640.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-131-0/+7
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-131-0/+7
| |\ \ | | |/
| | * Fix #77993: Wrong parse error for invalid hex literal on WindowsTheodore Brown2019-05-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | If a PHP file contains an invalid hex literal such as `0x_10`, the expected error is `Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d`. This already worked correctly on Linux, but on Windows prior to this patch a different error was produced: `Parse error: Invalid numeric literal in %s on line %d`.
* | | Fixed bug #71030Nikita Popov2019-05-092-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to always fetch the RHS of a list assignment first, instead of special casing known self-assignments, which will not detect cases using references correctly. As a side-effect, it is no longer possible to do something like byRef(list($x) = $y). This worked by accident previously, but only if $y was a CV and the self-assignment case did not trigger. However it shouldn't work for the same reason that byRef($x = $y) doesn't. Conversely byRef(list(&$x) = $y) and byRef($x =& $y) continue to be legal.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-05-081-0/+17
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-081-0/+17
| |\ \ | | |/
| | * Fix resolution of "parent" during inheritance checkNikita Popov2019-05-081-0/+17
| | | | | | | | | | | | | | | We can't assume that the method we're checking against is part of the parent class...
* | | Deprecate left-associative ternaryNikita Popov2019-05-072-1/+31
| | | | | | | | | | | | | | | | | | Deprecate nesting ternary operators without explicit parentheses. RFC: https://wiki.php.net/rfc/ternary_associativity
* | | Implement arrow functionsNikita Popov2019-05-0217-12/+259
| | | | | | | | | | | | | | | | | | | | | Per RFC: https://wiki.php.net/rfc/arrow_functions_v2 Co-authored-by: Levi Morrison <levim@php.net> Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
* | | Fix internal_encoding fallback in mbstringNikita Popov2019-04-176-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | By introducing a hook that is called whenever one of internal_encoding / input_encoding / output_encoding changes, so that mbstring can adjust it's internal state. This also makes internal_encoding work with zend multibyte.
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-04-161-0/+18
|\ \ \ | |/ /
| * | Fix second part of bug #77903Nikita Popov2019-04-161-0/+18
| | | | | | | | | | | | | | | | | | When a HT iterator is one past the end and we rehash, we need to make sure that it is move to the new one past the end position, to make sure that newly inserted elements are picked up.
* | | Replace "ZEND_CALL_CTOR" hack by additional live-rangeDmitry Stogov2019-04-121-0/+33
| | |
* | | Added testDmitry Stogov2019-04-111-0/+21
| | |
* | | Fixed typoMarkus Staab2019-04-111-1/+1
| | |
* | | Fixed bug #77877 (call_user_func() passes $this to satatic methods).Dmitry Stogov2019-04-111-0/+23
| | |
* | | Fix invalid function by-ref prop assign handlingNikita Popov2019-04-081-0/+20
| | |
* | | Add additional protected visibility prototype testNikita Popov2019-03-281-0/+26
| | | | | | | | | | | | See https://github.com/php/php-src/pull/3993 for context.