This PR was merged into the 3.x branch.
Discussion
----------
Simplify code when using `ob_*` functions
And fixed an edge case (see the modified test).
Commits
-------
0b9e30e3 Simplify code
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Simplify sandbox tests
This allows to remove some unneeded assertions and fix static analysis checks.
Commits
-------
bc22e38c Fix bad merge
e6a98a00 Fix test without any assertions
fca89954 Simplify tests
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
Add SourcePolicyInterface to selectively enable the Sandbox based on a template's Source
This is needed to patch some downstream vulnerabilities which I won't describe here.
I wrote `@fabpot` an email about this with more details a few weeks ago.
Generally the Sandbox can be enabled for a given template in either of two ways:
* Globally
* Including the template from another template in which we use the sandbox tag or parameter
This pull request adds a third way
* Using a SourcePolicy to selectively sandbox templates based on their Source object
Commits
-------
a18da161 Add SourcePolicyInterface to selectively enable the Sandbox based on a template's Source
This PR was merged into the 4.x branch.
Discussion
----------
Add type hints to private properties
Commits
-------
35640b6d Add type hints to private properties
* 3.x:
Fix CS
Move functions for CoreExtension
Move functions for EscaperExtension
Move functions for StringLoaderExtension
Move functions for DebugExtension
Move functions for MarkdownExtension
Move functions for InkyExtension
Move functions for CssInlinerExtension
Move functions for HtmlExtension
Deprecate internal extension functions in favor of methods on the extension classes
Tweak deprecated docs
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Deprecate internal extension functions in favor of methods on the extension classes
~~PoC on a simple extension for now.~~
Commits
-------
aa7c454e Fix CS
54d34b96 Move functions for CoreExtension
72071e8e Move functions for EscaperExtension
196e91dd Move functions for StringLoaderExtension
d4d01603 Move functions for DebugExtension
69a89e0e Move functions for MarkdownExtension
e07e9b5b Move functions for InkyExtension
bff189f1 Move functions for CssInlinerExtension
6a18cda5 Move functions for HtmlExtension
16abb69d Deprecate internal extension functions in favor of methods on the extension classes
This PR was merged into the 4.x branch.
Discussion
----------
Remove usage of isset before array_key_exists as performance is not an issue anymore
Commits
-------
c8d6df7e Remove usage of isset before array_key_exists as performance is not an issue anymore
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Simplify generated code by using named arguments
Commits
-------
bce22e4c Use named arguments
a64561b4 Simplify code
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Use PHP 8 features
Commits
-------
be67e969 Use str_* when possible
0668be9e Use arrow function
06d9fc6a Use is_countable()
89d37cd5 Use get_debug_type()
308aa5ba Remove usage of list()
a42eba63 Use match instead of switch
fed8dd10 Use ::class
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Remove obsolete code
Commits
-------
b9cf29d5 Remove obsolete code
583d7b2d Remove hack to inline throwing an exception
3d5ad9ac Remove obsolete code
3472ae12 Simplify code