Commit Graph

27273 Commits

Author SHA1 Message Date
Ener-Getick
c0a26bc8b0
[HttpFoundation] Deprecate extending some methods 2016-09-14 12:52:06 +02:00
Fabien Potencier
2bc54e0863 minor #19779 [FrameworkBundle] Fix test scanning the full tmp directory (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Fix test scanning the full tmp directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes/no
| Fixed tickets | n/a
| License       | MIT

Next to #19777 (my bad for both ☺️ ).

@nicolas-grekas It seems there are [some similar ones](https://github.com/search?utf8=%E2%9C%93&q=tempnam%28sys_get_temp_dir%28%29%2C+repo%3Asymfony%2Fsymfony&type=Code&ref=searchresults) that need to be fixed

Commits
-------

bb9413b [FrameworkBundle] Fix test scanning the full tmp directory
2016-08-30 10:58:27 -07:00
Fabien Potencier
0fd7cdb40c bug #19724 [Console] Register terminal env variables (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Register terminal env variables

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19719
| License       | MIT
| Doc PR        | -

Solves #19719 by setting `COLUMNS` & `LINES` env vars when running an Application.
Those env vars are then meant to be reused when using the Process component.

~~It creates a new `Terminal::registerEnv()` method allowing to register terminal related informations into environment variables. ~~It allows getting "consistent terminal informations" across processes.~~

Unless the env vars handling is backported from the 3.2 `Terminal` class to older branches in the `Application` class, the mentioned issue can't be solved this way.

Commits
-------

926bc51 [Console] Register terminal env variables
2016-08-30 10:54:44 -07:00
Fabien Potencier
816a3349ed minor #19774 [TwigBundle] Use vector images on the exception page (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBundle] Use vector images on the exception page

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | #19756
| License       | MIT

Before:
![capture du 2016-08-29 15-40-37](https://cloud.githubusercontent.com/assets/243674/18053289/f5ab33cc-6dfe-11e6-94cf-720098c214d8.png)

After:
![capture du 2016-08-29 21-00-36](https://cloud.githubusercontent.com/assets/243674/18063547/b274f520-6e2b-11e6-95cd-180ccb4cbf28.png)

Ghost SVG provided by  @patrick-mcdougle, thanks to him.

Commits
-------

1a3a4be [TwigBundle] Use vector images on the exception page
2016-08-30 10:02:24 -07:00
Nicolas Grekas
1a3a4be10d [TwigBundle] Use vector images on the exception page 2016-08-29 21:00:23 +02:00
Robin Chalas
bb9413b71b
[FrameworkBundle] Fix test scanning the full tmp directory 2016-08-29 20:58:41 +02:00
Fabien Potencier
9b39c7a091 minor #19777 [Yaml] Fix test scanning the full tmp directory (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] Fix test scanning the full tmp directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Commits
-------

d2d4b3c [Yaml] Fix test scanning the full tmp directory
2016-08-29 09:55:43 -07:00
Nicolas Grekas
d2d4b3ca82 [Yaml] Fix test scanning the full tmp directory 2016-08-29 17:14:38 +02:00
Nicolas Grekas
6f2ea672fe bug #19757 [PhpUnitBridge] allow to pass a message as string (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] allow to pass a message as string

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Currently our tests for deprecation messages just pass "accidentally" (we never pass arrays but only strings).

Commits
-------

8ceed79 [PhpUnitBridge] allow to pass a message as string
2016-08-29 10:55:32 +02:00
Nicolas Grekas
29b6b9b83e Merge branch '3.1'
* 3.1:
  [HttpKernel] Fix assertion of deprecation in fragment renderer
  [Yaml] sync test and actually triggered message
2016-08-29 10:54:53 +02:00
Nicolas Grekas
120a05d0e1 minor #19766 [Yaml] sync test and actually triggered message (xabbuh)
This PR was merged into the 3.1 branch.

Discussion
----------

[Yaml] sync test and actually triggered message

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see failures in #19757
| License       | MIT
| Doc PR        |

Commits
-------

e8dfd4d [Yaml] sync test and actually triggered message
2016-08-29 10:53:50 +02:00
Nicolas Grekas
3030c79442 feature #19755 [VarDumper] Get dump as string with $dumper->dump(..., true); (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Get dump as string with `$dumper->dump(..., true);`

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

ping @lyrixx @wouterj since you expressed interest in boilerplate reduction around this in the past :)

Commits
-------

4be9776 [VarDumper] Get dump as string with `$dumper->dump(..., true);`
2016-08-28 20:58:22 +02:00
Fabien Potencier
feb5413b6b minor #19759 [Console] Fix Application::setDefaultCommand() missing return in docblock (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Fix Application::setDefaultCommand() missing return in docblock

| Q             | A
| ------------- | ---
| Branch?       | master
| License       | MIT

Despite the fact IDEs are clever enough to make this useless, I think it's clearly part of the contract of this public method anyway 😄

Commits
-------

0165835 [Console] Fix Application::setDefaultCommand() missing return in docblock
2016-08-27 17:33:16 -07:00
Maxime Steinhausser
01658355da [Console] Fix Application::setDefaultCommand() missing return in docblock 2016-08-27 19:36:37 +02:00
Fabien Potencier
d923e35714 fixed CS 2016-08-27 09:29:21 -07:00
Fabien Potencier
8ee21c723b minor #19758 [Yaml] improve deprecation message and changelog (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] improve deprecation message and changelog

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

a7128f8 [Yaml] improve deprecation message and changelog
2016-08-27 09:28:58 -07:00
Fabien Potencier
30ef6ff9be minor #19731 [Yaml] improve changelog and upgrade entries (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] improve changelog and upgrade entries

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  |no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Improves the wording as suggested by @javiereguiluz in https://github.com/symfony/symfony/pull/19538#issuecomment-237769389.

Commits
-------

e288256 [Yaml] improve changelog and upgrade entries
2016-08-27 09:27:30 -07:00
Fabien Potencier
e33c694088 minor #19760 [HttpKernel] Fix assertion of deprecation in surrogate fragment renderer (chalasr)
This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Fix assertion of deprecation in surrogate fragment renderer

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

The message has been changed in #19281 but not the corresponding assertion

Commits
-------

4245bac [HttpKernel] Fix assertion of deprecation in fragment renderer
2016-08-27 09:26:19 -07:00
Robin Chalas
4245bacdd5
[HttpKernel] Fix assertion of deprecation in fragment renderer 2016-08-27 14:44:09 +02:00
Christian Flothmann
e8dfd4dc48 [Yaml] sync test and actually triggered message 2016-08-27 13:14:18 +02:00
Christian Flothmann
e28825656b [Yaml] improve changelog and upgrade entries 2016-08-27 13:07:10 +02:00
Christian Flothmann
8ceed79599 [PhpUnitBridge] allow to pass a message as string 2016-08-27 12:47:23 +02:00
Christian Flothmann
a7128f8c96 [Yaml] improve deprecation message and changelog 2016-08-27 12:43:03 +02:00
Nicolas Grekas
4be977627e [VarDumper] Get dump as string with $dumper->dump(..., true); 2016-08-27 08:12:35 +02:00
Nicolas Grekas
0cf50e2788 Merge branch '3.1'
* 3.1:
  fix typo
  add "provides" for psr/cache-implementation
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  Add symfony/inflector to composer.json "replaces"
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 14:08:28 +02:00
Nicolas Grekas
224ebc0aff Merge branch '2.8' into 3.1
* 2.8:
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 14:04:02 +02:00
Nicolas Grekas
b05de7d2be Merge branch '2.7' into 2.8
* 2.7:
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 13:57:43 +02:00
Nicolas Grekas
cb91ade74c minor #19744 [symfony/symfony] fix typo in "provides" for psr/cache-implementation (alcohol)
This PR was merged into the 3.1 branch.

Discussion
----------

[symfony/symfony] fix typo in "provides" for psr/cache-implementation

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19742
| License       | MIT

Commits
-------

9ec4d3a fix typo
2016-08-26 13:41:46 +02:00
Rob Bast
9ec4d3a023 fix typo 2016-08-26 13:33:40 +02:00
Christophe Coevoet
0a4ded98ad bug #19743 [symfony/symfony] add "provides" for psr/cache-implementation (alcohol)
This PR was merged into the 3.1 branch.

Discussion
----------

[symfony/symfony] add "provides" for psr/cache-implementation

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19742
| License       | MIT

Commits
-------

2f4c801 add "provides" for psr/cache-implementation
2016-08-26 12:02:38 +02:00
Rob Bast
2f4c801934 add "provides" for psr/cache-implementation
solves #19742
2016-08-26 11:42:10 +02:00
Fabien Potencier
af81c8cfad bug #19388 [Validator][GroupSequence] fixed GroupSequence validation ignores PropetyMetadata of parent classes (Sandro Hopf)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19388).

Discussion
----------

[Validator][GroupSequence] fixed GroupSequence validation ignores PropetyMetadata of parent classes

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19387
| License       | MIT
| Doc PR        | N/A

Commits
-------

54a7eff [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
2016-08-25 18:04:23 -07:00
Sandro Hopf
54a7eff868 [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes 2016-08-25 18:04:22 -07:00
Fabien Potencier
98051e909f feature #19604 [Routing] Add seamless support for unicode requirements (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Routing] Add seamless support for unicode requirements

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #3629, #5236, #19562
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6890

This PR adds unicode support to route matching and generation by automatically adding the `u` modifier to regexps that use either unicode characters or unicode enabled character classes (e.g. `\p...` `\x{...}` `\X`).

As a side note, if one wants to match a single unicode character (vs a single byte), one should use `\PM` or `\X` instead of `.` *or* set the `unicode` parameter to true.

Commits
-------

a829d34 [Routing] Add seamless support for unicode requirements
2016-08-25 11:15:34 -07:00
Fabien Potencier
16893a02b2 bug #19729 Add symfony/inflector to composer.json "replaces" (teohhanhui)
This PR was merged into the 3.1 branch.

Discussion
----------

Add symfony/inflector to composer.json "replaces"

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

73c143c Add symfony/inflector to composer.json "replaces"
2016-08-25 11:07:18 -07:00
Fabien Potencier
6de4359e4b minor #19736 [FrameworkBundle][Security] Remove useless mocks (Ener-Getick)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Security] Remove useless mocks

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Removes mocks causing issues in https://github.com/symfony/symfony/pull/19734.

Commits
-------

fcd3345 [FrameworkBundle][Security] Remove useless mocks
2016-08-25 10:52:51 -07:00
Ener-Getick
fcd3345e34
[FrameworkBundle][Security] Remove useless mocks 2016-08-25 14:52:03 +02:00
Nicolas Grekas
a829d3411d [Routing] Add seamless support for unicode requirements 2016-08-25 11:23:01 +02:00
Teoh Han Hui
73c143cfac Add symfony/inflector to composer.json "replaces" 2016-08-25 14:05:37 +08:00
Maxime STEINHAUSSER
926bc51910 [Console] Register terminal env variables 2016-08-25 01:54:15 +02:00
Fabien Potencier
6bfb42efe9 minor #19720 [DoctrineBridge] Enhance exception message in EntityUserProvider (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] Enhance exception message in EntityUserProvider

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

Lots of people use the `UserEntityProvider` without having a custom Repository for the user entity configured on the entity provider and in this case, if the `property` key of the provider isn't set, the exception thrown says:

> The Doctrine repository "Doctrine\ORM\EntityRepository" must implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface

"Doctrine\ORM\EntityRepository" doesn't feel relevant.
Plus, we can't guess that the exception is thrown first because there is no `property` configured on the corresponding provider, that is useful to have in the trace IMHO.

If accepted, `"Symfony\Component\Security\Core\User\UserProviderInterface"` will need to be replaced by `"Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface"` when merging in newer branches.

Commits
-------

acc0460 [DoctrineBridge] Enhance exception message in EntityUserProvider
2016-08-24 13:51:15 -07:00
Robin Chalas
acc0460100 [DoctrineBridge] Enhance exception message in EntityUserProvider
Typo/CS fixes
Avoid checking Repository class as it is not always the default one
Compromise
Change wording
Tests this method
2016-08-24 15:39:58 +02:00
Fabien Potencier
4030c0358d bug #19601 [FrameworkBundle] Added friendly exception when constraint validator class does not exist (yceruto)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19601).

Discussion
----------

[FrameworkBundle] Added friendly exception when constraint validator class does not exist

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Currently when mistakenly we type a [Custom Constraint Validator class](http://symfony.com/doc/current/validation/custom_constraint.html#creating-the-validator-itself) or the "alias name" from [validator service](http://symfony.com/doc/current/validation/custom_constraint.html#constraint-validators-with-dependencies)  (which would occurs frequently for newcomers) is shown `ClassNotFoundException`:

> Attempted to load class "alias_name" from namespace "Symfony\Component\Validator".
Did you forget a "use" statement for another namespace?
500 Internal Server Error - ClassNotFoundException

**This PR tries to improve the error message when this happen.**

But I'm not sure about the exception class used ([`InvalidArgumentException`](https://github.com/yceruto/symfony/blob/master/src/Symfony/Component/Validator/Exception/InvalidArgumentException.php)) : ?

*  [`ConstraintDefinitionException`](https://github.com/yceruto/symfony/blob/master/src/Symfony/Component/Validator/Exception/ConstraintDefinitionException.php) would be another option, because the source of the error comes from the custom [`Constraint`](https://github.com/yceruto/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Validator/ConstraintValidatorFactory.php#L68) definition.

The text message more convenient from this little mistake: ?

* This mistake happen for two reason: FQCN or alias name supplied by constraint not found.
* The constraint validator service was declared incorrectly (missing alias)
* Perhaps some hint how the developer should resolve the mistake.

Maybe some documentation core member would help me ?

Commits
-------

b66ea5e added friendly exception when constraint validator does not exist or it is not enabled
2016-08-24 03:54:03 -07:00
Yonel Ceruto
b66ea5e16e added friendly exception when constraint validator does not exist or it is not enabled 2016-08-24 03:54:03 -07:00
Nicolas Grekas
df8cf70673 minor #19722 [ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage (lyrixx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Example (for @nicolas-grekas :trollface: )

```php
<?php

require __DIR__.'/vendor/autoload.php';

use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use Symfony\Component\ExpressionLanguage\Node\NameNode;

$el = new ExpressionLanguage();

$expression = $el->parse('a + b + 12', ['a','b']);

function dump_with_highlight($node)
{
    $dump = '';

    foreach ($node->toArray() as $v) {
        if (is_scalar($v)) {
            $dump .= $v;
        } elseif ($v instanceof NameNode) {
            $dump .= sprintf('`%s`', dump_with_highlight($v));
        } else {
            $dump .= dump_with_highlight($v);
        }
    }

    return $dump;
}

echo dump_with_highlight($expression->getNodes());
```
Result:

```
((<strong>a</strong> + <strong>b</strong>) + 12)
```

Commits
-------

b6d0050 [ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage
2016-08-24 12:53:01 +02:00
Grégoire Pineau
b6d0050c38 [ExpressionLanguage] Move the ::dump method to the Node classe to ease its usage 2016-08-24 11:14:26 +02:00
Nicolas Grekas
384995e6da minor #19718 Break switch (tvlooy)
This PR was merged into the 2.7 branch.

Discussion
----------

Break switch

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

c811eb7 remove duplicate instruction
2016-08-24 09:53:56 +02:00
Tom Van Looy
c811eb7e8e remove duplicate instruction 2016-08-23 21:36:25 +02:00
Fabien Potencier
865f344143 feature #19714 [VarDumper] Handle "title" attribute on virtual properties (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Handle "title" attribute on virtual properties

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

As seen with @wouterj , it would be better to *not* display the stack level in front of each stack line.
This PR does just that, and moves the stack level to a title attribute in HtmlDumper.

![capture du 2016-08-23 14-09-43](https://cloud.githubusercontent.com/assets/243674/17891395/cc40b088-693b-11e6-8523-89ff51be929a.png)

Commits
-------

19bcf63 [VarDumper] Handle "title" attribute on virtual properties
2016-08-23 10:20:39 -07:00
Fabien Potencier
f5f1e103c4 feature #19687 [FrameworkBundle] Use relative paths in templates paths cache (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Use relative paths in templates paths cache

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #3079
| License       | MIT
| Doc PR        | -

This implements the usage of relative paths instead of absolute ones in `var/cache/*/templates.php`, important for ability to build the cache in a different context than where it will be used.

This PR transforms the following `templates.php`:

``` php
<?php return array (
  ':default:index.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/default/index.html.twig',
  '::base.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/base.html.twig',
);
```

Into:

``` php
<?php return array (
  ':default:index.html.twig' => __DIR__.'/../../../app/Resources/views/default/index.html.twig',
  '::base.html.twig' => __DIR__.'/../../../app/Resources/views/base.html.twig',
);
```

I also added tests for the TemplateCachePathsWarmer and improved tests for the TemplateLocator.

Commits
-------

6f6139c [FrameworkBundle] Use relative paths in templates paths cache
2016-08-23 10:17:40 -07:00