Commit Graph

40488 Commits

Author SHA1 Message Date
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
Fabien Potencier
b46ca51238 bug #30911 [Console] Fix table trailing backslash (maidmaid)
This PR was merged into the 4.2 branch.

Discussion
----------

[Console] Fix table trailing backslash

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

```php
(new Table($output))
    ->setColumnMaxWidth(0, 5)
    ->setRows([['1234\6']])
    ->render();
;
```
before:

```
+-------+
| 1234<fg=default;bg=default> |
| 6     |
+-------+
```

after:

```
+-------+
| 1234\ |
| 6     |
+-------+
```

#EUFOSSA

Commits
-------

48f020f9e3 Fix table trailing backslash
2019-04-06 18:35:21 +02:00
Fabien Potencier
a815308bf6 minor #30912 Restore previous state for libxml option (greg0ire)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30912).

Discussion
----------

Restore previous state for libxml option

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

Whenever libxml_use_internal_errors() is called, the previous value for
it should be restored. This used to be the case in this piece of code,
but it was wrongly removed in e53bf5839b ,
which has the nasty side effect of making the Validator component test
suite break with this message:

Validation failed: No DTD found!

Commits
-------

dde74aa8c9 Restore previous state for libxml option
2019-04-06 17:26:39 +02:00
Grégoire Paris
dde74aa8c9 Restore previous state for libxml option
Whenever libxml_use_internal_errors() is called, the previous value for
it should be restored. This used to be the case in this piece of code,
but it was wrongly removed in e53bf5839b ,
which has the nasty side effect of making the Validator component test
suite break with this message:

Validation failed: No DTD found!
2019-04-06 17:26:32 +02:00
Samuel ROZE
f88a79b550 bug #30903 [Messenger] Uses the SerializerStamp when deserializing the envelope (sroze)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Uses the `SerializerStamp` when deserializing the envelope

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

Uses the `SerializerStamp` when decoding the message.

Commits
-------

ab55e8e7ef Uses the SerializerStamp when deserializing the envelope
2019-04-06 17:25:35 +02:00
Christian Flothmann
ad62ba899c Merge branch '3.4' into 4.2
* 3.4:
  fix tests
2019-04-06 17:21:41 +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
Dany Maillard
48f020f9e3 Fix table trailing backslash 2019-04-06 17:11:40 +02:00
Christian Flothmann
83c661d5cf fix tests 2019-04-06 16:36:41 +02:00
Samuel ROZE
ab55e8e7ef Uses the SerializerStamp when deserializing the envelope 2019-04-06 16:25:54 +02:00
Robin Chalas
1628995268 fix merge 2019-04-06 16:21:02 +02:00
Fabien Potencier
fa44efe90c Merge branch '3.4' into 4.2
* 3.4:
  [Form] various minor fixes
  bugfix: the terminal state was wrong and not reseted
  [Console] Fix inconsistent result for choice questions in non-interactive mode
  Define null return type for Constraint::getDefaultOption()
  [HttpKernel] Fix DebugHandlersListener constructor docblock
  Skip Glob brace test when GLOB_BRACE is unavailable
  bumped Symfony version to 3.4.25
  updated VERSION for 3.4.24
  update CONTRIBUTORS for 3.4.24
  updated CHANGELOG for 3.4.24
  [EventDispatcher] cleanup
2019-04-06 15:51:08 +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
Fabien Potencier
d77ea48d2f bug #30883 [Console] Fix stty not reset when aborting in QuestionHelper::autocomplete() (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix stty not reset when aborting in QuestionHelper::autocomplete()

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #30861   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none

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

f54389b95c bugfix: the terminal state was wrong and not reseted
2019-04-06 12:13:41 +02:00
Fabien Potencier
0268b1def7 minor #30882 [Lock][TestSuite]Ensure the parent process is always killed (greg0ire)
This PR was merged into the 4.2 branch.

Discussion
----------

[Lock][TestSuite]Ensure the parent process is always killed

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes, but for the test suite
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | n/a

If you try to run the test suite but do not have a redis instance
running, the parent process that was supposed to be killed will never be
as the test is marked as skipped and the store never returned.
This results in the test suite hanging forever at the end.
In this patch, the exception is thrown again, and then caught in the trait, and
the parent gets killed as it should.

Commits
-------

94d41825fd Ensure the parent process is always killed
2019-04-06 12:12:39 +02:00
Grégoire Paris
94d41825fd
Ensure the parent process is always killed
If you try to run the test suite but do not have a redis instance
running, the parent process that was supposed to be killed will never be
as the thing being thrown is not an exception.
This results in the test suite hanging forever at the end.
In this patch, the exception is thrown again, and then caught in the trait, and
the parent gets killed as it should.
2019-04-06 12:12:12 +02:00
Amrouche Hamza
f54389b95c
bugfix: the terminal state was wrong and not reseted 2019-04-06 12:10:03 +02:00
Fabien Potencier
0c8e8a50b0 bug #30878 [Console] Fix inconsistent result for choice questions in non-interactive mode (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix inconsistent result for choice questions in non-interactive mode

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

Commits
-------

198b895eac [Console] Fix inconsistent result for choice questions in non-interactive mode
2019-04-06 11:16:33 +02:00
Robin Chalas
198b895eac [Console] Fix inconsistent result for choice questions in non-interactive mode 2019-04-06 10:49:15 +02:00
Fabien Potencier
d45ecefe0c minor #30869 [Validator] Define null return type for Constraint::getDefaultOption() (jaikdean)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #30869).

Discussion
----------

[Validator] Define null return type for Constraint::getDefaultOption()

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

The `Constraint::getDefaultOption()` method is documented with a return type of `string`, but has no `return` statement. This behaviour is expected, as the return value is compared against `null` elsewhere in the code, but the docblock causes problems with static analysis when extending this class.

This PR corrects the documented return type to `string|null` and adds an explicit `return null`.

Commits
-------

03987f2ba5 Define null return type for Constraint::getDefaultOption()
2019-04-05 14:51:33 +02:00
Jaik Dean
03987f2ba5 Define null return type for Constraint::getDefaultOption() 2019-04-05 14:51:27 +02:00
Fabien Potencier
25db9e26c9 bug #30825 [Routing] Fix: annotation loader ignores method's default values (voronkovich)
This PR was merged into the 4.2 branch.

Discussion
----------

[Routing] Fix: annotation loader ignores method's default values

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

In some cases annotation loader ignores method param's default values.
For example this code won't work as expected:
```php
/**
 * @Route("/hello/{name<\w++>}", methods="GET", name="hello")
 */
public function hello(Request $request, string $name = 'World'): Response
{
    // If you try to open "/hello" path an exception (No route found for "GET /hello") will be thrown.
    return $this->json([
        'hello' => \sprintf('Hello, %s!', $name),
    ]);
}
```

Commits
-------

9b37793cbe [Routing] Fix: annotation loader ignores method's default values
2019-04-03 16:10:24 +02:00
Oleg Voronkovich
9b37793cbe [Routing] Fix: annotation loader ignores method's default values 2019-04-03 15:26:22 +02:00
Fabien Potencier
69058e3873 minor #30847 [HttpKernel] Fix DebugHandlersListener constructor docblock (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix DebugHandlersListener constructor docblock

| 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

Commits
-------

2e4020c430 [HttpKernel] Fix DebugHandlersListener constructor docblock
2019-04-03 12:28:32 +02:00
Robin Chalas
2e4020c430 [HttpKernel] Fix DebugHandlersListener constructor docblock 2019-04-03 12:07:21 +02:00
Fabien Potencier
3f75092a74 minor #30839 Skip Glob brace test when GLOB_BRACE is unavailable (wouterj)
This PR was merged into the 3.4 branch.

Discussion
----------

Skip Glob brace test when GLOB_BRACE is unavailable

| 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        | n/a

From [PHP.net](https://www.php.net/glob):

 > Note: The GLOB_BRACE flag is not available on some non GNU systems, like Solaris.

This means running the testsuite in e.g. a php-alpine container fails atm. This test should be skipped in these environments.

Commits
-------

ce38fe3e58 Skip Glob brace test when GLOB_BRACE is unavailable
2019-04-03 11:53:01 +02:00
Wouter J
ce38fe3e58 Skip Glob brace test when GLOB_BRACE is unavailable 2019-04-02 21:54:57 +02:00
Fabien Potencier
a362b8b838 bumped Symfony version to 4.2.6 2019-04-02 21:06:21 +02:00
Fabien Potencier
5365a36a02
Merge pull request #30838 from fabpot/release-4.2.5
released v4.2.5
2019-04-02 21:04:13 +02:00
Fabien Potencier
da9ad29165 updated VERSION for 4.2.5 2019-04-02 21:03:51 +02:00
Fabien Potencier
6c6e085d66 updated CHANGELOG for 4.2.5 2019-04-02 21:03:43 +02:00
Fabien Potencier
668f585df4 bumped Symfony version to 3.4.25 2019-04-02 21:03:08 +02:00
Fabien Potencier
4783969de0
Merge pull request #30837 from fabpot/release-3.4.24
released v3.4.24
2019-04-02 15:48:13 +02:00
Fabien Potencier
3dc0a03d8b updated VERSION for 3.4.24 2019-04-02 15:47:51 +02:00
Fabien Potencier
483ec24812 update CONTRIBUTORS for 3.4.24 2019-04-02 15:47:34 +02:00
Fabien Potencier
86b382787d updated CHANGELOG for 3.4.24 2019-04-02 15:47:25 +02:00
Fabien Potencier
3a861acd1a minor #30829 [EventDispatcher] cleanup (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] cleanup

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

forgotten in #29411 (https://github.com/symfony/symfony/pull/29411/files#diff-a72bc1daccda0ec7bfcfae0e8d3df141L287)

Commits
-------

19134c0554 [EventDispatcher] cleanup
2019-04-02 11:29:50 +02:00
Roland Franssen
19134c0554
[EventDispatcher] cleanup 2019-04-02 10:51:52 +02:00
Nicolas Grekas
4a6a925a56 minor #30824 fix testIgnoredAttributesInContext (Raulnet)
This PR was merged into the 4.2 branch.

Discussion
----------

fix testIgnoredAttributesInContext

| Q             | A
| ------------- | ---
| Branch?       | fix/test_serializer
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fix CI
| License       | MIT

<!--
fix test GetSetMethodNormalizerTest::testIgnoredAttributesInContext
method setIgnoredAttributes is deprecated since 4.2
key "ignored_attributes" is use in the context
-->

Commits
-------

61547a291d fix testIgnoredAttributesInContext
2019-04-01 18:30:38 +02:00
Raulnet
61547a291d fix testIgnoredAttributesInContext 2019-04-01 18:12:17 +02:00