Commit Graph

38246 Commits

Author SHA1 Message Date
Nicolas Grekas
95ebc9f38f bug #29298 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix trailing slash redirection when using RedirectableUrlMatcher

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

This is #29297 for 4.1

Commits
-------

6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
2018-11-26 11:24:14 +01:00
Fabien Potencier
d788976d7b bug #29310 [MonologBridge] Return empty list for unknown requests (ro0NL)
This PR was merged into the 4.1 branch.

Discussion
----------

[MonologBridge] Return empty list for unknown requests

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Small continuation of #23659. Currently if the specified request is unknown, you'll get all available requests merged. This fixes it.

Commits
-------

69be8e649e [MonologBridge] Return empty list for unknonwn requests
2018-11-26 08:13:50 +01:00
Roland Franssen
69be8e649e [MonologBridge] Return empty list for unknonwn requests 2018-11-25 08:46:30 +01:00
Fabien Potencier
b178266bcd Merge branch '3.4' into 4.1
* 3.4:
  fix authorization checker variable name
  [Routing] Remove duplicate schemes and methods for invokable controllers
  [Bridge/PhpUnit] fix the fix
2018-11-24 08:45:31 +01:00
Fabien Potencier
812a878c47 bug #29274 [Routing] Remove duplicate schemes and methods for invokable controllers (claudusd)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Remove duplicate schemes and methods for invokable controllers

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

This PR backport for 3.4 branch the same issue than the PR #29225.

I add a test to check the fix when annotation are on the class and rename another one when the route annotation is on the invoke method.

Commits
-------

640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers
2018-11-24 08:36:54 +01:00
Fabien Potencier
eb593823f8 minor #29292 [PropertyAccess] Removed the return type phpdoc (samnela)
This PR was merged into the 4.1 branch.

Discussion
----------

[PropertyAccess] Removed the return type phpdoc

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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 master branch.
-->

Commits
-------

143597a2b9 Removed the return type phpdoc
2018-11-24 08:24:58 +01:00
Nicolas Grekas
6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher 2018-11-23 18:35:50 +01:00
Samuel NELA
143597a2b9 Removed the return type phpdoc 2018-11-23 14:03:00 +01:00
Fabien Potencier
d713671b80 minor #29278 [Workflow] fix authorization checker variable name (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] fix authorization checker variable name

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

9f4032d20f fix authorization checker variable name
2018-11-22 11:26:16 +01:00
Christian Flothmann
9f4032d20f fix authorization checker variable name 2018-11-22 08:01:54 +01:00
Claude Dioudonnat
640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers 2018-11-21 20:17:55 +01:00
Nicolas Grekas
dbb0f2ad77 [Bridge/PhpUnit] fix the fix 2018-11-20 17:47:12 +01:00
Nicolas Grekas
578f847c02 fix cs 2018-11-20 17:17:28 +01:00
Nicolas Grekas
d30b0814c8 Merge branch '3.4' into 4.1
* 3.4:
  fix cs
2018-11-20 17:14:53 +01:00
Nicolas Grekas
6a1701e574 fix cs 2018-11-20 17:14:23 +01:00
Nicolas Grekas
713b7986fe Merge branch '3.4' into 4.1
* 3.4:
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:14:00 +01:00
Nicolas Grekas
f103b6b91d fix cs 2018-11-20 17:10:26 +01:00
Nicolas Grekas
36527634f2 minor #29231 SCA: consolidate non empty array checks across codebase (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #29231).

Discussion
----------

SCA: consolidate non empty array checks across codebase

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

This PR replaces `is_array(...) && count(...) > 0` with `... && is_array(...)` construct used in the codebase.

Commits
-------

2f1fd54dda SCA: consolidate non empty array checks across codebase
2018-11-20 17:02:07 +01:00
Vladimir Reznichenko
2f1fd54dda SCA: consolidate non empty array checks across codebase 2018-11-20 17:01:59 +01:00
Nicolas Grekas
ab51fa84a5 bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix optimizing Psr6Cache for AdapterInterface pools

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

As described by @Tobion in https://github.com/symfony/symfony/pull/29236/files#r234324045:
> The problem I have experienced is that in dev mode the cache is decorated with a TraceableCache. This means it loses this optimization and introduces https://github.com/symfony/symfony/issues/28918#issuecomment-432399481 again

Commits
-------

b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools
2018-11-20 17:01:33 +01:00
Nicolas Grekas
73d98049fa bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix taking lazy services into account when dumping the container

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

This PR fixes issues found while working on #29246.
It *does* fix the infinite loop, ~but replaces it by an exception (reopening #29078)~:
> ~It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl()~

The full fix is not immediately accessible as it needs some core changes to the dumping logic. Requiring `symfony/proxy-manager-bridge` works around the issue properly.

See #29251 for 4.2

Commits
-------

67d7623e72 [DI] fix taking lazy services into account when dumping the container
2018-11-20 17:00:44 +01:00
Nicolas Grekas
d0698b2ec3 bug #29249 [Form] Fixed empty data for compound date interval (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed empty data for compound date interval

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

Following #29182, since this type has been introduced in Symfony 3 but with the same limitation explained in #4715.
So for consistency this needs to be fixed here as well.

Commits
-------

38a2abc790 [Form] Fixed empty data for compound date interval
2018-11-20 16:59:47 +01:00
Nicolas Grekas
e166d96cf5 bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge/PhpUnit] Use composer to download phpunit

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

Commits
-------

e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit
2018-11-20 16:58:54 +01:00
Nicolas Grekas
9e0f8e7804 Merge branch '2.8' into 3.4
* 2.8:
  [cs] correct invalid @param types
2018-11-20 16:57:17 +01:00
Nicolas Grekas
303cae1fec minor #29266 [cs] correct invalid @param types (TomasVotruba)
This PR was merged into the 2.8 branch.

Discussion
----------

[cs] correct invalid @param types

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

That's #29255 on 2.8

Commits
-------

40f26235eb [cs] correct invalid @param types
2018-11-20 16:56:52 +01:00
Tomas Votruba
40f26235eb [cs] correct invalid @param types 2018-11-20 16:55:20 +01:00
Nicolas Grekas
e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit 2018-11-20 16:36:32 +01:00
Nicolas Grekas
67d7623e72 [DI] fix taking lazy services into account when dumping the container 2018-11-20 15:22:20 +01:00
Grégoire Pineau
b74a086ec2 bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] deal with explicitly enabled workflow nodes

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

Commits
-------

017fd56bd8 deal with explicitly enabled workflow nodes
2018-11-19 10:38:20 +01:00
Jules Pietri
38a2abc790 [Form] Fixed empty data for compound date interval 2018-11-18 13:25:16 +01:00
Nicolas Grekas
b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools 2018-11-16 22:18:41 +01:00
Christian Flothmann
017fd56bd8 deal with explicitly enabled workflow nodes 2018-11-16 08:38:23 +01:00
Nicolas Grekas
17163ab430 Merge branch '3.4' into 4.1
* 3.4:
  [DI] dont fail on missing classes when resource tracking is disabled
  [Validator] Added the missing constraints instance checks
2018-11-15 13:40:31 +01:00
Nicolas Grekas
236565c87e [DI] dont fail on missing classes when resource tracking is disabled 2018-11-15 13:37:52 +01:00
Nicolas Grekas
654dc2209b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Added the missing constraints instance checks
2018-11-15 13:34:45 +01:00
Nicolas Grekas
b11ec05282 bug #29223 [Validator] Added the missing constraints instance checks (thomasbisignani)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Added the missing constraints instance checks

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

This PR adds the constraints instance checks missing to limit the validators use.

This behavior is already implemented in all built-in validators, but it was missed in two validators.

Commits
-------

0ecaead015 [Validator] Added the missing constraints instance checks
2018-11-15 13:27:27 +01:00
Nicolas Grekas
c8677f31bb Merge branch '3.4' into 4.1
* 3.4:
  Command::addOption should allow int in $default
  [Form] Fixed keeping hash of equal \DateTimeInterface on submit
  [PhpUnitBridge] Fix typo
  [Form] Minor fixes in docs and cs
  [Config] Unset key during normalization
  [Form] Fixed empty data for compound date types
  invalidate forms on transformation failures
  [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
2018-11-15 13:15:13 +01:00
Nicolas Grekas
4f18e76a0b Merge branch '2.8' into 3.4
* 2.8:
  Command::addOption should allow int in $default
  [Form] Minor fixes in docs and cs
  [Form] Fixed empty data for compound date types
2018-11-15 13:14:04 +01:00
Nicolas Grekas
1ac042b7b9 bug #28966 [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist (karser)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist

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

Please take a look at the tests I added - they describe the issue. It has to do with the priorities: `findAdderAndRemover('User', 'email')` is called earlier than `$this->isMethodAccessible('User', 'setEmail', 1)`

Commits
-------

8238f167ad [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
2018-11-15 13:12:43 +01:00
Nicolas Grekas
f975be24d4 bug #29182 [Form] Fixed empty data for compound date types (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fixed empty data for compound date types

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

Commits
-------

9bab1e8aba [Form] Fixed empty data for compound date types
2018-11-15 13:10:15 +01:00
Christophe Coevoet
e59e4e0961 minor #29218 Undeprecate the single-colon controller notation (stof)
This PR was merged into the 4.1 branch.

Discussion
----------

Undeprecate the single-colon controller notation

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

This notation is the only way to support controllers as services in the 3.4 LTS version.
This deprecation has only a very small benefit for the Symfony codebase (the amount of code involved is very small), but has a huge cost for the community which cannot avoid this deprecation without dropping support for the LTS or making crazy logic to switch routing files (as they cannot switch things inline in YAML or XML files).
This deprecation will be delayed until a future 5.x version, when the current LTS will be 4.4 (which supports the new notation).

This PR is based on a discussion I had with @nicolas-grekas a few days ago about the cost of that deprecation for the community.

For instance, in FOSUserBundle, a [PR](https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2853) got merged which duplicates the routing files with new files using the new notation, allowing people to opt-out from the deprecation, while the original files cannot be migrated without dropping support for the LTS (which is bad for the concept of LTS, as its usefulness is severally impacted if the ecosystem does not support it). But that's a bad solution for the future, as the bundle would have to keep 2 files forever (well, until next major) to avoid breaking projects referencing the new files. And most open-source bundles providing routes are faced with this challenge.

This is sent to 4.1, so that projects using 4.1 can become deprecation-free for these community bundles when using the latest 4.1 release too (meaning FOSUserBundle could revert this PR before the next release for instance)

Commits
-------

453efdfe1e Undeprecate the single-colon notation for controllers
2018-11-15 11:10:17 +01:00
Christophe Coevoet
453efdfe1e Undeprecate the single-colon notation for controllers
This notation is the only way to support controllers as services in the 3.4
LTS version.
This deprecation has only a very small benefit for the Symfony codebase (the
amount of code involved is very small), but has a huge cost for the community
which cannot avoid this deprecation without dropping support for the LTS or
making crazy logic to switch routing files (as they cannot switch things
inline in YAML or XML files).
This deprecation will be delayed until a future 5.x version, when the current
LTS will be 4.4 (which supports the new notation).
2018-11-15 10:34:05 +01:00
Thomas Bisignani
0ecaead015 [Validator] Added the missing constraints instance checks 2018-11-14 15:06:48 +01:00
Robin Chalas
c513c18fdd minor #29201 Command::addOption should allow int in $default (hultberg)
This PR was merged into the 2.8 branch.

Discussion
----------

Command::addOption should allow int in $default

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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 master branch.
-->

In #28714 the documentation for `$default` on `Command::addOption` was changed to specify more specifically than `mixed`. However, there is an inconsistency as `InputOption::__construct` allows int in its `$default`, but not `Command::addOption`. This PR makes fixes that inconsistency.

Commits
-------

5f8bd89 Command::addOption should allow int in $default
2018-11-14 10:59:29 +01:00
Nicolas Grekas
144a84a526 minor #29181 [Form] Minor fixes in docs and cs (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Minor fixes in docs and cs

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

de40f5d07b [Form] Minor fixes in docs and cs
2018-11-13 22:12:31 +01:00
Nicolas Grekas
c96325ff57 bug #29191 [Routing] generate(null) should throw an exception (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] generate(null) should throw an exception

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

Commits
-------

710aafbc91 [Routing] generate(null) should throw an exception
2018-11-13 19:51:21 +01:00
Nicolas Grekas
b6f9f8d769 Merge branch '2.8' into 3.4
* 2.8:
  [Form] Fixed keeping hash of equal \DateTimeInterface on submit
  [PhpUnitBridge] Fix typo
  [Config] Unset key during normalization
  invalidate forms on transformation failures
2018-11-13 17:52:15 +01:00
Nicolas Grekas
32c01724cd bug #29185 [Form] Fixed keeping hash of equal \DateTimeInterface on submit (HeahDude)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fixed keeping hash of equal \DateTimeInterface on submit

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

bc2e2cb5ad [Form] Fixed keeping hash of equal \DateTimeInterface on submit
2018-11-13 17:38:43 +01:00
Grégoire Pineau
28cd88e261 bug #29141 [Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled (Tetragramat, lyrixx)
This PR was merged into the 4.1 branch.

Discussion
----------

[Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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 master branch.
-->

Commits
-------

732f343572 [Workflow] Made code simpler
db69ccc185 method buildTransitionBlockerList returns TransitionBlockerList of expected transition
2018-11-13 15:27:19 +01:00
Edvin Hultberg
5f8bd898b4 Command::addOption should allow int in $default
The constructor for InputOption allows int on the $default parameter, but not Command::addOption $default parameter

fixup: apply coding standards patch
2018-11-13 15:21:37 +01:00