Commit Graph

40803 Commits

Author SHA1 Message Date
Fabien Potencier
846f721cc4 minor #31640 Fix inconsistency in json format regarding DST value (mmokhi)
This PR was merged into the 4.2 branch.

Discussion
----------

Fix inconsistency in json format regarding DST value

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

In absence of a known time zone we might or might not have DST.
If DST doesn't exist (eg, server has timezone set on GMT) the current test fails,
Becasue PHP doesn't dump `dst_savings` in the `IntlTimeZone` objects.

This patch takes care of this known point.

Sponsored-by: Platform.sh

Commits
-------

38a5b2c943 Fix inconsistency in json format regarding DST value
2019-06-04 14:23:06 +02:00
mmokhi
38a5b2c943 Fix inconsistency in json format regarding DST value
The `$expected` template seems not to be consistent.
It will change when the DST value is 0 (it'll not have `dst_savings` for
example)

This patch takes care of the issue, by adding proper condition.

Sponsored-by: Platform.sh
2019-06-04 13:59:41 +02:00
Nicolas Grekas
9fbfc4cf06 Merge branch '3.4' into 4.2
* 3.4:
  fix type hint for salt in PasswordEncoderInterface
  fix typo in PR #31802
  update italian validator translation
  Add missing translations
2019-06-03 22:27:17 +02:00
Nicolas Grekas
54ba63a57e bug #31786 [Translation] Fixed case sensitivity of lint:xliff command (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #31786).

Discussion
----------

[Translation] Fixed case sensitivity of lint:xliff command

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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        | (not needed)

I was checking some errors of `lint:xliff` (https://travis-ci.org/EasyCorp/EasyAdminBundle/jobs/540053551#L657) and saw this:

```
ERROR  in src/Resources/translations/EasyAdminBundle.sr_RS.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.sr_RS.xlf") and the "sr-rs" value used in the "target-language" attribute of the file.

ERROR  in src/Resources/translations/EasyAdminBundle.zh_CN.xlf
 * There is a mismatch between the language included in the file name ("EasyAdminBundle.zh_CN.xlf") and the "zh-cn" value used in the "target-language" attribute of the file.
```

This was suspicious, so I checked the XLIFF standard and it says (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language):

```
target-language:
  Unlike the other XLIFF attributes, the values are not case-sensitive.
```

So, it's valid that `zh-cn` is the target language and `zh-CN` is the file extension. This PR fixes that.

Commits
-------

ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command
2019-06-03 22:10:17 +02:00
Javier Eguiluz
ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command 2019-06-03 22:09:57 +02:00
Nicolas Grekas
dfae7e9f9d minor #31822 Simplify code - catch \Throwable capture all exceptions (lyrixx)
This PR was merged into the 4.2 branch.

Discussion
----------

Simplify code - catch \Throwable capture all exceptions

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

---

This is a legacy when we did support PHP 5.X

Commits
-------

648c6949fc Simplify code - catch \Throwable capture all exceptions
2019-06-03 21:45:55 +02:00
Nicolas Grekas
0797ef28ed minor #31813 fix type hint for salt in PasswordEncoderInterface (garak)
This PR was squashed before being merged into the 3.4 branch (closes #31813).

Discussion
----------

fix type hint for salt in PasswordEncoderInterface

See issue #31812

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

Pretty self-explanatory

Commits
-------

0e741f9600 fix type hint for salt in PasswordEncoderInterface
2019-06-03 21:38:32 +02:00
Massimiliano Arione
0e741f9600 fix type hint for salt in PasswordEncoderInterface 2019-06-03 21:38:25 +02:00
Grégoire Pineau
648c6949fc Simplify code - catch \Throwable capture all exceptions
This is a legacy when we did support PHP 5.X
2019-06-03 17:30:31 +02:00
Fabien Potencier
1bb0aeb97f minor #31805 fix typo in PR #31802 (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

fix typo in PR #31802

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

Fix typo done in PR #31802

Commits
-------

b37c1a818f fix typo in PR #31802
2019-06-03 12:07:11 +02:00
Massimiliano Arione
b37c1a818f
fix typo in PR #31802 2019-06-03 11:50:31 +02:00
Fabien Potencier
8214896edd minor #31802 update italian validator translation (garak)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #31802).

Discussion
----------

update italian validator translation

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

This PR just takes the italian translation for validators up to date with english one.

Commits
-------

2b95fcaa6b update italian validator translation
2019-06-03 11:16:27 +02:00
Massimiliano Arione
2b95fcaa6b update italian validator translation 2019-06-03 11:16:20 +02:00
Fabien Potencier
1583b4f46a minor #31787 Add missing Croatian translations (toniperic)
This PR was merged into the 3.4 branch.

Discussion
----------

Add missing Croatian translations

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

Commits
-------

e83886c811 Add missing translations
2019-06-01 16:36:07 +03:00
Toni Peric
e83886c811
Add missing translations 2019-06-01 15:18:31 +02:00
Nicolas Grekas
da01afacfc bug #31757 [DomCrawler] Fix type error with null Form::$currentUri (chalasr)
This PR was merged into the 4.2 branch.

Discussion
----------

[DomCrawler] Fix type error with null Form::$currentUri

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

Commits
-------

e48d5d07e3 [DomCrawler] Fix type error with null Form::$currentUri
2019-05-31 09:33:33 +02:00
Robin Chalas
e48d5d07e3 [DomCrawler] Fix type error with null Form::$currentUri 2019-05-31 01:40:59 +02:00
Nicolas Grekas
06c655251c Merge branch '3.4' into 4.2
* 3.4:
  Use willReturn() instead of will(returnValue()).
2019-05-30 18:06:08 +02:00
Nicolas Grekas
3cd3522735 minor #31738 Use willReturn() instead of will(returnValue()) (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Use willReturn() instead of will(returnValue())

| 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

In a recent PR, fabbot complained about the usage of will(returnValue()) in test cases that I haven't changed. In this PR, I've applied the PHP CS Fixer's `php_unit_mock_short_will_return` fixer on the whole codebase.

Commits
-------

4fb67df612 Use willReturn() instead of will(returnValue()).
2019-05-30 17:49:51 +02:00
Alexander M. Turek
4fb67df612 Use willReturn() instead of will(returnValue()). 2019-05-30 17:47:52 +02:00
Nicolas Grekas
6892c30930 Merge branch '3.4' into 4.2
* 3.4:
  Disable php_unit_mock_short_will_return rule of php-cs
  [github] define 4.4 as the feature branch
2019-05-30 16:14:40 +02:00
Nicolas Grekas
7ae54b43ea minor #31737 Disable php_unit_mock_short_will_return rule of php-cs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Disable php_unit_mock_short_will_return rule of php-cs

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

bf782ecb38 Disable php_unit_mock_short_will_return rule of php-cs
2019-05-30 16:14:23 +02:00
Nicolas Grekas
31c3c59131 minor #31583 [github] define 4.4 as the feature branch (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[github] define 4.4 as the feature branch

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

And let's use master for preparing 5.0.

Commits
-------

30b560c4df [github] define 4.4 as the feature branch
2019-05-30 16:13:52 +02:00
Nicolas Grekas
bf782ecb38 Disable php_unit_mock_short_will_return rule of php-cs 2019-05-30 16:12:14 +02:00
Nicolas Grekas
31f51ca9a5 Merge branch '3.4' into 4.2
* 3.4:
  [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
  Use AsserEquals for floating-point values
2019-05-29 20:10:06 +02:00
Nicolas Grekas
326a74c7b9 bug #31654 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping (vilius-g)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping

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

https://github.com/symfony/symfony/pull/31604 but refactored for 3.4

Commits
-------

a662f61e08 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
2019-05-29 13:45:02 +02:00
Vilius Grigaliūnas
a662f61e08 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
Currently BinaryFileResponse, when configured with X-Accel-Redirect sendfile type,
will only substitute file paths specified in X-Accel-Mapping. But if the provided
file path does not have a defined prefix, then the resulting header will include
the absolute path. Nginx expects a valid URI, therefore this will result in an
issue that is very hard to detect and debug as it will not show up in error logs
and instead the request would just hang for some time and then be re-served
without query parameters(?).
2019-05-28 15:48:21 +03:00
Fabien Potencier
2d72ec1a10 bumped Symfony version to 4.2.10 2019-05-28 14:11:55 +02:00
Fabien Potencier
a9373aeaf2
Merge pull request #31651 from fabpot/release-4.2.9
released v4.2.9
2019-05-28 14:07:35 +02:00
Fabien Potencier
c4462f6695 updated VERSION for 4.2.9 2019-05-28 14:07:12 +02:00
Fabien Potencier
cf1fa466d9 updated CHANGELOG for 4.2.9 2019-05-28 14:07:06 +02:00
Nicolas Grekas
a26c6d348d minor #31612 Use AsserEquals for floating-point values (mmokhi)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #31612).

Discussion
----------

Use AsserEquals for floating-point values

Use AssertEquals for these two specific case will do a better job,
since it'll convert both '0.1' and result of `getContent()` into PHP's
internal representation of floating-point and compares them and it should be fine.
Using `AssertSame` for this tests brings floating-point serialization
into consideration which of course will be php.ini specific.

Sponsored-by: Platform.sh

| Q             | A
| ------------- | ---
| Branch?       | master for features / 3.4, 4.2 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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 -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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
-------

0cef5f3ec9 Use AsserEquals for floating-point values
2019-05-28 12:41:07 +02:00
mmokhi
0cef5f3ec9 Use AsserEquals for floating-point values
Use AssertEquals for these two specific case will do a better job,
since it'll convert both '0.1' and result of `getContent()` into PHP's
internal representation of floating-point and compares them and it should be fine.
Using `AssertSame` for this tests brings floating-point serialization
into consideration which of course will be php.ini specific.

In order not missing the type assertion point that `AssertSame` does,
we also perform `assertInternalType('string'...`

Sponsored-by: Platform.sh
2019-05-28 12:41:01 +02:00
Nicolas Grekas
8943d4335a Merge branch '3.4' into 4.2
* 3.4:
  bumped Symfony version to 3.4.29
  updated VERSION for 3.4.28
  update CONTRIBUTORS for 3.4.28
  updated CHANGELOG for 3.4.28
2019-05-28 11:50:14 +02:00
Nicolas Grekas
5bc84778f9 fix deps 2019-05-28 11:47:34 +02:00
Fabien Potencier
bb9a67df3b bumped Symfony version to 3.4.29 2019-05-28 11:38:37 +02:00
Fabien Potencier
5e05ffeb1c
Merge pull request #31646 from fabpot/release-3.4.28
released v3.4.28
2019-05-28 11:24:58 +02:00
Fabien Potencier
af28e976df updated VERSION for 3.4.28 2019-05-28 11:24:42 +02:00
Fabien Potencier
8e3872f76d update CONTRIBUTORS for 3.4.28 2019-05-28 11:24:36 +02:00
Fabien Potencier
5a47816715 updated CHANGELOG for 3.4.28 2019-05-28 11:23:44 +02:00
Nicolas Grekas
90167c36f8 fix tests 2019-05-28 11:19:25 +02:00
Nicolas Grekas
a7bfe26fcc fix tests 2019-05-28 11:07:12 +02:00
Nicolas Grekas
0b0f7bf807 fix tests 2019-05-28 10:32:53 +02:00
Nicolas Grekas
82a1ebf57e Merge branch '3.4' into 4.2
* 3.4:
  fix typo
2019-05-28 10:20:12 +02:00
Fabien Potencier
deb01eb349 minor #31642 FragmentListener - fix typo in annotation (henry2778)
This PR was merged into the 3.4 branch.

Discussion
----------

FragmentListener - fix typo in annotation

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

Just a small typo I've found in fragment listener :)

Commits
-------

b6ff836a49 fix typo
2019-05-27 21:37:51 +02:00
Andrii Popov
b6ff836a49 fix typo 2019-05-27 21:45:58 +03:00
Fabien Potencier
2314f81891 Merge branch '3.4' into 4.2
* 3.4:
  Fixes a small doc blocks syntax error
  Small grammar mistake in documentation
  [Workflow] Do not trigger extra guard
2019-05-27 07:57:45 +02:00
Fabien Potencier
c562e71d29 bug #31584 [Workflow] Do not trigger extra guards (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Do not trigger extra guards

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

---

With this patch, guards are executed only on wanted transitions

**Note for merger**: This is already fixed (in a different manner) in 4.2, So this patch should not be included in 4.2, instead take: #31585 or discard changes of Workflow class but keep tests

Commits
-------

ad0619748e [Workflow] Do not trigger extra guard
2019-05-27 07:53:57 +02:00
Fabien Potencier
ac4429a6aa bug #31632 [Messenger] Use "real" memory usage to honor --memory-limit (chalasr)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Use "real" memory usage to honor --memory-limit

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29957
| License       | MIT
| Doc PR        | n/a

At least it's consistent with what other daemon-based libraries do:
https://github.com/php-enqueue/enqueue-dev/blob/master/pkg/enqueue/Consumption/Extension/LimitConsumerMemoryExtension.php#L58
https://github.com/M6Web/DaemonBundle/blob/master/src/M6Web/Bundle/DaemonBundle/Command/DaemonCommand.php#L493

Commits
-------

fbfe2dfa8a [Messenger] Use real memory usage for --memory-limit
2019-05-27 07:52:11 +02:00
Fabien Potencier
d0bea7aa92 minor #31631 Fixes a small doc blocks syntax error (michaelKaefer)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #31631).

Discussion
----------

Fixes a small doc blocks syntax error

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

Commits
-------

34d4fa66e7 Fixes a small doc blocks syntax error
2019-05-27 07:50:31 +02:00