Fabien Potencier
955611d5bb
Fix the possibility to override an aliased block (via use)
2024-09-25 22:08:16 +02:00
Fabien Potencier
28dc912c0e
Remove unused private methods
2024-09-09 08:24:03 +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
Ruud Kamphuis
bb8b9c197c
Add return type isTraitable
2024-08-29 10:29:47 +02:00
Fabien Potencier
41459e0ddb
Fix CS
2024-08-27 13:18:23 +02:00
Fabien Potencier
4b99692e2a
Fix class name
2024-08-24 17:12:56 +02:00
Fabien Potencier
51e93aa130
Deprecate not passing a BodyNode instance as the body of a ModuleNode constructor
2024-08-24 10:49:53 +02:00
Fabien Potencier
313303b366
Update a phpdoc (ModuleNode is final now)
2024-08-24 09:53:44 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Gildas de Cadoudal
6c6315263e
fix : #4033 add missing unwrap call when a TemplateWrapper instance can be present
2024-04-18 11:47:39 +02:00
Fabien Potencier
3ca9685f58
Fix usage of display_end hook
2024-04-17 08:50:57 -04:00
Nicolas Grekas
b46e93c725
Minor fixes
2024-02-15 12:09:06 +01: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
7e1945a618
minor #3991 Fix some errors reported by phpstan (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Fix some errors reported by phpstan
Commits
-------
2b2ac80d Fxi some errors reported by phpstan
2024-02-05 18:59:35 +01:00
Fabien Potencier
2b2ac80d34
Fxi some errors reported by phpstan
2024-02-05 17:48:36 +01:00
Fabien Potencier
0d3a283907
Tweak code
2024-01-25 13:09:58 +01:00
Fabien Potencier
1469e6a6bc
Add support for templates that do not have output 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
54d34b969b
Move functions for CoreExtension
2023-12-10 20:13:10 +01:00
Fabien Potencier
4be326aeeb
Fix tests and CS
2023-11-21 14:57:52 +01:00
Mark Huot
1cf610bd2a
Add @codeCoverageIgnore to untestable compiled methods
2022-04-30 04:49:45 -04:00
Nicolas Grekas
3aa40a42b3
Merge branch '2.x' into 3.x
...
* 2.x:
Try running all tests on nightly
Minor fixes
Fix Travis config
2020-05-21 11:56:39 +02:00
Nicolas Grekas
791f001ae6
Merge branch '1.x' into 2.x
...
* 1.x:
Minor fixes
2020-05-21 11:15:20 +02:00
Nicolas Grekas
5dc364469b
Minor fixes
2020-05-21 11:01:36 +02:00
Fabien Potencier
dce7bd9e14
Merge branch '2.x' into 3.x
...
* 2.x:
macros imported "globally" in a template are now available in macros without re-importing them
added more tests
added some tests
2019-05-17 14:16:15 +02:00
Fabien Potencier
e138164015
macros imported "globally" in a template are now available in macros without re-importing them
2019-05-17 13:03:55 +02:00
Fabien Potencier
54cec4e3b8
added type hints
2019-04-26 12:01:21 +02:00
Fabien Potencier
ebbe58793c
feature #2959 Remove the "base_template_class" option on Twig\Environment (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Remove the "base_template_class" option on Twig\Environment
Commits
-------
86eb15de removed the "base_template_class" option on Twig\Environment
2019-04-23 18:25:58 +02:00
Fabien Potencier
86eb15dede
removed the "base_template_class" option on Twig\Environment
2019-04-23 17:42:53 +02:00
Fabien Potencier
e8a21cfe97
changed classes marked as @final to final
2019-04-23 17:10:12 +02:00
Fabien Potencier
273b666a71
removed the obsolete lib/ directory, removed PSR-0 class aliases
2019-04-23 16:34:05 +02:00
Fabien Potencier
71bc632ab2
deprecated Node::setTemplateName()
2019-04-16 14:41:14 +02:00
Fabien Potencier
c576797ebc
simplified code
2019-04-12 12:19:21 +02:00
Fabien Potencier
243024d4e8
fixed CS
2019-04-12 12:16:59 +02:00
Fabien Potencier
95b8ac3501
fixed bad merge
2019-04-12 12:16:31 +02:00
Fabien Potencier
1c80fa7205
Merge branch '1.x' into 2.x
...
* 1.x:
added more tests
added missing hints in some runtime exceptions
2019-04-12 12:08:49 +02:00
Fabien Potencier
d4db91535d
added missing hints in some runtime exceptions
2019-04-12 10:29:05 +02:00
Fabien Potencier
67ffbe5b7e
Merge branch '1.x' into 2.x
...
* 1.x:
fixed "include" with "ignore missing" when an error loading occurs in the included template (again)
fixed "include" with "ignore missing" when an error loading occurs in the included template
2019-04-06 16:41:57 +02:00
Fabien Potencier
8ea68e06e4
fixed "include" with "ignore missing" when an error loading occurs in the included template (again)
2019-04-06 16:10:33 +02:00
Fabien Potencier
0ad866d513
Merge branch '1.x' into 2.x
...
* 1.x:
do not check sandbox for __toString if method does not exist on object
tweaked sandbox generated code
fixed indentation of the compiled template
2019-03-11 12:07:26 +01:00
Fabien Potencier
af6bdc4b12
fixed indentation of the compiled template
2019-03-11 07:48:38 +01:00
Nicolas Grekas
0f8d66be38
Fix deprecation notes
2019-03-10 11:48:42 +01:00
Fabien Potencier
4eb0c9da8e
moved some more PSR0 class names to namespaced ones
2019-03-06 13:58:28 +01:00
Fabien Potencier
037ee67224
switched to namespace first, PSR-0 as a fallback
2019-03-05 08:14:45 +01:00
Fabien Potencier
baa70287f5
switched to namespace first, PSR-0 as a fallback
2019-03-04 21:33:40 +01:00
Maxime Steinhausser
2c174e4015
Use class_exists instead of require
2017-06-05 23:42:50 +02:00
Nicolas Grekas
5420a5e3f8
Add the aliases
2017-05-25 08:32:07 +02:00
Nicolas Grekas
71af32b306
Add namespaced aliases
2017-05-24 10:12:32 +02:00