Commit Graph

28461 Commits

Author SHA1 Message Date
Fabien Potencier
6d01ad2a92 bug #20661 bug #20653 [WebProfilerBundle] Profiler includes ghost panels (jzawadzki)
This PR was merged into the 2.7 branch.

Discussion
----------

bug #20653 [WebProfilerBundle] Profiler includes ghost panels

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Fixed tickets | #20653
| License       | MIT

Commits
-------

73cf796 bug #20653 [WebProfilerBundle] Profiler includes ghost panels
2016-11-29 09:07:07 +01:00
Nicolas Grekas
be2b7df5c5 [VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector 2016-11-28 21:08:24 +01:00
Antanas Arvasevicius
595a9781e2 [DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments. 2016-11-28 16:07:09 +02:00
Christian Flothmann
56c8ff8b21 ensure the proper context for nested validations 2016-11-28 10:01:58 +01:00
Christian Flothmann
828c76154f mark alias as private during creation 2016-11-28 07:44:24 +01:00
Jerzy Zawadzki
73cf796029 bug #20653 [WebProfilerBundle] Profiler includes ghost panels 2016-11-27 21:52:05 +00:00
Nicolas Grekas
cb03103570 bug #20652 Fixed getRouteParams() when no parameters are available (wouterj)
This PR was merged into the 3.2 branch.

Discussion
----------

Fixed getRouteParams() when no parameters are available

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

Commits
-------

040da81 Fixed getRouteParams() when no parameters are available
2016-11-27 12:54:20 +01:00
WouterJ
040da8116e Fixed getRouteParams() when no parameters are available 2016-11-27 12:45:23 +01:00
Fabien Potencier
02dc4be9e4 bumped Symfony version to 3.2.0 2016-11-26 21:16:08 -08:00
Fabien Potencier
1a29cec155 Merge pull request #20649 from fabpot/release-3.2.0-RC2
released v3.2.0-RC2
2016-11-26 20:46:36 -08:00
Fabien Potencier
42d6eac045 updated VERSION for 3.2.0-RC2 2016-11-26 20:46:10 -08:00
Fabien Potencier
6f04b220ac updated CHANGELOG for 3.2.0-RC2 2016-11-26 20:45:52 -08:00
Fabien Potencier
ea7e2452bd Merge branch '3.2'
* 3.2:
  Fix tests that do not trigger any depreciation
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
  [Cache] Mark FilesystemAdapterTrait as internal
  [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
2016-11-26 20:22:04 -08:00
Fabien Potencier
a8c279d7a8 Merge branch '3.1' into 3.2
* 3.1:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:21:38 -08:00
Fabien Potencier
401396ac12 Merge branch '2.8' into 3.1
* 2.8:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:21:07 -08:00
Fabien Potencier
cae4755096 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:20:28 -08:00
Fabien Potencier
24c40e0d22 bug #20601 [FrameworkBundle] Don't rely on any parent definition for "cache.annotations" (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Don't rely on any parent definition for "cache.annotations"

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

Instead of a generic approach that failed in #20537, let's focus on the `cache.annotations` service, which is the one that needs special care because it can be required while the container is being built. See e.g.:
- #20234
- http://stackoverflow.com/questions/39625863/vichuploadbundle-inb-symfony-3-cant-load-cache-annotations-service/40626277
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/262

When the service is required at build time, we can't provide it a logger, because no logger service is ready at that time. Still, that doesn't prevent the service from working. The late `CachePoolClearerPass` wires the logger for later instantiations so that `cache.annotations` has a properly configured logger *for the next requests*.

Commits
-------

f62b820 [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
2016-11-26 13:21:39 -08:00
Javier Eguiluz
de7b326c7c Maintain the selected panel when redirecting to another profile 2016-11-26 16:44:35 +01:00
Nicolas Grekas
942cfc9061 bug #20638 Fix legacy tests that do not trigger any depreciation (julienfalque)
This PR was merged into the 3.2 branch.

Discussion
----------

Fix legacy tests that do not trigger any depreciation

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

Fixes `implode(): Invalid arguments passed` error when a `@legacy` test with `@expectedDeprecation` does not actually trigger any deprecation.

Commits
-------

9287b52 Fix tests that do not trigger any depreciation
2016-11-26 09:11:52 +01:00
Nicolas Grekas
91aaa44cbd minor #20639 [Cache] Mark FilesystemAdapterTrait as internal (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Mark FilesystemAdapterTrait as internal

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

62a1958 [Cache] Mark FilesystemAdapterTrait as internal
2016-11-26 09:10:38 +01:00
Nicolas Grekas
777cdfc0f6 minor #20640 [HttpFoundation] Fix isMethodSafe test for cacheables (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix isMethodSafe test for cacheables

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

Commits
-------

2699009 [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 09:09:28 +01:00
Julien Falque
9287b52783
Fix tests that do not trigger any depreciation 2016-11-25 23:54:21 +01:00
Robin Chalas
2699009770
[HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable 2016-11-25 23:28:18 +01:00
Nicolas Grekas
62a1958849 [Cache] Mark FilesystemAdapterTrait as internal 2016-11-25 21:20:19 +01:00
Jules Pietri
7e8490715c [Form] fixed "empty_value" option deprecation 2016-11-25 20:10:28 +01:00
Andreas Braun
70c42f2676
Cast result to int before adding to it
This fixes the occasional warning about non-numeric values when using PHP 7.1
2016-11-25 15:42:00 +01:00
Nicolas Grekas
13265aece3 Merge branch '3.2'
* 3.2:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
  Tag missing internals
  Add missing example for 'path' argument in debug:config
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:33:00 +01:00
Nicolas Grekas
5461c1ed53 Merge branch '3.1' into 3.2
* 3.1:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:32:42 +01:00
Nicolas Grekas
966d45f889 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:27:14 +01:00
Nicolas Grekas
4d04c40ae3 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:26:42 +01:00
Nicolas Grekas
e62b602dc4 bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Improve performance of ControllerNameParser

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

Today I was searching for bottlenecks in my application using Blackfire. And among other things I found one in Symfony. Blackfire showed that `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser::findAlternative()` was called almost 300 times which took 28 miliseconds.

It turns out that `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader::load()` is calling `ControllerNameParser::parse()` without actually needing to do so because `$controller` is in the class::method notation already. `ControllerNameParser` threw an exception, DelegatingLoader caught and ignored it - that's ok. The problem is that generating the exception message took a lot of time because findAlternative is slow. In my case it called the levenshtein function over 5000 times which was completely useless because the exception is ignored anyway.

Commits
-------

cf333f3 [FrameworkBundle] Improve performance of ControllerNameParser
2016-11-25 13:12:15 +01:00
Nicolas Grekas
8c2a77bbca bug #20474 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #20474).

Discussion
----------

[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name

| 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        | https://github.com/symfony/symfony-docs/pull/7139

This is a follow up PR to https://github.com/symfony/symfony/pull/20327.

I also decided to improve the current `is_numeric()` check that is done by a truer one. The current limitation is that a PCRE subpattern name must not start with a digit which is different.

Commits
-------

73fbd08 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
2016-11-25 13:07:11 +01:00
Thomas Calvet
73fbd085f1 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name 2016-11-25 13:06:46 +01:00
Jáchym Toušek
cf333f32c5 [FrameworkBundle] Improve performance of ControllerNameParser 2016-11-25 12:34:09 +01:00
Nicolas Grekas
b550d7ebd8 minor #20587 [SecurityBundle] Fix complete config tests (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Fix complete config tests

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

Fixes a little bug in `*CompleteConfigurationTest`: if a test fails for one format, subsequent tests for other formats will also fail. This is because subsequent tests actually use the container built from the very first tested config, which is PHP if all tests are ran.

This can be reproduced by changing a value in the PHP config fixtures. `PhpCompleteConfigurationTest` will fail as expected but `XmlCompleteConfigurationTest` and `YamlCompleteConfigurationTest` will fail too, which is not expected.

Commits
-------

b25c1d3 Fix complete config tests
2016-11-25 11:43:47 +01:00
Nicolas Grekas
b0fd45347a minor #20629 [Form] [Validator] Update documentation link to the component (CoolGoose)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20629).

Discussion
----------

[Form] [Validator] Update documentation link to the component

- [x] Update documentation link to the component since it has standalone examples

Commits
-------

25a6294 Update documentation link to the component
2016-11-25 11:12:25 +01:00
Alexandru Bucur
25a629419a Update documentation link to the component
Update documentation link to the component since it has standalone examples
2016-11-25 11:12:25 +01:00
Nicolas Grekas
821e7bbe7e minor #20622 [WebProfilerBundle] Dont use request attributes in RouterController (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Dont use request attributes in RouterController

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

As spotted in #20621, it makes little sense to use request attributes here, and if it were to have, the current code is broken because the returned values here have already been processed by ValueExporter in RequestDataCollector.

Commits
-------

962325a [WebProfilerBundle] Dont use request attributes in RouterController
2016-11-25 11:10:06 +01:00
Nicolas Grekas
bbddeec6d9 minor #20630 [HttpFoundation] Add links to RFC-7231 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add links to RFC-7231

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

ping @xabbuh

Commits
-------

c17a85b [HttpFoundation] Add links to RFC-7231
2016-11-25 11:09:18 +01:00
Nicolas Grekas
b1e87714ab minor #20625 [FrameworkBundle] Add missing example for 'path' argument in debug:config (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Add missing example for 'path' argument in debug:config

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| 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 argument has been introduced in #18940 .

Commits
-------

c6b7aeb Add missing example for 'path' argument in debug:config
2016-11-25 11:03:22 +01:00
Nicolas Grekas
7b33c0906b minor #20626 Tag missing internals (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Tag missing internals

| 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

Commits
-------

97e94b4 Tag missing internals
2016-11-25 11:02:25 +01:00
Nicolas Grekas
c17a85beff [HttpFoundation] Add links to RFC-7231 2016-11-25 10:58:59 +01:00
Nicolas Grekas
5e19c51bbd bug #20616 [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace

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

Exactly the same issue as in #20610, but for Doctrine ORM's cache:
> That's a design issue: using root_dir as discriminant doesn't work with blue/green deployment strategies, and doesn't prevent collision when different apps are deployed in the same path while sharing the same cache backend.

Commits
-------

5e3cbec [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
2016-11-25 10:51:05 +01:00
Nicolas Grekas
e62a390ff5 bug #20566 [DI] Initialize properties before method calls (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20566).

Discussion
----------

[DI] Initialize properties before method calls

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | not sure
| Deprecations? | no
| Tests pass?   | not yet (only dumps seem to fail)
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Given

```yml
services:
    handler:
        class: AppBundle\Handler
        properties:
            debug: '%kernel.debug%'
        calls:
            - [handle]
```

I totally expected `Handler::$debug` to be set before `Handler::handle` is called. It was not..  and it's really annoying :)

Commits
-------

0af433b [DI] Initialize properties before method calls
2016-11-25 10:44:34 +01:00
Roland Franssen
0af433b01f [DI] Initialize properties before method calls 2016-11-25 10:44:31 +01:00
Nicolas Grekas
5e3cbecd54 [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace 2016-11-25 10:37:59 +01:00
Maxime Steinhausser
97e94b4019 Tag missing internals 2016-11-25 08:43:06 +01:00
Fabien Potencier
d23fabfdc7 Merge branch '3.2'
* 3.2:
  [Workflow] Fixed graphviz dumper for state machine
  [HttpKernel] Fix exception when serializing request attributes
2016-11-24 13:23:15 -08:00
Fabien Potencier
215208e3eb bug #20583 [Workflow] Fixed graphviz dumper for state machine (lyrixx)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #20583).

Discussion
----------

[Workflow] Fixed graphviz dumper for state machine

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

---

Before:
![before](https://cloud.githubusercontent.com/assets/408368/20490801/77cc0abe-b00f-11e6-8094-f4d428d5acde.png)
After:
![after](https://cloud.githubusercontent.com/assets/408368/20490809/7d21a4b0-b00f-11e6-8de2-c5021fe2d4e0.png)

---

Script:
```php
<?php

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

use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
use Symfony\Component\Workflow\Marking;
use Symfony\Component\Workflow\StateMachine;
use Symfony\Component\Workflow\Transition;

$places = array('a', 'b', 'c', 'd');
$transitions[] = new Transition('t1', 'a', 'b');
$transitions[] = new Transition('t1', 'd', 'b');
$transitions[] = new Transition('t2', 'b', 'c');
$transitions[] = new Transition('t3', 'b', 'd');
$definition = new Definition($places, $transitions);

$marking = new Marking(['d' => 1]);

echo (new StateMachineGraphvizDumper())->dump($definition, $marking);
```

Commits
-------

330c069 [Workflow] Fixed graphviz dumper for state machine
2016-11-24 13:22:37 -08:00
Grégoire Pineau
330c069604 [Workflow] Fixed graphviz dumper for state machine 2016-11-24 13:22:36 -08:00