Commit Graph

36988 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Christian Flothmann
fb1c1549b9 minor #30905 [Form] fix tests (xabbuh)
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 | #30879
| License       | MIT
| Doc PR        |

Commits
-------

83c661d5cf fix tests
2019-04-06 17:14:25 +02:00
Christian Flothmann
83c661d5cf fix tests 2019-04-06 16:36:41 +02:00
Fabien Potencier
967fa368b2 bug #30879 [Form] Php doc fixes and cs + optimizations (Jules Pietri)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Php doc fixes and cs + optimizations

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

Some micro optimizations may target master with some profiling but I would like some reviews first. Thanks!

Commits
-------

56429a6f08 [Form] various minor fixes
2019-04-06 15:47:14 +02:00
Jules Pietri
56429a6f08 [Form] various minor fixes 2019-04-06 15:44:06 +02:00