Commit Graph

40727 Commits

Author SHA1 Message Date
Nicolas Grekas
e11ef7ed12 [HttpClient] yield a last chunk for completed responses also 2019-03-11 12:00:28 +01:00
André R
f5ece20a83 [Cache] Only delete one key at a time when on Predis + Cluster 2019-03-11 11:49:54 +01:00
Fabien Potencier
00fe6e6e2a bug #30511 [Process] fix using argument $php of new PhpProcess() (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Process] fix using argument $php of new PhpProcess()

| 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 current logic makes no sense. 3.4 is fine.

Commits
-------

aa6e5851f1 [Process] fix using argument $php of new PhpProcess()
2019-03-11 11:48:22 +01:00
Fabien Potencier
f038da0f6b bug #30507 [Routing] Fixed XML options resolution (Jules Pietri)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fixed XML options resolution

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

Found this bug while adding tests in #30501. I need it to be merged upward so it can get green there.
Thanks!

Commits
-------

53a6ff88f7 [Routing] Fixed XML options resolution
2019-03-11 11:46:25 +01:00
Fabien Potencier
0127b26a88 minor #30510 [Routing] removed a useless var (Jules Pietri)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] removed a useless var

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

This was never documented, we should rely on `$routes->import()` instead.

Commits
-------

10c1313d41 [Routing] removed a useless var
2019-03-11 10:58:16 +01:00
Fabien Potencier
7e8b767204 minor #30512 [Validator] Add the missing translations for the Swedish ("sv") locale (lorceroth)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Swedish ("sv") locale

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

Added the missing translations to the `src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf` file.

Commits
-------

7e9f63da43 [Validator] Add missing translations for Swedish locale
2019-03-11 07:46:08 +01:00
Tobias Genberg
7e9f63da43 [Validator] Add missing translations for Swedish locale 2019-03-11 00:40:03 +01:00
Nicolas Grekas
f54c89c530 [HttpClient] add missing test case 2019-03-10 23:05:39 +01:00
Nicolas Grekas
aa6e5851f1 [Process] fix using argument $php of new PhpProcess() 2019-03-10 21:07:02 +01:00
Fabien Potencier
a96308f0ba feature #30504 [DI] replace "nullable" env processor by improving the "default" one (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] replace "nullable" env processor by improving the "default" one

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

Neither `nullable` nor `default` are released yet.
I propose to replace the `nullable` processor (see #29767) with an improved `default` one (from #28976).
`%env(default::FOO)%` now defaults to `null` when the env var doesn't exist or compares to false".

ping @jderusse @bpolaszek

Commits
-------

c50aad2be1 [DI] replace "nullable" env processor by improving the "default" one
2019-03-10 20:40:48 +01:00
Jules Pietri
10c1313d41 [Routing] removed a useless var 2019-03-10 19:46:42 +01:00
Yonel Ceruto
22b20cab10 Fix debug:form dateTime 2019-03-10 14:20:19 -04:00
Nicolas Grekas
4619ae483d feature #30499 [HttpClient] add ResponseInterface::toArray() (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] add ResponseInterface::toArray()

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

I'd like we discuss adding a `toArray()` method to `ResponseInterface`.

JSON responses are so common when doing server-side requests that this may help remove boilerplate - especially the logic dealing with errors.

WDYT?

(about flags, I don't think we should make them configurable: if one really needs to deal with custom flags, there's always `ResponseInterface::getContent()` - but it should be very rare.).

Commits
-------

aabd1d455e [HttpClient] add ResponseInterface::toArray()
2019-03-10 18:25:55 +01:00
Nicolas Grekas
c50aad2be1 [DI] replace "nullable" env processor by improving the "default" one 2019-03-10 18:21:18 +01:00
Nicolas Grekas
c45bbd4442 Merge branch '4.2'
* 4.2:
  [TwigBridge] remove deprecation triggered when using Twig 2.7
2019-03-10 18:10:06 +01:00
Nicolas Grekas
33b881b9b7 Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] remove deprecation triggered when using Twig 2.7
2019-03-10 18:09:50 +01:00
Nicolas Grekas
4b5c6926cf bug #30506 [TwigBridge] remove deprecation triggered when using Twig 2.7 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] remove deprecation triggered when using Twig 2.7

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

Needs https://github.com/twigphp/Twig/pull/2874
Should make the CI green on 3.4.

Commits
-------

c17a5b25b5 [TwigBridge] remove deprecation triggered when using Twig 2.7
2019-03-10 18:08:49 +01:00
Nicolas Grekas
c17a5b25b5 [TwigBridge] remove deprecation triggered when using Twig 2.7 2019-03-10 18:07:42 +01:00
Jules Pietri
53a6ff88f7 [Routing] Fixed XML options resolution 2019-03-10 17:02:59 +01:00
Nicolas Grekas
6fd6b94628 Merge branch '4.2'
* 4.2:
  fix merge
2019-03-10 11:16:53 +01:00
Nicolas Grekas
11ac27d0b2 fix merge 2019-03-10 11:16:46 +01:00
Nicolas Grekas
bed7694132 Merge branch '4.2'
* 4.2: (27 commits)
  cs fix
  cs fix
  [PHPUnit-Bridge] override some environment variables
  [TwigBridge] Remove use spaceless tag
  Upgrade zookeeper ext
  [translation] Update defaut format from yml to yaml
  Change default log level for output streams
  update docblock to match the actual behavior
  Don't resolve the Deprecation error handler mode until a deprecation is triggered
  compatibility with phpunit8
  Make 'headers' key optional for encoded messages
  [Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods
  Fix undefined variable fromConstructor when passing context to getTypes
  Added translations for chineese language.
  Allow 3rd argument to be null
  Remove whitespace (tab on blank line)
  [Monolog] Really reset logger when calling logger::reset()
  [Form] Fixes debug:form appears many times as type extensions configured with new getExtendedTypes method
  Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
  Update src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php
  ...
2019-03-10 11:14:34 +01:00
Nicolas Grekas
a5951cef91 Merge branch '3.4' into 4.2
* 3.4:
  cs fix
  cs fix
  [PHPUnit-Bridge] override some environment variables
  [TwigBridge] Remove use spaceless tag
  [translation] Update defaut format from yml to yaml
  Change default log level for output streams
  update docblock to match the actual behavior
  compatibility with phpunit8
  [Debug][DebugClassLoader] Detect annotations before blank docblock lines on final and internal methods
  Added translations for chineese language.
2019-03-10 11:08:12 +01:00
Nicolas Grekas
b43cfc831d cs fix 2019-03-10 11:07:44 +01:00
Nicolas Grekas
504d4f2716 cs fix 2019-03-10 11:06:19 +01:00
Nicolas Grekas
42626744b2 bug #30496 [PHPUnit-Bridge] override some Composer environment variables (nicoweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PHPUnit-Bridge] override some Composer environment variables

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

Override `COMPOSER_VENDOR_DIR` and `COMPOSER_BIN_DIR` with their default values in PHPUnit Bridge: #30467

Commits
-------

628502645e [PHPUnit-Bridge] override some environment variables
2019-03-10 10:59:01 +01:00
Nicolas Grekas
c6a35ac106 bug #30505 [TwigBridge] Remove usages of the spaceless tag (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Remove usages of the spaceless tag

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

The spaceless tag is deprecated since version 2.7.

Commits
-------

2ee178b5c5 [TwigBridge] Remove use spaceless tag
2019-03-10 10:57:46 +01:00
nicoweb
628502645e [PHPUnit-Bridge] override some environment variables 2019-03-10 10:48:28 +01:00
Nicolas Grekas
2ee178b5c5 [TwigBridge] Remove use spaceless tag 2019-03-10 10:14:34 +01:00
Nicolas Grekas
d7ef2fdbf9 minor #30486 Upgrade zookeeper ext (tvlooy)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30486).

Discussion
----------

Upgrade zookeeper ext

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

This bumps the zookeeper extension to recent versions. versions > 0.6.0 and < 0.7.1 caused segfaults. This seems to be fixed in the latest version

Commits
-------

a5ace6632c Upgrade zookeeper ext
2019-03-09 22:13:38 +01:00
Tom Van Looy
a5ace6632c Upgrade zookeeper ext 2019-03-09 22:13:32 +01:00
Fabien Potencier
9c60490798 bug #30466 [Messenger] Make 'headers' key optional for encoded messages (yceruto)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Make 'headers' key optional for encoded messages

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

Commits
-------

bb881c9cd0 Make 'headers' key optional for encoded messages
2019-03-09 20:40:16 +01:00
Fabien Potencier
c207cc7940 feature #30472 [Translation] Add XLIFF 1 source to metadata to differentiate from attr (ostrolucky)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Translation] Add XLIFF 1 source to metadata to differentiate from attr

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

Here's our use case this patch solves:

We have 2 translation files. One is created by developer and has empty `<target>`. Second one is created by translator and has non-empty `<target>`, but same `<source>`.

Now, unlike Symfony fixtures, we also use `resname=` XLIFF1 attribute. This allows us to detect when translation is out of date, which happens when `<source>` in dev translation is changed, but `resname=` is not. As visualization which better illustrates problem:

dev.xlf:
```xml
<trans-unit id="source_is_different" resname="source_is_different">
    <source>Welcome to Calida</source>
</trans-unit>
```
real.xlf:
```xml
<trans-unit id="source_is_different" resname="source_is_different">
    <source>Welcome to Jacqueline</source>
    <target>Willkommen bei Jacqueline</target>
</trans-unit>
```

We need to be able to tell `<source>` for this pair is different (so we prepend alert glyph to translation message, to alert developer something is wrong). In current XliffFileLoader there is no way for consumer to figure out if translation key came from `resname` or `<source>`, so we had to copy whole loader.

Commits
-------

ab04f25da4 [Translation] Add XLIFF 1 source to metadata to differentiate from attr
2019-03-09 20:39:00 +01:00
Fabien Potencier
d583f80319 bug #30474 compatibility with phpunit8 (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

compatibility with phpunit8

This basically adds the same phpunit8 compatibility layer added in https://github.com/symfony/symfony/pull/30084 (but for other test classes)
See also discussion in https://github.com/symfony/symfony/issues/30071

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

Commits
-------

5ef254fa65 compatibility with phpunit8
2019-03-09 20:37:12 +01:00
Fabien Potencier
cf728a599b bug #30497 [HttpKernel] Change default log level for output streams (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Change default log level for output streams

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (visual)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27510
| License       | MIT

**BEFORE**
![default-logger-level-before](https://user-images.githubusercontent.com/2028198/54072209-94e93980-4245-11e9-855a-2d32de797072.png)

**AFTER**
![default-logger-level-after](https://user-images.githubusercontent.com/2028198/54072210-9a468400-4245-11e9-96ec-ce5334aba72c.png)

This should improve the first DX/UX for console-based apps.

Commits
-------

d69d5717cd Change default log level for output streams
2019-03-09 20:34:41 +01:00
Fabien Potencier
ee62741c43 bug #30498 [translation] Update defaut format from yml to yaml (GaryPEGEOT)
This PR was squashed before being merged into the 3.4 branch (closes #30498).

Discussion
----------

[translation] Update defaut format from yml to yaml

| 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 | #30443
| License       | MIT
| Doc PR        |

As stated in #30443 , command `php bin/console translation:update --dump-messages --force fr` will by default output the translation to yml format, which is not supported by Symfony

Commits
-------

ba42030641 [translation] Update defaut format from yml to yaml
2019-03-09 20:33:48 +01:00
Gary PEGEOT
ba42030641 [translation] Update defaut format from yml to yaml 2019-03-09 20:33:41 +01:00
Fabien Potencier
7d227e954d minor #30495 [DependencyInjection] update docblock to match the actual behavior (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] update docblock to match the actual behavior

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

Commits
-------

83826daba9 update docblock to match the actual behavior
2019-03-09 20:32:50 +01:00
Fabien Potencier
c1f24182ef bug #30500 [Mime] fixed wrong logic (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mime] fixed wrong logic

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | 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
-------

836970c776 [Mime] fixed wrong logic
2019-03-09 18:03:15 +01:00
Nicolas Grekas
aabd1d455e [HttpClient] add ResponseInterface::toArray() 2019-03-09 17:49:48 +01:00
Fabien Potencier
836970c776 [Mime] fixed wrong logic 2019-03-09 17:40:15 +01:00
Nicolas Grekas
0e2ea87199 [HttpClient] Remove dead code 2019-03-09 17:08:21 +01:00
Yonel Ceruto
d69d5717cd Change default log level for output streams 2019-03-09 08:26:56 -05:00
Christian Flothmann
83826daba9 update docblock to match the actual behavior 2019-03-08 19:10:13 +01:00
Nicolas Grekas
bfcc607b18 bug #30490 Don't resolve the Deprecation error handler mode until a deprecation is triggered (Emmanuel BORGES)
This PR was squashed before being merged into the 4.2 branch (closes #30490).

Discussion
----------

Don't resolve the Deprecation error handler mode until a deprecation is triggered

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

Don't resolve the Deprecation error handler mode until a deprecation is triggered

Commits
-------

f3a5b74dfd Don't resolve the Deprecation error handler mode until a deprecation is triggered
2019-03-08 18:11:35 +01:00
Emmanuel BORGES
f3a5b74dfd Don't resolve the Deprecation error handler mode until a deprecation is triggered 2019-03-08 18:11:28 +01:00
Fabien Potencier
d4326b238e bug #30491 [HttpClient] fixes (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] fixes

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

Spotted while playing with the client.
There is an issue with 307/308 redirects + streamed body that is not fixed here; use string bodies for now.
I'm going to look for a solution in another PR.

Commits
-------

3eca2b448d [HttpClient] fixes
2019-03-08 18:04:23 +01:00
Nicolas Grekas
3eca2b448d [HttpClient] fixes 2019-03-08 17:57:56 +01:00
Fabien Potencier
d0d188f0b9 feature #30484 [Mime] added Headers::toArray() (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mime] added Headers::toArray()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

That helps when using the Mime component to create a form submission HTTP body (where you need to merge the headers of the MIME body with the HTTP headers):

```php
$body->getPreparedHeaders()->toArray();

vs

foreach ($body->getPreparedHeaders()->getAll() as $header) {
      $headers[] = $header->toString();
}
```

Commits
-------

788bb812bf [Mime] added Headers::toArray()
2019-03-08 08:26:22 +01:00
Fabien Potencier
788bb812bf [Mime] added Headers::toArray() 2019-03-08 08:20:15 +01:00