Fabien Potencier
151aa4ecda
Fix CS
2025-02-14 12:57:03 +01:00
Fabien Potencier
72c91f6260
minor #4534 Add return type annotations on Twig 3 to prepare Twig 4 (smnandre)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Add return type annotations on Twig 3 to prepare Twig 4
Started to add missing type annotation following `@stof` comment [here](https://github.com/twigphp/Twig/pull/4523#discussion_r1901915880 ).
Update: I checked here every class (but one) in the `src` directory.
But you should ~~probably~~ **certainely** have another look.
Remains:
- src/ExpressionParser.php, where i'm not confident enough about the best return types (AbstractExpression|null works almost everytime, but lack some precision)
- extra directory
- tests directory
I'm happy to let them to someone else.... this was less fun than I expected 😅
Commits
-------
82be13429c Add return type annotations on Twig 3 to prepare Twig 4
2025-01-24 11:33:02 +01:00
Simon André
82be13429c
Add return type annotations on Twig 3 to prepare Twig 4
2025-01-24 11:32:59 +01:00
Fabien Potencier
a998723b70
Fix constant() behavior when used with ??
2025-01-14 17:55:21 +01:00
Fabien Potencier
0da899d911
Use get_debug_type() everywhere
2024-09-29 18:08:29 +02:00
Fabien Potencier
8b278986b8
Deprecate using Node directly, introduce EmptyNode and Nodes
2024-09-27 07:42:41 +02:00
Ruud Kamphuis
ba6e856d92
Set IteratorAggregate generics for Node
...
This will help PHPStan and Psalm to understand what happens when iterating over a Node.
2024-09-13 15:04:20 +02:00
Fabien Potencier
2ae0c0d38c
Fix CS
2024-09-06 12:33:38 +02:00
Fabien Potencier
5fca700cbd
Deprecate the fact that the extends and use tags are always allowed in a sandboxed template
2024-08-28 13:40:53 +02:00
Fabien Potencier
41459e0ddb
Fix CS
2024-08-27 13:18:23 +02:00
Fabien Potencier
157d36ae43
Update Node::__toString() to include the node tag if set
2024-08-24 17:28:38 +02:00
Fabien Potencier
1ee4210ba9
Deprecate node names that are not strings or integers
2024-08-23 22:35:24 +02:00
Fabien Potencier
675cb2d141
Fix CS
2024-08-18 19:25:19 +02:00
Fabien Potencier
b431ecad3a
Make Node::__toString() more readable
2024-08-15 20:18:30 +02:00
Fabien Potencier
18894cf91e
Add the possibility to deprecate attributes and nodes on Node
2024-08-08 14:48:20 +02:00
Fabien Potencier
f5e10e10f1
Fix CS
2024-08-07 19:34:09 +02:00
Fabien Potencier
fc64472145
Fix dumping callables on Node::__toString()
2024-08-04 16:35:01 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Daniel Penning
350670a321
synchronize sourceContext
2024-04-27 10:45:41 +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
Jérôme Tamarelle
6d715e2002
Remove unused variables and unreachable code
2023-10-08 21:18:06 +02:00
Fabien Potencier
d9ac797190
Merge branch '2.x' into 3.x
...
* 2.x:
Twig2 PHP 8.1 beta compatibility
2021-07-29 09:09:30 +02:00
Alex Pott
98c2233e47
Twig2 PHP 8.1 beta compatibility
2021-07-28 09:49:43 +01:00
Fabien Potencier
2dd1d909b9
Fix CS
2021-05-12 09:37:17 +02:00
Fabien Potencier
b0863c559c
Merge branch '2.x' into 3.x
...
* 2.x:
Add some return types
remove the C extension
Fix length filter doc
2021-02-02 16:25:52 +01:00
Fabien Potencier
5a60e72afa
Merge branch '1.x' into 2.x
...
* 1.x:
Add some return types
remove the C extension
Fix length filter doc
2021-02-02 16:25:09 +01:00
Nicolas Grekas
50d032c4df
Add some return types
2021-02-02 16:16:41 +01:00
Fabien Potencier
c83ede7fcd
Merge branch '2.x' into 3.x
...
* 2.x:
Fix CS
Fix CS
2020-06-22 08:17:05 +02:00
Fabien Potencier
c38f96318b
Fix CS
2020-06-22 08:15:56 +02:00
Fabien Potencier
c2019904bb
Merge branch '1.x' into 2.x
...
* 1.x:
Fix CS
2020-06-22 08:13:34 +02:00
Fabien Potencier
e99363231b
Fix CS
2020-06-22 08:11:03 +02:00
Nicolas Grekas
ac0f512553
[3.0] remove the most blocking return types
2019-09-20 15:04:28 +02:00
Fabien Potencier
44f02b2242
fixed PHP 7.4 support
2019-05-14 11:44:36 +02:00
Fabien Potencier
69d4060de8
Merge branch '2.x' into 3.x
...
* 2.x:
fixed deprecation under PHP 7.4
fixed PHP 7.4 support
added PHP 7.4 in Travis config
2019-05-14 08:47:41 +02:00
Fabien Potencier
2efd1c5515
Merge branch '1.x' into 2.x
...
* 1.x:
fixed deprecation under PHP 7.4
fixed PHP 7.4 support
added PHP 7.4 in Travis config
2019-05-14 08:46:40 +02:00
Fabien Potencier
f958bd1e86
fixed deprecation under PHP 7.4
2019-05-14 08:40:21 +02:00
Fabien Potencier
54cec4e3b8
added type hints
2019-04-26 12:01:21 +02:00
Fabien Potencier
147c95ff46
removed Node::setTemplateName()
2019-04-23 18:16:41 +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
701d8af675
fixed compat with NodeInterface
2019-04-12 12:39:38 +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
9de6b325e9
feature #2935 Add missing hints in some runtime exceptions (fabpot)
...
This PR was squashed before being merged into the 1.x branch (closes #2935 ).
Discussion
----------
Add missing hints in some runtime exceptions
Commits
-------
094df799 added more tests
d4db9153 added missing hints in some runtime exceptions
2019-04-12 11:47:47 +02:00
Fabien Potencier
d4db91535d
added missing hints in some runtime exceptions
2019-04-12 10:29:05 +02:00
Fabien Potencier
ed9f14db9b
Merge branch '1.x' into 2.x
...
* 1.x:
removed obsolete comment
2019-04-12 09:39:36 +02:00
Fabien Potencier
6f7342e8cb
removed obsolete comment
2019-04-12 09:36:44 +02:00
Fabien Potencier
1dead73882
added some type hints on constructors
2019-03-16 15:26:39 +01:00
Fabien Potencier
1d10d05775
Merge branch '1.x' into 2.x
...
* 1.x:
fixed CS
force loading class aliases used in typehints
bumped version to 1.38.1-DEV
prepared the 1.38.0 release
2019-03-12 16:40:19 +01:00