Commit Graph

40548 Commits

Author SHA1 Message Date
David Buchmann 37891525f7 [serializer] validate that the specified callbacks and max_depth_handler are actually callable 2019-04-08 15:09:58 +02:00
Christian Flothmann 4134be127a take setIgnoredAttributes() deprecation into account 2019-04-08 13:47:38 +02:00
Christian Flothmann ec41d76624 Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Respect ignored attributes in cache key of normalizer
  fix resetting the COLUMN environment variable
  Fix TestRunner compatibility to PhpUnit 8
  prevent mixup of the object to populate
2019-04-08 13:36:05 +02:00
Fabien Potencier 7a3060a867 bug #30907 [Serializer] Respect ignored attributes in cache key of normalizer (dbu)
This PR was squashed before being merged into the 3.4 branch (closes #30907).

Discussion
----------

[Serializer] Respect ignored attributes in cache key of normalizer

EUFOSSA

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

Do not share the attributes cache in object normalizer when using a different setting for the ignoredAttributes setting.

In Symfony 4.2, the setter is deprecated in favor of the ignored_attibutes option in the $context. When merging this up, we will however still need to respect the field as well for BC, the cache key does not look at the default context (apart from the deprecated modifiers, the default context is immutable)

There might be performance regression for some use cases, but also could be a performance improvement when using 'attributes' in the context with lists of objects of the same class.

Commits
-------

926d228877 [Serializer] Respect ignored attributes in cache key of normalizer
2019-04-08 12:10:13 +02:00
David Buchmann 926d228877 [Serializer] Respect ignored attributes in cache key of normalizer 2019-04-08 12:10:02 +02:00
Fabien Potencier d3eae71aa9 minor #31001 [Console] fix resetting the COLUMN environment variable (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] fix resetting the COLUMN environment variable

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

8fb2074972 fix resetting the COLUMN environment variable
2019-04-08 12:06:32 +02:00
Christian Flothmann 8fb2074972 fix resetting the COLUMN environment variable 2019-04-08 11:29:13 +02:00
Nicolas Grekas d7a8b3d5e1 bug #30085 Fix TestRunner compatibility to PhpUnit 8 (alexander-schranz)
This PR was squashed before being merged into the 3.4 branch (closes #30085).

Discussion
----------

Fix TestRunner compatibility to PhpUnit 8

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

Modify the installed phpunit version to be compatibility with the symfony custom TestRunner. This is sure not the best way but maybe currently the fastest way to support PhpUnit 8. The hack should be removed as soon as there is another way to implement a custom Runner.

Commits
-------

a0c66a399d Fix TestRunner compatibility to PhpUnit 8
2019-04-08 09:56:38 +02:00
Alexander Schranz a0c66a399d Fix TestRunner compatibility to PhpUnit 8 2019-04-08 09:56:31 +02:00
Fabien Potencier 0d786d3932 bug #30999 Fix dark themed componnents (ro0NL)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix dark themed componnents

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| 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 follow up of #30860

![image](https://user-images.githubusercontent.com/1047696/55705391-f5070300-59de-11e9-8d7e-195ea74d17c3.png)

see https://github.com/symfony/symfony/issues/29194#issuecomment-437980830
___

![image](https://user-images.githubusercontent.com/1047696/55705263-b40eee80-59de-11e9-9503-ba4adf64857c.png)

see https://github.com/symfony/symfony/issues/29194#issuecomment-437998078

Commits
-------

d2f2e56472 Fix dark themed componnents
2019-04-08 09:23:34 +02:00
Александр Ли 2ae2fd800d [FrameworkBundle] Fix Controller deprecated when using composer --optimized
Update Controller.php
Update Controller.php
2019-04-08 12:19:48 +05:00
Roland Franssen d2f2e56472 Fix dark themed componnents 2019-04-08 09:12:55 +02:00
Fabien Potencier b30f57e14b bug #30977 [serializer] prevent mixup in normalizer of the object to populate (dbu)
This PR was merged into the 3.4 branch.

Discussion
----------

[serializer] prevent mixup in normalizer of the object to populate

EUFOSSA

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

OBJECT_TO_POPULATE is meant to specify the top level object. The implementation left the option in the context and it would be used whenever we have the first element that matches the class. #30607 (to master) introduces the feature to also keep the instances of attributes to deeply populate an existing object tree. In both cases, we do not want the mix up to happen with what the current OBJECT_TO_POPULATE is.

Commits
-------

fdb668e051 prevent mixup of the object to populate
2019-04-08 08:05:24 +02:00
Fabien Potencier bbad6e8e58 Merge branch '3.4' into 4.2
* 3.4:
  Make tests independent from each other
2019-04-08 07:23:45 +02:00
Fabien Potencier 48bb7c999c minor #30986 Make tests independent from each other (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

Make tests independent from each other

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

Environment variables set in a test need to be restored to their
previous values or unset if we want to be able to run tests
independently.

Credits to @ostrolucky for spotting this issue, I'm available for help when merging this in more recent branch (issues may appear then).

Created during the EU-FOSSA hackathon

Commits
-------

00883fc409 Make tests independent from each other
2019-04-08 07:17:37 +02:00
Grégoire Paris 00883fc409
Make tests independent from each other
Environment variables set in a test need to be restored to their
previous values or unset if we want to be able to run tests
independently.
2019-04-07 23:05:09 +02:00
Christian Flothmann 5b8a68d98d minor #30989 fix tests (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

fix tests

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

Commits
-------

27df966705 fix tests
2019-04-07 21:42:46 +02:00
Christian Flothmann 27df966705 fix tests 2019-04-07 21:30:26 +02:00
Christian Flothmann 397e4b8931 Merge branch '3.4' into 4.2
* 3.4:
  fix PHPUnit 4.8 compatibility
  [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
  sync validator translations
2019-04-07 20:00:57 +02:00
Christian Flothmann 152e0992f5 minor #30988 [Form] fix PHPUnit 4.8 compatibility (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix PHPUnit 4.8 compatibility

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

64fa13bf44 fix PHPUnit 4.8 compatibility
2019-04-07 19:42:35 +02:00
Christian Flothmann 64fa13bf44 fix PHPUnit 4.8 compatibility 2019-04-07 19:26:29 +02:00
Fabien Potencier 615cc10b70 minor #30946 [Validator] sync validator translations (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] sync validator translations

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

#FOSSHackathons #EUFOSSA

Commits
-------

83f675d9f3 sync validator translations
2019-04-07 18:44:15 +02:00
Christophe Coevoet 393c6b390c Merge branch '3.4' into 4.2
* 3.4:
  [Form] Fix tests
  Fix the configurability of CoreExtension deps in standalone usage
  [Cache] fix using ProxyAdapter inside TagAwareAdapter
2019-04-07 15:57:20 +02:00
Fabien Potencier cd54e0f232 bug #30976 [Debug] Fixed error handling when an error is already handled when another error is already handled (5) (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Fixed error handling when an error is already handled when another error is already handled (5)

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

---

Please, don't ask how to reproduce it :)

Commits
-------

a36c7315f4 [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
2019-04-07 15:50:27 +02:00
Nicolas Grekas cb5a2551a3 minor #30972 [Form] Fix tests (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix tests

| 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

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

35418be8c4 [Form] Fix tests
2019-04-07 15:13:45 +02:00
Robin Chalas 35418be8c4 [Form] Fix tests 2019-04-07 15:12:50 +02:00
Nicolas Grekas d8b03ee437 bug #30979 Fix the configurability of CoreExtension deps in standalone usage (stof)
This PR was squashed before being merged into the 3.4 branch (closes #30979).

Discussion
----------

Fix the configurability of CoreExtension deps in standalone usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not yet, but will allow fixing them
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

When using the Forms entrypoint to configure the component, there was no chance to configure dependencies of the CoreExtension, as the one registered without argument was first and would win.
The builder now delays the prepending of the CoreExtension to do it only if the CoreExtension is not registered explicitly.

We discovered that when trying to fix tests for the FileType, where we wanted to pass a Translator to it.

Commits
-------

934118b131 Fix the configurability of CoreExtension deps in standalone usage
2019-04-07 15:12:19 +02:00
Christophe Coevoet 934118b131 Fix the configurability of CoreExtension deps in standalone usage 2019-04-07 15:12:11 +02:00
David Buchmann fdb668e051 prevent mixup of the object to populate 2019-04-07 14:49:34 +02:00
Grégoire Pineau a36c7315f4 [Debug] Fixed error handling when an error is already handled when another error is already handled (5) 2019-04-07 14:43:40 +02:00
Nicolas Grekas 77320cb645 bug #30918 [Cache] fix using ProxyAdapter inside TagAwareAdapter (dmaicher)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix using ProxyAdapter inside TagAwareAdapter

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

EUFOSSA

After some debugging this is my first attempt to fix this issue @nicolas-grekas 😊 Let's discuss it.

without the fix the test fails like this:

```
Testing Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest
F                                                                   1 / 1 (100%)

Time: 28 ms, Memory: 4.00MB

There was 1 failure:

1) Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest::testIntegration
Failed asserting that Array &0 (
    'tag1' => 0
    'tag2' => 0
) is identical to 'bar'.

/var/www/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php:26

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Commits
-------

98b9be9b6a [Cache] fix using ProxyAdapter inside TagAwareAdapter
2019-04-07 14:23:14 +02:00
Christian Flothmann 83f675d9f3 sync validator translations 2019-04-07 13:52:58 +02:00
Nicolas Grekas ecb52bc9f1 Merge branch '3.4' into 4.2
* 3.4:
  fix translating file validation error message
  [Validator] Add missing Hungarian translations
  [3.4] [Validator] Add missing french validation translations.
  [Validator] Only traverse arrays that are cascaded into
  Handle case where no translations were found
  [Validator] Translate unique collection message to Hungarian
  fix tests
  Run test in separate process
  Use a class name that does not actually exist
  fix horizontal spacing of inlined Bootstrap forms
  [Translator] Warm up the translations cache in dev
  turn failed file uploads into form errors
2019-04-07 11:56:43 +02:00
Fabien Potencier c82e2df9ff bug #30961 [Form] fix translating file validation error message (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix translating file validation error message

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

I messed this up in #30895.

#FOSSHackathons #EUFOSSA

Commits
-------

9c41842756 fix translating file validation error message
2019-04-07 11:45:40 +02:00
Christian Flothmann 9c41842756 fix translating file validation error message 2019-04-07 11:31:05 +02:00
Gábor Egyed 62e5a91150 [Validator] Add missing Hungarian translations 2019-04-07 10:52:46 +02:00
Fabien Potencier 95d46c25f7 minor #30940 [Validator] Translate unique collection message to Hungarian (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Translate unique collection message to Hungarian

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

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

6a732dc031 [Validator] Translate unique collection message to Hungarian
2019-04-07 10:48:21 +02:00
Fabien Potencier 6ea4d79e0f minor #30945 [3.4] [Validator] Add missing french validators translations (hhamon)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] [Validator] Add missing french validators translations

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

331b601fed [3.4] [Validator] Add missing french validation translations.
2019-04-07 10:44:45 +02:00
Fabien Potencier ff3649b554 minor #30952 [TwigBundle][TwigBridge] Improving deprecation message of the legacy Twig template directory (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[TwigBundle][TwigBridge] Improving deprecation message of the legacy Twig template directory

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

#eu-fossa

Commits
-------

89a00b315d Improving deprecation message of the Twig templates directory src/Resources/views
2019-04-07 10:41:31 +02:00
Yonel Ceruto 89a00b315d Improving deprecation message of the Twig templates directory src/Resources/views 2019-04-07 10:37:45 +02:00
Fabien Potencier 3d6f15251a bug #30951 Handle case where no translations were found (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

Handle case where no translations were found

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Right now, the program emits a warning when trying to use max() on an
empty array.

Commits
-------

79b1fb8333 Handle case where no translations were found
2019-04-07 10:36:55 +02:00
David Maicher 98b9be9b6a [Cache] fix using ProxyAdapter inside TagAwareAdapter 2019-04-07 10:35:15 +02:00
Hugo Hamon 331b601fed [3.4] [Validator] Add missing french validation translations. 2019-04-07 10:32:58 +02:00
Fabien Potencier 1f48f7bd82 bug #29800 [Validator] Only traverse arrays that are cascaded into (corphi)
This PR was squashed before being merged into the 3.4 branch (closes #29800).

Discussion
----------

[Validator] Only traverse arrays that are cascaded into

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

Previously, array properties were traversed even if they were not annotated `Valid`.

Commits
-------

7db9200279 [Validator] Only traverse arrays that are cascaded into
2019-04-07 10:20:18 +02:00
Philipp Cordes 7db9200279 [Validator] Only traverse arrays that are cascaded into 2019-04-07 10:20:12 +02:00
Grégoire Paris 79b1fb8333
Handle case where no translations were found
Right now, the program emits a warning when trying to use max() on an
empty array.
2019-04-07 10:01:42 +02:00
Fabien Potencier 03d804e32d minor #30928 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] fix tests

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

#FOSSHackathons #EUFOSSA

Commits
-------

e55f6e6f5e fix tests
2019-04-07 09:57:30 +02:00
Fabien Potencier adb15a03d7 minor #30923 [BrowserKit vs HttpFoundation][TestSuite]Run test in separate process (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

[BrowserKit vs HttpFoundation][TestSuite]Run test in separate process

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

This test calls code that defines some environment variables, which in
turn trigger the registration of a the deprecation error handler, which
causes unexpected issues when testing other components.

Commits
-------

6d51a04b11 Run test in separate process
2019-04-07 09:56:31 +02:00
Gábor Egyed 6a732dc031
[Validator] Translate unique collection message to Hungarian 2019-04-06 23:20:57 +02:00
Christian Flothmann e55f6e6f5e fix tests 2019-04-06 22:57:23 +02:00