Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add attr function #1

Closed
wants to merge 2,967 commits into from
Closed

add attr function #1

wants to merge 2,967 commits into from

Conversation

mpdude
Copy link
Owner

@mpdude mpdude commented Dec 6, 2023

  • bumped version to 2.0.0-DEV
  • removed deprecated Twig_Filter_* classes
  • removed deprecated Twig_Function_* classes
  • removed deprecated Twig_Test_* classes
  • emptied deprecated interfaces
  • updated CHANGELOG
  • removed deprecated token parser broker
  • removed deprecated Twig_Environment::removeExtension()
  • improved the performance of the filesystem loader
  • removed the ability to register a global variable after the runtime or the extensions have been initialized
  • simplified code
  • simplified code
  • simplified code
  • fixed a unit test as Twig_ExistsLoaderInterface has been merged into Twig_LoaderInterface
  • remove unneeded string cast
  • remove string casts from loader which was done for template reference objects, but this type of parameter is not contracted by the LoaderInterface
  • added missing deprecation notices
  • removed deprecated tests
  • removed deprecated Node::toXml() method
  • udpated the docs for 2.0
  • dropped support for PHP 5.2
  • removed obsolete interfaces
  • removed obsolete Twig_Simple* classes
  • drop support for PHP 5.3 and 5.4
  • removed pre-1.8 autoescape tag syntax, removed true as a valid autoescape strategy
  • replaced some functions by anonymous ones
  • removed usage of call_user_func when possible
  • replaced array() by [] in generated PHP code
  • simplified code with finally
  • removed the Autoloader as Composer provide one
  • updated CHANGELOG
  • removed deprecated Twig_Loader_String class
  • removed obsolete raw tag
  • removed obsolete docs
  • [2.0] unclosed "verbatim" block should be litteraly written
  • remove dead code
  • Add Twig_ExistsLoaderInterface back for 1.x BC layer
  • Update empty.rst
  • fixed CS
  • removed Twig_Environment::clearTemplateCache
  • removed code that people want to overide over and over again
  • removed PHP 5.2 code
  • Fix the profiler node visitor signature for Twig 2.0
  • fixed phpdocs
  • updated phpdoc
  • removed some test hacks
  • moved protected to private
  • moved protected to private (more)
  • Remove reference to String loader in docs
  • added a recipe about rendering a template stored in a string
  • Update copyright year
  • Bugfix/constructor should not have optional loader
  • fixed CS
  • updated CHANGELOG
  • re-added Twig_Simple* classes to provide more compat between 1.x and 2.x
  • fixed obsolete comment
  • removed deprecated _self variable
  • removed deprecated Twig_Template::getEnvironment()
  • simplified code
  • updated CHANGELOG
  • Revert "replaced array() by [] in generated PHP code"
  • fixed some tests
  • simplified code
  • made Twig_Extension_Staging final
  • Remove the reserved macro names
  • simplified code
  • removed an unneeded protected method
  • add callable typehints
  • Revert "removed an unneeded protected method"
  • removed BC break in filesystem loader
  • remove unused private property
  • moved more methods/properties to private
  • fixed built-in loaders to implement Twig_ExistsLoaderInterface
  • readded code lost in master
  • removed deprecated feature
  • removed versionadded tags in docs
  • fixed typo
  • removed deprecated features
  • make datetime handling according to minimum php version
  • fixed bad merge
  • use try-finally for macro compilation
  • fixed CS
  • simplified some code
  • removed Twig_Environment::computeAlternatives, refactored code
  • removed obsolete code
  • removed condition on iconv as it should be always available
  • added the Symfony mbstring polyfill
  • fixed Windows support
  • removed unneeded conditions for a null charset
  • removed useless method
  • simplified code
  • removed deprecated features
  • remove php 5.2 compatibility for filesystemhelper
  • Let PHP convert Twig_Markup to JSON instead of pre-filtering it
  • updated CHANGELOG
  • replaced dirname(FILE) with DIR
  • removed deprecated class
  • reintroduced _self (returns the current template name)
  • fixed 2.0 compat
  • add hasser support to getAttribute()
  • updated CHANGELOG
  • parenthesis typo
  • removed deprecated methods
  • fixed CHANGELOG
  • refactored extensions management
  • changed deprecation to an exception
  • made getSource() abstract
  • removed code that deal with potential null nodes (not possible anymore)
  • removed deprecation notice
  • fixed phpdocs
  • adding missing dots to some exception messages
  • fixed CS
  • fixed method signature
  • removed obsolete features
  • removed obsolete getName() methods on built-in extensions
  • made some cleanup
  • revert deprecations for a smooth upgrade path
  • removed deprecated code
  • removed deprecated code
  • fixed docs
  • removed obsolete code
  • fixed wrong merge
  • removed unneeded code
  • removed obsolete code
  • removed obsolete code
  • removed obsolete code
  • removed obsolete code
  • removed obsolete code
  • removed obsolete doc
  • removed obsolete code
  • removed obsolete code
  • removed code specific to older versions of PHP
  • removed obsolete code
  • fixed version constants
  • oops
  • bumped minimum version to PHP 5.6
  • simplified code
  • remove obsolete docs
  • removed obsolete code
  • removed deprecated code
  • removed obsolete code
  • Use ** operator over function pow()
  • Clean ups
  • removed obsolete code
  • removed support for mbstring.func_overload != 0
  • removed support for silent display of undefined blocks
  • Remove debugging class
  • simplified code
  • marked @Final classes as final
  • Cleanups
  • remove deprecations
  • removed deprecated disable_c_ext attribute on Twig_Node_Expression_GetAttr
  • fix travis build matrix to support 7.x and hhvm
  • dropped PHP 5.x support
  • removed old C extension
  • fixed CS
  • modified code to use variadics when possible
  • moved Twig_Template::getAttribute() to a function
  • removed remaining mentions of the C extension
  • fixed version in documentation
  • fixed composer.json
  • fixed CS
  • prepared the 2.0.0 release
  • bumped version to 2.0.1-DEV
  • added the missing deprecated doc
  • fixed typo
  • fixed class names
  • Typehint the function, filter and test names as string
  • remove condition on PHP version
  • removed obsolete code
  • bumped version to 2.1.0
  • do not overridde case-insentive cache entries
  • updated CHANGELOG
  • prepared the 2.1.0 release
  • bumped version to 2.1.1-DEV
  • Use null rather than specific length for 'all characters to the end' with mb_substr
  • Remove legacy exception catches from 2.x
  • Fix undef. source in exception.
  • Change '~' with '^' for version in composer require
  • bumped version to 2.2
  • updated tests for PHP 7+
  • tweaked docs
  • prepared the 2.2.0 release
  • bumped version to 2.2.1-DEV
  • Add error message when calling parent() in a block that doesn't exist
  • Fixed JS escaping for unicode characters with higher code points
  • fixed risky tests
  • Make "length" filter and "empty" test consider __toString [Twig 1.x]
  • fixed CHANGELOG
  • bumped version to 1.33
  • Call clearstatcache() before calling is_dir().
  • updated CHANGELOG
  • fixed PHP 5.2 compat
  • removed PHP 5.2 condition
  • prepared the 1.33.0 release
  • bumped version to 1.33.1-DEV
  • prepared the 2.3.0 release
  • bumped version to 2.3.1-DEV
  • test if is_object before calling method_exists, fixes 1.33.0 and "empty" test will try to load random strings as classes twigphp/Twig#2431
  • Autoescape test addition; collision fix in Array Loader.
  • added more is_object() safegaruds
  • Wrong stdClass class name generates warning
  • updated CHANGELOG
  • prepared the 1.33.1 release
  • bumped version to 1.33.2-DEV
  • prepared the 2.3.1 release
  • bumped version to 2.3.2-DEV
  • fixed edge case in the method cache for Twig attributes
  • fixed typo
  • prepared the 1.33.2 release
  • bumped version to 1.33.3-DEV
  • prepared the 2.3.2 release
  • bumped version to 2.3.3-DEV
  • removed a @Final tag
  • Fix typo in advanced.rst file
  • Prepare for php 7.2
  • Fix generating template name in createTemplate() method
  • fixed tests
  • added PHP 7.2 to the test matrix
  • Support PHPUnit 6 for testing extensions
  • bumped version to 1.34
  • fixed code for older versions of PHP
  • Length filter non-mb_string on 7.x fix.
  • dropped support for HHVM
  • fixed tests for PHP 7.2
  • Update number_format.rst
  • reworded docs
  • marked Twig_Node_Module as final via an annotation (will be final in 3.0)
  • added @Final classes in the deprecated document
  • added deprecation notices for @Final classes
  • Add namespaced aliases
  • Fix @final-related deprecations
  • [2.x] Add namespaced aliases
  • Add the aliases
  • updated CHANGELOG
  • [2.x] Allow using namespaced aliases as extension names
  • Update .php_cs.dist
  • [1.x] Allow using namespaced aliases as extension names
  • fixed bad merge
  • reverted renaming of Twig\Environment to Twig\Twig
  • Fix Twig\Environment alias
  • [Doc] Fixed documentation about 'Definition vs Runtime'
  • Remove alias duplicate
  • prepared the 1.34.0 release
  • bumped version to 1.34.1-DEV
  • added missing entries in CHANGELOG
  • updated CHANGELOG
  • prepared the 2.4.0 release
  • bumped version to 2.4.1-DEV
  • Use class_exists instead of require to play nice with inlining
  • updated CHANGELOG
  • prepared the 1.34.1 release
  • bumped version to 1.34.2-DEV
  • Use class_exists instead of require to play nice with inlining for 2.x
  • prepared the 1.34.1 release
  • bumped version to 2.4.2-DEV
  • Use class_exists instead of require
  • replaced require with class_exists
  • replaced require with class_exists
  • prepared the 1.34.2 release
  • bumped version to 1.34.3-DEV
  • prepared the 2.4.2 release
  • bumped version to 2.4.3-DEV
  • Move class_exists() at the bottom of files
  • prepared the 1.34.3 release
  • bumped version to 1.34.4-DEV
  • prepared the 2.4.3 release
  • bumped version to 2.4.4-DEV
  • Add support for runtime loaders to IntegrationTestCase
  • Create number_format.rst
  • fixed deprecation when using Twig_Profiler_Dumper_Html
  • removed @Final from Twig_Profiler_Dumper_Text
  • fixed php cs config for 2.x
  • Update internals.rst
  • updated CHANGELOG
  • prepared the 1.34.4 release
  • bumped version to 1.34.5-DEV
  • Update .travis.yml
  • Throw exception on circular reference detection
  • updated CHANGELOG
  • updated CHANGELOG
  • Added RuntimeExtensionInterface
  • show how to use a variable as hash map key
  • bumped version to 1.35
  • simplified tests as min version if now 5.3.3
  • fixed CS
  • ensured that the use TokenParser returns a node instance
  • updated CHANGELOG
  • µoptim for twig_get_attribute()
  • Added pssibility to reset the profiler.
  • added missing item in CHANGELOG
  • updated CHANGELOG
  • add throws tags doc block for Twig_Environment:load
  • prepared the 1.35.0 release
  • bumped version to 1.35.1-DEV
  • updated CHANGELOG
  • prepared the 2.4.4 release
  • bumped version to 2.4.5-DEV
  • Fix PHP 5.3 build
  • fix grammar
  • Change typo in documentation
  • Environment::resolveTemplate now accepts instances of TemplateWrapper
  • updated CHANGELOG
  • updated CHANGELOG
  • Update advanced.rst
  • contents -> content
  • Update license year
  • made it clear that placeholders are free-forms for the replace filter
  • optimized twig_get_attribute (avoid calling getSourceContext())
  • optimized compilation for arrays when using a['b'] notation under certain conditions
  • added some tests
  • removed old class
  • optimized nested array calls
  • Be able to count on iterator
  • Make variable names deterministic
  • Fix possible array to string conversion concealing actual error
  • Update .travis.yml
  • Exception for use of "===" instead of "same as"
  • added missing test
  • optimized the . operator performance
  • fixed resetting options hash when overriding all extensions
  • improved performance by inlining constants
  • updated CHANGELOG
  • updated CHANGELOG
  • fixed Travis config
  • fixed C ext
  • simplified code
  • prepared the 1.35.1 release
  • bumped version to 1.35.2-DEV
  • Switch the PHP ext jobs to a whitelist rather than a blacklist
  • removed obsolete code
  • optimized performance when accessing extensions in templates
  • optimized calls to custom extension runtimes
  • updated CHANGELOG
  • fixed CS
  • fixed CS
  • prepared the 2.4.5 release
  • bumped version to 2.4.6-DEV
  • fixed profiler unicity when several ones are registered
  • fixed test
  • updated CHANGELOG
  • prepared the 1.35.2 release
  • bumped version to 1.35.3-DEV
  • prepared the 2.4.6 release
  • bumped version to 2.4.7-DEV
  • fixed version
  • fixed version
  • made a small performance improvement
  • optimized the parser by inlining the constant values
  • fixed .. (range operator) in sandbox policy
  • added missing else clause to avoid infinite loops
  • convert_encoding doc updated
  • Fixed counting children of SimpleXMLElement object
  • removed dev deps in composer.json
  • fixed block names unicity
  • updated CHANGELOG
  • prepared the 1.35.3 release
  • bumped version to 1.35.4-DEV
  • updated CHANGELOG
  • prepared the 2.4.7 release
  • bumped version to 2.4.8-DEV
  • Add JSON escape strategy
  • Small optimization for Twig_NodeTraverser::traverseForVisitor
  • simplified tests
  • fixed regression
  • prepared the 2.4.8 release
  • bumped version to 2.4.9-DEV
  • reworded installation docs
  • Fix links to repository in documentation
  • Fix cache update after uploading the template file (when auto-update is enabled).
  • fixed website URL
  • fixed website URL
  • use HTTPS whenever possible
  • removed extra whitespaces
  • use HTTPS whenever possible
  • Added missing edge-cases
  • added the Symfony ctype polyfill as a dependency
  • Fixed PHPDoc of Twig_Token::test
  • fixed doc markup
  • fixed doc markup
  • updated CHANGELOG
  • bumped version to 2.5.0
  • fixed typo
  • moved legacy tests that were not executed anymore in 2.x
  • deprecated the possibility to define a block in a non-capturing block from a child template
  • deprecated using the spaceless tag at the root level of a child template (noop anyway)
  • fix a typo
  • Ensure that syntax errors are triggered with the right line
  • Fix the error handling for the optimized extension-based function calls
  • Report the proper location for errors compiled in templates
  • Use isset before array_key_exists
  • Fix test
  • updated CHANGELOG
  • prepared the 1.35.4 release
  • bumped version to 1.35.5-DEV
  • updated CHANGELOG
  • prepared the 2.5.0 release
  • bumped version to 2.5.1-DEV
  • Do not throw error on validate or parse name if throw var is false
  • updated CHANGELOG
  • Fix GlobalsInterface extends for IDE
  • Add support for dynamic tests
  • fixed bad merge
  • bumped versionn to 2.6
  • Added "deprecated" tag
  • added missing test
  • Fix multi-byte UFT-8 in escape('html_attr')
  • Fix multi-byte UFT-8 in escape('html_attr')
  • Improved the code of an example
  • Make sure twig_include returns a string
  • Document combining JSON constants
  • fixed ReST format
  • fiwed internal link
  • Remove mention of the Twig C extension
  • Update .travis.yml
  • tweaked phpunit config
  • updated CHANGELOG
  • updated CHANGELOG
  • prepared the 1.36.0 release
  • bumped version to 1.36.1-DEV
  • prepared the 2.6.0 release
  • bumped version to 2.6.1-DEV
  • Enhances join filter for natural language join (i.e., "A, B and C")
  • tweaked previous merge
  • Added hint that the php c extension is only for php5
  • udpated year in LICENSE
  • remove a test that is not relevant anymore (related to the removed C extension)
  • fixed CS
  • fixed CS
  • fixed float representation in compiled templates
  • bumped version
  • dropped PHP 5.3 support
  • switched to use short arrays in generated code
  • switched to use PHP short array notation for Twig's code
  • fixed more short array notations
  • fixed usage of short array notation in tests
  • fixed usage of short array notation in tests
  • enabled short array notation in docs
  • removed array notation in comments
  • removed 5.3 from Travis matrix
  • fixed .php_cs CS
  • fixed CS
  • Add missing ]
  • added missing information in the precedence paragraph
  • deprecated passing a string as a source on Twig_Error
  • fixed error location when calling an undefined block
  • fixed tests
  • removed obsolete condition
  • updated CHANGELOG
  • fixed tests
  • fixed using a Twig_TemplateWrapper instance as an argument to extends
  • modernized code
  • fixed ArrayObject access with a null value
  • Remove pre PHP v5.3 code
  • fixed embedded templates starting with a BOM
  • removed obsolete code
  • Fixed 2.x tests
  • added missing items in the CHANGELOG
  • fixed CS
  • added missing items in the CHANGELOG
  • prepared the 1.37.0 release
  • bumped version to 1.37.1-DEV
  • prepared the 2.6.1 release
  • bumped version to 2.6.2-DEV
  • fixed logic in TemplateWrapper
  • fix key exists check for non ArrayObject objects
  • updated CHANGELOG
  • updated CHANGELOG
  • backport tests
  • prepared the 1.37.1 release
  • bumped version to 1.37.2-DEV
  • prepared the 2.6.2 release
  • bumped version to 2.6.3-DEV
  • Fix typo
  • remove duplicated directory separator
  • removed the
     tag in docblocks
  • added some docs about the difference between the include tag and the include function
  • fixed Travis config
  • tweaked deprecations
  • tweaked message
  • deprecated Parser::isReservedMacroName()
  • simplified some phpdocs
  • fixed CS
  • prefixed some classes with a backslash
  • fixed CS
  • fixed CS
  • tweaked PHP-CS-Fixer config
  • fixed CS
  • fixed some PHPUnit assertions
  • fixed CS
  • bumped version to 1.38
  • fixed some class names
  • moved to namespaced classes by default
  • moved to namespaced classes by default
  • moved to namespaced classes by default
  • moved some more classes to namespaced ones
  • used ::class whenever possible
  • deprecated the possibility to change the base template for generated templates
  • prepared use statements
  • moved most FQCN to use statements
  • prepared use statements
  • fixed CS
  • moved most FQCN to use statements
  • fixed CS
  • Add max value to random function
  • Fix undefined class Profile in templates
  • fixed typos
  • removed support forum in composer.json
  • tweaked some docs
  • improved documentation on tags
  • fixed wrong version in docs
  • removed mentions of version 1.x in docs for 2.x
  • improved the tag documentation
  • Encourage using prepared statements
  • added getLoaders() on the chain loader
  • clarify the type of returned loaders
  • removed PHP 5.4 code
  • fixed typo
  • fixed namespace typo
  • fixed deprecation warning when using the namespaced class for extensions
  • fixed class usage
  • fixed tests for errors
  • switched to namespace first, PSR-0 as a fallback
  • fixed class usage
  • fixed namespace typo
  • fixed Sandbox extension class name
  • fixed tests for errors
  • switched to namespace first, PSR-0 as a fallback
  • deprecated PSR-0 class names
  • fixed typo
  • added @deprecated on PSR-0 classes
  • updated CHANGELOG
  • updated CHANGELOG
  • tweaked deprecations messages to use namespaced classes
  • fixed doc markup
  • added missing deprecated entry in the docs
  • added soe missing deprecations
  • fixed typo
  • tweaked docs
  • updated CHANGELOG
  • removed mock usage in profile tests
  • fixed usage of ::class
  • fixed wrong usage of Error() constructor
  • fixed typo
  • moved some more PSR0 class names to namespaced ones
  • fixed phpdocs
  • fixed more un-namespaced classes
  • fixed more un-namespaced classes
  • fixed more un-namespaced classes
  • removed some unneded phpdocs
  • removed @internal tag on Twig\Template as the whole class is marked as internal
  • removed @internal tag on Twig\Template as the whole class is marked as internal
  • fixed some issues
  • removed unneeded usage of spaceless in tests
  • added a spaceless filter
  • re-implemented the spaceless tag to reuse the filter tag logic
  • fixed CS
  • Revert "re-implemented the spaceless tag to reuse the filter tag logic"
  • deprecated the spaceless tag
  • removed dead code
  • document support for defining default argument values in the macro tag
  • added a note about the performance of the spaceless filter
  • added a deprecation notice when using the spaceless tag
  • fixed some deprecation messages
  • improved the performance of the sandbox
  • updated CHANGELOG
  • Remove runtime deprecation that prevent smooth update
  • Fix deprecation notes
  • fixed indentation of the compiled template
  • tweaked sandbox generated code
  • do not check sandbox for __toString if method does not exist on object
  • tweaked docs for macro
  • removed obsolete docs
  • tried to avoid guessing template info on errors
  • removed -2 magic number
  • simplified some code
  • fixed CS
  • added the possibility to pass a TemplateWrapper to Twig\Environment::load()
  • use load() instead of loadTemplate() in tests
  • simplified code
  • marked Twig\Environment::getTemplateClass() as internal
  • added the possibility to pass a TemplateWrapper to Twig\Environment::load()
  • updated docs
  • deprecated passing a Twig\Template to load()/resolveTemplate()
  • fixed CS
  • fixed "embed" support when used from "template_from_string"
  • removed dead code
  • added preserveKeys support for the batch filter
  • fixed batch filter clobbers array keys when fill parameter is used
  • updated CHANGELOG
  • fixed security issue in the sandbox
  • removed one usage of Template vs TemplateWrapper
  • prepared the 1.38.0 release
  • bumped version to 1.38.1-DEV
  • prepared the 2.7.0 release
  • bumped version to 2.7.1-DEV
  • force loading class aliases used in typehints
  • fixed CS
  • updated CHANGELOG
  • updated CHANGELOG
  • prepared the 1.38.1 release
  • bumped version to 1.38.2-DEV
  • prepared the 2.7.1 release
  • bumped version to 2.7.2-DEV
  • added TemplateWrapper::getTemplateName()
  • prepared the 1.38.2 release
  • bumped version to 1.38.3-DEV
  • prepared the 2.7.2 release
  • bumped version to 2.7.3-DEV
  • added some tests for the set tag
  • fixed the autoloader to take into account namespaced classes
  • added some missing tests
  • Fixed spaceless filter
  • fixed BC break on Environment::resolveTemplate()
  • updated CHANGELOG
  • added a note about Environment::resolveTemplate in 3.0
  • removed some usage of loadTemplate in tests
  • removed some usage of loadTemplate in tests
  • fixed tests
  • removed dead code
  • fixed wrong argument type in test
  • added some type hints on private methods
  • added some type hints on constructors
  • added some type hints on final classes
  • fixed BC break
  • fixed typo
  • Allow Traversable objects to be used in the with tag
  • updated CHANGELOG
  • removed debug code
  • fixed phpunit configuration
  • Allow Traversable objects to be used in the with keyword of the include and embed tags
  • updated CHANGELOG
  • prepared the 1.38.3 release
  • bumped version to 1.38.4-DEV
  • prepared the 2.7.3 release
  • bumped version to 2.7.4-DEV
  • fix(with): comment some strings
  • refactored the implementation of dump()
  • fixed CheckToStringNode implementation
  • updated CHANGELOG
  • fixed variadic support
  • prepared the 1.38.4 release
  • bumped version to 1.38.5-DEV
  • prepared the 2.7.4 release
  • bumped version to 2.7.5-DEV
  • fix major version in Environment
  • Add spaceless filter to the index
  • Update json_encode.rst
  • Add Traversable support of length filter
  • bumped version to 1.39
  • simplified Lexer regexes
  • made Lexer regexes more readable
  • added support for a new whitespace trimming option
  • Add the column filter
  • bumped version to 2.8
  • fixed CS
  • added some missing docs
  • fixed CS
  • fixed "include" with "ignore missing" when an error loading occurs in the included template
  • fixed "include" with "ignore missing" when an error loading occurs in the included template (again)
  • Prepare for the new serialization mechanism
  • Disable xdebug var_dump overload for tests
  • fixed CS
  • fixed CS
  • tweaked twig_to_array
  • fixed the "with" behavior to always include the globals
  • added the possibility to give a nice name to string templates
  • added the possibility to give a nice name to string templates
  • fixed compat with PHP 5
  • revert 1.x merge
  • made escaping on ternary expressions more fine-grained
  • removed obsolete comment
  • added missing hints in some runtime exceptions
  • added more tests
  • fixed bad merge
  • fixed CS
  • simplified code
  • fixed compat with NodeInterface
  • updated CHANGELOG
  • updated CHANGELOG
  • prepared the 1.39.0 release
  • bumped version to 1.39.1-DEV
  • prepared the 2.8.0 release
  • bumped version to 2.8.1-DEV
  • deprecated Node::setTemplateName()
  • fixed various small bugs
  • fixed bad merge
  • deprecated passing a 4th and 5th arguments to the Sandbox exception classes
  • fixed phpdoc
  • fixed CS
  • deprecated the 3rd argument of Sandbox error classes
  • added the source for all sandbox security exceptions
  • fixed CS
  • fixed EscaperNodeVisitor
  • updated CHANGELOG
  • prepared the 1.39.1 release
  • bumped version to 1.39.2-DEV
  • prepared the 2.8.1 release
  • bumped version to 2.8.2-DEV
  • fixed tpyo
  • fixed typo
  • removed obsolete code
  • fixed phpdoc
  • added template line number to twig_get_attribute()
  • added template line number to sandbox security check calls
  • fix major version constant
  • fixed Lexer when using custom options containing the # char
  • fixed doc (missing word)
  • added a note about escaping
  • fixed import macros from a template string
  • fixed in test to support Twig_Markup instances
  • tweaked macro docs
  • refactored some test to ease changing them
  • fixed Parser contract for some implementations
  • bumped version to 3.0
  • removed the obsolete lib/ directory, removed PSR-0 class aliases
  • updated the docs for 3.0
  • fixed tests
  • changed Environment::resolveTemplate() to always return a TemplateWrapper
  • removed obsolete Error features
  • changed classes marked as @Final to final
  • removed deprecated loader interfaces
  • simplified code
  • removed the "base_template_class" option on Twig\Environment
  • changed false to null to allow for type hinting
  • removed the spaceless tag
  • removed Node::setTemplateName()
  • removed the possibility to pass a Template to Environment::load()
  • simplified code
  • removed remaining code supporting PSR-0 class names
  • removed obsolete OPTIMIZE_VAR_ACCESS const
  • removed Parser::isReservedMacroName()
  • removed block definition nested in non-capturing nodes
  • removed obsolete code
  • removed Template::__toString()
  • removed dead code
  • removed obsolete SandboxedPrintNode
  • made Template::getSourceContext() abstract
  • updated CHANGELOG for 3.0
  • removed obsolete code
  • allowed Twig\Loader\FilesystemLoader::findTemplate() to return "null" instead of "false" (same meaning)
  • added some notes in deprecated doc
  • removed obsolete feature
  • removed obsolete PHPUnit config
  • Refactor the with node to avoid leaking the parent scope to the template
  • bumped version to 1.40
  • Update TemplateWrapper.php
  • bumped version to 2.9
  • fixed CS
  • added the apply tag
  • removed die()
  • fixed docs
  • fixed typo
  • fixed docs
  • fixed bad merge
  • deprecated the filter tag
  • removed the deprecated filter tag
  • removed obsolete comments
  • removed InitRuntimeInterface and RuntimeExtensionInterface
  • allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
  • added missing items in the CHANGELOG
  • tweaked escape docs
  • tweaked doc markup
  • fixed doc format
  • Add Parser typehint
  • added missing items in the CHANGELOG
  • deprecated returning "false" to remove a Node from NodeVisitorInterface::leaveNode()
  • removed deprecated feature
  • added type hints
  • tweaked the doc
  • added type hints
  • prepared the 1.40.0 release
  • bumped version to 1.40.1-DEV
  • prepared the 2.9.0 release
  • bumped version to 2.9.1-DEV
  • fixed regression in NodeTraverser
  • fixed phpdocs
  • revert 1.x changes
  • prepared the 1.40.1 release
  • bumped version to 1.40.2-DEV
  • made the in, <, >, <=, >=, ==, and != operators more strict when comparing strings and integers/floats
  • optimized context access on PHP 7.4
  • add column filter to index
  • fixed doc indexes
  • fixed doc indexes
  • fixed doc indexes
  • fixed doc markup
  • removed wrong link in docs
  • added Drupal in the CI process
  • fixed Drupal script
  • required 8.7 for Drupal tests
  • disabled Drupal tests on 3.x
  • fixed markup in docs
  • fixed partial output leak when a PHP fatal error occurs
  • bumped version to 1.41
  • bumped version to 2.10
  • fixed CS
  • simplified code
  • added "filter", "map", and "reduce" filters
  • changed arrow syntax
  • removed fn in front of arrow functions
  • added support for iterators
  • added the key to the map and filter filters
  • fixed CS
  • added a test
  • updated CHANGELOG
  • deprecated "if" conditions on "for" tags
  • fixed support for IteratorAggregate in the filter filter
  • added PHP 7.4 in Travis config
  • fixed PHP 7.4 support
  • fixed deprecation under PHP 7.4
  • fixed CS
  • removed the "if" condition support on the "for" tag
  • fixed PHP 7.4 support
  • Correct Twig_SimpleFilter/Twig_SimpleFunction/Twig_SimpleTest deprecation doc (Revert: moved to namespaced classes by default)
  • prepared the 1.41.0 release
  • bumped version to 1.41.1-DEV
  • prepared the 2.10.0 release
  • bumped version to 2.10.1-DEV
  • fixed wrong error message on "import" and "from"
  • tweaked error messages
  • fixed a PHP fatal error when calling a macro, imported in the template, in another macro
  • simplified code
  • tweaked the error message when using extends in a block/macro
  • made code more readable
  • fixed a regression
  • added some tests
  • fixed typo
  • fixed a PHP fatal error when calling a macro imported in the template in a nested block
  • fixed tests
  • fixed typo
  • bumped version to 1.42
  • bumped version to 2.11
  • added some tests
  • added more tests
  • macros imported "globally" in a template are now available in macros without re-importing them
  • update docs for for loop with conditional to reference filter filters
  • fixed typo
  • fixed version
  • remove obsolete docs
  • added support for macros on "is defined" tests
  • fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator
  • simplified code
  • fixed CS
  • fixed CS
  • added a better error message for unknown macros
  • tweaked docs for macros
  • simplified code
  • updated docs for macros
  • fixed CS
  • Local macros auto-import
  • updated CHANGELOG
  • doc(filter): add example of filter without for use
  • tweaked docs
  • deprecated CoreExtension::setEscaper() and CoreExtension::getEscaper() in favor of the same methods on EscaperExtension
  • moved tests
  • added the possibility to register classes/interfaces as being safe for the escaper
  • Add information for when filter filter was added in 2.x branch
  • tweaked docs
  • removed obsolete code
  • Fix typo in filter doc
  • Add missing template name and line no to some deprecation messages
  • Use v5.0 of the phpunit bridge
  • prepared the 1.42.0 release
  • bumped version to 1.42.1-DEV
  • prepared the 2.11.0 release
  • bumped version to 2.11.1-DEV
  • added some tests
  • moved a test
  • fixed macro inheritance
  • added more tests
  • allowed string operators as variables names in assignments
  • updated CHANGELOG
  • Update the documentation for newly added features
  • Fixed: Endless loop if more than one parent without the macro exists
  • added support for "Twig\Markup" instances in the "in" test (again)
  • updated CHANGELOG
  • added a doc note
  • prepared the 1.42.1 release
  • bumped version to 1.42.2-DEV
  • prepared the 2.11.1 release
  • bumped version to 2.11.2-DEV
  • removed docs about overloading
  • bumped version to 2.12
  • fix CS
  • fix CS
  • fixed macro auto-import
  • prepared the 2.11.2 release
  • bumped version to 2.11.3-DEV
  • fixed end of constructor node logic
  • fixed macro auto-import when a template contains only macros
  • Remove duplicate phpdoc
  • Don't clear PHP buffer when an error occurs with debug=true
  • fixed tests
  • Escape DIR in the test suite
  • fixed the filter filter
  • prepared the 1.42.2 release
  • bumped version to 1.42.3-DEV
  • prepared the 2.11.3 release
  • bumped version to 2.11.4-DEV
  • fixed CHANGELOG
  • [Doc] Minor fixes and removed belittling words
  • [doc] "map" filter: fix args order (value, key)
  • [1.x] Patch split filter
  • fixed CS
  • Use dir constant for fixtures
  • tweaked an example in the docs
  • added Blackfire as a sponsor
  • moved tests to a namespace structure
  • fixed CS
  • moved FQDN in tests to use statemetns
  • fixed CS
  • fixed typo
  • moved tests under tests/
  • moved test under tests/
  • moved test under tests/
  • fixed typo
  • fixed tests for PHP 7.4
  • fixed tests
  • fixed PHPUnit compat
  • fixed using macros in arrow functions
  • Update include.rst
  • Extend opcache check if it is enabled
  • tweaked code
  • updated CHANGELOG
  • updated CHANGELOG
  • Update CoreExtension.php
  • Fix using array_key_exists() on objects, it is deprecated in PHP 7.4
  • bumped version
  • added the data_uri filter
  • fixed wrong registration
  • added missing docs
  • Added support for css_class function
  • moved css_class function to html_classes filter
  • fixed CHANGELOG
  • fixed phpdocs
  • avoid confusion between .. and ..
  • fixed the "empty" test on Traversable instances
  • fixed composer.json
  • fixed CS
  • Restore tests on PHP 5.4
  • Upgrade minimal version of php
  • fixed CHANGELOG
  • simplified .travis.yml
  • fixed docs
  • fixed composer.json
  • fixed bad merge
  • fixed typo hints
  • bumped some deps
  • allowed Symfony 5
  • Update to PhpUnitBridge and fix deprecations
  • Fix PHPUnit deprecations
  • fixed PHPUnit deprecations
  • Fix compatibility with PHPUnit 8
  • code cleanup
  • removed usage of getmockBuilder() when not needed
  • removed usage of getmockBuilder() when not needed
  • added an entry to .gitignore
  • moved the HTML extension to an external Composer package
  • fixed HTML extension
  • fixed Travis
  • fixed package name
  • added the Markdown extension
  • fixed composer.json
  • fixed bad merge
  • Fix PHPDoc of twig_get_attribute()
  • Revamping bundle structure to not mix source code with config files
  • fixed config/ directory in extra bundle
  • fixed Travis config
  • added missing dep
  • fixed path
  • added suggestions for extra extensions
  • made a class final
  • fixed wrong class usage
  • fixed typos
  • disabled some tests that are not compatible with pHp 7.4 yet
  • added the Intl extension
  • fixed typo
  • fixed CS
  • fixed typo
  • fixed markup in docs
  • fixed markup in docs
  • fixed versions of extra exts
  • tweaked doc
  • added the cssinliner and inky extensions
  • updated CHANGELOG
  • fixed code
  • moved mime to req
  • removed unneeded condition
  • Fix intl-extra docs and links
  • cleaned up the code
  • added support for an "arrow" function on the "sort" filter
  • added the spaceship operator
  • Handle opcache_invalidate() being disabled on shared hosting platforms
  • updated ChANGELOG
  • prepared the 1.42.3 release
  • bumped version to 1.42.4-DEV
  • Minor fixes in the docs of some intl filters
  • Minor fix in a filter description
  • Renamed inky to inky_to_html
  • Move country_timezone to a function
  • fix variable name
  • Bump min version for pinky
  • Optimize block('foo') ?? 'bar'
  • Fix code
  • [3.0] remove the most blocking return types
  • Twig 2 is compatible with PHP 7.0
  • [3] Fix leftover
  • Fix issue What is the purpose of the first argument of the map filter? twigphp/Twig#3160
  • Fix issue batch filter documentation is missing preserve_keys argument twigphp/Twig#3159
  • Revert previous merge partially
  • Update CHANGELOG
  • Prepare the 2.12.0 release
  • Bump version to 2.12.1-DEV
  • doc: number_format add math calculation hint
  • Update documentation for inky_to_html
  • Add twig/string-extra extension
  • Add missing docs
  • Add string extra in the bundle
  • Fix CS
  • Update .gitattributes to remove tests from "dist"
  • Add missing .gitattributes for string-extra
  • Add .gitattributes
  • Fix phpdoc
  • Prepare the 2.12.1 release
  • Bump version to 2.12.2-DEV
  • Fix small typo
  • Add support for exponential numbers
  • Allow Symfony 5
  • Fix the Travis setup
  • Fix the Travis config again
  • Fix twig compare
  • Prepare the 1.42.4 release
  • Bump version to 1.42.5-DEV
  • Update CHANGELOG
  • Prepare the 2.12.2 release
  • Bump version to 2.12.3-DEV
  • Prepare the 3.0.0-BETA1 release
  • Bump version to 3.0.0-DEV
  • Fixed doc markup
  • Fix docs
  • Remove usage of the old Autoloader class in the docs
  • Fix README
  • Fix number formatter in Intl extra extension
  • Update CHANGELOG
  • Prepare the 3.0.0 release
  • Bump version to 3.0.1-DEV
  • Remove mention of the obsolete twig-extensions repository
  • Remove obsolete file
  • Fix tests
  • Updated spaceless deprecation to point to apply tag, as the filter tag is now deprecated too
  • Correct return type of twig_date_converter
  • Add missing link in docs
  • Add missing suggestions in Twig Extra Bundle
  • Lower the PHP requirement
  • language typo
  • Remove obsolete page
  • Update doc with new escaping behavior
  • Fix constraints
  • support Sf5
  • Update CHANGELOG
  • Prepare the 2.12.3 release
  • Bump version to 2.12.4-DEV
  • Prepare the 3.0.1 release
  • Bump version to 3.0.2-DEV
  • Fix CHANGELOG
  • Bump license year
  • Bump license year
  • lower php requirement
  • Minor fixes in docs
  • Replace strtolower() with strtr() when dealing with method names
  • Fix versionadded in doc
  • Remove versionadded in 2.x in 3.x doc
  • Syntax error in doc
  • Fix license to use the "official" BSD wording
  • IntlExtension > Handle MissingResourceException
  • allow null string in StringExtension
  • Update CHANGELOG
  • Update CHANGELOG
  • Update CHANGELOG
  • Prepare the 1.42.5 release
  • Bump version to 1.42.6-DEV
  • Prepare the 2.12.4 release
  • Bump version to 2.12.5-DEV
  • Fix version
  • Prepare the 3.0.2 release
  • Bump version to 3.0.3-DEV
  • Fix 7.4 on Travis
  • Add a check to ensure that iconv() is defined
  • allow null string in StringExtension
  • Prepare the 2.12.5 release
  • Bump version to 2.12.6-DEV
  • Update CHANGELOG
  • Prepare the 3.0.3 release
  • Bump version to 3.0.4-DEV
  • Sync LICENSE with GitHub template
  • Fix optimize context access on PHP 7.4
  • Update advanced.rst
  • IntlExtension > Return empty string when input is null
  • Fix format of the CHANGELOG
  • Fix CHANGELOG
  • Fix ambiguous syntax parsing
  • Fix regression
  • Fix ambiguous syntax parsing
  • Update default.rst
  • Identity Equals - Best practices
  • Tweaking phpdoc above Environment
  • fix node class namespace
  • Remove extra Mardown word in classname
  • Remove extra Mardown word in classname
  • [docs] CoreExtension::setEscaper is deprecated
  • Fix typo
  • Fix CI
  • Fix wrong link
  • Fix CI on PHP5
  • Fix typos
  • Fix typo
  • Update api.rst
  • Optimize fil_exists()
  • Fix transform call to Michelf\MarkdownExtra
  • Fix an exmaple
  • Deprecation documentation indentation
  • Drop PHP 5 support
  • Drop support for PHP 7.0
  • Add PHP 8 / nightly in Travis matrix
  • Install the phpunit-bridge with PHP 7.4 when testing nightly
  • Fix PHP 8 compat
  • Fix integration tests
  • Bump version to 2.13
  • Fix Travis
  • Allow PHP 8 for extra packages
  • Allow dev versions
  • fix constructor argument types
  • Bypass tests for extra packages on PHP 8
  • Remove deprecated option
  • Fix Travis config
  • Fix Travis config
  • Fix typo
  • Remove boilerplate to run tests on PHP 8
  • Tweak PHP constraint
  • Fix tests
  • Fix extra package deps
  • Fix Travis config
  • Minor fixes
  • Try running all tests on nightly
  • Improve batch code example
  • Throw exception in case non-Traversable data is passed to "filter" filter
  • Fix missing http_build_query function call
  • Fix the compilation of Twig comparison operators
  • Fix twig_compare float-string trailing whitespace + refactor
  • Minimum version fix
  • Fix CS
  • Fix CS
  • Fix Drupal tests
  • Bump Drupal version in tests
  • Add version in the docs to be more search engine friendly
  • Add version in the docs for search engine
  • Update CHANGELOG
  • Prepare the 1.43.0 release
  • Bump version to 1.43.1-DEV
  • Update CHANGELOG
  • Prepare the 2.13.0 release
  • Bump version to 2.13.0-DEV
  • Update CHANGELOG
  • Prepare the 3.0.4 release
  • Bump version to 3.0.5-DEV
  • [3.x] Fix twig_compare w.r.t. whitespace trimming
  • Update html_to_markdown.rst
  • Fix CS
  • Restrict callables to closures in filters
  • Allow trailing commas in macros + functions + filters
  • Fix a regression when not using a space before an operator
  • Unify code style
  • Fix CS
  • Fixes Sandbox is not disabled if syntax error occurs within {% sandbox %} tag twigphp/Twig#3351
  • fix typo in ApplyTokenParser PHP doc
  • Update doc for macro with embed tags
  • Fix compatibility with PHPUnit 10
  • Fix typo
  • Added return and argument type for LoaderInterface
  • Add a test
  • Update CHANGELOG
  • Prepare the 1.43.1 release
  • Bump version to 1.43.2-DEV
  • Update CHANGELOG
  • Prepare the 2.13.1 release
  • Bump version to 2.13.2-DEV
  • Fix CHANGELOG
  • Prepare the 3.0.5 release
  • Bump version to 3.0.6-DEV
  • Fixed Twig\Template check
  • Update phpunit assertion
  • Update phpunit config
  • Migrate more tests
  • Fix CS
  • Fix CS
  • Support object init from variable
  • Update CHANGELOG
  • Tweak docs
  • Bump version
  • Bump version
  • Bump version
  • Make round brackets optional for one argument tests like sameas
  • Fix previous merge
  • Update CHANGELOG
  • Update CHANGELOG
  • Update CHANGELOG
  • Remove tests that do not make sense
  • In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
  • Add test to verify that filter is not working when template_from_string is used.
  • Fix sandbox support when using include(template_from_string())
  • Update CHANGELOG
  • Update CHANGELOG
  • Typo in release date in CHANGELOG
  • Fix typo
  • Update block.rst
  • Replace implicit dependence on ext/iconv in JS escaper
  • Backport Replace implicit dependence on ext/iconv in JS escaper twigphp/Twig#3397
  • Add another paragraph about mentioning another needed library
  • Fix missing delimiter for preg_quote in lexer
  • Update ChANGELOG
  • Emphase the fact that the include tag outputs data
  • [doc] Quick access to ICU user guide
  • Tweak docs
  • Improving truncate documentation
  • Tweak docs
  • Update CHANGELOG
  • Drop support for PHP 7.1
  • Fix PHP 8 support
  • Fix PHP 8 support
  • Prepare the 1.44.0 release
  • Bump version to 1.44.1-DEV
  • Prepare the 2.14.0 release
  • Bump version to 2.14.1-DEV
  • Prepare the 3.1.0 release
  • Fix CHANGELOG
  • Bump version to 3.1.1-DEV
  • Fix PHPUnit config
  • Fix "include(template_from_string())"
  • Fix CS
  • Fix CS
  • Update format_date.rst
  • Update format_time.rst
  • Prepare the 1.44.1 release
  • Bump version to 1.44.2-DEV
  • Update CHANGELOG
  • Prepare the 2.14.1 release
  • Bump version to 2.14.2-DEV
  • Update CHANGELOG
  • Prepare the 3.1.1 release
  • Bump version to 3.1.2-DEV
  • Fix odd not working for negative numbers
  • Enhancement: Use GithubActions instead of Travis for tests
  • Enhancement: Introduce DOCtor-RST config + Sphinx build + GithubActions
  • Fix: Highlighting
  • Enhancement: Use no_explicit_use_of_code_block_php rule
  • Fix: DOCtor-RST build
  • Enhancement: Use GithubActions instead of Travis for tests
  • Fix: Typo
  • Fix small typo
  • Fix branch in tests
  • Fix: Add missing versionadded directive
  • Enhancement: Use GithubActions instead of Travis for tests
  • Fix doc
  • Enhancement: Introduce DOCtor-RST config + GithubAction
  • Add return type for getGlobals() to documentation. The return type is defied in the GlobalsInterface
  • Fix include documentation - change filter tag to apply
  • Remove is_int since typehint exists
  • Typo
  • Fix typo
  • Mark built-in node visitors as @internal
  • Mark built-in token parsers as @internal
  • Bump copyright year
  • Bump version
  • Remove some PHP in docs
  • Add "registerUndefinedTokenParserCallback"
  • Fix Composer version
  • Fix Composer version
  • bump license year
  • Move Extra Bundle config from XML to PHP
  • Move things around
  • Add a cache tag
  • Improve wiring
  • Update CHANGELOG
  • Prepare the 1.44.2 release
  • Bump version to ${NEXT_VERSION}-DEV
  • Update CHANGELOG
  • Prepare the 3.2.0 release
  • Bump version
  • Prepare the 2.14.2 release
  • require twig/twig ^3.2
  • Fix compat with older Symfony versions
  • Fix compat with older Symfony versions
  • Prepare the 2.14.3 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 2.14.3 release
  • Bump version
  • Allow macro calls and definition inside cache tag
  • Fix CHANGELOG
  • Adding link to the SymfonyCasts Twig tutorial
  • Fix length filter doc
  • remove the C extension
  • Add slug filter (follow-up to PR Add slug twigphp/Twig#3386)
  • Add some return types
  • Invalid "tag" configuration key
  • Allowing compat with Twig 2 by conditionally calling method
  • Update CHANGELOG
  • Update CHANGELOG
  • Bump version to 3.3.0
  • Prepare the 3.3.0 release
  • [Doc] Update the Twig version where spaceless filter was added
  • Bump version
  • Prepare the 2.14.4 release
  • Bump version
  • added PHP 8.1 as experimental
  • Fix CS
  • Allow installation of league/html-to-markdown 5.x
  • Fix reference in docs
  • Slug filter: Mentioning requiredStringExtension
  • Added installation instructions
  • Fix CS
  • Slug filter: Mentioning requiredStringExtension
  • Fix CS
  • Fix: A template name cannot be an absolute path
  • Adding link to RFC
  • Tweak wording on docs
  • Fix code for PHP 8.1
  • Revert
  • Add missing arguments in intl docs
  • Fixing links
  • Migrate to the new PHP CS Fixer config file
  • Fix CS
  • Fix CS
  • Fix CS
  • Update CHANGELOG
  • Prepare the 1.44.3 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 2.14.5 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.3.1 release
  • Bump version
  • Some code style fixes
  • Revert "bug Fix: A template name cannot be an absolute path twigphp/Twig#3499 Fix: A template name cannot be an absolute path (mvorisek)"
  • Update CHANGELOG
  • Update CHANGELOG
  • Update CHANGELOG
  • Prepare the 1.44.4 release
  • Bump version
  • Prepare the 2.14.6 release
  • Bump version
  • Prepare the 3.3.2 release
  • Bump version
  • fix file permissions
  • Move Drupal test file to tests/
  • Add a note about end of 1.x maintenance
  • Fix merge
  • Replace secure.php.net with www.php.net
  • Fix URLs
  • Allow Symfony 6
  • Fix implicit flot to int casts
  • Add ReturnTypeWillChange to JsonSerializable implementation
  • Fix typo in CacheTokenParser.php
  • Implement template annotation for getExtension and getRuntime
  • Update Markdown packages
  • Explicitly specify the encoding for mb_ord in JS escaper
  • Twig2 PHP 8.1 beta compatibility
  • Add explicit @return type next to #[ReturnTypeWillChange]
  • Update CHANGELOG
  • Prepare the 1.44.5 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 2.14.7 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.3.3 release
  • Bump version
  • Missing Environment and LoaderInterface
  • Fix CS
  • Update markdown-to-html converter missing message
  • Update .gitattributes to exclude non-dist files
  • Update README.md
  • Remove license info in the README now that Github already displays it
  • Fix emphasis on compiler to bold styling
  • [TwigExtraBundle] Add the return type information in getConfigTreeBuilder()
  • Upgrade to version 4.4 lts at least
  • Prepare the last release for the 1.x series
  • Remove changelogs from 1.x
  • Update CHANGELOG
  • Prepare the 2.14.8 release
  • Bump version
  • Remove changelogs from 2.x
  • Update CHANGELOG
  • Prepare the 3.3.4 release
  • Bump version
  • Fix a typo advanced.rst
  • Fix a typo in api.rst
  • Hashing is not necessary to generate unique variable names during compilation
  • Use faster hash algorithm (xxh128) on PHP 8.1
  • Optimize Environment::resolveTemplate() to be much faster when template overrides do not exist
  • Remove unneeded coments
  • allow translation-contracts:^3
  • Typo fix : "flexiblity" ➤ "flexibility"
  • Bump license year
  • Allow null when Twig expects a string
  • Add 8.1 in tests
  • Allow CommonMark extensions to easily be added
  • Add compat with PHP 7.1 back
  • Update CHANGELOG
  • This reverts commit 7389f48.
  • Update CHANGELOG
  • Prepare the 2.14.9 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.3.5 release
  • Bump version
  • Allow null for nl2br, striptags and format filters
  • [bug] only use Commonmark extensions if markdown enabled
  • Prepare the release
  • Bump version
  • fix Commonmark factory definition
  • Update CHANGELOG
  • Prepare the 2.14.10 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.3.7 release
  • Bump version
  • [extra-bundle] add integration tests
  • The deprecated null value for the method round has been changed to zero.
  • Rename variables used in map method
  • Fix map example output
  • Fix call to deprecated "convertToHtml" method
  • Disallow non closures in sort filter when the sanbox mode is enabled
  • Prepare the 2.14.11 release
  • Bump version
  • Prepare the 3.3.8 release
  • Bump version
  • Fix CHANGELOG
  • do not reuse internally generated variable names during parsing
  • Rename variable
  • Add phpdoc to SecurityPolicyInterface
  • Fix custom escapers when using multiple Twig environments
  • Remove legacy test
  • Added token type and value to error message
  • Add a test
  • New info: Documents / filters / format_datetime: added info and example of using argument timezone
  • Tweak docs
  • Fix docs
  • add support for the class constant on objects
  • Update CHANGELOG
  • Prepare the 2.14.12 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.3.9 release
  • Bump version
  • Add "some" and "every" filters
  • Fix docs about the deprecated tag
  • Enable bytecode invalidation with auto_reload
  • Prepare the 2.14.13 release
  • Bump version
  • Prepare the 2.14.13 release
  • Bump version
  • [Documentation] Add note about simple string matching
  • Tweak previous commit
  • Add @codeCoverageIgnore to untestable compiled methods
  • Fix support for named closures
  • Update CHANGELOG
  • Prepare the 2.15.0 release
  • Bump version
  • Prepare the 3.4.0 release
  • Bump version
  • Fix optimizing non-public named closures
  • Update CHANGELOG
  • Prepare the 2.15.1 release
  • Bump version
  • Prepare the 3.4.1 release
  • Bump version
  • Fixes CallExpression::reflectCallable() throwing TypeError
  • Removed unneeded ext refs
  • Bugfix typo in twig/intl-exta
  • chore: Included githubactions in the dependabot config
  • chore: Set permissions for GitHub actions
  • Allow inherited magic method to still run with calling class
  • Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)
  • Fix CS
  • Update CHANGELOG
  • Prepare the 2.15.2 release
  • Bump version
  • Update CHANGELOG
  • Prepare the 3.4.2 release
  • Bump version
  • Make doc clearer
  • Use the PHP doc builder instead of Sphinx in CI
  • Update .gitattributes
  • Adding installation instructions for Symfony
  • Fix doc CS
  • Update CHANGELOG
  • Prepare the 2.15.3 release
  • Prepare the 3.4.3 release
  • Bump version
  • Bump version
  • Update michelf/php-markdown require-dev to allow v2
  • Update templates.rst
  • Remove internal from ExpressionParser
  • Improve phpdoc of ExtensionInterface/Environment/Expressionparser arrays
  • Fix optimizing closures callbacks
  • Add missing argument for the cycle function
  • Fix the drupal testing script
  • Add output
  • Remove a test that was a regression test for the C extension
  • Add PHP 8.2 to the tests
  • Use checkout actions v3
  • Do more Github actions updates
  • Re-enable Drupal integration tests
  • Updates CoreExtension::twig_constant to check for definition first to avoid hard crash
  • Fix tests
  • Add Compile::reset()
  • chore: Included githubactions in the dependabot config
  • Bump version of actions/cache
  • do not clean up whitespace text nodes inside if tags
  • throwing syntaxt error when the matches regexp is not valid
  • Add some tests
  • Add function twig *_name for intl list
  • Fix tests
  • Update CHANGELOG
  • Bump version to 3.5
  • Update CHANGELOG
  • Prepare the 2.15.4 release
  • Bump version
  • Prepare the 3.5.0 release
  • Bump version
  • Add some missing functions in docs
  • Add "has some" and "has every" expressions
  • Fix CHANGELOG
  • Tweak docs
  • Bump LICENSE year
  • Fix error messages in sandboxed mode for has some and has every
  • Update docs for filters that use the calendar option
  • pass the current key to reduce filter's callback
  • Minor: Fixing language
  • Restores the leniency of the matches twig comparison, allowing null subject to result in a non-match.
  • Fix LICENSE year
  • Update CHANGELOG
  • Prepare the 3.5.1 release
  • Fix LICENSE year
  • Bump version
  • Add the new PHP 8.0 IntlDateFormatter::RELATIVE_* constants for date formatting.
  • Bump version to 3.6
  • Allow psr/container 2.0.2
  • Adding mb_strlen
  • return annotation to suppress deprecation warning
  • Put example all on one line
  • Remove duplicate sentence in macro scoping
  • Making the Lexer initialize itself lazily, to avoid loading the extension set early
  • Update CHANGELOG
  • Prepare the 2.15.5 release
  • Update CHANGELOG
  • Prepare the 3.6.0 release
  • Bump version
  • Bump version
  • suppress native return type deprecation msg
  • Update CHANGELOG
  • Prepare the 3.6.1 release
  • Mention where named arguments are supported
  • Bump version to 3.6.2
  • add extra example to slice filter
  • Update signature to acknowledge a TemplateWrapper
  • Fix callable phpdoc for twig elements
  • Adding support for the ...spread operator on arrays and hashes
  • Fix spread operator implementation
  • Update CHANGELOG
  • Prepare the 3.7.0 release
  • Bump version
  • Fix callable phpdoc
  • add return type for Symfony 7 compatibility
  • Bump PHP version used by Drupal tests
  • Fix code
  • Update Drupal version in tests
  • Fix BC break
  • Bump min deps
  • Add Twig Language Server and Modern Twig extension to docs
  • Reorganize some information
  • Update CHANGELOG
  • Prepare the 3.7.1 release
  • Bump version
  • Bump CI actions
  • allow Symfony 7 packages to be installed
  • Fix tests
  • Remove Drupal tests
  • Set Twig 2 end of maintenance to December 2023
  • Fix CS
  • Use PHP 8.0 functions with polyfill
  • Remove TemplateWrapper::render 2nd parameter not used
  • restore return type annotations
  • Remove unused variables and unreachable code
  • Add Twiggy extension for VS Code to docs.
  • range example leads to Array to string conversion exception
  • fix NumberFormatter::TYPE_CURRENCY being deprecated in PHP 8.3
  • Rewrite an example
  • Fix CS
  • Use is_iterable when possible
  • Convert Ternary to Elvis or Null Coalescing
  • Replace calls to twig_test_iterable to is_iterable
  • Add missing docs
  • Compile Elvis operator with Elvis operator
  • Compile starts/ends with using PHP8 functions str_starts/ends_with
  • Fix premature loop exit in Security Policy lookup of allowed methods/properties
  • Fix IntlExtension::formatDateTime use of date formatter prototype
  • Catch errors thrown during template rendering
  • Minor rename of SandboxTest functions->methods
  • Fix timezone fallback to CoreExtension in IntlExtension
  • Fix tests and CS
  • Bump dependencies
  • Add PHP 8.3 to the CI
  • Update CHANGELOG
  • Prepare the 3.8.0 release
  • Bump version
  • Add an attr function to make outputting HTML attributes easier

fabpot and others added 30 commits May 17, 2022 07:48
…TypeError` (ju1ius)

This PR was submitted for the 3.x branch but it was squashed and merged into the 2.x branch instead.

Discussion
----------

Fixes `CallExpression::reflectCallable()` throwing `TypeError`

See twigphp#3708

Commits
-------

e333ccc Fixes `CallExpression::reflectCallable()` throwing `TypeError`
* 2.x:
  Fixes `CallExpression::reflectCallable()` throwing `TypeError`
* 2.x:
  Removed unneeded ext refs
Bugfix typo in text attribute name see twigphp#3710
This PR was merged into the 2.x branch.

Discussion
----------

Bugfix typo in twig/intl-exta

Bugfix typo in text attribute name see twigphp#3710

Commits
-------

fd2f6d4 Bugfix typo in twig/intl-exta
* 2.x:
  Bugfix typo in twig/intl-exta
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
* pull/3713:
  chore: Set permissions for GitHub actions
* 2.x:
  chore: Set permissions for GitHub actions
If a static method cannot be resolved to the calling class, but the calling class has, or inherits, a `__callStatic` handler, this allows the `__callStatic` handler to be used with the calling class, and not the inherited class as would occur with reflection. This allows systems such as Laravel facades to still work.

Fixes twigphp#3716
…ng class (bennothommo)

This PR was merged into the 2.x branch.

Discussion
----------

Allow inherited magic method to still run with calling class

This is twigphp#3719 ported to 2.x and improved a bit.

I also reported php/php-src#8932 because the underlying behavior of PHP is broken to me.

If a static method cannot be resolved to the calling class, but the calling class has, or inherits, a `__callStatic` handler, this allows the `__callStatic` handler to be used with the calling class, and not the inherited class as would occur with reflection. This allows systems such as Laravel facades to still work.

Fixes twigphp#3716

Commits
-------

d1457a4 Allow inherited magic method to still run with calling class
* 2.x:
  Fix CS
  Allow inherited magic method to still run with calling class
* 2.x:
  Bump version
  Prepare the 2.15.2 release
  Update CHANGELOG
This PR was merged into the 2.x branch.

Discussion
----------

Make doc clearer for the replace filter

Closes twigphp#3733

Commits
-------

c25a1ef Make doc clearer
* 2.x:
  Make doc clearer
GromNaN and others added 27 commits October 21, 2023 19:08
… and `str_ends_with` (GromNaN)

This PR was merged into the 3.x branch.

Discussion
----------

Compile `starts/ends with` using `str_starts_with` and `str_ends_with`

Since we now require PHP 8.0 polyfill twigphp#3884, we can use `str_starts_with` and `str_ends_with` to compile `starts with` and `ends with` expressions.

Example with `bootstrap_4_layout.html.twig` [line 6-7](https://github.com/symfony/symfony/blob/e6d1ed4edb5ae197ec7d25ddaf64cfa456229504/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig#L6-L7) (see deep [diff](https://www.diffchecker.com/18CtPeja/)):

```twig
    {%- set prepend = not (money_pattern starts with '{{') -%}
    {%- set append = not (money_pattern ends with '}}') -%}
```

Previous compilation:
```php
// line 6
$context["prepend"] =  !(is_string($__internal_compile_0 = (isset($context["money_pattern"]) || array_key_exists("money_pattern", $context) ? $context["money_pattern"] : (function () { throw new RuntimeError('Variable "money_pattern" does not exist.', 6, $this->source); })())) && is_string($__internal_compile_1 = "{{") && ('' === $__internal_compile_1 || 0 === strpos($__internal_compile_0, $__internal_compile_1)));
// line 7
$context["append"] =  !(is_string($__internal_compile_2 = (isset($context["money_pattern"]) || array_key_exists("money_pattern", $context) ? $context["money_pattern"] : (function () { throw new RuntimeError('Variable "money_pattern" does not exist.', 7, $this->source); })())) && is_string($__internal_compile_3 = "}}") && ('' === $__internal_compile_3 || $__internal_compile_3 === substr($__internal_compile_2, -strlen($__internal_compile_3))));
```

With this change:
```php
// line 6
$context["prepend"] =  !(is_string($__internal_compile_0 = (isset($context["money_pattern"]) || array_key_exists("money_pattern", $context) ? $context["money_pattern"] : (function () { throw new RuntimeError('Variable "money_pattern" does not exist.', 6, $this->source); })())) && is_string($__internal_compile_1 = "{{") && str_starts_with($__internal_compile_0, $__internal_compile_1));
// line 7
$context["append"] =  !(is_string($__internal_compile_2 = (isset($context["money_pattern"]) || array_key_exists("money_pattern", $context) ? $context["money_pattern"] : (function () { throw new RuntimeError('Variable "money_pattern" does not exist.', 7, $this->source); })())) && is_string($__internal_compile_3 = "}}") && str_ends_with($__internal_compile_2, $__internal_compile_3));
```

Commits
-------

30b5a56 Compile starts/ends with using PHP8 functions str_starts/ends_with
…romNaN)

This PR was merged into the 3.x branch.

Discussion
----------

Compile Elvis operator into Elvis operator `?:`

When using ternary operator without "then" part, the "condition" part is evaluated twice, which is inconsistent with how PHP works.
The Twig template `A ?: B` is currently compiled as `A ? A : B` in PHP. This PR change it to `A ?: B`.

If `A` is a complex expression, it improves performance to only execute the expression once.
If `A` is has a side effect (like updating a variable), the expression being executed twice could result in a bug. ([example in PHP](https://3v4l.org/LWZLR))

Example with ``@WebProfiler`/Collector/form.html.twig` [line 9](https://github.com/symfony/symfony/blob/e6d1ed4edb5ae197ec7d25ddaf64cfa456229504/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig#L9) (see deep [diff](https://www.diffchecker.com/jOm3dE13/))

```twig
{{ collector.data.nb_errors ?: collector.data.forms|length }}
```

Previous compilation:
```php
echo twig_escape_filter($this->env, (((isset($context["error_count"]) || array_key_exists("error_count", $context) ? $context["error_count"] : (function () { throw new RuntimeError('Variable "error_count" does not exist.', 9, $this->source); })())) ? ((isset($context["error_count"]) || array_key_exists("error_count", $context) ? $context["error_count"] : (function () { throw new RuntimeError('Variable "error_count" does not exist.', 9, $this->source); })())) : (twig_get_attribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 9, $this->source); })()), "countDefines", [], "any", false, false, false, 9))), "html", null, true);
```

After this change:
```php
echo twig_escape_filter($this->env, ((isset($context["error_count"]) || array_key_exists("error_count", $context) ? $context["error_count"] : (function () { throw new RuntimeError('Variable "error_count" does not exist.', 9, $this->source); })()) ?: twig_get_attribute($this->env, $this->source, (isset($context["collector"]) || array_key_exists("collector", $context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.', 9, $this->source); })()), "countDefines", [], "any", false, false, false, 9)), "html", null, true);
```

Commits
-------

fb0d749 Compile Elvis operator with Elvis operator
… allowed methods/properties (YSaxon)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Fix premature loop exit in Security Policy lookup of allowed methods/properties

The current security policy logic exits too soon when checking permissions for allowed classes and their methods/properties, causing false negatives in situations involving classes related by inheritance.

Consider the following configuration:

```
'methods' => [
  'App\BasicCollection' => ['sortAlphabetically'],
  'App\AdvancedCollection'=> ['sortByTimestamp'],
],
```
where `AdvancedCollection` is a subclass of `BasicCollection`, and `mylist` is an instance of `AdvancedCollection`

If you try to call `{{ mylist.sortByTimestamp() }}`, the current code will first match `mylist` against `App\BasicCollection`. Since `sortByTimestamp` is not an allowed method for `App\BasicCollection`, the code will exit the loop and incorrectly deny access. It will never get to checking `App\AdvancedCollection`.

Note that reordering classes in the config can't solve this issue. If you flipped the order, then it would fail for `{{ mylist.sortAlphabetically() }}` instead.

This pull request fixes the issue by only exiting the loop early when both the class and method/property match.

Commits
-------

5e1838d Fix premature loop exit in Security Policy lookup of allowed methods/properties
* 2.x:
  Fix premature loop exit in Security Policy lookup of allowed methods/properties
…ter prototype (drjayvee)

This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix IntlExtension::formatDateTime use of date formatter prototype

See twigphp/intl-extra#6 for more details

Commits
-------

c75762c Fix IntlExtension::formatDateTime use of date formatter prototype
… methods (markhuot)

This PR was merged into the 3.x branch.

Discussion
----------

Add `@codeCoverageIgnore` to untestable compiled methods

I've been experimenting with adding my compiled templates to my code coverage reports and it works largely as expected. Templates that get executed return percentages accurate to the number of lines the tests actually cover. The only exception are the "meta" methods on the compiled template that aren't necessarily called by the tests.

This PR adds ``@codeCoverageIgnore`` comments to the compiled template for all non-display methods so the coverage report only lists lines from `doDisplay`.

I'm assuming that I will need to update some of the Twig tests to account for these new comments, but am curious if you'd be open to this change.

An example screenshot below. The last line shows line 46 out of the compiled template is never executed. The compiled template's `getDebugInfo` even correctly informs me that line 46 maps to line 4 in my `.twig` so I'll work on updating the line numbering next.

![image](https://user-images.githubusercontent.com/48975/166098890-fbaf99ad-9aa4-4430-9f82-050f482a6777.png)

Commits
-------

1cf610b Add `@codeCoverageIgnore` to untestable compiled methods
…rds-square)

This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Catch errors thrown during template rendering

Some errors, like not providing a function the proper number of arguments or division by zero, extend from `\Error` rather than `\Exception`. This PR catches these types of errors during template rendering and throws a `RuntimeError` in order to provide better debugging information.

Commits
-------

85bf01b Catch errors thrown during template rendering
…alize)

This PR was merged into the 3.x branch.

Discussion
----------

Removed duplicate sentence in macro scoping

Commits
-------

73f5cad Remove duplicate sentence in macro scoping
This PR was merged into the 3.x branch.

Discussion
----------

Fix tests and CS

Commits
-------

4be326a Fix tests and CS
This PR was merged into the 3.x branch.

Discussion
----------

Bump dependencies

Commits
-------

fdb9d9e Bump dependencies
This PR was merged into the 3.x branch.

Discussion
----------

Add PHP 8.3 to the CI

Commits
-------

a04cc88 Add PHP 8.3 to the CI
…YSaxon)

This PR was merged into the 3.x branch.

Discussion
----------

Minor rename of Sandbox test: functions->methods

Commits
-------

6273264 Minor rename of SandboxTest functions->methods
…ion (keulinho)

This PR was merged into the 3.x branch.

Discussion
----------

Fix timezone fallback to CoreExtension in IntlExtension

This is probably a regression from twigphp#3844

Refer to my comment on the original MR: twigphp#3844 (comment)

Commits
-------

144c4da Fix timezone fallback to CoreExtension in IntlExtension
@mpdude mpdude closed this Dec 6, 2023
@mpdude mpdude deleted the add-attr-function branch December 6, 2023 22:12
@mpdude mpdude restored the add-attr-function branch December 6, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet