Commit Graph

40107 Commits

Author SHA1 Message Date
Fabien Potencier
057890d41e bug #29873 [Debug] remove return type hint for PHP 5 compatibility (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] remove return type hint for PHP 5 compatibility

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

Commits
-------

1f31471ffe remove return type hint for PHP 5 compatibility
2019-01-14 09:59:05 +01:00
Christian Flothmann
1f31471ffe remove return type hint for PHP 5 compatibility 2019-01-14 09:43:48 +01:00
Fabien Potencier
1874369577 minor #29745 SCA: minor code tweaks (kalessil)
This PR was squashed before being merged into the 4.1 branch (closes #29745).

Discussion
----------

SCA: minor code tweaks

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

Eliminated a few excessive calls, tweaked query parameters sorting

Commits
-------

8887f76b64 SCA: minor code tweaks
2019-01-13 17:56:47 +01:00
Vladimir Reznichenko
8887f76b64 SCA: minor code tweaks 2019-01-13 17:56:40 +01:00
Fabien Potencier
3ea4901516 bug #29837 Fix SwiftMailerHandler to support Monolog's latest reset functionality (Seldaek)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix SwiftMailerHandler to support Monolog's latest reset functionality

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

Monolog 1.24 added the ResettableInterface which is meant to support resetting handlers. Reset should also flush as if the request was ending, and it can be used for long running workers for example in between each job that is processed. Due to SwiftMailer's spool however the emails in case of errors are right now only sent at the very end of the worker's lifetime.

For older Monolog versions, this will be ignored, and is thus harmless.

Commits
-------

ada2d83b67 Fix SwiftMailerHandler to support Monolog's latest reset functionality
2019-01-13 17:54:10 +01:00
Fabien Potencier
f95036440a minor #29797 [Dotenv] improved code coverage and removed unreachable code (Stas-Soroka)
This PR was squashed before being merged into the 4.3-dev branch (closes #29797).

Discussion
----------

[Dotenv] improved code coverage and removed unreachable code

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

Commits
-------

34dac7c8fd [Dotenv] improved code coverage and removed unreachable code
2019-01-13 17:52:51 +01:00
Stas Soroka
34dac7c8fd [Dotenv] improved code coverage and removed unreachable code 2019-01-13 17:52:45 +01:00
Fabien Potencier
b06967e64f minor #29798 Component CssSelector tests (vladis84)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29798).

Discussion
----------

Component CssSelector tests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

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

c7410bef29 Component CssSelector tests
2019-01-13 17:50:42 +01:00
Gordienko Vladislav
c7410bef29 Component CssSelector tests 2019-01-13 17:50:36 +01:00
Fabien Potencier
9e9506ebef feature #29148 Load original file metadata when loading Xliff 1.2 files (eternoendless)
This PR was squashed before being merged into the 4.3-dev branch (closes #29148).

Discussion
----------

Load original file metadata when loading Xliff 1.2 files

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

At PrestaShop, we maintain our translations catalog automatically using an internal tool based on our [TranslationToolsBundle](https://github.com/PrestaShop/TranslationToolsBundle), which is capable of reverse building a MessageCatalogue by parsing the source code, and then saving it to Xliff files.

Currently, this tool is only capable of building catalogs from scratch. We are currently moving to an incremental catalog where we only add new wordings, and keep old ones even if they are no longer present in the code (because of B/C). To do that, instead of starting from a clean MessageCatalogue, we load our current catalog using XliffLoader, and use that MessageCatalogue as a base. Easy peasy. But then we found a problem...

The Xliff 1.2 standard defines a list of `<trans-unit>` elements within a collection of `<file>` elements. The `<file>` element has a required attribute named `original`, which is supposed to contain the name of the file where the wordings are used in (at least in our case it does). **This attribute is currently ignored by XliffFileLoader**.

This means that it's currently impossible to read a Xliff 1.2 file using XliffFileloader, and save it back to Xliff without losing data.

This Pull Request adds a new `file` element to the messages' metadata (alongside `notes`, `target-attributes` and `id`). Right now, it only contains `original`, but it could be extended to contain all the other attributes from the `<file>` element if needed.

This required a small change in the loader where we loop through `<file>` elements before fetching their `<trans-unit>` children, instead of fetching all `<trans-unit>` elements at once.

Commits
-------

4073319d0f Load original file metadata when loading Xliff 1.2 files
2019-01-13 17:47:52 +01:00
Pablo Borowicz
4073319d0f Load original file metadata when loading Xliff 1.2 files 2019-01-13 17:47:46 +01:00
Fabien Potencier
ea68e28cf0 bug #29853 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused" (mmarynich)
This PR was merged into the 3.4 branch.

Discussion
----------

Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused"

This reverts commit 44e9a91f30, reversing
changes made to 91b28ff081.

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

4.2.2 release changed the way tagged service are injected

As asked by @nicolas-grekas https://github.com/symfony/symfony/issues/29836#issuecomment-453464500

Commits
-------

b3e17d2101 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)"
2019-01-13 17:45:27 +01:00
Fabien Potencier
34365ec2fe feature #29840 [FrameworkBundle] pass project dir into the assets install command (xabbuh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] pass project dir into the assets install command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29708#discussion_r244287106
| License       | MIT
| Doc PR        |

Commits
-------

b373d4206b pass project dir into the assets install command
2019-01-13 17:43:24 +01:00
Fabien Potencier
6573cd35b4 minor #29849 [Validator] Fixed exception wording (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed exception wording

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

Commits
-------

8266262c9c Fixed exception wording
2019-01-13 17:39:55 +01:00
Fabien Potencier
37c6ae8923 bug #29833 [DebugClassLoader] expose proxyfied findFile() method (fancyweb)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29833).

Discussion
----------

[DebugClassLoader] expose proxyfied findFile() method

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

As bad as it is, some third party libraries expect that at least one autoload function will be the Composer one and have behaviors that relies on the public `findFile` method.

When the `DebugClassLoader` wraps the Composer `ClassLoader`, the function `findFile` is currently lost. So it becomes impossible to use the `DebugClassLoader` with these libraries.

This is for example the case in Drupal 😢 (cf 83bc30ac40/lib/Drupal/Component/ClassFinder/ClassFinder.php).

Fixing these bad implementations in third party libraries can take forever as things move way slower than in Symfony. This is why I think supporting this case directly in Symfony is better. It's easy and will make the `DebugClassLoader` compatible with more cases.

What could be done to go further in this direction would be to proxify any method implementend by wrapped class loaders.

Commits
-------

4f690a31c6 [DebugClassLoader] Readd findFile() method
2019-01-13 17:36:53 +01:00
Thomas Calvet
4f690a31c6 [DebugClassLoader] Readd findFile() method 2019-01-13 17:36:47 +01:00
Fabien Potencier
78e6f28f67 minor #29860 [Console] Fix composer.json suggest/provide (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix composer.json suggest/provide

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

For using the ConsoleLogger you need to require psr/log, not a psr/log-implementation given ConsoleLogger is an implem.

Commits
-------

4db43f3e76 [Console] Fix composer.json suggest/provide
2019-01-12 13:18:00 +01:00
Robin Chalas
4db43f3e76 [Console] Fix composer.json suggest/provide 2019-01-12 12:06:42 +01:00
Robin Chalas
d6cfde94b4 [Security] Do not mix usage of password_*() functions and sodium_*() ones 2019-01-12 03:20:20 +01:00
Mikhail Marynich
b3e17d2101 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)"
This reverts commit 44e9a91f30, reversing
changes made to 91b28ff081.
2019-01-11 16:53:30 +01:00
Christian Flothmann
4d21ab4e7b Merge branch '4.2'
* 4.2:
  account for the short array syntax in Twig
2019-01-11 15:23:08 +01:00
Christian Flothmann
2dddea4d0d Merge branch '4.1' into 4.2
* 4.1:
  account for the short array syntax in Twig
2019-01-11 15:22:29 +01:00
Christian Flothmann
c325155e10 Merge branch '3.4' into 4.1
* 3.4:
  account for the short array syntax in Twig
2019-01-11 15:09:01 +01:00
Christian Flothmann
497309a20f minor #29829 [TwigBridge] account for the short array syntax in Twig (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] account for the short array syntax in Twig

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

59a4dc609d account for the short array syntax in Twig
2019-01-11 15:06:55 +01:00
Valentin
8266262c9c Fixed exception wording 2019-01-11 17:00:45 +03:00
Christian Flothmann
b373d4206b pass project dir into the assets install command 2019-01-11 12:41:57 +01:00
Jordi Boggiano
ada2d83b67
Fix SwiftMailerHandler to support Monolog's latest reset functionality 2019-01-10 16:10:12 +01:00
Christian Flothmann
59a4dc609d account for the short array syntax in Twig 2019-01-10 09:15:17 +01:00
Christian Flothmann
4ba6397c5b Merge branch '4.2'
* 4.2:
  Fix docs
  enabled short array notation in CS
  [fabbot] enable short arrays
  bumped Symfony version to 4.2.3
  updated VERSION for 4.2.2
  updated CHANGELOG for 4.2.2
  bumped Symfony version to 4.1.11
  updated VERSION for 4.1.10
  updated CHANGELOG for 4.1.10
  bumped Symfony version to 3.4.22
  updated VERSION for 3.4.21
  update CONTRIBUTORS for 3.4.21
  updated CHANGELOG for 3.4.21
2019-01-10 08:43:17 +01:00
Christian Flothmann
2c9a3717a7 Merge branch '4.1' into 4.2
* 4.1:
  Fix docs
  enabled short array notation in CS
  [fabbot] enable short arrays
  bumped Symfony version to 4.1.11
  updated VERSION for 4.1.10
  updated CHANGELOG for 4.1.10
  bumped Symfony version to 3.4.22
  updated VERSION for 3.4.21
  update CONTRIBUTORS for 3.4.21
  updated CHANGELOG for 3.4.21
2019-01-10 08:34:23 +01:00
Christian Flothmann
7efc487333 Merge branch '3.4' into 4.1
* 3.4:
  Fix docs
  enabled short array notation in CS
  [fabbot] enable short arrays
  bumped Symfony version to 3.4.22
  updated VERSION for 3.4.21
  update CONTRIBUTORS for 3.4.21
  updated CHANGELOG for 3.4.21
2019-01-10 08:32:51 +01:00
Fabien Potencier
a5c52b81f2 minor #29815 [Console] Fix phpdoc for InputOption shortcut (tvlooy)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29815).

Discussion
----------

[Console] Fix phpdoc for InputOption shortcut

symfony documentation tells people to pass null, and it is the default, but the method docs don't allow it so static analyzers complain about it (spotted by phan)

| Q             | A
| ------------- | ---
| Branch?       |  3.4 (careful when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

64a65e9cd1 Fix docs
2019-01-09 19:02:33 +01:00
Tom Van Looy
64a65e9cd1 Fix docs
symfony documentation tells people to pass null, and it is the default, but the method docs don't allow it so static analyzers complain about it (spotted by phan)
2019-01-09 19:02:24 +01:00
Fabien Potencier
29b151bb61 feature #29821 [VarDumper] add caster for OpenSSL X.509 resources (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] add caster for OpenSSL X.509 resources

| 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 needed that today, so here we are:

![image](https://user-images.githubusercontent.com/243674/50846515-a0b49e80-136f-11e9-9ebd-5d570c01df26.png)

Commits
-------

5e88dc63e2 [VarDumper] add caster for OpenSSL X.509 resources
2019-01-09 16:17:43 +01:00
Nicolas Grekas
5e88dc63e2 [VarDumper] add caster for OpenSSL X.509 resources 2019-01-08 17:42:08 +01:00
Fabien Potencier
3245cb48da enabled short array notation in CS 2019-01-08 09:38:39 +01:00
Fabien Potencier
cb07a3b551 minor #29811 [fabbot] enable short arrays (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[fabbot] enable short arrays

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

Let's move to short arrays, but let's do it in a smooth way.
This PR enables short arrays for php-cs-fixer, making PRs red when they don't follow the CS.
We should then ask all authors of pending PRs to rebase their PR and apply the CS patch.
This will need some time.
Then, in 1-2 months, we'll be able to move all the code base to short arrays without creating hundred merge conflicts with all pending PRs, hopefully.

Commits
-------

84e72e0061 [fabbot] enable short arrays
2019-01-08 08:25:04 +01:00
Nicolas Grekas
84e72e0061 [fabbot] enable short arrays 2019-01-07 21:28:45 +01:00
Konstantin Grachev
38a9d8b6a3
[Bugfix] MemcachedSessionHandler::close() must close connection 2019-01-06 22:40:17 +03:00
Fabien Potencier
006dacd18d minor #29762 Improved performance of LoggerDataCollector (javiereguiluz)
This PR was squashed before being merged into the 4.3-dev branch (closes #29762).

Discussion
----------

Improved performance of LoggerDataCollector

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| 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 | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | -

My feeling is that Symfony's "dev" environment is more and more slow lately. After profiling the Symfony Demo app with Blackfire, I found that `getContainerCompilerLogs()` is one of the slowest methods.

Given that you rarely need or look at these "compiler logs", in this PR I propose to get them only when/if you really need them.

[The before/after profile comparison](https://blackfire.io/profiles/compare/4959d918-8e00-4cd7-9b0b-41919e73ae62/graph) confirms a nice performance improvement and thousands of functions no longer called.

Commits
-------

3b8d6d19ec Improved performance of LoggerDataCollector
2019-01-06 17:31:10 +01:00
Javier Eguiluz
3b8d6d19ec Improved performance of LoggerDataCollector 2019-01-06 17:31:01 +01:00
Fabien Potencier
0083ba1d88 feature #29781 [DI] Add trim env processor (ogizanagi)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] Add trim env processor

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- 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 | #26708  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | Todo

Which is especially useful in combination with the `file` env processor.

Commits
-------

e226492db7 [DI] Add trim env processor
2019-01-06 17:27:17 +01:00
Fabien Potencier
40a53d555a bumped Symfony version to 4.2.3 2019-01-06 17:25:15 +01:00
Fabien Potencier
4b3e32332f
Merge pull request #29803 from fabpot/release-4.2.2
released v4.2.2
2019-01-06 17:19:41 +01:00
Fabien Potencier
c78e7482d5 updated VERSION for 4.2.2 2019-01-06 17:19:23 +01:00
Fabien Potencier
8400ae4751 updated CHANGELOG for 4.2.2 2019-01-06 17:19:13 +01:00
Fabien Potencier
4ef814a19d bumped Symfony version to 4.1.11 2019-01-06 17:18:42 +01:00
Fabien Potencier
96e5fca388
Merge pull request #29802 from fabpot/release-4.1.10
released v4.1.10
2019-01-06 17:16:32 +01:00
Fabien Potencier
379d486959 updated VERSION for 4.1.10 2019-01-06 17:16:13 +01:00
Fabien Potencier
0a7cfd365e updated CHANGELOG for 4.1.10 2019-01-06 17:16:07 +01:00