Commit Graph

43 Commits

Author SHA1 Message Date
Fabien Potencier b8e6b314b3 Merge branch '3.x' into 4.x
* 3.x:
  fix documentation typos for singular filter arguments
  Add getOperatorTokens() to ExpressionParserInterface to separate operator token registration from parser identity
  Ensure filters/attributes aren't mistaken for operators
2026-02-25 09:40:35 +01:00
Fabien Potencier e5eb95d0d7 Add getOperatorTokens() to ExpressionParserInterface to separate operator token registration from parser identity 2026-02-24 21:13:06 +01:00
brandonkelly a9ac993938 Ensure filters/attributes aren't mistaken for operators 2026-02-24 21:10:18 +01: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 50cdb7bf4a Remove usage of @dataProvider 2025-02-26 22:01:08 +01:00
Fabien Potencier 9bccdf438d Merge branch '3.x' into 4.x
* 3.x:
  Add a proper prefix spread operator
  Avoid storing expression parser instances in Node attributes
2025-02-14 12:51:14 +01:00
Fabien Potencier 3964aeba78 Add a proper prefix spread operator 2025-02-14 11:45:39 +01:00
Fabien Potencier c142a3268e Merge branch '3.x' into 4.x
* 3.x:
  Fix CHANGELOG
  Fix support for ignoring syntax erros in an undefined handler in guard
  Add missing CHANGELOG
  Fix timezone conversion on strings
  Use correct lineno for ForElseNode
  Add support for registered undefined element callbacks in tests
  Add UnaryInterface
  Add BinaryInterface
  Reimplement the cache tag in an adhoc way
  Fix CS
  Fix wrong array index
  Fix wrong array index
  Bump min PHP version to 8.1
  Add even more tests
  Add some tests on balanced brackets
  Bump version
  Prepare the 3.19.0 release
  Added configuration for commonmark use in twig-extra-bundle.
2025-02-09 18:23:27 +01:00
Fabien Potencier e48abfe47c Add even more tests 2025-01-31 19:03:58 +01:00
Fabien Potencier 3b605c4180 Add some tests on balanced brackets 2025-01-30 13:38:40 +01:00
Fabien Potencier d564048b9c Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
  Fix Token::__toString()
  fix intl-extra tests
  add missing parentheses to deprecation message
  Deprecate Token::getType()
2025-01-26 11:56:31 +01:00
Fabien Potencier ade8bce516 Deprecate Token::getType() 2025-01-24 15:48:04 +01:00
Fabien Potencier 196c9dcf85 minor #4472 [Twig 4] Add PHPUnit as dev dependency (ruudk)
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

[Twig 4] Add PHPUnit as dev dependency

This makes it easier to run the tests locally.

I understand we didn't do this previously (Twig 3) because of `symfony/simple-phpunit`. But that is now removed in Twig 4, so maybe we can do this as well?

Commits
-------

c352a8d283 [Twig 4] Add PHPUnit as dev dependency
2024-12-01 10:29:11 +01:00
Ruud Kamphuis c352a8d283 [Twig 4] Add PHPUnit as dev dependency 2024-12-01 10:29:08 +01:00
Fabien Potencier cf105b566a Merge branch '3.x' into 4.x
* 3.x:
  Fix CS
2024-11-30 09:43:08 +01:00
Fabien Potencier 14fc89ebea Fix CS 2024-11-30 09:42:13 +01:00
Fabien Potencier ed1b44470f Improve deprecation messages 2024-10-11 08:16:49 +02:00
Fabien Potencier 0c6bd47d6b Merge branch '3.x' into 4.x
* 3.x:
  Deprecate using Node directly, introduce EmptyNode and Nodes
  Add support for inline comments
  Update plural.rst: Fixing(?) broken links
  Fix CS
  Add support for accessing class constants with the dot operator
  Fix getting a property on an object casted to an array
  Replace strtr() by strtolower()
  Improve escape deprecation message
  Remove useless assign in compiled code
  Add fixture filename as key
  Be more precise about double-escaping
  Fix template name in error for an unknown dynamic extends called from an include
2024-09-27 07:59:52 +02:00
Fabien Potencier d9d8bb0df3 Add support for inline comments 2024-09-27 07:32:09 +02:00
Ruud Kamphuis 7256713c86 Improve escape deprecation message 2024-09-26 15:09:41 +02:00
Fabien Potencier 995e7c2270 Fix CS 2024-09-09 08:49:09 +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
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
Ruud Kamphuis 53c24bfc33 Do not hide unnecessary escape characters 2024-08-21 19:42:26 +02:00
Ruud Kamphuis 90107929da Improve deprecation message
See https://github.com/twigphp/Twig/pull/4199#discussion_r1723456834
2024-08-21 19:36:27 +02:00
Fabien Potencier 302971f34e Fix CS 2024-08-20 18:10:26 +02:00
Fabien Potencier 675cb2d141 Fix CS 2024-08-18 19:25:19 +02:00
Ruud Kamphuis c6656cf5d0 Deprecate unnecessary escape characters
See #4123 #2712

This allows to change the implementation in v4 so that we no longer have to escape backslashes.
2024-08-11 16:21:05 +02:00
Fabien Potencier 38250b91ca Add more tests to the Lexer 2024-08-10 12:17:25 +02:00
Fabien Potencier e4e95f5b86 Replace template loader mocks by ArrayLoader 2024-07-24 08:27:23 +02:00
Fabien Potencier ccc20cbd1b Fix a warning 2024-04-24 08:06:10 +02:00
Ryan Weaver ba4fe3ba34 Adding support for the ...spread operator on arrays and hashes 2023-07-20 16:08:57 +02:00
Fabien Potencier 656c295ed9 Merge branch '1.x' into 2.x
* 1.x:
  removed usage of getmockBuilder() when not needed
2019-08-08 13:33:07 +02:00
Fabien Potencier 5861a539e4 removed usage of getmockBuilder() when not needed 2019-08-08 11:59:51 +02:00
Fabien Potencier 5ebcecf24b Fix PHPUnit deprecations 2019-08-08 11:03:05 +02:00
Fabien Potencier c829dafd75 Merge branch '1.x' into 2.x
* 1.x:
  Update to PhpUnitBridge and fix deprecations
2019-08-08 10:19:01 +02:00
Jérémy Derussé b776e41f5a Update to PhpUnitBridge and fix deprecations 2019-08-08 09:39:49 +02:00
Fabien Potencier 1e3bb75010 moved test under tests/ 2019-06-30 14:51:54 +02:00
Fabien Potencier 22a1317249 moved tests under tests/ 2019-06-30 14:48:27 +02:00