Commit Graph

27942 Commits

Author SHA1 Message Date
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
Nicolas Grekas
4744c3de64 bug #20175 [VarDumper] Fix source links with latests Twig versions (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix source links with latests Twig versions

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

Sibling to #20173

Commits
-------

f3b09d9 [VarDumper] Fix source links with latests Twig versions
2016-10-18 17:35:33 +02:00
Nicolas Grekas
8dee4be6b7 bug #20235 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions (klausi, nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions

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

@klausi could you please validate this patch? Is it an improvement over yours? (sorry I don't have the proper use case to test.)

Commits
-------

17757d8 [DomCrawler] Optimize DomCrawler::relativize()
5b26e33 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
2016-10-18 17:34:22 +02:00
Nicolas Grekas
f3b09d9ca5 [VarDumper] Fix source links with latests Twig versions 2016-10-18 17:06:24 +02:00
Nicolas Grekas
17757d8114 [DomCrawler] Optimize DomCrawler::relativize() 2016-10-18 15:42:15 +02:00
Nicolas Grekas
0e8b2a3916 minor #20236 [HttpKernel] Fix source links with latests Twig versions (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix source links with latests Twig versions

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

Commits
-------

3c21617 [HttpKernel] Fix source links with latests Twig versions
2016-10-18 11:38:25 +02:00
Nicolas Grekas
3c216176e8 [HttpKernel] Fix source links with latests Twig versions 2016-10-18 11:20:54 +02:00
Klaus Purer
5b26e33261 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions 2016-10-18 10:27:59 +02:00
Fabien Potencier
de4a650d8c Merge branch '3.1'
* 3.1:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:30:21 -07:00
Fabien Potencier
f07bf03667 Merge branch '2.8' into 3.1
* 2.8:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:30:12 -07:00
Fabien Potencier
ee8203a599 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:28:30 -07:00
Fabien Potencier
ef48f5924a bug #20224 [Twig] removed deprecations added in Twig 1.27 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Twig] removed deprecations added in Twig 1.27

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

Commits
-------

f0849d8 [TwigBridge] removed deprecations added in Twig 1.27
2016-10-17 21:24:28 -07:00
Fabien Potencier
f0849d8331 [TwigBridge] removed deprecations added in Twig 1.27 2016-10-17 18:02:36 -07:00
Fabien Potencier
9fc7306f72 feature #19741 [ExpressionLanguage] Making cache PSR6 compliant (Alexandre GESLIN)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[ExpressionLanguage] Making cache PSR6 compliant

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

Adding Cache component compatible ParserCache in ExpressionLanguage component.
I hope you will find it useful :) I would like to make tests also

Commits
-------

a7352ff [ExpressionLanguage] Making cache PSR6 compliant
2016-10-17 11:35:41 -07:00
Fabien Potencier
0ea0958dbe feature #20217 [Serializer] Support specifying format for DateTimeNormalizer::denormalize (teohhanhui)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Serializer] Support specifying format for DateTimeNormalizer::denormalize

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

Commits
-------

ff23924 [Serializer] Support specifying format for DateTimeNormalizer::denormalize
2016-10-17 07:13:55 -07:00
Teoh Han Hui
ff2392423b
[Serializer] Support specifying format for DateTimeNormalizer::denormalize 2016-10-17 16:06:12 +08:00
Fabien Potencier
bee50d4ba7 minor #20228 PHP CS Fixer: use php_unit_dedicate_assert (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

PHP CS Fixer: use php_unit_dedicate_assert

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

appendix for #19121

Commits
-------

b0df3a7 PHP CS Fixer: use php_unit_dedicate_assert
2016-10-16 13:31:14 -07:00
Dariusz Ruminski
b0df3a7eb9 PHP CS Fixer: use php_unit_dedicate_assert 2016-10-16 22:09:53 +02:00
Fabien Potencier
f9bb4abd25 feature #19452 Remove the new SecurityUserValueResolver (weaverryan)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Remove the new SecurityUserValueResolver

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (the feature hasn't been released yet)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Hi guys!

This is a revert for #18510 (ping @iltar), which is a nice idea, but will have some big practical implications:

1) You are only allowed to type-hint the argument with `UserInterface` exactly. For the 90% of Symfony project's that user a User entity for their User, this will be weird: I'll receive a `UserInterface`, that immediately call methods on it that aren't in the interface (and also, your IDE won't give you auto-completion). And as #18510 mentions, we can't allow people to type-hint their concrete `User` class, because this will conflict with SensioFWExtraBundle ParamConverter if there is a user id in the URL

2) Deprecating and removing `$this->getUser()` in a controller is a step back. Where we can, let's make controllers and services act *more* like each other. You can't call `$this->getUser()` in a service, but at least if you look at this method in `Controller`, you can see that it uses `security.token_storage` - which is how you will get the User object if you need it from within services.

Sorry for being late on this original issue! It looked good to me at first :).

Cheers!

Commits
-------

da7daee Removing the Controller::getUser() deprecation
2016-10-15 07:40:11 -07:00
Ryan Weaver
da7daee407 Removing the Controller::getUser() deprecation 2016-10-14 19:46:34 -04:00
Fabien Potencier
adf20c86fb minor #20204 3.0 Upgrade Guide: Describing how to pass data to a form through options resolver (smithandre)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #20204).

Discussion
----------

3.0 Upgrade Guide: Describing how to pass data to a form through options resolver

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

Enhanced the upgrade guide by adding details regarding passing data to a form through the options resolver.

Commits
-------

b69bd3f 3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
2016-10-14 08:11:06 -07:00
Andre Smith
b69bd3f0ed 3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver 2016-10-14 08:11:06 -07:00
Fabien Potencier
287713fd6a bug #19478 fixed Filesystem:makePathRelative and added 2 more testcases (muhammedeminakbulut)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19478).

Discussion
----------

fixed Filesystem:makePathRelative and added 2 more testcases

| Q             | A
| ------------- | ---
| Branch?       |2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
The 2 new test cases where broken on the old code. The old testcases and the new one succeed with the given code.

Commits
-------

cd3206c fixed Filesystem:makePathRelative and added 2 more testcases
2016-10-14 07:26:34 -07:00
Muhammed Akbulut
cd3206c5cb fixed Filesystem:makePathRelative and added 2 more testcases 2016-10-14 07:26:34 -07:00
Fabien Potencier
8d218e7f50 bug #20218 [HttpFoundation] no 304 response if method is not cacheable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] no 304 response if method is not cacheable

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

Since #19321 OPTIONS and TRACE are considered safe methods. But both methods should not lead to "304 Not modified" responses.

Commits
-------

3d6b450 no 304 response if method is not cacheable
2016-10-14 07:10:20 -07:00
Fabien Potencier
7e2f24fc6f bug #20207 [DependencyInjection] move tags from decorated to decorating service (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] move tags from decorated to decorating service

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

Commits
-------

7def83c move tags from decorated to decorating service
2016-10-14 07:09:04 -07:00
Christian Flothmann
3d6b4502c8 no 304 response if method is not cacheable 2016-10-14 13:10:27 +02:00
Nicolas Grekas
870c302199 Merge branch '3.1'
* 3.1:
  Fix deps merge
2016-10-14 11:45:08 +02:00
Nicolas Grekas
af10027906 Merge branch '2.8' into 3.1
* 2.8:
  Fix deps merge
2016-10-14 11:44:55 +02:00
Nicolas Grekas
d24c340231 Fix deps merge 2016-10-14 11:42:19 +02:00
Nicolas Grekas
115a37999f bug #20214 Fix/broken merging of parameter bag env placeholders (mickadoo)
This PR was squashed before being merged into the 3.2-dev branch (closes #20214).

Discussion
----------

Fix/broken merging of parameter bag env placeholders

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20213
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

In PR https://github.com/symfony/symfony/pull/20199 I made changes after review that broke the use of env variables, sorry about that - should have checked it a bit more before making the changes.

@nicolas-grekas, I know you're very busy with all that merging, but if you could take a look at this it would be great since you know most about it.

Commits
-------

b53e0de Fix/broken merging of parameter bag env placeholders
2016-10-14 11:11:11 +02:00
Michael Devery
b53e0de8f0 Fix/broken merging of parameter bag env placeholders 2016-10-14 11:11:06 +02:00
Fabien Potencier
69e86547d4 feature #15002 [DoctrineBridge] Add a way to select the repository used by the UniqueEntity validator (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DoctrineBridge] Add a way to select the repository used by the UniqueEntity validator

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12573, #4087, #12977
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7057

This is a cherry pick of #12977 on ~~2.8~~ 3.2 branch, as it is clearly a new feature, even if it was primary introduced in order to fix an inappropriate behavior that might be considered as a bug.

Commits
-------

00d5459 [Doctrine] [Bridge] Add a way to select the repository used by the UniqueEntity validator
2016-10-13 20:17:35 -07:00