Commit Graph

2773 Commits

Author SHA1 Message Date
Fabien Potencier bf326dbb75 bumped version to 1.23.2-DEV 2015-11-05 13:52:08 +01:00
Fabien Potencier d9b6333ae8 prepared the 1.23.1 release v1.23.1 2015-11-05 13:49:06 +01:00
Fabien Potencier e4bedf07d8 updated CHANGELOG 2015-11-05 13:47:51 +01:00
Fabien Potencier 93ec90b857 minor #1910 Code grooming (SpacePossum)
This PR was merged into the 1.x branch.

Discussion
----------

Code grooming

Commits
-------

aa7c53a Add dot to the end of exception messages.
b8a6e72 set back default
0f5f9aa Typo in doc
8bb9b83 CS
355213b static vs. self
d4e3ada Code grooming
2015-11-05 13:38:16 +01:00
Possum aa7c53ae0a Add dot to the end of exception messages. 2015-11-05 13:20:01 +01:00
Possum b8a6e72414 set back default 2015-11-05 12:52:55 +01:00
Possum 0f5f9aaf2a Typo in doc 2015-11-05 10:22:46 +01:00
Possum 8bb9b83e32 CS 2015-11-05 10:12:15 +01:00
Possum 355213ba6c static vs. self 2015-11-05 10:11:09 +01:00
Possum d4e3adaaee Code grooming 2015-11-05 10:04:30 +01:00
Fabien Potencier fd84403ac7 minor #1909 [Extension] Fix deprecation message typo (Rvanlaak)
This PR was merged into the 1.x branch.

Discussion
----------

[Extension] Fix deprecation message typo

Commits
-------

cb5ea52 fix deprecation message typo
2015-11-03 19:31:41 +01:00
Richard van Laak cb5ea5244f fix deprecation message typo 2015-11-03 17:56:06 +01:00
Fabien Potencier e7e334c8b2 bug #1907 made exception messages more precise (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

made exception messages more precise

Replaces #1906 and #1902

Commits
-------

04d6738 fixed typos
2015-11-02 19:00:50 +01:00
Fabien Potencier 79af12a1d2 bug #1905 fix BC, revert to pre 1.23 behavior, and make use of pattern an option (remicollet)
This PR was merged into the 1.x branch.

Discussion
----------

fix BC, revert to pre 1.23 behavior, and make use of pattern an option

For context see twigphp/Twig-extensions#155

Commits
-------

ee5e25e fix BC, revert to pre 1.23 behavior, and make use of pattern an option
2015-11-02 15:52:06 +01:00
Fabien Potencier 7203d4bee6 minor #1901 fixed Twig_Extension_GlobalsInterface name in comments (craue)
This PR was merged into the 1.x branch.

Discussion
----------

fixed Twig_Extension_GlobalsInterface name in comments

It looks like renaming `Twig_Extension_GlobalsProviderInterace` to `Twig_Extension_GlobalsInterface` was done only partially while working on #1897.

Commits
-------

2660286 fixed Twig_Extension_GlobalsInterface name in comments
2015-11-02 15:49:25 +01:00
Fabien Potencier 04d6738ddf fixed typos 2015-11-02 15:47:58 +01:00
Fabien Potencier 20249a0320 fixed CS 2015-11-02 15:44:22 +01:00
Fabien Potencier 52b8d992dc minor #1904 make cache per user (on linux) (remicollet)
This PR was merged into the 1.x branch.

Discussion
----------

make cache per user (on linux)

Just because I hate having failed test when I run test once on 1 account, then once on another account ;)

Commits
-------

da5cac6 make cache per user (on linux)
2015-11-02 15:44:00 +01:00
Remi Collet ee5e25eb46 fix BC, revert to pre 1.23 behavior, and make use of pattern an option 2015-11-02 15:13:46 +01:00
Remi Collet da5cac6b54 make cache per user (on linux) 2015-11-02 15:09:33 +01:00
Christian Raue 2660286d28 fixed Twig_Extension_GlobalsInterface name in comments 2015-11-02 13:15:25 +01:00
Fabien Potencier b9b6f367e1 bumped version to 1.23.1-DEV 2015-10-29 16:33:13 -07:00
Fabien Potencier 5868cd822f prepared the 1.23.0 release v1.23.0 2015-10-29 16:29:01 -07:00
Fabien Potencier d83deb9f32 feature #1897 deprecated Twig_ExtensionInterface::getGlobals() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_ExtensionInterface::getGlobals()

Commits
-------

e3a325f deprecated Twig_ExtensionInterface::getGlobals()
2015-10-29 16:18:41 -07:00
Fabien Potencier e3a325f249 deprecated Twig_ExtensionInterface::getGlobals() 2015-10-29 16:13:49 -07:00
Fabien Potencier 7220fd2d88 fixed typo 2015-10-27 22:39:34 -07:00
Fabien Potencier babf8f80e7 feature #1896 deprecated the possibility to override an extension by registering an other one with the same name (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated the possibility to override an extension by registering an other one with the same name

Commits
-------

72485c2 deprecated the possibility to override an extension by registering another one with the same name
2015-10-27 22:13:25 -07:00
Fabien Potencier 72485c2ea0 deprecated the possibility to override an extension by registering another one with the same name 2015-10-27 22:04:22 -07:00
Fabien Potencier 847d48e790 feature #1886 deprecated Twig_ExtensionInterface::initRuntime() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_ExtensionInterface::initRuntime()

I'm working on splitting Twig extensions into 2 different phases: compilation and runtime. The goal is to avoid having to load the runtime environment of an extension when compiling templates. That also opens the way to be able to lazy-load Twig extensions.

While working on the split, I realized that the `initRuntime()` method on `Twig_ExtensionInterface` is not needed anymore. It was added at a time `needs_environment` did not exist and was a way to keep the environment around for custom filters/tests/functions. But nowadays, that's not needed anymore. I did a quick search on Github, and most of the implementation I found just store the environment in a local property, which is not needed anymore. So, I propose to deprecate it in 1.x and remove it in 2.0.

Commits
-------

9774f4f deprecated Twig_ExtensionInterface::initRuntime()
2015-10-27 20:46:45 -07:00
Fabien Potencier d4f699a089 minor #1894 removed useless phpdocs (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

removed useless phpdocs

Commits
-------

6450c87 removed useless phpdocs
2015-10-27 20:44:19 -07:00
Fabien Potencier dbd7884857 minor #1893 fixed message inconsistency (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed message inconsistency

Commits
-------

12ea202 fixed message inconsistency
2015-10-27 20:40:16 -07:00
Fabien Potencier 12ea20245c fixed message inconsistency 2015-10-26 19:17:27 +01:00
Fabien Potencier 6450c870ae removed useless phpdocs 2015-10-26 18:35:50 +01:00
Fabien Potencier 9caf7722cc renamed a method 2015-10-26 15:00:58 +01:00
Fabien Potencier 9774f4f1a4 deprecated Twig_ExtensionInterface::initRuntime() 2015-10-25 15:48:46 +01:00
Fabien Potencier 0468a7ede4 feature #1890 deprecated Twig_Environment::computeAlternatives() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_Environment::computeAlternatives()

Commits
-------

d0a5ef8 deprecated Twig_Environment::computeAlternatives()
2015-10-25 12:39:22 +01:00
Fabien Potencier d0a5ef8cc0 deprecated Twig_Environment::computeAlternatives() 2015-10-25 09:10:27 +01:00
Fabien Potencier 6ddd911aa5 minor #1891 made the tests semantically more correct (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

made the tests semantically more correct

Calling `initRuntime()` is just a side-effect of loading a template.

Commits
-------

f839ad3 made the tests semantically more correct
2015-10-25 08:16:08 +01:00
Fabien Potencier f839ad328e made the tests semantically more correct 2015-10-25 08:12:33 +01:00
Fabien Potencier f47af35457 bug #1874 Fix adding mock extension to Twig environment (GromNaN)
This PR was merged into the 1.x branch.

Discussion
----------

Fix adding mock extension to Twig environment

When the extension class is not defined in a file but in eval'd code we cannot assume `ReflectionObject::getFileName()` will return a valid file path.
https://bugs.php.net/bug.php?id=63901

This PR adds a test case that produce the following error without the fix:

```
1) Twig_Tests_EnvironmentTest::testAddMockExtension
filemtime(): stat failed for phar:///usr/local/php5-5.5.14-20140628-105310/bin/phpunit/phpunit-mock-objects/Framework/MockObject/Generator.php(335) : eval()'d code

/xxx/Twig/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php:40
/xxx/Twig/lib/Twig/Environment.php:769
/xxx/Twig/test/Twig/Tests/EnvironmentTest.php:304
```

I encountered this issue with mocked twig extensions in SonataAdminBundle test suite:
https://github.com/sonata-project/SonataAdminBundle/blob/master/Tests/Controller/HelperControllerTest.php#L254

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1870
| License       | MIT
| Doc PR        | n/a

Commits
-------

a57b1cc Fix adding mock extension to Twig environment
2015-10-25 07:53:33 +01:00
Fabien Potencier a4597a4c00 bumped version to 1.23 2015-10-24 23:38:20 +02:00
Jérôme Tamarelle a57b1cc3be Fix adding mock extension to Twig environment
When the extension class is not defined in a file but in eval'd code
we cannot assume ReflectionObject::getFileName will return
a valid file path.

https://bugs.php.net/bug.php?id=63901
2015-10-23 13:31:04 +02:00
Fabien Potencier 53aa70a3f4 minor #1884 removed obsolete documentation about requiring classes (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

removed obsolete documentation about requiring classes

Commits
-------

eac8c0c removed obsolete documentation about requiring classes
2015-10-23 08:29:28 +02:00
Fabien Potencier eac8c0cd3f removed obsolete documentation about requiring classes 2015-10-21 08:17:22 +02:00
Fabien Potencier 50e68e68f0 Revert "simplified logic and improve perf slightly"
This reverts commit 7030fdd767.
2015-10-20 19:44:50 +02:00
Fabien Potencier 656ecc0a5c bumped version to 1.22.4-DEV 2015-10-13 09:16:21 +02:00
Fabien Potencier ebfc36b7e7 prepared the 1.22.3 release v1.22.3 2015-10-13 09:07:02 +02:00
Fabien Potencier 353e1a4e42 updated CHANGELOG 2015-10-13 09:03:42 +02:00
Fabien Potencier b75dab9e6d bug #1868 fixed BC break by allowing null as the cache strategy (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed BC break by allowing null as the cache strategy

fixes #1851

Commits
-------

d6316d6 fixed BC break by allowing null as the cache strategy
2015-10-13 09:02:05 +02:00
Fabien Potencier 35a396418b minor #1869 added a note about using .. and | together (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

added a note about using .. and | together

fixes #1860

Commits
-------

3802920 added a note about using .. and | together
2015-10-13 09:01:13 +02:00