Commit Graph

38281 Commits

Author SHA1 Message Date
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
Christian Flothmann
785fff56ce properly parse backslashes in unquoted env vars 2018-11-14 23:14:12 +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
Grégoire Pineau
ab9b40de1c Merge branch '3.4' into 4.1
* 3.4:
  Update symfony links to https
  [FrameworkBundle] fixed guard event names for transitions
  [FrameworkBundle] fixed guard event names for transitions
2018-11-13 15:13:43 +01:00
Grégoire Pineau
8dcefc9a27 bug #29137 [Workflow][FrameworkBundle] fixed guard event names for transitions (destillat, lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow][FrameworkBundle] fixed guard event names for transitions

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

There is a bug when many transitions are defined with the same name.
I finished destillat's work and rebase against 3.4 as it's a bug fix.

There another point of failure, but it could not be fixed on 3.4. I will
be a need feature. The issue is related to `Workflow::can($subject, $transitionName)`.
Since the transitionName could be not unique, we will need to support
passing an instance of Transition. A new PR is incomming

Commits
-------

83dc473dd6 [FrameworkBundle] fixed guard event names for transitions
fb88bfc79a [FrameworkBundle] fixed guard event names for transitions
2018-11-13 15:03:53 +01:00
Fabien Potencier
dc36886298 minor #29200 Update symfony links to https (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #29200).

Discussion
----------

Update symfony links to https

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 -->

Commits
-------

bea63a1399 Update symfony links to https
2018-11-13 13:18:00 +01:00
Roland Franssen
bea63a1399 Update symfony links to https 2018-11-13 13:17:51 +01:00
Fabien Potencier
19b018989a minor #29192 [PhpUnitBridge] Fix typo (ro0NL)
This PR was merged into the 2.8 branch.

Discussion
----------

[PhpUnitBridge] Fix typo

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

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

78e386e87f [PhpUnitBridge] Fix typo
2018-11-13 13:16:55 +01:00
Jules Pietri
bc2e2cb5ad [Form] Fixed keeping hash of equal \DateTimeInterface on submit 2018-11-12 21:06:28 +01:00
Roland Franssen
78e386e87f
[PhpUnitBridge] Fix typo 2018-11-12 19:05:42 +01:00
Nicolas Grekas
710aafbc91 [Routing] generate(null) should throw an exception 2018-11-12 17:52:50 +01:00
Jules Pietri
de40f5d07b [Form] Minor fixes in docs and cs 2018-11-12 11:47:20 +01:00
Grégoire Pineau
732f343572 [Workflow] Made code simpler 2018-11-12 10:18:05 +01:00
Fabien Potencier
893237d58f bug #28731 [Form] invalidate forms on transformation failures (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] invalidate forms on transformation failures

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

Commits
-------

385d9df29c invalidate forms on transformation failures
2018-11-12 08:14:53 +01:00
Fabien Potencier
26f321cb01 bug #29152 [Config] Unset key during normalization (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #29152).

Discussion
----------

[Config] Unset key during normalization

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

2.8 vs. 4.x :) let me know.

Commits
-------

e1402d495e [Config] Unset key during normalization
2018-11-12 08:03:10 +01:00
Roland Franssen
e1402d495e [Config] Unset key during normalization 2018-11-12 08:03:04 +01:00
Jules Pietri
9bab1e8aba [Form] Fixed empty data for compound date types 2018-11-11 23:32:26 +01:00
Nicolas Grekas
913781baac Merge branch '3.4' into 4.1
* 3.4:
  [Form] Hardened test suite for empty data
  Bump phpunit XSD version to 5.2
  [Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
  Add required key attribute
2018-11-11 20:51:29 +01:00
Nicolas Grekas
e32b518818 Merge branch '2.8' into 3.4
* 2.8:
  [Form] Hardened test suite for empty data
  Bump phpunit XSD version to 5.2
  Add required key attribute
2018-11-11 20:48:54 +01:00
Nicolas Grekas
131a42b38a minor #29174 Add required key attribute (greg0ire)
This PR was merged into the 2.8 branch.

Discussion
----------

Add required key attribute

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

I am getting warnings when running tests with recent phpunit versions (since 7.2.0) :

> `- Element 'element': The attribute 'key' is required but missing.`

This requirement is far from being new, what is recent is phpunit
validating its configuration file against the XSD schema.

See d4484be1a9

This is pedantic (not a bugfix), and might be a bit painful to merge upstream, so if you feel like I should target a more recent instead and let the old branches go on with their lives, please tell me.

Commits
-------

c0733c22cb Add required key attribute
2018-11-11 20:41:05 +01:00