Commit Graph

6947 Commits

Author SHA1 Message Date
Fabien Potencier 4d3ee19d22 bug #4459 Fix the exception message to match the expected one for not ready nodes (stof)
This PR was merged into the 3.x branch.

Discussion
----------

Fix the exception message to match the expected one for not ready nodes

This fixes the tests that got broken in https://github.com/twigphp/Twig/pull/4446 because that PR updated the expected message to include the FQCN of the attribute for both the deprecation and the exception, but forgot to use the FQCN in the actual exception.

Commits
-------

b15ba0f963 Fix the exception message to match the expected one for not ready nodes
2024-11-20 17:22:27 +01:00
Christophe Coevoet b15ba0f963 Fix the exception message to match the expected one for not ready nodes 2024-11-20 13:36:08 +01:00
Fabien Potencier fd4d580654 minor #4456 Add missing import (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Add missing import

Hi `@fabpot`, the phpdoc was updated in https://github.com/twigphp/Twig/pull/4367 but the import was forgotten.
This leads to an error with all static analysis tools when implementing ExtensionInterface.

If possible a patch version would be helpful.

(Tests are already failing on 3.x)

Commits
-------

51d10ba480 Add missing import
2024-11-20 10:37:29 +01:00
Vincent Langlet 51d10ba480 Add missing import 2024-11-20 10:18:47 +01:00
Fabien Potencier 709fc6abce minor #4454 Add BC break note in CHANGELOG for 3.15 (nicolas-grekas)
This PR was merged into the 3.x branch.

Discussion
----------

Add BC break note in CHANGELOG for 3.15

Let's add this hint for people affected by the behavior change, as in https://github.com/twigphp/Twig/issues/4453

Commits
-------

37d99c2a59 Add BC break note in CHANGELOG for 3.15
2024-11-19 15:11:18 +01:00
Nicolas Grekas 37d99c2a59 Add BC break note in CHANGELOG for 3.15 2024-11-19 14:24:04 +01:00
Fabien Potencier 3a438ffb9b Fix CHANGELOG 2024-11-18 09:23:06 +01:00
Fabien Potencier f544879b31 minor #4451 Update CHANGELOG (andreybolonin)
This PR was merged into the 3.x branch.

Discussion
----------

Update CHANGELOG

Commits
-------

fee03389c8 Update CHANGELOG
2024-11-18 09:22:14 +01:00
Andrey Bolonin fee03389c8 Update CHANGELOG 2024-11-18 10:56:02 +03:00
Fabien Potencier 8f3f8df9cd Bump version 2024-11-17 17:00:39 +01:00
Fabien Potencier 2d5b3964cc Prepare the 3.15.0 release v3.15.0 2024-11-17 16:59:19 +01:00
Fabien Potencier 41a7988cef Simplify code 2024-11-17 16:45:52 +01:00
Fabien Potencier 065a45f54a Fix CHANGELOG 2024-11-17 16:31:33 +01:00
Fabien Potencier c5d0d593d2 minor #4446 Improve YieldReady support docs (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Improve YieldReady support docs

Refs https://github.com/twigphp/Twig/discussions/4428

Commits
-------

9d9c9d81e9 Improve YieldReady support docs
2024-11-12 08:12:30 +01:00
Fabien Potencier 9d9c9d81e9 Improve YieldReady support docs 2024-11-11 09:38:36 +01:00
Fabien Potencier 0ca3815c5c minor #4444 Fix some typos in html_cva docs (jdreesen)
This PR was merged into the 3.x branch.

Discussion
----------

Fix some typos in `html_cva` docs

Commits
-------

151b05b2bb Fix some typos in `html_cva` docs
2024-11-08 20:13:25 +01:00
Jacob Dreesen 151b05b2bb Fix some typos in html_cva docs 2024-11-08 19:22:16 +01:00
Fabien Potencier 5b380e5b3b minor #4435 Fix wrong type for cycle position (ruudk)
This PR was merged into the 3.x branch.

Discussion
----------

Fix wrong type for cycle position

It also accepts 0, which is not a positive int.

Commits
-------

c78499bda9 Fix wrong type for cycle position
2024-11-07 18:02:41 +01:00
Fabien Potencier 8f1ae67b73 minor #4421 Add type for join method (ruudk)
This PR was merged into the 3.x branch.

Discussion
----------

Add type for join method

Looking at the code, this method is very forgiving in what it accepts.

This helps PHPStan to not complain when something other than an array is passed.

Did I miss other types?

/cc `@stof`

Commits
-------

226f0ff0dd Add type for join method
2024-11-07 18:02:05 +01:00
Fabien Potencier 0232d389ca minor #4425 Rely on reflection to access null properties (nicolas-grekas)
This PR was merged into the 3.x branch.

Discussion
----------

Rely on reflection to access null properties

Benchmark like https://gist.github.com/arnaud-lb/c4235164fb41e11672aa670da8fa4fc7 (which were done for another use case but is still relevant here) prove that using reflection instead of array-casts is significantly faster for accessing properties.

Checking for dynamic properties is done with property_exists.

Commits
-------

5cd1ff1977 Rely on reflection to access null properties
2024-11-07 13:39:46 +01:00
Fabien Potencier a362ee312d Merge branch '3.14.x' into 3.x
* 3.14.x:
  Prepare the 3.14.2 release
  Prepare the 3.11.3 release
  Update CHANGELOG
2024-11-07 13:37:21 +01:00
Fabien Potencier 0b6f9d8370 Prepare the 3.14.2 release v3.14.2 2024-11-07 13:36:22 +01:00
Fabien Potencier fe9e0d00c1 Merge branch '3.11.x' into 3.14.x
* 3.11.x:
  Prepare the 3.11.3 release
  Update CHANGELOG
2024-11-07 13:35:53 +01:00
Fabien Potencier 3b06600ff3 Prepare the 3.11.3 release v3.11.3 2024-11-07 13:34:41 +01:00
Fabien Potencier dbd734a553 Update CHANGELOG 2024-11-07 13:34:21 +01:00
Nicolas Grekas 5cd1ff1977 Rely on reflection to access null properties 2024-11-07 11:23:04 +01:00
Nicolas Grekas d72ae2447e Merge branch '3.14.x' into 3.x
* 3.14.x:
  Improve detection of recursion
  Fix recursion when arrays contain self-references in sandboxed mode
  Fix code
  Prepare the 3.11.2 release
  Update CHANGELOG
  Sandbox ArrayAccess and do sandbox checks before isset() checks
  Fix sandbox handling for __toString()
  Prepare the 3.14.1 release
  Update CHANGELOG
  Sandbox ArrayAccess and do sandbox checks before isset() checks
  Fix sandbox handling for __toString()
  Prepare the 3.11.1 release
  Fix a security issue when an included sandboxed template has been loaded before without the sandbox context
2024-11-07 11:17:57 +01:00
Nicolas Grekas 83a21d31e5 Merge branch '3.11.x' into 3.14.x
* 3.11.x:
  Improve detection of recursion
  Fix recursion when arrays contain self-references in sandboxed mode
  Fix code
  Prepare the 3.11.2 release
  Update CHANGELOG
  Sandbox ArrayAccess and do sandbox checks before isset() checks
  Fix sandbox handling for __toString()
  Prepare the 3.11.1 release
  Fix a security issue when an included sandboxed template has been loaded before without the sandbox context
2024-11-07 11:11:36 +01:00
Nicolas Grekas d3fc074171 Improve detection of recursion 2024-11-07 10:15:07 +01:00
Lee Rowlands a0f775683d Fix recursion when arrays contain self-references in sandboxed mode 2024-11-07 09:42:22 +01:00
Fabien Potencier 32e99c263d Remove obsolete code 2024-11-06 21:45:08 +01:00
Fabien Potencier cf5d4e3bc8 Update CHANGELOG 2024-11-06 21:41:52 +01:00
Nicolas Grekas b957e5a44c Sandbox ArrayAccess and do sandbox checks before isset() checks 2024-11-06 21:41:25 +01:00
Fabien Potencier d4a302681b Fix sandbox handling for __toString() 2024-11-06 21:35:53 +01:00
Fabien Potencier 5b580ec188 Fix code v3.11.2 2024-11-06 19:50:16 +01:00
Fabien Potencier 94612e7602 Prepare the 3.11.2 release 2024-11-06 19:48:59 +01:00
Fabien Potencier 8b5278227b Update CHANGELOG 2024-11-06 19:48:59 +01:00
Nicolas Grekas ec39a9dccc Sandbox ArrayAccess and do sandbox checks before isset() checks 2024-11-06 19:48:59 +01:00
Fabien Potencier cafc608ece Fix sandbox handling for __toString() 2024-11-06 19:27:48 +01:00
Fabien Potencier f405356d20 Prepare the 3.14.1 release v3.14.1 2024-11-06 19:17:38 +01:00
Fabien Potencier 793e8358fb Update CHANGELOG 2024-11-06 19:16:07 +01:00
Nicolas Grekas 831c148e78 Sandbox ArrayAccess and do sandbox checks before isset() checks 2024-11-06 19:16:07 +01:00
Fabien Potencier 2bb8c2460a Fix sandbox handling for __toString() 2024-11-05 17:54:37 +01:00
Ruud Kamphuis c78499bda9 Fix wrong type for cycle position
It also accepts 0, which is not a positive int.
2024-11-04 11:31:38 +01:00
Fabien Potencier 98e7f7141a minor #4432 Fix mistake in docs for keys filter (ruudk)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix mistake in docs for `keys` filter

Commits
-------

deb37c30c4 Fix mistake in docs for `keys` filter
2024-11-04 08:50:22 +01:00
Ruud Kamphuis deb37c30c4 Fix mistake in docs for keys filter 2024-11-04 08:50:19 +01:00
Fabien Potencier b99d73c927 Update CHANGELOG 2024-11-03 15:09:58 +01:00
Fabien Potencier 8d3bad4c50 feature #4426 [String] Add SpanishInflector support for singular and plural (dennistobar)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

[String] Add SpanishInflector support for singular and plural

This PR implement a new Inflector using Spanish (ISO Code = es) implemented in this PR symfony/symfony#58228.

* I sort the list of supported Inflectors to follow some rule (alphabet?)
* I just change invalid test from "it" to "qq" (qq doesn't exist as valid ISO code, but it is italian... don't be evil if anyone want to create the italian inflector 😅 )

Commits
-------

290a923a42 [String] Add SpanishInflector support for singular and plural
2024-11-03 15:08:50 +01:00
Dennis Tobar 290a923a42 [String] Add SpanishInflector support for singular and plural 2024-11-03 15:08:48 +01:00
Fabien Potencier e062a17cc5 minor #4430 Add find to Filters docs (ruudk)
This PR was merged into the 3.x branch.

Discussion
----------

Add `find` to `Filters` docs

https://twig.symfony.com/doc/3.x/filters/index.html
https://twig.symfony.com/doc/3.x/filters/find.html

It's missing or I am blind.

Commits
-------

b4ed19b5e1 Add `find` to `Filters` docs
2024-11-03 15:07:52 +01:00