Commit Graph

28762 Commits

Author SHA1 Message Date
Dany Maillard
44d67ed5f5 [ExpressionLanguage] Create an ExpressionFunction from a PHP function name 2017-02-20 09:23:01 -08:00
Fabien Potencier
61a67ecc5a bug #21072 [DI] Fix method autowiring in ResolveDefinitionTemplatesPass (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix method autowiring in ResolveDefinitionTemplatesPass

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

cc @nicolas-grekas

Commits
-------

57661e4 [DI] Fix method autowiring in ResolveDefinitionTemplatesPass
2016-12-30 07:43:06 +01:00
Fabien Potencier
ba932ae095 minor #21096 [DependencyInjection] register alias after defining the class (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] register alias after defining the class

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

Commits
-------

d8d4417 [DI] register alias after defining the class
2016-12-29 22:26:19 +01:00
Christian Flothmann
d8d44170f0 [DI] register alias after defining the class 2016-12-29 16:20:01 +01:00
Nicolas Grekas
64e1da0581 feature #21082 [Cache] TraceableAdapter (Nyholm)
This PR was squashed before being merged into the 3.3-dev branch (closes #21082).

Discussion
----------

[Cache] TraceableAdapter

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

I moved the TraceableAdapter to a separate PR and added some tests. I found a small bug which was fixed.

Commits
-------

5cc4baf [Cache] TraceableAdapter
2016-12-29 11:50:15 +01:00
Tobias Nyholm
5cc4bafb10 [Cache] TraceableAdapter 2016-12-29 11:50:13 +01:00
Kévin Dunglas
57661e40fe
[DI] Fix method autowiring in ResolveDefinitionTemplatesPass 2016-12-28 11:50:08 +01:00
Fabien Potencier
d0e8476afc Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  [FrameworkBundle] Allow multiple transactions with the same name
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:45:09 +01:00
Fabien Potencier
f4a635957e Merge branch '3.1' into 3.2
* 3.1:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:44:30 +01:00
Fabien Potencier
4c453f617d Merge branch '2.8' into 3.1
* 2.8:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:43:25 +01:00
Fabien Potencier
9a64d83436 Merge branch '2.7' into 2.8
* 2.7:
  fixed @return when returning this or static
  override property constraints in child class
  [Console] improved code coverage of Command class
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:39:57 +01:00
Fabien Potencier
eeb9192cf3 minor #21054 Fix @return statements to use $this or static when relevant (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix @return statements to use $this or static when relevant

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

see #20290

Commits
-------

3c0693d fixed @return when returning this or static
2016-12-27 11:38:09 +01:00
Nicolas Grekas
59dc976caf bug #20959 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer (fancyweb)
This PR was squashed before being merged into the 3.2 branch (closes #20959).

Discussion
----------

[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer

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

I ran into a case that led to an `AnnotationException` in the `AnnotationsCacheWarmer`. I deduced that these exceptions should be ignored to not break the cache warming process.

The case :
* You have a controller in your `AppBundle\Controller\` directory.
* You have an annotation in this controller that will never be found (because you made a mistake in the class / annotation name) or not every time : for example your controller is only used in dev env and it uses an annotation that is defined in a vendor bundle that is only under the `require-dev` key in your `composer.json` because you don't need it in your production deployment. So in production, your controller exists but will never be used. However the vendor bundle does not exist.
* You dump your autoload files with composer using the `--optimize` option.
* You end up with an `AnnotationException`.

Why :
* In the [`FrameworkExtension`](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L189), the `**Bundle\Controller\` pattern is added as an "annotated class to compile".
* In the [`AddClassesToCachePass`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php#L50), all the classes defined in the `autoload_classmap.php` file are matched against the previous pattern.
* Your controller will match. So even if you don't use it at all in your application, the annotation will still be read and the exception will be thrown.

Commits
-------

6749569 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
2016-12-27 10:59:18 +01:00
Thomas Calvet
67495693a4 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer 2016-12-27 10:59:17 +01:00
Fabien Potencier
3c0693de23 fixed @return when returning this or static 2016-12-27 08:23:47 +01:00
Fabien Potencier
085171fc50 bug #20795 [FrameworkBundle] Allow multiple transitions with the same name (Padam87)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Allow multiple transitions with the same name

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

Commits
-------

7c86e16 [FrameworkBundle] Allow multiple transactions with the same name
2016-12-26 21:42:16 +01:00
Fabien Potencier
5a0157f928 feature #20938 [DI] Prepare dropping "strict" handling in loaders (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Prepare dropping "strict" handling in loaders

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

"strict" has been deprecated in 2.8, removed from 3.0, but loaders still read them
(note that the XSD still mentions it for BC at XML level, but it has no effect.)

We could also deprecate the attribute in XML, but I don't see the need since it's already ignored.
In YAML, we need people to remove this trailing `=`, which is why the PR is on master with a deprecation.

Commits
-------

243d160 [DI] Prepare dropping "strict" handling in loaders
2016-12-26 18:57:20 +01:00
Nicolas Grekas
243d160615 [DI] Prepare dropping "strict" handling in loaders 2016-12-26 17:39:10 +01:00
Fabien Potencier
2e0b61eaff bug #20859 Avoid warning in PHP 7.2 because of non-countable data (wouterj)
This PR was merged into the 2.7 branch.

Discussion
----------

Avoid warning in PHP 7.2 because of non-countable data

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

Recently, the "[Counting of non-countable objects][1]" RFC was merged in PHP 7.2-dev. This means `count()` now causes a warning when passing anything that's not countable (e.g. `null` or `''`).

As PHP does not lazily execute conditions, `FormUtil::isEmtpy($data) || 0 === count($data)` will cause *both* conditions to be executed. This means `count($data)` errors when `$data` is empty.

Splitting it up in 2 statements avoids the warning being triggered in PHP 7.2.

See https://travis-ci.org/symfony-cmf/content-bundle/jobs/181815895 for a failing test caused by this bug.

 [1]: https://wiki.php.net/rfc/counting_non_countables

Commits
-------

94253e8 Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-26 12:09:56 +01:00
Fabien Potencier
0c1260ca89 bug #21053 [Validator] override property constraints in child class (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] override property constraints in child class

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

Commits
-------

8b281fe override property constraints in child class
2016-12-26 11:59:28 +01:00
Christian Flothmann
8b281fe401 override property constraints in child class 2016-12-25 18:58:48 +01:00
Fabien Potencier
e5ce4c9383 removed unneeded comment 2016-12-23 22:13:36 +01:00
Fabien Potencier
a4ac1a785e minor #20817 [Console] improved code coverage of Command class (ShinDarth)
This PR was squashed before being merged into the 2.7 branch (closes #20817).

Discussion
----------

[Console] improved code coverage of Command class

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

This PR increases the code coverage of the Command class from ``86.82%`` to ``96.90%``.

Commits
-------

d393113 [Console] improved code coverage of Command class
2016-12-23 21:36:17 +01:00
ShinDarth
d39311385f [Console] improved code coverage of Command class 2016-12-23 21:36:12 +01:00
Fabien Potencier
f1d8575d38 bug #21034 [FrameworkBundle] Make TemplateController working without the Templating component (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Make TemplateController working without the Templating component

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

The template controller was missed during #15502. Btw I've added some tests for this controller.

Commits
-------

89ccbc4 [FrameworkBundle] Make TemplateController working without the Templating component
2016-12-23 21:28:53 +01:00
Christian Flothmann
7bc268e8c0 Merge branch '3.2'
* 3.2:
  use HHVM 3.15 to run tests
  [TwigBridge] fix Twig 2.x compatibility
  removed some PHP CS Fixer rules
  Improve language
  [Console] SymfonyStyle: Escape trailing backslashes in user texts
  Mention the community review guide
  [Form] fix group sequence based validation
  [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-23 18:11:40 +01:00
Christian Flothmann
a3788e7ce6 Merge branch '3.1' into 3.2
* 3.1:
  use HHVM 3.15 to run tests
  [TwigBridge] fix Twig 2.x compatibility
  removed some PHP CS Fixer rules
  Improve language
  [Console] SymfonyStyle: Escape trailing backslashes in user texts
  Mention the community review guide
  [Form] fix group sequence based validation
  [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-23 18:05:10 +01:00
Christian Flothmann
e1d2426d56 Merge branch '2.8' into 3.1
* 2.8:
  use HHVM 3.15 to run tests
  [TwigBridge] fix Twig 2.x compatibility
  removed some PHP CS Fixer rules
  Improve language
  [Console] SymfonyStyle: Escape trailing backslashes in user texts
  Mention the community review guide
  [Form] fix group sequence based validation
  [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-23 17:43:44 +01:00
Christian Flothmann
8a27d79a10 Merge branch '2.7' into 2.8
* 2.7:
  use HHVM 3.15 to run tests
  [TwigBridge] fix Twig 2.x compatibility
  removed some PHP CS Fixer rules
  Improve language
  [Console] SymfonyStyle: Escape trailing backslashes in user texts
  Mention the community review guide
  [Form] fix group sequence based validation
  [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-23 17:32:24 +01:00
Christian Flothmann
9f1858580e minor #21033 use HHVM 3.15 to run tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

use HHVM 3.15 to run tests

| 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        |

For some reason, tests with the latest HHVM release fail on Travis CI. Neither do I have an idea why they are failing nor do I have the ability to trace the issue down so far to be able to open an issue for them. However, as tests pass with HHVM 3.15 I suggest that we use this version to run tests on Travis until we figure out the reason or tests pass again with a more recent release.

Commits
-------

a70b389 use HHVM 3.15 to run tests
2016-12-23 16:55:58 +01:00
Kévin Dunglas
89ccbc450c
[FrameworkBundle] Make TemplateController working without the Templating component 2016-12-23 16:30:22 +01:00
Christian Flothmann
a70b389c38 use HHVM 3.15 to run tests 2016-12-23 15:46:49 +01:00
Fabien Potencier
5c5c9116ae minor #21021 [TwigBridge] Late deprecation for TwigRendererEngine::setEnvironment() (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBridge] Late deprecation for TwigRendererEngine::setEnvironment()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20093#discussion_r81309117
| License       | MIT
| Doc PR        | n/a

This method should have been deprecated in 3.2 since the twig environment should be injected through the constructor and replacing it later can break things (see https://github.com/symfony/symfony/pull/20093#discussion_r81309117 for details).

Maybe this could target 3.2

Commits
-------

aabb73c Deprecate TwigRendererEngine::setEnvironment()
2016-12-23 14:00:15 +01:00
Fabien Potencier
7fa18ba1b9 minor #21030 [TwigBridge] fix Twig 2.x compatibility (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] fix Twig 2.x compatibility

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

Commits
-------

08e5747 [TwigBridge] fix Twig 2.x compatibility
2016-12-23 13:31:39 +01:00
Christian Flothmann
08e5747ce1 [TwigBridge] fix Twig 2.x compatibility 2016-12-23 12:20:51 +01:00
Fabien Potencier
d559e26e0b removed some PHP CS Fixer rules 2016-12-23 08:00:05 +01:00
Fabien Potencier
0bb7eafba0 bug #20970 [Console] Fix question formatting using SymfonyStyle::ask() (chalasr, ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix question formatting using SymfonyStyle::ask()

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

Given
```php
$io = new SymfonyStyle($input, $output);
$io->ask('Do you want to use Foo\\Bar <comment>or</comment> Foo\\Baz\\?', 'Foo\\Bar');
```

Before output
![before](http://image.prntscr.com/image/af3806f866654deda2dec79b50d1ffa2.png)

After output
![after](http://image.prntscr.com/image/59c031d9e02949cebeae7a4734c7043f.png)

Commits
-------

e189183 [Console] SymfonyStyle: Escape trailing backslashes in user texts
9d46712 [Console] Fix question formatting using SymfonyStyle::ask()
2016-12-22 13:18:06 +01:00
Robin Chalas
aabb73cab8 Deprecate TwigRendererEngine::setEnvironment() 2016-12-22 12:01:04 +01:00
Fabien Potencier
d73dd8b66e minor #21001 [HttpKernel] Continuation of #20569 (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Continuation of #20569

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20567#discussion_r92928110
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Forgotten in #20569 and makes #20567 truly a feature only.

Before

![image](https://cloud.githubusercontent.com/assets/1047696/21361738/971e4f8e-c6e5-11e6-8b08-8a5f8ab4f1f0.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/21361752/a6dc5380-c6e5-11e6-9f18-3bc3d7db94be.png)

Commits
-------

e1616b3 [HttpKernel] Continuation of #20569
2016-12-22 11:32:39 +01:00
Fabien Potencier
69264ff921 Merge branch '3.2'
* 3.2:
  [HttpKernel] Continuation of #20599 for 3.1
  Add missing upgrade path for Request::isMethodSafe() deprecation
2016-12-22 11:31:13 +01:00
Fabien Potencier
072393d924 Merge branch '3.1' into 3.2
* 3.1:
  [HttpKernel] Continuation of #20599 for 3.1
2016-12-22 11:30:54 +01:00
Fabien Potencier
73a7169a5d bug #20999 [HttpKernel] Continuation of #20599 for 3.1 (ro0NL)
This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Continuation of #20599 for 3.1

| Q             | A
| ------------- | ---
| Branch?       | 3.1 only
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

#20599 is only merged up to 2.8.. not sure if 3.1 is already EOM?

Commits
-------

c245f87 [HttpKernel] Continuation of #20599 for 3.1
2016-12-22 11:29:08 +01:00
Fabien Potencier
e13e3f0d0c minor #21016 [Validator][Translation] Improve Norwegian language (tarjei)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #21016).

Discussion
----------

[Validator][Translation] Improve Norwegian language

I suspect the file has been updated from the Danish translation and thus some of the sentences sound weird in Norwegian. Here's a suggested update.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I suspect the change can be applied to lower branches as well :)

Commits
-------

1255786 Improve language
2016-12-22 11:26:53 +01:00
Tarjei Huse
1255786811 Improve language
I suspect the file has been updated from the Danish translation and thus some of the sentences sound weird in Norwegian. Here's a suggested update.
2016-12-22 11:26:53 +01:00
Roland Franssen
e1616b3ca3 [HttpKernel] Continuation of #20569 2016-12-20 17:39:17 +00:00
Roland Franssen
c245f87a47 [HttpKernel] Continuation of #20599 for 3.1 2016-12-20 17:35:30 +00:00
Fabien Potencier
2de9dd157c minor #20994 Add missing upgrade path for Request::isMethodSafe() deprecation (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

Add missing upgrade path for Request::isMethodSafe() deprecation

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Fixed tickets| #20990

Commits
-------

570a76c Add missing upgrade path for Request::isMethodSafe() deprecation
2016-12-20 05:13:53 +01:00
Robin Chalas
570a76cd9c
Add missing upgrade path for Request::isMethodSafe() deprecation 2016-12-20 00:25:41 +01:00
Nicolas Grekas
d29fc2ca9e Merge branch '3.2'
* 3.2:
  Fix merge
2016-12-19 22:17:42 +01:00
Nicolas Grekas
411afbe854 Fix merge 2016-12-19 22:16:36 +01:00