summaryrefslogtreecommitdiff
path: root/ext/zend_test
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Dmitry Stogov2021-03-171-0/+14
|\ | | | | | | | | * PHP-8.0: Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
| * Fixed bug #80847 (CData structs with fields of type struct can't be passed ↵Dmitry Stogov2021-03-171-0/+14
| | | | | | | | as C function argument)
| * Add missing classes to stubsMáté Kocsis2021-02-092-1/+29
| |
| * Properly render 2+ namespaces functions in build/gen_stub.phpTyson Andre2021-02-063-3/+19
| | | | | | | | | | | | | | | | Affects ZEND_NS_FE Add test cases of the global function Backported to php 8.0 from GH-6664
* | Add support for generating properties with union type of multiple classesMáté Kocsis2021-02-163-18/+16
| | | | | | | | Closes GH-6701
* | Improve class entry generationMáté Kocsis2021-02-162-9/+15
| | | | | | | | Related to GH-6701
* | Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-092-5/+2
| | | | | | | | | | | | enabled Closes GH-6675
* | Properly render 2+ namespaces functions in build/gen_stub.phpTyson Andre2021-02-063-3/+46
| | | | | | | | | | | | | | | | Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE Add test cases of the global function and namespaced values Closes GH-6664
* | Merge branch 'PHP-8.0'Nikita Popov2021-02-011-0/+2
|\ \ | |/ | | | | | | * PHP-8.0: XFAIL observer_error_05.phpt test
| * XFAIL observer_error_05.phpt testNikita Popov2021-02-011-0/+2
| |
* | Merge branch 'PHP-8.0'Nikita Popov2021-01-282-1/+33
|\ \ | |/ | | | | | | * PHP-8.0: Observe fake closures
| * Observe fake closuresSammy Kaye Powers2021-01-281-0/+32
| | | | | | | | Closes GH-6607.
* | Merge branch 'PHP-8.0'Dmitry Stogov2021-01-261-0/+35
|\ \ | |/ | | | | | | * PHP-8.0: Skip dummy frames allocated on CPU stack of zend_call_function(). (Usage of "current_observed_frame" varible looks unsafe to me).
| * Skip dummy frames allocated on CPU stack of zend_call_function().Dmitry Stogov2021-01-261-0/+35
| | | | | | | | (Usage of "current_observed_frame" varible looks unsafe to me).
* | Add support for generating class entries from stubsMáté Kocsis2021-01-263-55/+157
| | | | | | | | | | | | Closes GH-6289 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | Disable jit in observer opline testNikita Popov2021-01-251-0/+1
| | | | | | | | This test fails in --repeat mode with tracing JIT.
* | Rename zend-test to zend_testNikita Popov2021-01-1941-42/+42
|/ | | | | | | | | | | 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.
* Fix observer tests on WindowsNikita Popov2021-01-1938-140/+140
| | | | Use %e instead of a hardcoded forward slash.
* Disable opcache optimizations during some observer testsNikita Popov2021-01-194-16/+18
| | | | | | Opcache inlines functions that only return a constant. Disable optimizations to prevent differences in tests where such functions are used (or rewrite the test to not depend on it).
* Disable JIT with incompatible third-party extensionsDmitry Stogov2020-11-301-0/+13
|
* Provide unused retvals to observersSammy Kaye Powers2020-11-1713-1/+455
| | | | | | | Make sure that the return value is available to observers, even if it is not used by the caller. Closes GH-6422.
* Fire open observer end handlers after a zend_bailoutSammy Kaye Powers2020-11-164-0/+142
| | | | Closes GH-6377
* [Observer] Save opline before calling begin/end handlersDmitry Stogov2020-11-112-0/+66
|
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-302-6/+13
|\ | | | | | | | | * PHP-7.4: Fix bug79177.phpt wrt. JIT
| * Fix bug79177.phpt wrt. JITChristoph M. Becker2020-10-302-2/+19
| | | | | | | | | | | | | | | | | | | | JIT ignores that the `zend_write` callback is overwritten, so we define our own callback and caller. We also fix the "inconsistent DLL binding" warnings on Windows, by introducing `PHP_ZEND_TEST_API`. Closes GH-6391.
* | Add missing observer testsSammy Kaye Powers2020-10-266-0/+239
| | | | | | | | Closes GH-6378
* | Avoid namespaced class symbol clashes in gen_stubNikita Popov2020-10-073-1/+47
| | | | | | | | | | Add the namespace prefix (using underscores) to both the arginfo name and the method declaration name.
* | Support "static" type in gen_stubNikita Popov2020-10-073-7/+19
| |
* | Support specifying linkage for generate-function-entriesNikita Popov2020-10-023-35/+35
| | | | | | | | | | The linkage can be specified as the argument to the @generate-function-entries tag. Test this on zend_test.
* | Pass zend_execute_data instead of zend_function to fcall initSammy Kaye Powers2020-09-252-2/+134
| | | | | | | | | | | | | | | | The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in. But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex. Closes GH-6209
* | Run tidyNikita Popov2020-09-181-1/+1
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | Cleanup observer API and add JIT supportDmitry Stogov2020-09-182-31/+6
| |
* | Consolidate new union type ZPP macro namesMáté Kocsis2020-09-111-8/+8
| | | | | | | | | | | | | | They will now follow the canonical order of types. Older macros are left intact due to maintaining BC. Closes GH-6112
* | Add Z_PARAM_ITERABLE and coLevi Morrison2020-09-033-1/+22
| |
* | Change Attribute Syntax from @@ to #[]Benjamin Eberlei2020-09-021-1/+1
| |
* | Add zend_observer APILevi Morrison2020-09-0117-4/+818
| | | | | | | | | | | | | | Closes GH-5857. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
* | Add a few missing parameter types in stubsMáté Kocsis2020-07-302-3/+3
| | | | | | | | Related to GH-5627
* | Implement Shorter Attribute SyntaxTheodore Brown2020-07-281-1/+1
| | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/shorter_attribute_syntax Closes GH-5796. Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
* | Tweak zend_test arginfo/zppNikita Popov2020-07-213-9/+7
| |
* | Parse parameters in zend_test_void_return()Nikita Popov2020-07-171-0/+1
| |
* | Remove proto comments from C filesMax Semenik2020-07-061-4/+2
| | | | | | | | Closes GH-5758
* | Add string or object ZPP macrosMáté Kocsis2020-07-063-1/+111
| | | | | | | | Closes GH-5788
* | Implement Attribute Amendments.Martin Schröder2020-06-291-2/+6
| | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/attribute_amendments Support for attribute grouping is left out, because the short attribute syntax RFC will likely make it obsolete. Closes GH-5751.
* | Include stub hash in generated arginfo filesNikita Popov2020-06-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* | Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-053-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* | Add AttributesBenjamin Eberlei2020-06-041-0/+15
| | | | | | | | Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
* | Annotate internal functions with the mixed typeMáté Kocsis2020-05-252-3/+2
| | | | | | | | Closes GH-5618
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-292-0/+9
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79532: sizeof off_t can be wrong
| * Fix #79532: sizeof off_t can be wrongChristoph M. Becker2020-04-292-0/+9
| | | | | | | | | | | | | | | | | | We have to actually determine the proper `SIZEOF_OFF_T`. Interestingly, it is `4` on Windows x64. We also have to prevent the redefinition in pg_config.h. The clean solution would likely be to not include pg_config.h at all, but that's out of scope for BC reasons for now.
* | Generate method entries from stubs for a couple of extensionsMáté Kocsis2020-04-113-19/+25
| | | | | | | | Closes GH-5368