Commit Graph

28024 Commits

Author SHA1 Message Date
Fabien Potencier
ae68e66d7e bug #20267 [DependencyInjection] A decorated service should not keep the autowiring types (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] A decorated service should not keep the autowiring types

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

When decorating a service which is not abstract and has `autowiring_types`, the decorator should be the one used for autowiring methods of autowired services, so we should explicitly empty them on the decorated definition after merged them into the child. See  https://github.com/symfony/symfony/pull/20260#issuecomment-255364862 for a use case where we are forced to manually empty the decorated service's `autowiring_types`.

Commits
-------

5951378 A decorated service should not keep the autowiring types
2016-10-23 08:08:37 -07:00
Fabien Potencier
7f3ce9af83 bug #20278 [DependencyInjection] merge tags instead of completely replacing them (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] merge tags instead of completely replacing them

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

In #20207, I missed the `array_merge()` call. Thus, previously set tags of the decorating service would have been discarded by the compiler pass.

Commits
-------

c333eb7 merge tags instead of completely replacing them
2016-10-23 08:03:30 -07:00
Robin Chalas
5951378727
A decorated service should not keep the autowiring types 2016-10-23 11:04:13 +02:00
Christian Flothmann
c333eb70b6 merge tags instead of completely replacing them 2016-10-23 08:52:28 +02:00
Fabien Potencier
728034c44d Merge branch '3.1'
* 3.1:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
  [HttpKernel] Fix a regression in the RequestDataCollector
  [HttpKernel] Refactor a RequestDataCollector test case to use a data provider
2016-10-22 18:13:47 -07:00
Fabien Potencier
d1e0ba973c Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
2016-10-22 18:13:38 -07:00
Fabien Potencier
5dfaf584fb Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
2016-10-22 18:13:14 -07:00
Fabien Potencier
122ac67823 bug #20271 Changes related to Twig 1.27 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

Changes related to Twig 1.27

| 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        | n/a

Commits
-------

317d46f [TwigBundle] fixed usage of getSource in tests
b9a4586 [TwigBridge] fixed Twig_Source required argument
2016-10-22 08:17:41 -07:00
Fabien Potencier
317d46f249 [TwigBundle] fixed usage of getSource in tests 2016-10-22 08:04:15 -07:00
Fabien Potencier
0c551b5236 minor #20273 [FrameworkBundle][HttpKernel] move test to the HttpKernel component (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] move test to the HttpKernel component

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

The moved test case does not test the `AddConsoleCommandPass` class, but ensures certain behavior in the `registerCommands()` method of the `Bundle` class from the HttpKernel component.

Commits
-------

c9ca322 move test to the HttpKernel component
2016-10-22 07:38:20 -07:00
Fabien Potencier
d5d84f6900 bug #20252 Trim constant values in XmlFileLoader (lstrojny)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20252).

Discussion
----------

Trim constant values in XmlFileLoader

| Q             | A
| ------------- | ---
| Branch?       | 2.7, 2.8, 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.

When an XML config file gets long, it's nice to put the constant name into the next line like this:
```xml
<parameter key="som_very_very_long_constant_name" type="constant">
    Some\Namespace\That\Is\Sufficiently\Long\To\Require\A\LineBreak::someLongishConstantName
</parameter>
```

If that’s the case, `constant()` will try and find a constant including the spaces. While it is theoretically possible to have a constant in PHP that starts or ends with a space, it’s impossible for class constants and only doable using `define(" FOO ", …);`. So that’s probably an edge case we can ignore.

Commits
-------

f09e621 Trim constant values in XmlFileLoader
2016-10-22 07:36:57 -07:00
Lars Strojny
f09e6218f8 Trim constant values in XmlFileLoader 2016-10-22 07:36:57 -07:00
Fabien Potencier
aa75adf8bb bug #20239 [HttpKernel] Fix a regression in the RequestDataCollector (jakzal)
This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Fix a regression in the RequestDataCollector

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

The regression was introduced by refactoring made as part of #17589 (if/else statements where rearranged).

Commits
-------

57008ea [HttpKernel] Fix a regression in the RequestDataCollector
26b90e4 [HttpKernel] Refactor a RequestDataCollector test case to use a data provider
2016-10-22 07:30:10 -07:00
Christian Flothmann
c9ca322825 move test to the HttpKernel component 2016-10-22 11:18:43 +02:00
Fabien Potencier
b9a4586b24 [TwigBridge] fixed Twig_Source required argument 2016-10-21 18:08:29 -07:00
Fabien Potencier
923aaad7db feature #20266 [Console] rename Command::private to Command::hidden (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] rename Command::private to Command::hidden

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

Commits
-------

f900ef0 rename Command::private to Command::hidden
2016-10-21 14:28:04 -07:00
Fabien Potencier
2a14cf224d bug #20263 [DependencyInjection] Fix FactoryReturnTypePass position in PassConfig (hason)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DependencyInjection] Fix FactoryReturnTypePass position in PassConfig

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

Commits
-------

dfb5cc3 [DependencyInjection] Fix FactoryReturnTypePass position in PassConfig
2016-10-21 14:26:55 -07:00
Nicolas Grekas
0471e7b03a feature #20270 [PhpUnitBridge] Drop ErrorAssert (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] Drop ErrorAssert

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

Last step towards `@expectedDeprecation`.

Commits
-------

27e7584 [PhpUnitBridge] Drop ErrorAssert
2016-10-21 23:17:28 +02:00
Nicolas Grekas
27e7584c88 [PhpUnitBridge] Drop ErrorAssert 2016-10-21 23:13:02 +02:00
Nicolas Grekas
22f00a20ba Merge branch '3.1'
* 3.1:
  [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
  [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 23:10:51 +02:00
Nicolas Grekas
57f8d1e1e4 Merge branch '2.8' into 3.1
* 2.8:
  [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 23:09:30 +02:00
Nicolas Grekas
a67242fe74 minor #20269 [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation

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

Commits
-------

5d5f704 [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 23:07:12 +02:00
Nicolas Grekas
5d5f704563 [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation 2016-10-21 22:59:10 +02:00
Fabien Potencier
d481c503a6 minor #20268 [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation

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

Needs #20255 first

Commits
-------

5735255 [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 13:58:13 -07:00
Fabien Potencier
60e6af5c3a feature #20256 [PhpUnitBridge] Allow configuring removed deps and phpunit versions (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] Allow configuring removed deps and phpunit versions

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

Allowing greater reuse of the wrapper.

Commits
-------

fb1c5b8 [PhpUnitBridge] Allow configuring removed deps and phpunit versions
2016-10-21 13:54:26 -07:00
Fabien Potencier
9af0683b4e feature #20255 [PhpUnitBridge] Replace ErrorAssert by @expectedDeprecation (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] Replace ErrorAssert by `@expectedDeprecation`

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18880
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7074

For 3.2, that's what the feat. freeze is for in this case. ping @xabbuh

See https://github.com/symfony/symfony/pull/20255/files?w=1

Commits
-------

c344203 [PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 13:49:47 -07:00
Nicolas Grekas
5735255467 [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation 2016-10-21 22:36:24 +02:00
Nicolas Grekas
c344203013 [PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation 2016-10-21 22:33:10 +02:00
Nicolas Grekas
fb1c5b88f3 [PhpUnitBridge] Allow configuring removed deps and phpunit versions 2016-10-21 22:14:14 +02:00
Fabien Potencier
030ddcf8a7 bug #20265 [VarDumper] Fix ArgsStub (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Fix ArgsStub

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

Two bugs fixed here:
- ArgsStub changing the value of arguments passed by reference
- `class::function` used with off-by-one `args`

Commits
-------

808c25e [VarDumper] Fix ArgsStub
2016-10-21 13:12:04 -07:00
Nicolas Grekas
808c25e2e8 [VarDumper] Fix ArgsStub 2016-10-21 21:59:10 +02:00
Christian Flothmann
f900ef0f48 rename Command::private to Command::hidden 2016-10-21 21:25:53 +02:00
Martin Hasoň
dfb5cc3922 [DependencyInjection] Fix FactoryReturnTypePass position in PassConfig 2016-10-21 13:59:37 +02:00
Fabien Potencier
4eeb1f018b Merge branch '3.1'
* 3.1:
  [Validator] Fix annotation
  [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
  [WebProfilerBundle][btn-link] add `cursor: pointer`
  Update README.md
2016-10-19 15:39:05 -07:00
Fabien Potencier
a01cc6d8c4 Merge branch '2.8' into 3.1
* 2.8:
  [Validator] Fix annotation
  [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
  [WebProfilerBundle][btn-link] add `cursor: pointer`
  Update README.md
2016-10-19 15:38:53 -07:00
Fabien Potencier
5a08a32f30 Merge branch '2.7' into 2.8
* 2.7:
  [Validator] Fix annotation
  [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
  Update README.md
2016-10-19 15:37:24 -07:00
Fabien Potencier
8974d773a7 bug #20253 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()

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

bb791d0 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
2016-10-19 15:36:59 -07:00
Jáchym Toušek
8a420c554c [Validator] Fix annotation 2016-10-19 15:22:52 -07:00
Fabien Potencier
bb791d0764 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine() 2016-10-19 15:20:47 -07:00
Fabien Potencier
650f6d1ea5 feature #20047 [Form] Change FormTypeGuesserChain to accept Traversable (enumag)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Form] Change FormTypeGuesserChain to accept Traversable

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

I'm using symfony/form without the rest of the framework and this will make things a bit easier for me.

Commits
-------

5e4f4d4 [Form] Change FormTypeGuesserChain to accept Traversable
2016-10-19 15:12:03 -07:00
Fabien Potencier
6a1667dc5d feature #19982 [Validator] Allow validating multiple groups in one GroupSequence step (enumag)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Validator] Allow validating multiple groups in one GroupSequence step

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

To see what I've changed just look at the last commit. The other two are just refactoring without any effect.

GroupSequenceProviderInterface seems to be the recommended solution for conditional validators (like when some properties should be required only if other property has a certain value). And it's a good solution honestly. Except for the fact that it's completely useless when I want to get validation violations for all groups at once and not just violations for the first group that caused any violations.

```php
// If the User validation group causes any violations the Premium group will not be
// validated at all even if the $this->isPremium() is true.
class User implements GroupSequenceProviderInterface {
    public function getGroupSequence() {
        $groups = array('User');
        if ($this->isPremium()) {
            $groups[] = 'Premium';
        }
        return $groups;
    }
}
```

To be honest I never found a use case for this step-by-step behavior. When user fills a form I want to show him all errors at once not just some subset.

It's surprisingly easy to fix this. With just one changed line in RecursiveContextualValidator it's perfectly solveable:

```php
// With this PR it is possible to do this and get violations for both groups like this.
class User implements GroupSequenceProviderInterface {
    public function getGroupSequence() {
        $groups = array('User');
        if ($this->isPremium()) {
            $groups[] = 'Premium';
        }
        return [$groups]; // this line has changed
    }
}
```

Commits
-------

31b609e [Validator] Allow validating multiple groups in one GroupSequence step
3847bad [Validator] Refactor tests
38b643a [Validator] Fix annotation
2016-10-19 15:03:14 -07:00
Fabien Potencier
d55321d832 minor #20240 Fix readme quick tour link (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix readme quick tour link

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

d367cfc Update README.md
2016-10-19 07:12:16 -07:00
Javier Eguiluz
265bb5fd76 bug #20243 [WebProfilerBundle][btn-link] add cursor: pointer (aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle][btn-link] add `cursor: pointer`

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

Commits
-------

4f31dec [WebProfilerBundle][btn-link] add `cursor: pointer`
2016-10-19 11:18:42 +02:00
Abdellatif Ait boudad
4f31dec580 [WebProfilerBundle][btn-link] add cursor: pointer 2016-10-19 09:54:02 +01:00
Jakub Zalas
57008ea42b
[HttpKernel] Fix a regression in the RequestDataCollector 2016-10-18 21:24:10 +01:00
Jakub Zalas
26b90e47c0
[HttpKernel] Refactor a RequestDataCollector test case to use a data provider 2016-10-18 21:23:37 +01:00
Roland Franssen
d367cfc6f2 Update README.md 2016-10-18 19:16:23 +02:00
Nicolas Grekas
b819518898 Merge branch '3.1'
* 3.1:
  [VarDumper] Fix source links with latests Twig versions
  [DomCrawler] Optimize DomCrawler::relativize()
  [HttpKernel] Fix source links with latests Twig versions
  [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
2016-10-18 18:01:03 +02:00
Nicolas Grekas
34abba65de Merge branch '2.8' into 3.1
* 2.8:
  [VarDumper] Fix source links with latests Twig versions
  [DomCrawler] Optimize DomCrawler::relativize()
  [HttpKernel] Fix source links with latests Twig versions
  [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
2016-10-18 17:46:07 +02:00
Nicolas Grekas
5b566dae1b Merge branch '2.7' into 2.8
* 2.7:
  [DomCrawler] Optimize DomCrawler::relativize()
  [HttpKernel] Fix source links with latests Twig versions
  [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
2016-10-18 17:35:45 +02:00