Fabien Potencier
9e6e700f96
minor #3509 Some code style fixes (dionisvl)
...
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Some code style fixes
Fixes that:
- Type cast is unnecessary
- Unnecessary curly braces syntax for variable
- Operations priority might differ that except
Commits
-------
17c6371f Some code style fixes
2021-05-14 10:26:10 +02:00
Den
17c6371fb5
Some code style fixes
2021-05-14 10:26:05 +02:00
Fabien Potencier
fcbaa669ab
Fix CS
2021-05-12 09:47:40 +02:00
Fabien Potencier
ca3bb5188c
Mark built-in node visitors as @internal
2020-11-30 09:16:20 +01:00
Youssef Benhssaien
d8a4113a74
Remove is_int since typehint exists
2020-11-11 07:27:35 +01:00
Fabien Potencier
1fb577363d
Merge branch '2.x' into 3.x
...
* 2.x:
Fix sandbox support when using include(template_from_string())
Add test to verify that filter is not working when template_from_string is used.
In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
2020-08-23 17:55:24 +02:00
Fabien Potencier
ab6695b580
Merge branch '1.x' into 2.x
...
* 1.x:
Fix sandbox support when using include(template_from_string())
Add test to verify that filter is not working when template_from_string is used.
In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
2020-08-23 17:55:14 +02:00
Fabien Potencier
c7be1bb3c4
Fix sandbox support when using include(template_from_string())
2020-08-23 17:48:34 +02:00
Nicolas Grekas
551a6c1cb8
[3] Fix leftover
2019-09-20 15:26:44 +02:00
Nicolas Grekas
ac0f512553
[3.0] remove the most blocking return types
2019-09-20 15:04:28 +02:00
Fabien Potencier
db41300124
Merge branch '2.x' into 3.x
...
* 2.x:
fixed macro auto-import when a template contains only macros
fixed end of constructor node logic
bumped version to 2.11.3-DEV
prepared the 2.11.2 release
fixed macro auto-import
fix CS
fix CS
bumped version to 2.12
2019-06-08 09:01:50 +02:00
Fabien Potencier
197528f45c
fixed macro auto-import when a template contains only macros
2019-06-06 10:15:08 +02:00
Fabien Potencier
1a3dc0aab0
Merge branch '1.x' into 2.x
...
* 1.x:
fixed end of constructor node logic
2019-06-06 10:08:52 +02:00
Fabien Potencier
8a29b42df9
fixed end of constructor node logic
2019-06-06 10:03:25 +02:00
Fabien Potencier
57c51301c9
fixed macro auto-import
2019-06-05 13:11:42 +02:00
Fabien Potencier
c7df3a20b9
removed obsolete code
2019-05-22 16:03:56 +02:00
Fabien Potencier
53b87622f3
Merge branch '2.x' into 3.x
...
* 2.x:
tweaked docs
Add information for when `filter` filter was added in 2.x branch
moved tests
deprecated CoreExtension::setEscaper() and CoreExtension::getEscaper() in favor of the same methods on EscaperExtension
tweaked docs
doc(filter): add example of `filter` without `for` use
updated CHANGELOG
Local macros auto-import
fixed CS
updated docs for macros
simplified code
tweaked docs for macros
added a better error message for unknown macros
2019-05-22 16:00:25 +02:00
Fabien Potencier
3fcbc44205
Local macros auto-import
2019-05-18 15:49:29 +02:00
Fabien Potencier
ee45e20955
fixed phpdocs
2019-04-29 15:34:41 +02:00
Fabien Potencier
54cec4e3b8
added type hints
2019-04-26 12:01:21 +02:00
Fabien Potencier
3ada819420
removed deprecated feature
2019-04-26 11:49:42 +02:00
Fabien Potencier
090eaf8f20
Merge branch '2.x' into 3.x
...
* 2.x:
added missing items in the CHANGELOG
Add Parser typehint
allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
2019-04-26 11:46:06 +02:00
Fabien Potencier
aada6833ca
Merge branch '1.x' into 2.x
...
* 1.x:
Add Parser typehint
allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
2019-04-26 11:39:30 +02:00
Fabien Potencier
f297b52f36
allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
2019-04-25 10:43:59 +02:00
Fabien Potencier
5adb9ea867
removed die()
2019-04-24 19:34:40 +02:00
Fabien Potencier
619bc12f62
added the apply tag
2019-04-24 17:20:47 +02:00
Fabien Potencier
592ab0376e
feature #2965 Change false to null to allow for type hinting (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Change false to null to allow for type hinting
Commits
-------
75333805 changed false to null to allow for type hinting
2019-04-23 18:34:47 +02:00
Fabien Potencier
12972d0032
removed obsolete OPTIMIZE_VAR_ACCESS const
2019-04-23 18:22:46 +02:00
Fabien Potencier
7533380596
changed false to null to allow for type hinting
2019-04-23 17:43:53 +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
3d13c582ee
Merge branch '1.x' into 2.x
...
* 1.x:
fixed EscaperNodeVisitor
fixed CS
2019-04-16 19:10:25 +02:00
Fabien Potencier
a3fc63923a
fixed EscaperNodeVisitor
2019-04-16 19:05:39 +02:00
Fabien Potencier
253f3e8e88
Merge branch '1.x' into 2.x
...
* 1.x:
made escaping on ternary expressions more fine-grained
2019-04-11 21:10:58 +02:00
Fabien Potencier
dfa9411310
made escaping on ternary expressions more fine-grained
2019-04-11 17:26:15 +02:00
Fabien Potencier
1dead73882
added some type hints on constructors
2019-03-16 15:26:39 +01:00
Fabien Potencier
241f95cb25
added some type hints on private methods
2019-03-16 13:24:59 +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
Fabien Potencier
fb19ea7dde
fixed CS
2019-03-12 16:38:19 +01:00
Christophe Coevoet
65c0559125
force loading class aliases used in typehints
2019-03-12 15:24:00 +01:00
Fabien Potencier
ad7d27425d
Merge branch '1.x' into 2.x
...
* 1.x:
fixed security issue in the sandbox
2019-03-12 13:36:16 +01:00
Fabien Potencier
eac5422956
fixed security issue in the sandbox
2019-03-12 11:09:54 +01: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
cbb8f6edc1
tweaked sandbox generated code
2019-03-11 08:53:51 +01:00
Fabien Potencier
71e8e981c4
Merge branch '1.x' into 2.x
...
* 1.x:
fixed more un-namespaced classes
2019-03-06 18:10:47 +01:00
Fabien Potencier
9b8c3a2344
fixed more un-namespaced classes
2019-03-06 18:10:39 +01:00
Fabien Potencier
47b5238c67
Merge branch '1.x' into 2.x
...
* 1.x:
moved some more PSR0 class names to namespaced ones
2019-03-06 14:02:19 +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
Fabien Potencier
e92a13aae9
replaced require with class_exists
2017-06-05 17:04:19 -07:00