Commit Graph

41011 Commits

Author SHA1 Message Date
Nicolas Grekas
26a92b1bbc bug #30518 [Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers

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

This is slimmed down version of: https://github.com/symfony/symfony/pull/28269 _(many of the fixes there are already part of 3.4)_

Does:
- Adds test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that it simplifies / aligning clear() handling across all clients
- reuse doDelete() from clear to make sure we call singular del calls when in predis cluster

Commits
-------

dacf17962b [Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers
2019-03-13 16:58:56 +01:00
Nicolas Grekas
5218979a76 bug #30509 [Form] Fix debug form when using partial type name (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Fix debug form when using partial type name

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

Since https://github.com/symfony/symfony/pull/29452 (4.3) we have the possibility of passing a partial type name. This fixes the case where `debug:form dateTime` doesn't work as expected:
```bash
In FormRegistry.php line 89:

  [Symfony\Component\Form\Exception\InvalidArgumentException]
  Could not load type "dateTime": class does not implement "Symfony\Component\Form\FormTypeInterface".
```

Commits
-------

22b20cab10 Fix debug:form dateTime
2019-03-13 16:58:09 +01:00
Nicolas Grekas
d0eb13e55a Rebase and update to latest CS 2019-03-13 16:47:52 +01:00
zenmate
fc66683cf2 Add UniqueCollection constraint and validator 2019-03-13 16:40:35 +01:00
Renan Taranto
708d759b8d [Validator] String normalization options for string-based validators 2019-03-13 16:38:44 +01:00
Nicolas Grekas
9f6c827678 minor #30535 Fix return type of Request::getRequestFormat (teohhanhui)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix return type of Request::getRequestFormat

| 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

Helps static analysis tools get the correct type.

Commits
-------

bd92349a3e Fix return type of Request::getRequestFormat
2019-03-13 16:34:38 +01:00
Simeon Kolev
d15c76cd53 Make translations consistent with other translations. 2019-03-13 17:31:25 +02:00
Grégoire Pineau
f9d3848581 minor #29457 [Workflow] Move code from ValidateWorkflowsPass to the FrameworkExtension (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Move code from ValidateWorkflowsPass to the FrameworkExtension

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

---

Just some cleaning. See
https://github.com/symfony/symfony/pull/29146#issuecomment-44418654

Commits
-------

a608797165 [Workflow] Move code from ValidateWorkflowsPass to the FrameworkExtension
2019-03-13 16:26:34 +01:00
Grégoire Pineau
9305fe5c64 bug #30530 [Workflow] Fixed BC break with MarkingStoreInterface::setMarking() (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Workflow] Fixed BC break with `MarkingStoreInterface::setMarking()`

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

Commits
-------

7a94e5eaba [Workflow] Fixed BC break with `MarkingStoreInterface::setMarking()`
2019-03-13 16:24:02 +01:00
Nicolas Grekas
b6f3932004 feature #29303 [Messenger] add welcome notice when running the command (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] add welcome notice when running the command

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

The current behavior of `./bin/console messenger:consume-messages` is totally silent: you run it and nothing visible happens.

Here is what is displayed with this PR:
![image](https://user-images.githubusercontent.com/243674/54235039-af0a6c80-4510-11e9-89d8-3c1c55e946c0.png)

Combined with #30539, it gives:
![image](https://user-images.githubusercontent.com/243674/54235156-ed079080-4510-11e9-9d4d-9f27c87e16e5.png)

Commits
-------

673b58b964 [Messenger] add welcome notice when running the command
2019-03-13 16:19:25 +01:00
Stanislav Kocanda
b86fa9312b Correct language code for ukrainian language
in security translations.
2019-03-13 15:34:24 +01:00
Grégoire Pineau
7a94e5eaba [Workflow] Fixed BC break with MarkingStoreInterface::setMarking() 2019-03-13 10:27:38 +01:00
Nicolas Grekas
673b58b964 [Messenger] add welcome notice when running the command 2019-03-13 08:46:39 +01:00
Fabien Potencier
29f81b003f feature #30541 [BrowserKit] Rename Client to Browser (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[BrowserKit] Rename Client to Browser

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

`Client` is very generic and used in 3 places: BrowserKit, HttpKernel, and FramewrokBundle. Each Client extends another one. So, to make things clearer, I'd like to rename Client to Browser like this:

Symfony\Component\BrowerKit\Client -> AbstractBrowser
Symfony\Component\HttpKernel\Client -> HttpKernelBrowser
Symfony\Bundle\FrameworkBundle\Client -> KernelBrowser

The next PR will introduce an `HttpBrowser` based on the new HttpClient component :)

Commits
-------

dbe4f8605b renamed Client to Browser
2019-03-12 22:00:59 +01:00
Fabien Potencier
dbe4f8605b renamed Client to Browser 2019-03-12 21:40:15 +01:00
Nicolas Grekas
a31c87798f Merge branch '4.2'
* 4.2:
  Fix README about BC promise
  Fixed typo
2019-03-12 19:57:21 +01:00
Nicolas Grekas
5ac6dd405f minor #30538 [Messenger] Fix README about BC promise (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Fix README about BC promise

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

We don't have a BC *break* policy :)
Should be applied to MIME and HttpClient when merging into master.

Commits
-------

9b2af69403 Fix README about BC promise
2019-03-12 19:56:24 +01:00
Nicolas Grekas
9b2af69403 Fix README about BC promise 2019-03-12 18:23:22 +01:00
Nicolas Grekas
793e7aef30 minor #30533 Fixed typo (lyrixx)
This PR was merged into the 4.2 branch.

Discussion
----------

Fixed typo

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

---

cc @pborreli

Commits
-------

ae0adf1b9b Fixed typo
2019-03-12 18:17:33 +01:00
Yonel Ceruto
f647b4a29d Fix DebugCommand when chain loader is involved 2019-03-12 11:49:41 -04:00
Teoh Han Hui
bd92349a3e
Fix return type of Request::getRequestFormat 2019-03-12 15:29:13 +01:00
Grégoire Pineau
a608797165 [Workflow] Move code from ValidateWorkflowsPass to the FrameworkExtension 2019-03-12 14:15:00 +01:00
Jules Pietri
b9162e8cfb [Form] Fixed some phpdocs 2019-03-12 14:00:52 +01:00
Grégoire Pineau
ae0adf1b9b Fixed typo 2019-03-12 12:29:59 +01:00
Nicolas Grekas
18cd3420a4 bug #30513 [HttpClient] yield a last chunk for completed responses also (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] yield a last chunk for completed responses also

| 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 a response completed, streaming it again yields no chunks right now.
This PR makes it yield a `LastChunk` - or an `ErrorChunk` when applicable.
The reasoning for the previous behavior was that streams should yield only activity from the network.
But this looks more complex to use in practice. The proposed behavior is simpler to reason about I think.

Commits
-------

e11ef7ed12 [HttpClient] yield a last chunk for completed responses also
2019-03-12 09:16:06 +01:00
Nicolas Grekas
2ac5f1d08b Merge branch '4.2'
* 4.2:
  [Cache] Only delete one key at a time when on Predis + Cluster
  [Validator] Add missing translations for Swedish locale
  [Process] fix using argument $php of new PhpProcess()
  [Routing] removed a useless var
  [Routing] Fixed XML options resolution
2019-03-11 21:50:47 +01:00
Andrew Berry
2a4f8a11d4
[PropertyInfo] Use a single cache item per method 2019-03-11 16:31:39 -04:00
Nicolas Grekas
dacf17962b [Cache] Fix perf when using RedisCluster by reducing roundtrips to the servers
This is slimmed down version of: https://github.com/symfony/symfony/pull/28269 _(many of the fixes here are already part of 3.4)_

Adds:
- Test coverage for Predis with RedisCluster
- Removes usage of key versioning when on RedisCluster, besides performance aspect of that simplify / aligning clear() handling across cases
2019-03-11 15:17:09 +01:00
Nicolas Grekas
cb3c56bc0c Support indexing tagged locators by FQCN as fallback 2019-03-11 14:33:24 +01:00
Anthony MARTIN
250a2c8332 [DI] Allow tagged_locator tag to be used as an argument
Signed-off-by: Anthony MARTIN <anthony.martin@sensiolabs.com>
2019-03-11 14:33:24 +01:00
Nicolas Grekas
8af31f845d Merge branch '3.4' into 4.2
* 3.4:
  [Cache] Only delete one key at a time when on Predis + Cluster
  [Validator] Add missing translations for Swedish locale
  [Routing] removed a useless var
  [Routing] Fixed XML options resolution
2019-03-11 14:02:11 +01:00
Nicolas Grekas
21d01973f7 bug #30515 [Cache] Only delete one key at a time when on Predis + Cluster (andrerom)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Only delete one key at a time when on Predis + Cluster

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

Makes sure deletes when on Predis  Cluster is only done one by one as it's not able to send the keys to right cluster node like RedisCluster can.

_This is backport of logic from 4.x to fix this. With one tweak; make sure to only do this when on cluster so not all Predis users pay the penalty for it._

Commits
-------

f5ece20a83 [Cache] Only delete one key at a time when on Predis + Cluster
2019-03-11 13:58:49 +01:00
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