Commit Graph

4065 Commits

Author SHA1 Message Date
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
Fabien Potencier ae39480f01 Prepare the last release for the 1.x series v1.44.6 2021-11-25 14:31:46 +01:00
Fabien Potencier 7e5ba95dc8 minor #3584 Fix emphasis on compiler to bold styling (jonnyeom)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Fix emphasis on compiler to bold styling

This is just so the Lexer, Parser, and Compiler has the same styling

Commits
-------

97ae3c8e Fix emphasis on compiler to bold styling
2021-11-04 18:52:44 +01:00
Jonny Eom 97ae3c8e97 Fix emphasis on compiler to bold styling 2021-11-04 18:52:41 +01:00
Fabien Potencier 8bab813c86 minor #3570 Update .gitattributes to exclude non-dist files (kaznovac)
This PR was submitted for the 3.x branch but it was squashed and merged into the 1.x branch instead.

Discussion
----------

Update .gitattributes to exclude non-dist files

resolves #3503

some extra files can be excluded also:
- changelog
- license
- readme

should this be rebased to 1.x, 2.x?

Commits
-------

92766d0e Update .gitattributes to exclude non-dist files
2021-10-04 11:03:20 +02:00
Marko Kaznovac 92766d0e0c Update .gitattributes to exclude non-dist files 2021-10-04 11:03:13 +02:00
Fabien Potencier 3a18bb3a6b Fix CS 2021-09-22 17:05:23 +02:00
Fabien Potencier 212e49be47 minor #3563 Missing Environment and LoaderInterface (remicollet)
This PR was merged into the 1.x branch.

Discussion
----------

Missing Environment and LoaderInterface

Detected by CI...

Commits
-------

61df934a Missing Environment and LoaderInterface
2021-09-22 17:03:26 +02:00
Remi Collet 61df934a7e Missing Environment and LoaderInterface 2021-09-22 11:33:46 +02:00
Fabien Potencier 803efed8ea Bump version 2021-09-17 10:36:08 +02:00
Fabien Potencier dd4353357c Prepare the 1.44.5 release v1.44.5 2021-09-17 10:35:19 +02:00
Fabien Potencier 881744313e Update CHANGELOG 2021-09-17 10:34:38 +02:00
Fabien Potencier 9ba72f1b82 bug #3548 Explicitly specify the encoding for mb_ord in JS escaper (oleg-st)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Explicitly specify the encoding for mb_ord in JS escaper

`mb_ord` should be called with the specified UTF-8 encoding to make it independent of `mb_internal_encoding`.

Related to https://github.com/twigphp/Twig/pull/3397

Commits
-------

da24c934 Explicitly specify the encoding for mb_ord in JS escaper
2021-07-08 12:58:51 +02:00
Oleg Stepanischev da24c9340e Explicitly specify the encoding for mb_ord in JS escaper
Explicitly specify the encoding for mb_ord in JS escaper - fix
2021-07-08 12:58:33 +02:00
Fabien Potencier 4fe3a98928 bug #3535 Fix implicit float to int casts (derrabus)
This PR was merged into the 1.x branch.

Discussion
----------

Fix implicit float to int casts

PHP 8.1 is picky about implicit float-to-int casts if we lose precision because of that cast. This PR attempts to fix all issues on the 1.x branch.

Commits
-------

de9cd76d Fix implicit flot to int casts
2021-06-06 18:31:09 +02:00
Alexander M. Turek de9cd76d7c Fix implicit flot to int casts 2021-06-06 00:32:22 +02:00
Fabien Potencier b8026c8907 minor #3525 Replace secure.php.net with www.php.net (mauriciofauth)
This PR was merged into the 1.x branch.

Discussion
----------

Replace secure.php.net with www.php.net

It is no longer necessary to use the _secure_ subdomain.

See: https://news-web.php.net/php.internals/104533.

> Instead of having mirrors, we are moving all of PHP.net to HTTPS (and get rid of https://secure.php.net)

Commits
-------

1783298b Replace secure.php.net with www.php.net
2021-05-19 09:12:00 +02:00
Maurício Meneghini Fauth 1783298bb8 Replace secure.php.net with www.php.net
See: https://news-web.php.net/php.internals/104533

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-18 16:07:51 -03:00
Fabien Potencier 9a7f3c8d0e Add a note about end of 1.x maintenance 2021-05-18 13:13:36 +02:00
Fabien Potencier 2fa8bce914 Move Drupal test file to tests/ 2021-05-18 13:09:01 +02:00
Fabien Potencier 589d6a5514 minor #3524 fix file permissions (romainmenke)
This PR was submitted for the 3.x branch but it was squashed and merged into the 1.x branch instead.

Discussion
----------

fix file permissions

`drupal_test.sh` was executable and when installing the plugin with `composer` it retains these permissions.

Better to call this script as `bash ./drupal_test.sh` and have `100644` as permissions.

I could only find one reference to this script and it was commented out.
Updated it anyway as it might be revived at some point.

Commits
-------

bd706520 fix file permissions
2021-05-18 13:06:55 +02:00
romainmenke bd70652057 fix file permissions 2021-05-18 13:06:51 +02:00
Fabien Potencier 577c5423d6 Bump version 2021-05-16 14:11:59 +02:00
Fabien Potencier 4d40042152 Prepare the 1.44.4 release v1.44.4 2021-05-16 14:11:20 +02:00
Fabien Potencier f7bfa2ec6f Update CHANGELOG 2021-05-16 14:07:12 +02:00
Fabien Potencier 124f10c27e Revert "bug #3499 Fix: A template name cannot be an absolute path (mvorisek)"
This reverts commit 83f26e402b, reversing
changes made to f5d3c704df.
2021-05-16 14:06:26 +02:00
Fabien Potencier 35f8b78b66 Bump version 2021-05-12 09:59:57 +02:00
Fabien Potencier 920a9b9a61 Prepare the 1.44.3 release v1.44.3 2021-05-12 09:58:47 +02:00
Fabien Potencier 18e7034b99 Update CHANGELOG 2021-05-12 09:58:27 +02:00
Fabien Potencier 87c09f6d87 minor #3520 Fix CS (fabpot)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

Fix CS

Commits
-------

59f3e8e5 Fix CS
bded3886 Migrate to the new PHP CS Fixer config file
2021-05-12 09:24:36 +02:00
Fabien Potencier 59f3e8e5dc Fix CS 2021-05-12 09:19:37 +02:00
Fabien Potencier bded388664 Migrate to the new PHP CS Fixer config file 2021-05-12 09:11:44 +02:00
Fabien Potencier 83f26e402b bug #3499 Fix: A template name cannot be an absolute path (mvorisek)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

Fix: A template name cannot be an absolute path

fixes #3209, https://github.com/PrestaShop/PrestaShop/issues/20709

The source of this is in https://github.com/twigphp/Twig/blob/v3.3.0/src/Loader/FilesystemLoader.php#L212 which NEVER accepts an absolute name (path is always prefixed with path). As discussed in https://github.com/twigphp/Twig/issues/3209#issuecomment-814816613.

The original code emit php warning when `open_basedir` is set on Windows on NTS PHP build (because of PHP inconsistency between TS and NTS, see https://bugs.php.net/bug.php?id=78939). This PR fixes this issue and no warning is emitted.

This fix is important as Symfony relies on exception when absolute path is given in https://github.com/symfony/symfony/blob/v3.4.47/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php#L82.

Please merge and issue a patch release for every major Twig version.

Commits
-------

3a67fc7d Fix: A template name cannot be an absolute path
2021-04-07 17:57:29 +02:00
Michael Voříšek 3a67fc7dc5 Fix: A template name cannot be an absolute path 2021-04-07 17:57:24 +02:00
Fabien Potencier f5d3c704df Fix reference in docs 2021-04-06 08:27:15 +02:00
Fabien Potencier 9773024395 Fix CS 2021-03-22 09:23:44 +01:00
Fabien Potencier 47201dc3bc bug #3495 added PHP 8.1 as experimental (oleg-andreyev)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

added PHP 8.1 as experimental

fixes #3494

Commits
-------

bef89dcc added PHP 8.1 as experimental
2021-03-22 09:19:59 +01:00
Oleg Andreyev bef89dcc1e added PHP 8.1 as experimental 2021-03-22 09:19:53 +01:00
Fabien Potencier ad02eb9236 minor #3481 Fix length filter doc Add some return types (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Fix length filter doc Add some return types

These return types preemptively tell consumers that Twig 4 / PHP 9 might add real return types here.

For `Profile`, we can add the return types right away because the class is `@final`.

Spotted by DebugClassLoader comparing return types of internal PHP base types / magic methods.

Commits
-------

50d032c4 Add some return types
2021-02-02 16:24:34 +01:00
Nicolas Grekas 50d032c4df Add some return types 2021-02-02 16:16:41 +01:00
Fabien Potencier bfcf4091a9 minor #3476 remove the C extension (xabbuh)
This PR was merged into the 1.x branch.

Discussion
----------

remove the C extension

fixes #3474

Commits
-------

db9cb3af remove the C extension
2021-01-26 10:11:36 +01:00
Christian Flothmann db9cb3af68 remove the C extension 2021-01-26 09:00:57 +01:00
Fabien Potencier 0fc3341a39 minor #3473 Fix length filter documentation about computation (VincentLanglet)
This PR was merged into the 1.x branch.

Discussion
----------

Fix length filter documentation about computation

According to https://github.com/twigphp/Twig/blob/1.x/src/Extension/CoreExtension.php#L1317

Commits
-------

473f73ef Fix length filter doc
2021-01-15 14:14:47 +01:00
Vincent Langlet 473f73ef2e Fix length filter doc 2021-01-15 12:57:47 +01:00
Fabien Potencier 91e1a3cd56 minor #3472 Adding link to the SymfonyCasts Twig tutorial (weaverryan)
This PR was merged into the 1.x branch.

Discussion
----------

Adding link to the SymfonyCasts Twig tutorial

Hi!

We have (and have had) for a long time, a really nice Twig screencast on SymfonyCasts with interactive coding challenges so people can play with Twig. I thought a link from Twig's docs might be useful :). I was also thinking a link from https://twig.symfony.com/doc/3.x/ might make sense, but I think this isn't modifiable directly via the docs (but tell me if I'm wrong).

Here's the "look":

<img width="776" alt="Screen Shot 2021-01-13 at 1 07 40 PM" src="https://user-images.githubusercontent.com/121003/104491678-93ef6480-55a0-11eb-9dce-db24c0748267.png">

Thanks!

Commits
-------

500a7da9 Adding link to the SymfonyCasts Twig tutorial
2021-01-14 08:57:08 +01:00
Ryan Weaver 500a7da999 Adding link to the SymfonyCasts Twig tutorial 2021-01-13 13:07:49 -05:00
Fabien Potencier 31adc5e157 Bump version to ${NEXT_VERSION}-DEV 2021-01-05 11:10:47 +01:00
Fabien Potencier 138c493c5b Prepare the 1.44.2 release v1.44.2 2021-01-05 11:10:05 +01:00
Fabien Potencier c04c68f2d3 Update CHANGELOG 2021-01-05 11:09:30 +01:00
Fabien Potencier d6cbc70064 Bump copyright year 2020-12-30 09:16:13 +01:00