Commit Graph

13 Commits

Author SHA1 Message Date
Ruud Kamphuis 4cd8955f74 Fix iterable return type
Currently, the PHPDoc states that a string should be returned, but that's not correct.

It can be anything that is echo-able.

That means any scalar, Stringable and even null.
2024-09-05 09:24:38 +02:00
Fabien Potencier dd9af8ec25 feature #4265 Migrate NodeTestCase to static data providers (derrabus)
This PR was merged into the 3.x branch.

Discussion
----------

Migrate NodeTestCase to static data providers

PHPUnit 11 requires data providers to be static. This PR prepares our abstract `NodeTestCase` by deprecating the non-static `getTests()` and adding a static `provideTests()` as a replacement. I've also added PHPUnit attributes which newer PHPUnit releases prefer over PHPDoc annotations.

Commits
-------

f555a33c Migrate NodeTestCase to static data providers
2024-09-03 14:03:04 +02:00
Alexander M. Turek f555a33caf Migrate NodeTestCase to static data providers 2024-09-03 13:51:42 +02:00
Ruud Kamphuis 09a43a9f6f Replace return; yield with yield from []
This has the same effect, but looks less hacky and makes PHPStan happy.
https://phpstan.org/r/df7fcc88-1df8-428e-b675-5dc6965c34d6

Previously this was needed to work properly with output capturing.
2024-09-03 09:55:58 +02:00
Ruud Kamphuis 7e52a68097 Add more types to Template class and compiled templates 2024-08-30 16:17:55 +02:00
Fabien Potencier 30b5658f89 Fix CS 2024-04-14 10:22:11 +02:00
Nicolas Grekas e70777405d Add #[YieldReady] to allow extensions to tell when they're ready for yielding 2024-02-15 10:27:26 +01:00
Fabien Potencier f7f11ea410 Fix CS 2024-02-10 09:52:03 +01:00
Fabien Potencier 0d3a283907 Tweak code 2024-01-25 13:09:58 +01:00
Fabien Potencier a9c7307b5c Tweak code 2024-01-25 13:09:58 +01:00
Fabien Potencier 15879406c8 Remove the new yield nodes 2024-01-25 13:09:58 +01:00
Fabien Potencier 3b6cbf98d8 Remove usage of ob_* functions in favor of yielding 2024-01-25 13:09:52 +01:00
Fabien Potencier 6823b64cad moved test under tests/ 2019-06-30 14:56:12 +02:00