Commit Graph

40630 Commits

Author SHA1 Message Date
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
Grégoire Paris 6d51a04b11
Run test in separate process
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.
2019-04-06 21:33:58 +02:00
Fabien Potencier 98f26cb628 minor #30936 [Debug vs DI][TestSuite] Use a class name that does not actually exist (greg0ire)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug vs DI][TestSuite] Use a class name that does not actually exist

| 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

Using "Foo", a class name that corresponds to no less than 22 fixture
classes, results in the first found "Foo" being loaded when one is
found by the ClassNotFoundFatalErrorHandler error handler, I am not sure
exactly why, but it is not really a big issue because this is a fatal
error handler and execution is not supposed to continue after that.
Except that is very much the case when running the whole test suite
sequentially with ./phpunit . Then we arrive to the DI component test
suite, and a failure happens because \\foo was not supposed to be defined:

> Failed asserting that exception message 'The definition for "\foo" has
> no class attribute, and appears to reference a class or interface in the
> global namespace. Leaving out the "class" attribute is only allowed for
> namespaced classes. Please specify the class attribute explicitly to get
> rid of this error.' contains 'The definition for "\foo" has no class.'.

Commits
-------

a53e0fe1cd Use a class name that does not actually exist
2019-04-06 21:29:10 +02:00
Grégoire Paris a53e0fe1cd
Use a class name that does not actually exist
Using "Foo", a class name that corresponds to no less than 22 fixture
classes, results in the first found "Foo" being loaded when one is
found by the ClassNotFoundFatalErrorHandler error handler, I am not sure
exactly why, but it is not really a big issue because this is a fatal
error handler and execution is not supposed to continue after that.
Except that is very much the case when running the whole test suite
sequentially with ./phpunit . Then we arrive to the DI component test
suite, and a failure happens because \\foo was not supposed to be defined:

> Failed asserting that exception message 'The definition for "\foo" has
> no class attribute, and appears to reference a class or interface in the
> global namespace. Leaving out the "class" attribute is only allowed for
> namespaced classes. Please specify the class attribute explicitly to get
> rid of this error.' contains 'The definition for "\foo" has no class.'.
2019-04-06 21:25:09 +02:00
Pascal Borreli a29ce2817c [Security] Add a separator in the remember me cookie hash 2019-04-06 21:17:28 +02:00
Fabien Potencier 3e0b2354db bug #30921 [Translator] Warm up the translations cache in dev (tgalopin)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] Warm up the translations cache in dev

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

This PR fixes a bug in development when using the DataCollectorTranslator: because it's not implementing WarmableInterface, the translations cache is not built during cache:clear during development.

Commits
-------

a5f1afca15 [Translator] Warm up the translations cache in dev
2019-04-06 20:09:42 +02:00
Fabien Potencier ed1b95d0d6 bug #30922 [TwigBridge] fix horizontal spacing of inlined Bootstrap forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] fix horizontal spacing of inlined Bootstrap forms

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

Commits
-------

7113a53e19 fix horizontal spacing of inlined Bootstrap forms
2019-04-06 20:07:34 +02:00
Fabien Potencier 07a1095af9 bug #30860 [Profiler] Fix dark theme elements color (dFayet)
This PR was squashed before being merged into the 4.2 branch (closes #30860).

Discussion
----------

[Profiler] Fix dark theme elements color

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | 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 | #29194   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | -

I think the color handling of the code highlighted (exceptions, ...) is quite questionnable, but as we use the `highlight_file()` function, I don't really see an other way to handle it, tell me what you think.

###  Before/After
**Form**
![Capture d’écran de 2019-04-04 10-07-18](https://user-images.githubusercontent.com/7721219/55539945-2cfe0580-56c2-11e9-8e5c-a4b6352ab12d.png)

![Capture d’écran de 2019-04-04 10-03-27](https://user-images.githubusercontent.com/7721219/55539906-15268180-56c2-11e9-90e7-326cc1c01ccd.png)

**Twig render graph**
![Capture d’écran de 2019-04-04 10-07-36](https://user-images.githubusercontent.com/7721219/55539969-3b4c2180-56c2-11e9-9064-1fd10bf1da02.png)

![Capture d’écran de 2019-04-06 19-37-02](https://user-images.githubusercontent.com/7721219/55673094-693c8c00-58a3-11e9-90a4-76f6b312d516.png)

**Exceptions**
![Capture d’écran de 2019-04-04 10-08-19](https://user-images.githubusercontent.com/7721219/55540012-51f27880-56c2-11e9-930b-98d680093e49.png)

![Capture d’écran de 2019-04-06 09-39-27](https://user-images.githubusercontent.com/7721219/55667421-4f2b8b00-585c-11e9-81c7-dc09bd982375.png)

**Doctrine queries**
![Capture d’écran de 2019-04-04 10-08-37](https://user-images.githubusercontent.com/7721219/55540059-73536480-56c2-11e9-9b0d-ea691a16a1a5.png)

![Capture d’écran de 2019-04-04 10-04-47](https://user-images.githubusercontent.com/7721219/55540068-78b0af00-56c2-11e9-88f7-2181800006a7.png)

Commits
-------

8a9c2c86ef [Profiler] Fix dark theme elements color
2019-04-06 20:06:10 +02:00
dFayet 8a9c2c86ef [Profiler] Fix dark theme elements color 2019-04-06 20:06:03 +02:00
Fabien Potencier db93b952e9 bug #30895 [Form] turn failed file uploads into form errors (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] turn failed file uploads into form errors

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

Commits
-------

1a21ca7362 turn failed file uploads into form errors
2019-04-06 20:02:12 +02:00
Fabien Potencier 4c3a48a66f Merge branch '3.4' into 4.2
* 3.4:
  Fix wrong dump for PO files
2019-04-06 19:57:40 +02:00
Fabien Potencier 09a808dc88 bug #30919 [Translator] Fix wrong dump for PO files (deguif)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] Fix wrong dump for PO files

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

When working on #30909 I encountered this bug.
Currently the tests were passing, because the po fixture file contained only one translation.

Commits
-------

b54abfc643 Fix wrong dump for PO files
2019-04-06 19:57:17 +02:00
Christian Flothmann 7113a53e19 fix horizontal spacing of inlined Bootstrap forms 2019-04-06 19:28:56 +02:00
François-Xavier de Guillebon b54abfc643
Fix wrong dump for PO files 2019-04-06 19:11:02 +02:00
Titouan Galopin a5f1afca15 [Translator] Warm up the translations cache in dev 2019-04-06 19:05:56 +02:00
Christian Flothmann 1a21ca7362 turn failed file uploads into form errors 2019-04-06 19:02:48 +02:00
Fabien Potencier dc65401f66 Merge branch '3.4' into 4.2
* 3.4:
  [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
2019-04-06 18:39:07 +02:00
Fabien Potencier 86210b3fa1 bug #30889 [DependencyInjection] Fix a wrong error when using a factory (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix a wrong error when using a factory

…d a call

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | 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 | #30885    <!-- #-prefixed issue number(s), if any -->
| 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.
-->
This a work in progress, it needs tests, firstly I wanted to ask the author to test and tell if it's ok.

Commits
-------

5d4e3a2d57 [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
2019-04-06 18:37:16 +02:00
Amrouche Hamza 5d4e3a2d57
[WIP] [DependencyInjection] Fix a wrong error when using a factory and a call 2019-04-06 18:35:29 +02:00