Commit Graph

66 Commits

Author SHA1 Message Date
Fabien Potencier 4ff99377f5 Merge branch '3.x' into 4.x
* 3.x:
  Fix null coalescing operator with imported macros
2026-02-25 10:39:52 +01:00
Fabien Potencier efa004caab Fix null coalescing operator with imported macros 2026-02-25 08:38:54 +01:00
Fabien Potencier 0facb551b0 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2026-02-07 09:12:05 +01:00
Fabien Potencier 861215c507 Fix CS 2026-02-07 09:07:38 +01:00
Fabien Potencier f9d61e8a0d Merge branch '3.x' into 4.x
* 3.x:
  Fix deprecations
  Fix intl-extra tests
  Fix CHANGELOG
2026-01-12 10:15:26 +01:00
Fabien Potencier 8391928896 Fix deprecations 2026-01-12 09:52:14 +01:00
Fabien Potencier 56a7aa4e4f Merge branch '3.x' into 4.x
* 3.x:
  use getShareDir as an indicator of Symfony version
  Add 'invoke' to filters index
  [Core] Fix cycle() with non-countable ArrayAccess+Traversable objects
  Update .gitattributes to exclude phpstan configs
  Bump version
  Prepare the 3.22.1 release
  Update CHANGELOG
  `CoreExtension` : Make error message more readable
  Add caution note for random function usage
  Add throw tag to parse methods
2025-12-05 09:58:08 +01:00
Thomas Cochard 40248e4ca9 CoreExtension : Make error message more readable 2025-11-15 08:57:35 +01:00
Fabien Potencier b03de9de05 Merge branch '3.x' into 4.x
* 3.x:
  Update CHANGELOG
  Fix accessing arrays with stringable objects as key
  Update inky_to_html.rst: Updating link
  Update replace.rst
  [Doc] Tweaks in the escaping article
  Compile 'index' with repr (not string) in EmbedNode
  Introduce registerUndefinedTestCallback
  Fix intl test
  Bump minimum Commonmark requirement
  Support two words test guard
  Bump version
  Improve documentation examples for `enum` and `enum_cases`
  Avoid errors when failing to guess the template info for an error
  Add note to format_datetime explaining how to install required extensions
  Fix compatibility layer
2025-10-29 11:55:46 -04:00
Nicolas Grekas 9ae75d315c Fix accessing arrays with stringable objects as key 2025-10-24 14:19:16 +02:00
Nicolas Grekas c649c1658b Merge branch '3.x' into 4.x
* 3.x:
  CS fixes
  Enable Fabbot as a GHA
2025-07-29 10:27:55 +02:00
Nicolas Grekas 85a4817128 CS fixes 2025-07-29 10:07:07 +02:00
Fabien Potencier ef7ade8ee3 Merge branch '3.x' into 4.x
* 3.x: (30 commits)
  Make {} optional for the types tag
  Remove the note about types mapping argument
  Add a note on the types locality
  Fix CS
  Fix typos in the docs
  Use spl_object_id() instead of spl_object_hash()
  Add `LastModifiedExtensionInterface` and implementation in `AbstractExtension` to track modification of runtime classes
  Bump version
  Optimize NameExpression compilation
  Fix typo in enum twig doc functions
  Remove dead method in ModuleNode
  Bump version
  Prepare the 3.18.0 release
  Add support for `Twig\Markup`
  Fix unary operator precedence change
  Replace Twigfiddle by the new Twig playground
  Fix MacroNode $name argument can be overridden
  Ignore exceptions from undefined handlers when using the guard tag
  [Doc] Update the docs about attribute() function
  Fix doc
  ...
2025-01-10 08:41:31 +01:00
Faizan Akram 0a61801d9a adds support for invoking closures 2024-12-14 20:06:34 +01:00
Fabien Potencier 69f8cf7092 Merge branch '3.x' into 4.x
* 3.x:
  Add missing is_iterable() checks
  Fix tests
  Add quotes on filters/functions in CoreExtension
  Use get_debug_type() everywhere
2024-09-29 18:26:00 +02:00
Fabien Potencier 0da899d911 Use get_debug_type() everywhere 2024-09-29 18:08:29 +02:00
Fabien Potencier 9700212005 Merge branch '3.x' into 4.x
* 3.x:
  Rename a variable for more clarity
  Set IteratorAggregate generics for Node
  Add cross-link
  Let's no deprecate the attribute function yet
  Add more precise types for the registration of safe classes
  Clarify coding standards
  Fix markup
  Fix markup
  Clarify docs for the u filter
  Allow to use a dynamic attribute on the . operator via ()
  Remove most usage of foo/bar/baz in the docs
  Tweak docs
  Add StringCastUnary
2024-09-14 10:51:19 +02:00
Fabien Potencier 333638e8e6 Allow to use a dynamic attribute on the . operator via () 2024-09-12 21:44:45 +02:00
Fabien Potencier fa1c9f0bf9 Merge branch '3.x' into 4.x
* 3.x:
  Remove obsolete code
  Deprecate Environment::mergeGlobals()
  Bump version
  Prepare the 3.13.0 release
  Fix wrong format of `Environment::VERSION_ID` constant
  Fix minor things
  Fix CS
  Fix isset in ForLoopNode
  Fix iterable return type
  Improve exception expectations reliability
2024-09-07 17:03:10 +02:00
Fabien Potencier 2ae0c0d38c Fix CS 2024-09-06 12:33:38 +02:00
Alexandre Daubois 797e490356 Improve exception expectations reliability 2024-09-04 15:22:48 +02:00
Alexander M. Turek f2053bbea0 PHPUnit 11 2024-09-04 12:11:51 +02:00
Fabien Potencier a789eca738 Merge branch '3.x' into 4.x
* 3.x:
  Validate the input of CoreExtension::map()
  Rename AbstractTest to ProfilerTestCase
  Make data providers static
  Prepare IntegrationTestCase for static data providers
2024-09-03 22:20:28 +02:00
Alexander M. Turek 6ddb76bb76 Make data providers static 2024-09-03 16:32:00 +02:00
Fabien Potencier 573ccf0c13 Merge branch '3.x' into 4.x
* 3.x:
  Add more types to Template class and compiled templates
2024-08-30 16:18:52 +02:00
Ruud Kamphuis 7e52a68097 Add more types to Template class and compiled templates 2024-08-30 16:17:55 +02:00
Fabien Potencier 61aa645a30 Merge branch '3.x' into 4.x
* 3.x:
  Fix doc markup
  Add an example on how to iterate over a string
  Remove NodeCaptureInterface from TypesNode
  Use CPP in full code base
  Add types tag
  Bump version
  Bump version
  Prepare the 3.12.0 release
  Fix CS
  Add conditional return types to `ensureTraversable`
  Add return type `isTraitable`
2024-08-30 12:38:56 +02:00
Ruud Kamphuis bb8b9c197c Add return type isTraitable 2024-08-29 10:29:47 +02:00
Fabien Potencier 0131c230c7 Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2024-08-07 19:34:39 +02:00
Fabien Potencier f5e10e10f1 Fix CS 2024-08-07 19:34:09 +02:00
Fabien Potencier 76dcc75982 Merge branch '3.x' into 4.x
* 3.x:
  Replace template loader mocks by ArrayLoader
  [Doc] Fix javascript code-block
2024-07-24 09:53:24 +02:00
Fabien Potencier e4e95f5b86 Replace template loader mocks by ArrayLoader 2024-07-24 08:27:23 +02:00
Fabien Potencier 3236429dc8 Merge branch '3.x' into 4.x
* 3.x:
  Fix typo
  Tweak
  Rename array to sequence
  Rename hash to mapping
2024-06-22 19:42:47 +02:00
Fabien Potencier c44be99a84 Rename array to sequence 2024-06-22 19:37:51 +02:00
Fabien Potencier 67cb9a06fe Merge branch '3.x' into 4.x
* 3.x:
  Update PHPUnit config
  Optimize sprintf() calls for PHP 8.4
2024-06-21 08:27:27 +02:00
Fabien Potencier b63bde3063 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:16:55 +02:00
Fabien Potencier c129040d46 Merge YieldingTemplate and Template 2024-02-05 16:13:35 +01:00
Fabien Potencier d234a60efa Merge branch '3.x' into 4.x
* 3.x:
  Bump actions/cache for CI
  Remove an obsolete comment
  Throws proper Twig exception when using cycle on an empty array
  Add tests when a template doesn't have output nodes
  Optimize TextNodes
  Remove list() usage in code
  Remove usage of list() in favor of []
2024-01-22 18:50:54 +01:00
Fabien Potencier d53509d457 Add tests when a template doesn't have output nodes 2024-01-11 08:19:14 +01:00
Fabien Potencier 13e57cb3fe Remove usage of ReturnTypeWillChange 2023-12-24 11:22:05 +01:00
Fabien Potencier 3d849eab57 Merge branch '3.x' into 4.x
* 3.x:
  Simplify code
2023-12-20 20:48:01 +01:00
Fabien Potencier 0b9e30e3d2 Simplify code 2023-12-20 20:43:49 +01:00
Fabien Potencier ac423430aa Merge branch '3.x' into 4.x
* 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
2023-12-10 20:55:15 +01:00
Fabien Potencier 54d34b969b Move functions for CoreExtension 2023-12-10 20:13:10 +01:00
Fabien Potencier b9cf29d53d Remove obsolete code 2023-12-09 14:56:21 +01:00
Fabien Potencier 5193653ecb Fix CS 2023-10-08 09:05:22 +02:00
Fabien Potencier 464842c41f Merge branch '2.x' into 3.x
* 2.x:
  Add explicit `@return` type next to `#[ReturnTypeWillChange]`
2021-08-11 09:52:24 +02:00
Nicolas Grekas 1d0bab9d63 Add explicit @return type next to #[ReturnTypeWillChange] 2021-08-10 18:49:26 +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