Commit Graph

45323 Commits

Author SHA1 Message Date
Richard Hodgson
13233fcd8e
Fixed Redis Sentinel usage when only one Sentinel specified
Added check for $params['redis_sentinel'] to line 274, as by converting the array of hosts to a single host configuration (as you might in a test environment), this causes the class to initialise incorrectly.
2019-10-01 18:57:36 +01:00
Alexander M. Turek
8e8a6ed99b [EventDispatcher] Added tests for aliased events. 2019-10-01 18:40:32 +02:00
Fabien Potencier
5b7848c8ff feature #33789 [Serializer] Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant (pierredup)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | yes
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A
| Related       | #33788

Deprecate the `XmlEncoder::TYPE_CASE_ATTRIBUTES` constant in favour of `XmlEncoder::TYPE_CAST_ATTRIBUTES`

Commits
-------

9f51cf4a77 Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant
2019-10-01 18:26:56 +02:00
Thomas Calvet
d7682fee6c Sync Twig templateExists behaviors 2019-10-01 17:13:36 +02:00
Robin Chalas
c75098ed37 minor #33790 [Console] remove abbreviation support for hidden commands (xabbuh)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Console] remove abbreviation support for hidden commands

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

6623ec2131 remove abbreviation support for hidden commands
2019-10-01 15:09:46 +02:00
Fabien Potencier
d2b66ff592 bug #33777 Fix the :only-of-type pseudo class selector (jakzal)
This PR was squashed before being merged into the 3.4 branch (closes #33777).

Discussion
----------

Fix the :only-of-type pseudo class selector

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33773
| License       | MIT
| Doc PR        | -

Commits
-------

c2a9bf08f1 Fix the :only-of-type pseudo class selector
2019-10-01 13:57:42 +02:00
Jakub Zalas
c2a9bf08f1 Fix the :only-of-type pseudo class selector 2019-10-01 13:57:37 +02:00
Fabien Potencier
11da6f6eea minor #33787 [Mailer] Tweak some code (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Tweak some code

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Tweaks from the Notifier PR.

Commits
-------

ab094c02eb [Mailer] Tweak some code
2019-10-01 13:38:59 +02:00
Pierre du Plessis
9f51cf4a77
Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant 2019-10-01 12:51:09 +02:00
Fabien Potencier
ab094c02eb [Mailer] Tweak some code 2019-10-01 12:10:05 +02:00
Fabien Potencier
3a1d36102f bug #33772 [WebserverBundle] Remove duplicated deprecation message (jschaedl)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebserverBundle] Remove duplicated deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | -
| Tickets       | Fix #33765
| License       | MIT
| Doc PR        | -

Commits
-------

77534aa45d [WebserverBundle] Remove duplicated deprecation message
2019-10-01 01:14:25 +02:00
Fabien Potencier
871e8e9158 bug #32051 [Serializer] Add CsvEncoder tests for PHP 7.4 (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #32051).

Discussion
----------

[Serializer] Add CsvEncoder tests for PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| 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 -->

Some CSV encoder tests to show the broken behavior of a trailing slash. Spotted in #31867, not sure what to do with it :)

Commits
-------

760354d533 [Serializer] Add CsvEncoder tests for PHP 7.4
2019-10-01 01:11:46 +02:00
Roland Franssen
760354d533 [Serializer] Add CsvEncoder tests for PHP 7.4 2019-10-01 01:11:32 +02:00
Fabien Potencier
befa5c69c2 feature #33776 Copy phpunit.xsd to a predictable path (julienfalque)
This PR was merged into the 3.4 branch.

Discussion
----------

Copy phpunit.xsd to a predictable path

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes-ish
| Deprecations? | no
| Tickets       | https://github.com/symfony/recipes/pull/652#discussion_r329446277
| License       | MIT
| Doc PR        | -

In symfony/recipes#652 I would like to make Flex create the `phpunit.xml.dist` file with a local URI for the `phpunit.xsd`. This is doable when using `phpunit/phpunit` standalone because the path to the XSD file is known. This PR aims to allow doing this when using the PHPUnit Bridge, which installs PHPUnit in a path that might change.

Is is simple `@copy()` call ok? Should I add some error handling?

Commits
-------

233dcb4b75 Copy phpunit.xsd to a predictable path
2019-10-01 01:07:55 +02:00
Fabien Potencier
f4af6d2273 minor #33762 [Console] remove duplicated test (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] remove duplicated test

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

4c1b66c6de remove duplicated test
2019-10-01 01:04:49 +02:00
Fabien Potencier
a824e08314 bug #33759 [Security/Http] fix parsing X509 emailAddress (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Http] fix parsing X509 emailAddress

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33636
| License       | MIT
| Doc PR        | -

Commits
-------

fceb86bde6 [Security/Http] fix parsing X509 emailAddress
2019-10-01 01:01:20 +02:00
Julien Falque
233dcb4b75
Copy phpunit.xsd to a predictable path 2019-09-30 22:33:19 +02:00
Jan Schädlich
77534aa45d [WebserverBundle] Remove duplicated deprecation message 2019-09-30 20:56:12 +02:00
Nicolas Grekas
a2cd56c12f bug #33733 [Serializer] fix denormalization of string-arrays with only one element (mkrauser)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] fix denormalization of string-arrays with only one element

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  |no
| Deprecations? |no
| Tickets       | Fix #33731
| License       | MIT
| Doc PR        |

This PR does almost the same as ac70edf8cd, just not only for arrays of objects.

Commits
-------

8814751b96 [Serializer] fix denormalization of string-arrays with only one element #33731
2019-09-30 16:55:04 +02:00
Christian Flothmann
5e48c39f79 minor #33760 [HttpKernel] drop support for retrieving container from non-booted kernels (xabbuh)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[HttpKernel] drop support for retrieving container from non-booted kernels

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

81ae635100 drop support for retrieving container from non-booted kernels
2019-09-30 16:37:48 +02:00
Christian Flothmann
4c1b66c6de remove duplicated test 2019-09-30 16:33:22 +02:00
Christian Flothmann
6623ec2131 remove abbreviation support for hidden commands 2019-09-30 16:19:32 +02:00
Christian Flothmann
81ae635100 drop support for retrieving container from non-booted kernels 2019-09-30 15:58:09 +02:00
Christian Flothmann
001777ac07 minor #33757 [FrameworkBundle] conflict with VarDumper < 4.4 (dmaicher)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] conflict with VarDumper < 4.4

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

While trying FrameworkBundle 4.4.x-dev I noticed that I was still using VarDumper 4.3 which leads to this error:

```
> app/console cache:clear

Fatal error: Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
PHP Fatal error:  Uncaught Symfony\Component\ErrorHandler\Exception\ClassNotFoundException: Attempted to load class "ContextualizedDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace? in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php:13
Stack trace:
#0 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(1357): require()
#1 /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/appAppKernelDevDebugContainer.php(2282): ContainerB7mbdCh\appAppKernelDevDebugContainer->load('getDebug_DumpLi...')
#2 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(275): ContainerB7mbdCh\appAppKernelDevDebugContainer->ContainerB7mbdCh\{closure}()
#3 /var/www/x/symfony/vendor/symfony/event-dispatcher/EventDispatcher.php(90): Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('console.command')
#4 /var/www/x in /var/www/x/symfony/app/cache/dev/ContainerB7mbdCh/getDebug_DumpListenerService.php on line 13
Script app/console cache:clear handling the post-update-cmd event returned with error code 255
```
So we need to use `symfony/var-dumper >= 4.4`

Commits
-------

9b512c6d5d [FrameworkBundle] conflict with VarDumper < 4.4
2019-09-30 15:16:52 +02:00
Nicolas Grekas
fceb86bde6 [Security/Http] fix parsing X509 emailAddress 2019-09-30 14:24:32 +02:00
David Maicher
9b512c6d5d [FrameworkBundle] conflict with VarDumper < 4.4 2019-09-30 13:00:46 +02:00
Nicolas Grekas
b15ae9c5e0 Merge branch '4.4'
* 4.4:
  [4.4] Fix some leftovers
  [VarDumper] Output the location of calls to dump()
2019-09-30 12:48:47 +02:00
Matthias Krauser
8814751b96 [Serializer] fix denormalization of string-arrays with only one element #33731 2019-09-30 12:45:58 +02:00
Nicolas Grekas
2b71c6f221 bug #33752 [4.4] Fix some leftovers (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Fix some leftovers

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #33756
| License       | MIT
| Doc PR        | -

Found while running console commands with the Symfony Demo.

Commits
-------

b416c12d29 [4.4] Fix some leftovers
2019-09-30 12:04:15 +02:00
Nicolas Grekas
03f2adcb4e bug #33754 [Cache] fix known tag versions ttl check (SwenVanZanten)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix known tag versions ttl check

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT

The introduced changes from PR #27007 came with a knownTagVersionTtl property defaulted to 0.15 microseconds. The if statement defined on line 353 checks if the ttl is higher then the already known tag versions. This results in the opposite of the wanted behavior. Instead of waiting for the ttl to expire the if statement is only true if the known versions are lower than the version ttl.

So if this Adapter stays in memory the tag versions are never checked again if the ttl is already lower then the passed time.

The unit test I've added tests once if the version is changed and another time it doesn't get checked cause the ttl hasn't been expired yet.

Commits
-------

205abf3435 [Cache] fix known tag versions ttl check
2019-09-30 12:02:01 +02:00
Nicolas Grekas
b416c12d29 [4.4] Fix some leftovers 2019-09-30 11:07:05 +02:00
Swen van Zanten
205abf3435
[Cache] fix known tag versions ttl check 2019-09-29 23:19:44 +02:00
Nicolas Grekas
8649f43009 minor #33746 [String] improve AbstractUnicodeString::ascii() fallback logic (nicolas-grekas)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[String] improve AbstractUnicodeString::ascii() fallback logic

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

`any-latin/bgn` is a better default when available, and accepting `\Transliterator` instances allows the consumer code to decide how they are instantiated.

Commits
-------

59069626fd [String] improve AbstractUnicodeString::ascii() fallback logic
2019-09-29 21:33:53 +02:00
Nicolas Grekas
5440d671ca feature #31446 [VarDumper] Output the location of calls to dump() (ktherage)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Output the location of calls to dump()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not tested yet
| Fixed tickets | #30830
| License       | MIT
| Doc PR        |

see #30830

Commits
-------

f0a59d3eab [VarDumper] Output the location of calls to dump()
2019-09-28 18:21:11 +02:00
THERAGE Kévin
f0a59d3eab [VarDumper] Output the location of calls to dump() 2019-09-28 18:20:13 +02:00
Nicolas Grekas
10be999069 Merge branch '4.4'
* 4.4:
  sync phpunit script with master
  [HttpFoundation] allow additinal characters in not raw cookies
  [Console] Deprecate abbreviating hidden command names using  Application->find()
  Do not include hidden commands in suggested alternatives
  [Messenger] Improve error message when routing to an invalid transport (closes #31613)
  [DependencyInjection] Fix wrong exception when service is synthetic
  [Security] add "anonymous: lazy" mode to firewalls
2019-09-28 18:14:00 +02:00
Nicolas Grekas
55843f2de6 Merge branch '4.3' into 4.4
* 4.3:
  sync phpunit script with master
  [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 18:13:05 +02:00
Nicolas Grekas
d8a026bcad Merge branch '3.4' into 4.3
* 3.4:
  sync phpunit script with master
2019-09-28 18:12:55 +02:00
Nicolas Grekas
fda5b20c39 sync phpunit script with master 2019-09-28 18:12:11 +02:00
Nicolas Grekas
241e2f7fb7 Merge branch '3.4' into 4.3
* 3.4:
  [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 17:12:15 +02:00
Nicolas Grekas
ca253960d8 bug #33646 [HttpFoundation] allow additinal characters in not raw cookies (marie)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] allow additinal characters in not raw cookies

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| Tickets       | Fix #33619
| License     | MIT

> **Description**
> When creating a non-raw Cookie, it is impossible to provide a name that contains characters matching the regex class [=,; \t\r\n\013\014]

**Solution**: Check with this regex only raw cookie

Commits
-------

4db1402770 [HttpFoundation] allow additinal characters in not raw cookies
2019-09-28 17:10:09 +02:00
marie
4db1402770 [HttpFoundation] allow additinal characters in not raw cookies 2019-09-28 17:09:56 +02:00
Robin Chalas
e627989089 feature #33412 [Console] Do not leak hidden console commands (m-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Do not leak hidden console commands

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

This PR attempts to fix hidden console commands to be leaked when interacting with the console.

These are the changes:
* Hidden commands won't be shown anymore in the list of commands in a namespace as well as the list of  suggestions ("Did you mean...") for invalid or ambiguous commands.
* Hidden commands therefore now need to be always entered with their full name.
* If an abbreviated command is entered that was previously ambiguous with (only) hidden commands, it's now executed directly (not ambiguous anymore).

Side note: When implementing the tests & changes I realized that `Application->get()` isn't side effect free (when redirecting to the help command) and behaves differently when called multiple times. It therefore must not be used from inside `find()`. Maybe we should change this? Here are the relevant bits:
f71f74b36a/src/Symfony/Component/Console/Application.php (L495-L502)

Commits
-------

f3406338e6 [Console] Deprecate abbreviating hidden command names using  Application->find()
2019-09-28 17:03:31 +02:00
M. Vondano
f3406338e6 [Console] Deprecate abbreviating hidden command names using Application->find() 2019-09-28 17:00:54 +02:00
Nicolas Grekas
399e0fb06f Merge branch '4.3' into 4.4
* 4.3:
  Do not include hidden commands in suggested alternatives
  [DependencyInjection] Fix wrong exception when service is synthetic
2019-09-28 16:56:00 +02:00
Nicolas Grekas
8033fc5a1d Merge branch '3.4' into 4.3
* 3.4:
  Do not include hidden commands in suggested alternatives
  [DependencyInjection] Fix wrong exception when service is synthetic
2019-09-28 16:55:46 +02:00
Nicolas Grekas
944cda7969 bug #33748 [Console] Do not include hidden commands in suggested alternatives (m-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Do not include hidden commands in suggested alternatives

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33398
| License       | MIT
| Doc PR        | n/a

Partially backports #33412 on 3.4, avoids leaking the names of hidden commands in suggested alternatives on command not found.

Commits
-------

8a9d173c36 Do not include hidden commands in suggested alternatives
2019-09-28 16:54:55 +02:00
M. Vondano
8a9d173c36 Do not include hidden commands in suggested alternatives 2019-09-28 16:39:43 +02:00
Nicolas Grekas
59069626fd [String] improve AbstractUnicodeString::ascii() fallback logic 2019-09-28 15:42:02 +02:00
Roland Franssen
82f341864c [DI] Add CSV env var processor tests 2019-09-28 11:59:10 +02:00