Commit Graph

36808 Commits

Author SHA1 Message Date
Nicolas Grekas
63c105d406 [String] renamed core classes to Byte/CodePoint/UnicodeString 2019-10-04 09:55:49 +02:00
Titouan Galopin
056d8ceed9 [String] Introduce a locale-aware Slugger in the String component with FrameworkBundle wiring 2019-10-02 18:31:43 +02:00
Nicolas Grekas
4a547c5663 bug #33815 [Workflow] Fixed default marking store value of Workflow (lyrixx)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Workflow] Fixed default marking store value of Workflow

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

Commits
-------

a2330b7a90 [Workflow] Fixed default marking store value of Workflow
2019-10-02 18:13:01 +02:00
Nicolas Grekas
7db04f1248 Merge branch '4.4'
* 4.4:
  fix merge
2019-10-02 18:10:14 +02:00
Grégoire Pineau
a2330b7a90 [Workflow] Fixed default marking store value of Workflow 2019-10-02 17:57:26 +02:00
Nicolas Grekas
d7e5dd120b Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-10-02 17:04:54 +02:00
Nicolas Grekas
766162c4c7 fix merge 2019-10-02 17:03:35 +02:00
Nicolas Grekas
3ee9dbd17b Merge branch '4.4'
* 4.4: (24 commits)
  [Console] Command::execute() should always return int - deprecate returning null
  [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand
  [AnnotationCacheWarmer] add RedirectController to annotation cache
  [WebProfilerBundle] Try to display the most useful panel by default
  Add note about deprecating the XmlEncoder::TYPE_CASE_ATTRIBUTES constant in the upgrade guide
  fix merge
  [DI] add tests loading calls with returns-clone
  [DI] dont mandate a class on inline services with a factory
  Fixed Redis Sentinel usage when only one Sentinel specified
  [EventDispatcher] Added tests for aliased events.
  Sync Twig templateExists behaviors
  Fix the :only-of-type pseudo class selector
  Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant
  [Mailer] Tweak some code
  [Serializer] Add CsvEncoder tests for PHP 7.4
  Copy phpunit.xsd to a predictable path
  [WebserverBundle] Remove duplicated deprecation message
  remove duplicated test
  [Security/Http] fix parsing X509 emailAddress
  [FrameworkBundle] conflict with VarDumper < 4.4
  ...
2019-10-02 17:00:37 +02:00
Jan Schädlich
98c4f6a06c [Console] Command::execute() should always return int - deprecate returning null
- added deprecation message for non-int return value in Command::execute()
- fixed all core commands to return proper int values
- added proper return type-hint to Command::execute() method in all core Commands
2019-10-02 16:44:58 +02:00
Nicolas Grekas
3354bacc02 Merge branch '4.3' into 4.4
* 4.3:
  [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand
  [AnnotationCacheWarmer] add RedirectController to annotation cache
  [DI] add tests loading calls with returns-clone
  [EventDispatcher] Added tests for aliased events.
  [DI] Add CSV env var processor tests
2019-10-02 16:41:32 +02:00
Nicolas Grekas
bf62544a0c Merge branch '3.4' into 4.3
* 3.4:
  [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand
  [AnnotationCacheWarmer] add RedirectController to annotation cache
2019-10-02 16:38:26 +02:00
Nicolas Grekas
1fea53330d bug #33744 [DI] Add CSV env var processor tests / support PHP 7.4 (ro0NL)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Add CSV env var processor tests / support PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Similar as #32051

Commits
-------

82f341864c [DI] Add CSV env var processor tests
2019-10-02 14:58:58 +02:00
Nicolas Grekas
69928be76e minor #33795 [EventDispatcher] Added tests for aliased events (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[EventDispatcher] Added tests for aliased events

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

While working on #33793 I discovered that I could remove the event alias feature of `RegisterListenersPass` without breaking the component's tests. This PR adds the missing tests.

Commits
-------

8e8a6ed99b [EventDispatcher] Added tests for aliased events.
2019-10-02 14:57:27 +02:00
Nicolas Grekas
badb656f62 minor #33801 [DI] add tests loading calls with returns-clone (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] add tests loading calls with returns-clone

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

Commits
-------

9a48def0c0 [DI] add tests loading calls with returns-clone
2019-10-02 14:55:34 +02:00
Nicolas Grekas
00792fc778 minor #33788 [Serializer] Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant (pierredup)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[Serializer] Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | not really
| Deprecations? | yes (well, sort of)
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

There is a small typo in the `XmlEncoder` constant. This can only be fixed in the master branch for Symfony 5 as it is a breaking change. I'm not sure if it's possible to deprecate the usage of the old constant name in 4.4? As the constant just resolves to a string, there is no way of determining if someone used the constant or not (a quick search on Github, I can't find any direct usages of the constant outside of this class)

Commits
-------

001d0f1693 Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant
2019-10-02 14:42:21 +02:00
Nicolas Grekas
4d6fe5ce5d feature #33783 [WebProfilerBundle] Try to display the most useful panel by default (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Try to display the most useful panel by default

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

Alternative to https://github.com/symfony/symfony/pull/32491, the goal stays the same.

I think reserving a data collector name is fine, isn'it ? It's not likely that end users use this name (that's why I added an underscore) + shouldn't be hard for them to just rename it.

I don't think adding a configuration option to toggle the "_best" behavior is useful, should be by default for DX IMHO.

Not adding an extension point for now (for end users to set their panel as the "best"), maybe later if someone request it?

Commits
-------

a45dd98b73 [WebProfilerBundle] Try to display the most useful panel by default
2019-10-02 14:22:29 +02:00
Nicolas Grekas
a176d1a928 bug #33807 [String] fix toAscii() (nicolas-grekas)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[String] fix toAscii()

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

Commits
-------

46a23f87d9 [String] fix toAscii()
2019-10-02 14:13:38 +02:00
Nicolas Grekas
46a23f87d9 [String] fix toAscii() 2019-10-02 14:01:44 +02:00
Jan Schädlich
9b5ced20bb [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand 2019-10-02 12:47:49 +02:00
Jens Schulze
6b6c246c72 [AnnotationCacheWarmer] add RedirectController to annotation cache
This prevents to exclude the RedirectController from the warmed annotation cache which would lead to warnings when trying to use the warmed cache on read only file systems

See #29357
2019-10-02 11:29:04 +02:00
Nicolas Grekas
e3aed1055d minor #33782 [DI] dont mandate a class on inline services with a factory (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] dont mandate a class on inline services with a factory

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

This check is too strict, useless and boring for inline services :)

Commits
-------

a2665d17cd [DI] dont mandate a class on inline services with a factory
2019-10-02 11:23:07 +02:00
Pierre du Plessis
001d0f1693
Remove XmlEncoder::TYPE_CASE_ATTRIBUTES constant 2019-10-02 11:18:51 +02:00
Thomas Calvet
a45dd98b73 [WebProfilerBundle] Try to display the most useful panel by default 2019-10-02 11:17:11 +02:00
Nicolas Grekas
41e452a906 Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-10-02 11:13:07 +02:00
Nicolas Grekas
e490db8834 fix merge 2019-10-02 11:05:24 +02:00
Nicolas Grekas
d4f3b685df Merge branch '4.3' into 4.4
* 4.3:
  Sync Twig templateExists behaviors
  Fix the :only-of-type pseudo class selector
  [Serializer] Add CsvEncoder tests for PHP 7.4
  Copy phpunit.xsd to a predictable path
  [Security/Http] fix parsing X509 emailAddress
  [Serializer] fix denormalization of string-arrays with only one element #33731
  [Cache] fix known tag versions ttl check
2019-10-02 10:48:21 +02:00
Nicolas Grekas
b628210df7 Merge branch '3.4' into 4.3
* 3.4:
  Sync Twig templateExists behaviors
  Fix the :only-of-type pseudo class selector
  [Serializer] Add CsvEncoder tests for PHP 7.4
  Copy phpunit.xsd to a predictable path
  [Security/Http] fix parsing X509 emailAddress
  [Serializer] fix denormalization of string-arrays with only one element #33731
  [Cache] fix known tag versions ttl check
2019-10-02 10:36:26 +02:00
Fabien Potencier
7020f2602b bug #33797 [Cache] Fixed Redis Sentinel usage when only one Sentinel specified (Rohaq)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] 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.

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

As from Issue #33796
In a Redis Sentinel setup, if only a single Redis Sentinel, or multiple Sentinels with the same host/port are specified (as we're currently doing in a test environment), then the call to `setSentinelTimeout` in `RedisTrait.php` throws an exception, as the wrong interface appears to be initialised as a result.

Adding a check for the `redis_sentinel` parameter, as was done with a check for the `redis_cluster` parameter, avoids this, and the Redis Client is initialised correctly.

Commits
-------

13233fcd8e Fixed Redis Sentinel usage when only one Sentinel specified
2019-10-02 10:31:34 +02:00
Fabien Potencier
526fd9fc44 feature #33701 [HttpKernel] wrap compilation of the container in an opportunistic lock (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] wrap compilation of the container in an opportunistic lock

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

https://github.com/symfony/symfony/pull/32764#issuecomment-516924305

This PR adds a lock around the compilation of the container. When two or more concurrent requests want to compile the container, the first one runs the computation and the others wait for its completion. If for any reasons the lock doesn't work, compilation happens as usual.

The effect is visible when developing locally:

Here is what all concurrent requests consume now:
![image](https://user-images.githubusercontent.com/243674/65603626-4e231d00-dfa6-11e9-8b6c-62dbd5eb30fe.png)

And here is what they will consume with this PR (they wait but reuse the just compiled container):
![image](https://user-images.githubusercontent.com/243674/65603733-7f9be880-dfa6-11e9-930b-ce793c3e280c.png)

Commits
-------

0b5b3ed7f9 [HttpKernel] wrap compilation of the container in an opportunistic lock
2019-10-02 10:09:14 +02:00
Nicolas Grekas
9a48def0c0 [DI] add tests loading calls with returns-clone 2019-10-02 10:03:02 +02:00
Nicolas Grekas
a2665d17cd [DI] dont mandate a class on inline services with a factory 2019-10-02 09:19:13 +02:00
Gregor Harlan
80b4f81ebf
[String] fix beforeLast/afterLast 2019-10-01 20:07:29 +02:00
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
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
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
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
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