Commit Graph

31681 Commits

Author SHA1 Message Date
Nicolas Grekas
d8d0f87793 [TwigBundle] Add Doctrine Cache to dev dependencies 2017-06-14 09:33:02 +02:00
Nicolas Grekas
44955bea53 [Config] Fix ** GlobResource on Windows 2017-06-14 09:11:58 +02:00
Fabien Potencier
936c1a5c7d feature #23161 [FrameworkBundle] Deprecate useless --no-prefix option (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Deprecate useless --no-prefix option

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

It was a workaround, not needed since https://github.com/symfony/symfony/pull/21228. Let's deprecate it and remove it in 4.0.

Commits
-------

f7afa777d8 [FrameworkBundle] Deprecate useless --no-prefix option
2017-06-13 22:09:10 -07:00
Fabien Potencier
a75a32d661 bug #23166 [TwigBundle] Add Doctrine Cache to dev dependencies to fix failing unit tests (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] Add Doctrine Cache to dev dependencies to fix failing unit tests

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

Currently, the unit tests of TwigBundle are failing because Doctrine Cache is missing. Before the changes of #23131, this dependency was pulled via FrameworkBundle. This PR adds Doctrine Cache to the dev dependencies of TwigBundle, so the tests pass again.

```
There were 3 errors:

1) Symfony\Bundle\TwigBundle\Tests\CacheWarmingTest::testCacheIsProperlyWarmedWhenTemplatingIsAvailable
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.

2) Symfony\Bundle\TwigBundle\Tests\CacheWarmingTest::testCacheIsProperlyWarmedWhenTemplatingIsDisabled
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.

3) Symfony\Bundle\TwigBundle\Tests\NoTemplatingEntryTest::test
Symfony\Component\DependencyInjection\Exception\LogicException: Annotations cannot be enabled as the Doctrine Cache library is not installed.
```

Commits
-------

2dfde58851 Add Doctrine Cache to dev dependencies to fix failing unit tests.
2017-06-13 19:22:52 -07:00
Fabien Potencier
5bc4ef0224 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  SCA with Php Inspections (EA Extended): 2.7
  Remove deprecated each function
  Fixed PHPdoc return references in FormBuilderInterface
  [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2017-06-13 17:55:24 -07:00
Fabien Potencier
78f028cc75 fixed CS 2017-06-13 17:54:13 -07:00
Fabien Potencier
748a999416 bug #23171 [Yaml] Fix linting yaml with constants as keys (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] Fix linting yaml with constants as keys

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

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

55a8d35e64 [Yaml] Fix linting yaml with constants as keys
2017-06-13 17:23:18 -07:00
Robin Chalas
55a8d35e64 [Yaml] Fix linting yaml with constants as keys 2017-06-13 23:05:27 +02:00
Maxime Steinhausser
abd9007337 [FrameworkBundle] Remove unnecessary use 2017-06-13 20:29:33 +02:00
Robin Chalas
f7afa777d8 [FrameworkBundle] Deprecate useless --no-prefix option 2017-06-13 19:36:01 +02:00
Fabien Potencier
9649b9e5ca bug #23121 [Routing] Revert the change in [#b42018] with respect to Routing/Route.php (Dan Wilga)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #23121).

Discussion
----------

[Routing] Revert the change in [#b42018] with respect to Routing/Route.php

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

...because it breaks BC with third-party code which, for instance, might use a subclass of CompiledRoute within the options portion of the Route. Refers to https://github.com/symfony/symfony/pull/21090 and https://github.com/symfony/symfony/issues/23109

Commits
-------

f09893bed4 [Routing] Revert the change in [#b42018] with respect to Routing/Route.php
2017-06-13 10:12:09 -07:00
Dan Wilga
f09893bed4 [Routing] Revert the change in [#b42018] with respect to Routing/Route.php 2017-06-13 10:11:59 -07:00
Fabien Potencier
0300412ec1 feature #23105 [SecurityBundle][Profiler] Give info about called security listeners in profiler (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle][Profiler] Give info about called security listeners in profiler

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

Currently the profiler gives no info about security listeners (see fixed ticket), this displays each called listener with the time spent at calling it and its response if any.

![preview](https://image.prntscr.com/image/Wx-n-Ni_RQK5JGTdTZsdGw.png)

Commits
-------

369f19fcfd Give info about called security listeners in profiler
2017-06-13 09:07:04 -07:00
Alexander M. Turek
2dfde58851 Add Doctrine Cache to dev dependencies to fix failing unit tests. 2017-06-13 17:15:58 +02:00
Fabien Potencier
17d23a79e8 bug #23157 Fix the usage of FrameworkBundle in debug mode without Stopwatch (stof)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix the usage of FrameworkBundle in debug mode without Stopwatch

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

https://github.com/symfony/symfony/pull/23148 removed the loading of the debug.xml file when Stopwatch is not installed.
While all services defined in it are related to Stopwatch, the parameter was not (it is related to dumping the debug container in the compiler pass), which was breaking the usage of the bundle in debug mode without Stopwatch (exception triggered in the compiler pass)

Commits
-------

2ea26c1ffe Fix the usage of FrameworkBundle in debug mode without Stopwatch
2017-06-13 07:14:35 -07:00
Nicolas Grekas
7c3d0c7a46 [DI] Reference instead of inline for array-params 2017-06-13 13:14:06 +02:00
Malte Blättermann
3f7fd432df Fix Usage with anonymous classes
Replace forbidden characters in the the class names of Anonymous Classes in form of
"class@anonymous /symfony/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php0x7f3f5f267ad5"

Wrapped in eval to avoid PHP parsing errors < 7
2017-06-13 10:47:59 +02:00
Robin Chalas
369f19fcfd Give info about called security listeners in profiler 2017-06-13 10:30:58 +02:00
Christophe Coevoet
2ea26c1ffe Fix the usage of FrameworkBundle in debug mode without Stopwatch 2017-06-13 10:29:19 +02:00
Christian Flothmann
fddd754c0a add back support for legacy constant values 2017-06-13 09:43:03 +02:00
Fabien Potencier
f1e2fbd486 minor #23101 [FormBuilderInterface] Fixed PHPdoc return references (Javan Eskander)
This PR was merged into the 2.7 branch.

Discussion
----------

[FormBuilderInterface] Fixed PHPdoc return references

| Q             | A
| ------------- | ---
| Branch?       | 2.7 and higher
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (phpdoc)
| License       | MIT

In a case where the method `createFormBuilder()` was used where the methods `add()` and `getForm()` were chained onto it, the final resulting object was no longer a FormBuilder object as the `add()` and `remove()` methods was using a return variable that didn't work.
Should reference `self` as interfaces do not have a `$this` object.

Commits
-------

2f350d1d38 Fixed PHPdoc return references in FormBuilderInterface
2017-06-12 11:43:34 -07:00
Fabien Potencier
cc2363fa6c feature #23148 [FrameworkBundle] drop hard dependency on the Stopwatch component (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] drop hard dependency on the Stopwatch component

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | related to symfony/flex#14
| License       | MIT
| Doc PR        |

Commits
-------

8d70ca0ff4 drop hard dependency on the Stopwatch component
2017-06-12 11:05:06 -07:00
Fabien Potencier
18ecbd7011 feature #23131 [FrameworkBundle] Remove dependency on Doctrine cache (fabpot)
This PR was squashed before being merged into the 3.4 branch (closes #23131).

Discussion
----------

[FrameworkBundle] Remove dependency on Doctrine cache

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | related to symfony/flex#14
| License       | MIT
| Doc PR        | n/a

In our quest to remove hard dependencies, I propose to remove `doctrine/cache` from the default dependencies on the Framework bundle. That's possible now as we have PSR6 cache support in Symfony and because Doctrine cache is only used for the validator mapping cache.

The two other occurrences are for the serializer (already deprecated in 3.3) and for annotations, where we need to keep it, but as Doctrine annotations is already optional, that's not an issue.

Commits
-------

a4e336ea34 [FrameworkBundle] removed doctrine/cache as a dependency
b57895ccaf [FrameworkBundle] deprecated validator.mapping.cache.doctrine.apc
2017-06-12 10:50:15 -07:00
Fabien Potencier
a4e336ea34 [FrameworkBundle] removed doctrine/cache as a dependency 2017-06-12 09:10:25 -07:00
Nicolas Grekas
8bbfc96802 Merge branch '3.3' into 3.4
* 3.3:
  Fix the conditional definition of the SymfonyTestsListener
  [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
  [EventDispatcher] Remove dead code in WrappedListener
  Fix non-dumped voters in security panel
  [Yaml] Remove line number in deprecation notices
  [SecurityBundle] Made 2 service aliases private
2017-06-12 18:03:21 +02:00
Fabien Potencier
d3d62e9fa2 bug #23132 [FrameworkBundle] Fix colliding service ids (GuilhemN)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix colliding service ids

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

Rereading #23044, I realized that `routing.loader.directory` is already used, so it should be changed.

Commits
-------

a4d799ad0e [FrameworkBundle] Fix colliding service ids
2017-06-12 08:47:10 -07:00
Fabien Potencier
7fc255218e bug #23141 [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix keys resolution in ResolveParameterPlaceHoldersPass

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

Keys are resolved in 3.2, but we broke that when moving to AbstractRecursivePass.

Commits
-------

9251a2143d [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass
2017-06-12 08:25:47 -07:00
Fabien Potencier
c0486f667d minor #23142 [Workflow] Added more keywords in the composer.json (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Added more keywords in the composer.json

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

Commits
-------

79bc4b017d [Workflow] Added more keywords in the composer.json
2017-06-12 07:57:37 -07:00
Fabien Potencier
6852b105c4 bug #23145 Fix the conditional definition of the SymfonyTestsListener (stof)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix the conditional definition of the SymfonyTestsListener

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

This is a continuation of the attempts at fixing the PHPUnit 5 compatibility layer for the listener.
The signature mismatch error still happened when using the PHPUnit PHAR instead of a source install (hint: people using `simple-phpunit` are using a source install).

It looks like the class definition gets loaded by PHP before executing the code placed above it (and so the early return breaks). Putting the code inside a `else` instead works fine (the class definition probably cannot bubble up).

The known difference between the PHAR and a source install is that the source install relies on autoloading while the PHAR loads all PHPUnit classes through `require_once` eagerly (and so the parent class already exists when using the Symfony file).

@jpauli is it an expected behavior that early returns before class definitions don't work consistently ?

Regarding the patch itself, an alternative would be to move the PHPUnit 6+ implementation to a dedicated class instead, and use a `class_alias` for the else clause too. But I don't think it is worth it.

Commits
-------

0ec8b1c1ff Fix the conditional definition of the SymfonyTestsListener
2017-06-12 07:56:08 -07:00
Christian Flothmann
8d70ca0ff4 drop hard dependency on the Stopwatch component 2017-06-12 15:27:27 +01:00
Christophe Coevoet
0ec8b1c1ff Fix the conditional definition of the SymfonyTestsListener 2017-06-12 15:35:45 +02:00
Grégoire Pineau
79bc4b017d [Workflow] Added more keywords in the composer.json 2017-06-12 13:49:55 +02:00
Nicolas Grekas
9251a2143d [DI] Fix keys resolution in ResolveParameterPlaceHoldersPass 2017-06-12 12:11:53 +02:00
Guilhem Niot
a4d799ad0e [FrameworkBundle] Fix colliding service ids 2017-06-11 11:30:54 +02:00
Fabien Potencier
b57895ccaf [FrameworkBundle] deprecated validator.mapping.cache.doctrine.apc 2017-06-10 17:54:55 -07:00
Fabien Potencier
0dbba7bf4f minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #22931).

Discussion
----------

SCA with Php Inspections (EA Extended): 2.7

| 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

Static Code Analysis with Php Inspections (EA Extended): dead code and control flow tweaks.

Commits
-------

598ae56cc9 SCA with Php Inspections (EA Extended): 2.7
2017-06-10 17:25:34 -07:00
Vladimir Reznichenko
598ae56cc9 SCA with Php Inspections (EA Extended): 2.7 2017-06-10 17:25:31 -07:00
Fabien Potencier
9e2f394bf3 minor #23120 Remove deprecated each function (pierredup)
This PR was squashed before being merged into the 2.7 branch (closes #23120).

Discussion
----------

Remove deprecated each function

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

Replace the `each()` function which is deprecated in PHP 7.2 (https://wiki.php.net/rfc/deprecations_php_7_2#each)

Commits
-------

232caad876 Remove deprecated each function
2017-06-10 07:57:49 -07:00
Pierre du Plessis
232caad876 Remove deprecated each function 2017-06-10 07:57:48 -07:00
Fabien Potencier
7c1febd600 minor #23124 [Console] remove now useless condition (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] remove now useless condition

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

Commits
-------

c9c3495fc0 remove now useless condition
2017-06-10 07:55:02 -07:00
Christian Flothmann
c9c3495fc0 remove now useless condition 2017-06-10 13:08:03 +01:00
Fabien Potencier
63ecc9c60b feature #23114 [SecurityBundle] Lazy load security listeners (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Lazy load security listeners

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

Each of them is heavy and unused if a previous one sets a response or breaks in the middle.

Commits
-------

e3ee6bc349 Lazy load security listeners
2017-06-09 11:16:56 -07:00
Robin Chalas
e3ee6bc349 Lazy load security listeners 2017-06-09 17:57:53 +02:00
Fabien Potencier
d024c82b48 minor #23117 [EventDispatcher] Remove dead code in WrappedListener (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[EventDispatcher] Remove dead code in WrappedListener

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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 static `$cloner` property is unused since ab716c64de

Commits
-------

8b7de02413 [EventDispatcher] Remove dead code in WrappedListener
2017-06-09 08:14:08 -07:00
Fabien Potencier
e1bc7a80c8 minor #23118 [SecurityBundle] Fix non-dumped voters in profiler (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Fix non-dumped voters in profiler

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

As a bugfix since it was just forgot.

__before__
![before](https://image.prntscr.com/image/PvGuQeNmRFCBpYJTuHbjcg.png)
__after__
![after](https://image.prntscr.com/image/3Q-AuYq5SyKmC5RmQ6EErQ.png)

Commits
-------

c1fa308c0a Fix non-dumped voters in security panel
2017-06-09 08:13:05 -07:00
Robin Chalas
8b7de02413 [EventDispatcher] Remove dead code in WrappedListener 2017-06-09 16:53:08 +02:00
Fabien Potencier
1195c7d97e feature #23111 [Process] Deprecate ProcessBuilder (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Deprecate ProcessBuilder

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

Commits
-------

3aa8861a42 [Process] Deprecate ProcessBuilder
2017-06-09 07:00:49 -07:00
Nicolas Grekas
3aa8861a42 [Process] Deprecate ProcessBuilder 2017-06-09 15:37:35 +02:00
Robin Chalas
c1fa308c0a Fix non-dumped voters in security panel 2017-06-09 14:05:05 +02:00
Fabien Potencier
e4e1b81b48 feature #22675 [FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22668#issuecomment-299875161
| License       | MIT
| Doc PR        | N/A

Commits
-------

d102fc08e4 [FrameworkBundle] KernelTestCase: deprecate not using KERNEL_CLASS
2017-06-08 17:37:21 -07:00