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
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
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)"
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
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
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
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
* 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
* 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
* 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
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
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)
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
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
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
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