Commit Graph

5505 Commits

Author SHA1 Message Date
Thomas Landauer f52b45d226 Minor: Fixing language 2023-02-02 13:22:48 +01:00
Fabien Potencier eb8bde3c41 Bump LICENSE year 2023-01-01 09:42:51 +01:00
Fabien Potencier d573914760 Bump version 2022-12-27 13:27:28 +01:00
Fabien Potencier 3e059001d6 Prepare the 2.15.4 release v2.15.4 2022-12-27 13:26:20 +01:00
Fabien Potencier de55785d85 Update CHANGELOG 2022-12-27 13:19:32 +01:00
Fabien Potencier 7cbabe42e2 bug #3738 do not clean up whitespace text nodes inside if tags (xabbuh)
This PR was merged into the 2.x branch.

Discussion
----------

do not clean up whitespace text nodes inside if tags

Commits
-------

c8ec092c do not clean up whitespace text nodes inside if tags
2022-12-26 18:08:03 +01:00
Christian Flothmann c8ec092ceb do not clean up whitespace text nodes inside if tags 2022-12-26 18:04:52 +01:00
Fabien Potencier 6cd1473d65 Bump version of actions/cache 2022-12-26 17:29:08 +01:00
naveen 3b6a2a6910 chore: Included githubactions in the dependabot config
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>
2022-12-26 17:19:56 +01:00
Fabien Potencier 61f55998d2 Fix tests 2022-12-26 16:06:40 +01:00
Fabien Potencier 6c2bb9fc8d bug #3769 Updates CoreExtension::twig_constant to check for definition first to avoid hard crash (Alex Henderson-Roche)
This PR was merged into the 2.x branch.

Discussion
----------

Updates CoreExtension::twig_constant to check for definition first to avoid hard crash

The behaviour of PHP's constant() method has been updated after https://github.com/php/php-src/issues/9905 was accepted and fixed in PHP 8.1 (and previously changed post PHP 8.0) . This PR prevents a fatal error in the case a constant is supplied that doesn't actually exist.

Commits
-------

56b31224 Updates CoreExtension::twig_constant to check for definition first to avoid hard crash
2022-12-26 13:36:08 +01:00
Alex Henderson-Roche 56b31224bd Updates CoreExtension::twig_constant to check for definition first to avoid hard crash 2022-12-26 13:36:01 +01:00
Fabien Potencier dec30692ab Do more Github actions updates 2022-12-26 12:47:02 +01:00
Fabien Potencier e428a0b701 Use checkout actions v3 2022-12-26 12:43:42 +01:00
Fabien Potencier 7f9cad9972 Add PHP 8.2 to the tests 2022-12-26 12:43:08 +01:00
Fabien Potencier ef7a5ef2e3 Remove a test that was a regression test for the C extension 2022-12-26 12:42:02 +01:00
Fabien Potencier 6642c3a520 minor #3779 Cycle function: Add output to example code (kathi-at-datrycs)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Cycle function: Add output to example code

At first I couldn't grasp the concept of the cycle function, but after I saw the output in twigfiddle it was clear. I can imagine other readers having the same issue. Therefore I suggest to add the output to the example code.

Commits
-------

1e3b126c Add output
2022-12-15 11:46:20 +01:00
Katharina Luthe 1e3b126cf2 Add output 2022-12-15 11:46:17 +01:00
Fabien Potencier 2ae70b5b9c minor #3780 Add missing argument for the cycle function (stof)
This PR was merged into the 2.x branch.

Discussion
----------

Add missing argument for the cycle function

Commits
-------

883fb333 Add missing argument for the cycle function
2022-12-15 11:45:51 +01:00
Fabien Potencier c8cf74de25 minor #3781 Fix the drupal testing script (stof)
This PR was merged into the 2.x branch.

Discussion
----------

Fix the drupal testing script

Commits
-------

f3b8c012 Fix the drupal testing script
2022-12-15 11:45:00 +01:00
Christophe Coevoet f3b8c01262 Fix the drupal testing script 2022-12-15 11:35:27 +01:00
Christophe Coevoet 883fb333b3 Add missing argument for the cycle function 2022-12-15 11:26:46 +01:00
Fabien Potencier fba01bfba2 bug #3777 Fix optimizing closures callbacks (nicolas-grekas)
This PR was merged into the 2.x branch.

Discussion
----------

Fix optimizing closures callbacks

Follows https://github.com/twigphp/Twig/pull/3722 and https://github.com/php/php-src/issues/8932

Uses a dedicated method added to PHP 8.1.11 (and 8.0.24, but I feel like there is no need to make the check too complex for an outdated version. We just need a marker to make the code simpler when we'll bump to PHP >= 8.1.11.)

Commits
-------

406b3e59 Fix optimizing closures callbacks
2022-12-13 16:48:15 +01:00
Nicolas Grekas 406b3e5969 Fix optimizing closures callbacks 2022-12-12 16:33:12 +01:00
Fabien Potencier 0986e54682 minor #3759 Update templates.rst (Francoscopic)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Update templates.rst

Changed "an other strategy" to "another strategy". I assume this latter should be the intended sentence structure.

Commits
-------

4904f38e Update templates.rst
2022-10-15 07:53:42 +02:00
Joshua Francis 4904f38e32 Update templates.rst 2022-10-15 07:53:40 +02:00
Fabien Potencier e542b9d5a1 minor #3751 Update michelf/php-markdown require-dev to allow v2 (bobvandevijver)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Update michelf/php-markdown require-dev to allow v2

This new release should work fine: https://github.com/michelf/php-markdown#version-history

Commits
-------

1a8ac1d8 Update michelf/php-markdown require-dev to allow v2
2022-10-05 08:25:59 +02:00
Bob van de Vijver 1a8ac1d83f Update michelf/php-markdown require-dev to allow v2 2022-10-05 08:25:56 +02:00
Fabien Potencier efe6294cc2 Bump version 2022-09-28 10:43:58 +02:00
Fabien Potencier ab402673db Prepare the 2.15.3 release v2.15.3 2022-09-28 10:40:08 +02:00
Fabien Potencier fc18c2ed30 Update CHANGELOG 2022-09-28 10:39:41 +02:00
Fabien Potencier d6ea14aa84 Merge branch '1.x' into 2.x
* 1.x:
  Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)
2022-09-28 10:36:46 +02:00
Fabien Potencier 35f3035c5d security #cve- Fix a security issue on filesystem loader (possibility to load a template outside a configured directory) (fabpot)
This PR was merged into the 1.x branch.
2022-09-28 10:36:08 +02:00
Fabien Potencier 9170edfa35 Fix doc CS 2022-09-28 08:40:57 +02:00
Fabien Potencier fab3e0ff0b minor #3744 Adding installation instructions for Symfony (ThomasLandauer)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Adding installation instructions for Symfony

Wording is taken from https://twig.symfony.com/doc/3.x/filters/format_datetime.html

Commits
-------

c034c1d2 Adding installation instructions for Symfony
2022-09-28 08:38:02 +02:00
Thomas Landauer c034c1d248 Adding installation instructions for Symfony
Wording is taken from https://twig.symfony.com/doc/3.x/filters/format_datetime.html
2022-09-28 08:37:59 +02:00
Fabien Potencier 226b73cff0 minor #3735 Use the PHP doc builder instead of Sphinx in CI (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Use the PHP doc builder instead of Sphinx in CI

Commits
-------

fcf65bd9 Use the PHP doc builder instead of Sphinx in CI
2022-08-14 15:28:40 +02:00
Fabien Potencier fcf65bd916 Use the PHP doc builder instead of Sphinx in CI 2022-08-14 15:25:29 +02:00
Fabien Potencier 6fe9edfed1 minor #3734 Make doc clearer for the replace filter (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Make doc clearer for the replace filter

Closes #3733

Commits
-------

c25a1efc Make doc clearer
2022-08-14 15:11:14 +02:00
Fabien Potencier c25a1efc80 Make doc clearer 2022-08-14 15:03:31 +02:00
Fabien Potencier 48fba37310 Bump version 2022-08-12 08:44:42 +02:00
Fabien Potencier 3e43405a9a Prepare the 2.15.2 release v2.15.2 2022-08-12 08:43:37 +02:00
Fabien Potencier 3296294482 Update CHANGELOG 2022-08-12 08:43:06 +02:00
Fabien Potencier f2cb718bdb Fix CS 2022-08-12 08:33:05 +02:00
Fabien Potencier 25283066ab bug #3722 Allow inherited magic method to still run with calling class (bennothommo)
This PR was merged into the 2.x branch.

Discussion
----------

Allow inherited magic method to still run with calling class

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

I also reported https://github.com/php/php-src/issues/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 https://github.com/twigphp/Twig/issues/3716

Commits
-------

d1457a40 Allow inherited magic method to still run with calling class
2022-08-12 08:31:44 +02:00
Fabien Potencier f8009347c4 Fix a security issue on filesystem loader (possibility to load a template outside a configured directory) 2022-07-13 16:03:29 +02:00
Ben Thomson d1457a40b6 Allow inherited magic method to still run with calling class
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 https://github.com/twigphp/Twig/issues/3716
2022-07-06 10:46:46 +02:00
Fabien Potencier c953a77b23 Merge branch 'pull/3713' into 2.x
* pull/3713:
  chore: Set permissions for GitHub actions
2022-07-04 21:57:15 +02:00
naveen 188fd290c5 chore: Set permissions for GitHub actions
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>
2022-07-04 21:55:50 +02:00
Fabien Potencier 40041cac12 bug #3711 Bugfix typo in twig/intl-exta (nyamsprod)
This PR was merged into the 2.x branch.

Discussion
----------

Bugfix typo in twig/intl-exta

Bugfix typo in text attribute name see https://github.com/twigphp/Twig/issues/3710

Commits
-------

fd2f6d42 Bugfix typo in twig/intl-exta
2022-06-10 10:32:47 +02:00