Commit Graph

67 Commits

Author SHA1 Message Date
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
Fabien Potencier fe7bac8989 Merge branch '3.x' into 4.x
* 3.x:
  Migrate NodeTestCase to static data providers
2024-09-03 14:51:02 +02:00
Alexander M. Turek f555a33caf Migrate NodeTestCase to static data providers 2024-09-03 13:51:42 +02:00
Fabien Potencier cde9e7dcd4 Use proper node names when they are integers 2024-08-26 09:59:54 +02:00
Fabien Potencier 31037d0e51 Refactor code 2024-08-20 15:39:54 +02:00
Fabien Potencier d051ccde20 Merge branch '3.x' into 4.x
* 3.x:
  Throw a SyntaxError exception at compile time when a Twig callable has not the minimum number of required arguments
2024-08-16 08:12:37 +02:00
Fabien Potencier 0823d23488 Throw a SyntaxError exception at compile time when a Twig callable has not the minimum number of required arguments 2024-08-15 23:00:02 +02:00
Fabien Potencier a30d07eeb4 Remove obsolete code 2024-08-15 20:59:30 +02:00
Fabien Potencier 4bade436a4 Merge branch '3.x' into 4.x
* 3.x:
  Extract a new CallableArgumentsExtractor class
  Make Node::__toString() more readable
2024-08-15 20:57:57 +02:00
Fabien Potencier e1705f8831 Extract a new CallableArgumentsExtractor class 2024-08-15 20:37:59 +02:00
Fabien Potencier eaf04e53f0 Remove deprecated code 2024-08-14 23:34:13 +02:00
Fabien Potencier abee6fc583 Merge branch '3.x' into 4.x
* 3.x:
  Move FunctionExpression/FilterExpression/TestExpression attributes from compilation time to parsing time
  Cleanup the implementation of the defined test for constants
2024-08-14 23:07:43 +02:00
Fabien Potencier 3156d8093e Move FunctionExpression/FilterExpression/TestExpression attributes from compilation time to parsing time 2024-08-14 18:45:35 +02:00
Fabien Potencier 91f29731d4 Merge branch '3.x' into 4.x
* 3.x:
  Optimize stripcslashes
  (minor) Prefer `className` over `classname`
  Remove escape
  Deprecate unnecessary escape characters
  Micro-micro optimization
  Simplify tests
2024-08-12 09:28:43 +02:00
Fabien Potencier 8a8f22131c Simplify tests 2024-08-10 18:25:26 +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 b36d9bb7ed Merge branch '3.x' into 4.x
* 3.x:
  Simplify usage of RawFilter
2024-07-28 11:11:24 +02:00
Fabien Potencier 6e55b5f956 Simplify usage of RawFilter 2024-07-28 11:10:04 +02:00
Fabien Potencier 8951b8f73a Remove unneeded PHP version check 2024-07-24 13:08:43 +02:00
Fabien Potencier 6b0f2e78c2 Merge branch '3.x' into 4.x
* 3.x:
  Refactor some tests
2024-07-24 13:03:11 +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 ebcd5034ee Refactor some tests 2024-07-24 08:44:11 +02:00
Fabien Potencier a656293915 minor #4150 Replace template loader mocks by ArrayLoader (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Replace template loader mocks by ArrayLoader

Commits
-------

e4e95f5b Replace template loader mocks by ArrayLoader
2024-07-24 08:31:51 +02:00
Fabien Potencier e4e95f5b86 Replace template loader mocks by ArrayLoader 2024-07-24 08:27:23 +02:00
Fabien Potencier fcb36ec18a Merge branch '3.x' into 4.x
* 3.x:
  Add support for first class callables
2024-07-14 13:59:52 +02:00
Fabien Potencier d2eab12e70 Add support for first class callables 2024-07-14 13:56:14 +02:00
Fabien Potencier c250afdda0 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:27:51 +02:00
Fabien Potencier b63bde3063 Optimize sprintf() calls for PHP 8.4 2024-06-21 08:16:55 +02:00
Fabien Potencier 3046c8cc9b minor #4076 Remove obsolete code (setAccessible(true)) (fabpot)
This PR was merged into the 4.x branch.

Discussion
----------

Remove obsolete code (setAccessible(true))

Commits
-------

85760a17 Remove obsolete code (setAccessible(true))
2024-05-05 09:15:43 +02:00
Fabien Potencier 85760a17fa Remove obsolete code (setAccessible(true)) 2024-05-05 09:14:07 +02:00
Fabien Potencier e5431b1361 Modernize code 2024-05-04 18:35:53 +02:00
Fabien Potencier 3d99ed8bdb Merge branch '3.x' into 4.x
* 3.x:
  Move some static extension methods to non-static
  Add needs_charset option for filters and functions
  Fix method call
  Rename some internal methods
2024-05-01 13:58:23 +02:00
Fabien Potencier 283475b102 Move some static extension methods to non-static 2024-05-01 13:48:35 +02:00
Fabien Potencier c63f695e8a Add needs_charset option for filters and functions 2024-05-01 13:12:48 +02:00
Fabien Potencier 16acdf69fe Rename some internal methods 2024-05-01 10:19:22 +02:00
Fabien Potencier 5fdb1ee11a Merge branch '3.x' into 4.x
* 3.x:
  Fix a @return type hint
  Fix CS
  Fix a test
  Fix type
  Simplify sandbox code
  Get rid of weird code
  [html-extra] filter classes
  Fix some inconsistencies
2024-04-30 15:46:54 +02:00
Fabien Potencier 5148d10515 Fix some inconsistencies 2024-04-28 13:15:26 +02:00
Fabien Potencier f9871531b7 Merge branch '3.x' into 4.x
* 3.x:
  Fxi some errors reported by phpstan
2024-02-05 19:00:15 +01:00
Fabien Potencier 2b2ac80d34 Fxi some errors reported by phpstan 2024-02-05 17:48:36 +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 c8d6df7eb2 Remove usage of isset before array_key_exists as performance is not an issue anymore 2023-12-09 17:24:12 +01:00
Fabien Potencier bce22e4c32 Use named arguments 2023-12-09 17:18:55 +01:00
Fabien Potencier fed8dd102b Use ::class 2023-12-09 15:33:38 +01:00
Fabien Potencier b9cf29d53d Remove obsolete code 2023-12-09 14:56:21 +01:00
Fabien Potencier 583d7b2d2c Remove hack to inline throwing an exception 2023-12-09 14:52:04 +01:00
Ryan Weaver ba4fe3ba34 Adding support for the ...spread operator on arrays and hashes 2023-07-20 16:08:57 +02:00