This PR was squashed before being merged into the 4.3-dev branch (closes#29599).
Discussion
----------
[Routing] Allow force-generation of trailing parameters using eg "/exports/news.{!_format}"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29593
| License | MIT
When a route is defined as path: `/exports/news.{!_format}`, we should force `_format` be defined in `defaults` and the generator should generate URLs with that default when none is provided (should work with any parameter of course).
Commits
-------
9fab3d62ec [Routing] Allow force-generation of trailing parameters using eg \"/exports/news.{!_format}\"
This PR was squashed before being merged into the 3.4 branch (closes#29654).
Discussion
----------
[Twig] Replace for-loops with blocks for attributes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets |
| License | MIT
| Doc PR |
As mentioned in #29636, replaced for-loops with blocks for attributes to make use of its features.
Commits
-------
0cd8088a6d [Twig] Replace for-loops with blocks for attributes
This PR was merged into the 4.1 branch.
Discussion
----------
[VarDumper] Add descriptors tests
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see below -->
| Bug fix? | yes
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Just adding some tests for these classes & fixing a small issue with the optional `project_dir` entry from `source` context provider.
If merged before #29613, I'll update tests in it (796ca6b4c6b6f758383ec37ebec952d0fe0ccfe0) (otherwise could be picked on merge).
Commits
-------
8570b8af2a [VarDumper] Add descriptors tests
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes#29672).
Discussion
----------
[Tests] Change to willThrowException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Trivial changes of `will($this->throwException());` to `willThrowException();`
Do you think it's worth it ti create a PR to change `->will($this->returnValue());`
Commits
-------
0695834657 [Tests] Change to willThrowException
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] fix PHPDoc in Command
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix? | yes
| 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 -->
| License | MIT
<!--
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.
-->
Issue was introduced in #28714, this PR fixes copy&paste from `InputArgument` and `InputOption`.
Commits
-------
13bcd6ae9f [Console] fix PHPDoc in Command
This PR was merged into the 4.1 branch.
Discussion
----------
[Config] remove redundant method calls
rebase of #29665
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
since `4.0`, `$resource` and `$sourceResource` are type hinted as `string` so there's not need to call `->varToString(): string`, method not removed for BC as the class is not marked final and the method is `protected`.
Commits
-------
2021f9ecbb Update FileLoaderLoadException.php
This PR was merged into the 3.4 branch.
Discussion
----------
Fix wrong calls to clearstatcache
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| 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 | - <!-- required for new features -->
This was discovered while fixing https://github.com/doctrine/DoctrineMongoDBBundle/issues/510: The first argument is a bool, not the path string. It makes sense to also clear the realpath cache since it doesn't have any performance implications on the tests themselves.
Commits
-------
596b981 Fix wrong calls to clearstatcache
This PR was merged into the 4.3-dev branch.
Discussion
----------
[VarDumper] Use hyperlinks in CliDescriptor
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| 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 | Part of #29585 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Leverages #29168 to add the hyperlink directly on the source text instead of printing below:
#### Before (or with `symfony/console < 4.3`)
![capture d ecran 2018-12-14 a 16 37 18](https://user-images.githubusercontent.com/2211145/50012891-1e2efe00-ffc0-11e8-9e07-b5358cb057bd.png)
#### After
![capture d ecran 2018-12-14 a 16 12 13](https://user-images.githubusercontent.com/2211145/50012921-25560c00-ffc0-11e8-92cd-d6efd43419f9.png)
Commits
-------
e54e21933a [VarDumper] Use hyperlinks in CliDescriptor
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#29625).
Discussion
----------
Add Vietnamese translation for validators
| Q | A
| ------------- | ---
| Branch? | 3.4 (be careful when merging)
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add Vietnamese translations file for Validators
Commits
-------
c76c23e6fe Add Vietnamese translation for validators
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#29645).
Discussion
----------
Allow running PHPUnit with "xdebug.scream" ON
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| 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 | <!-- required for new features -->
Since https://github.com/symfony/symfony/pull/25733 the Kernel attempts to unlink the legacy container while being built.
This throws an error if the file did not exist, for example on a clean install, on the build, which is then silenced.
That's fine on production systems, but on our build we have enabled `xdebug.scream` in order to visualise every errors, which basically un-silences the errors. I believe there should not be a need to silence anything on a usual, clean usage of the system.
Making this `unlink` conditional fixes it.
Could you please approve and merge this PR?
Thanks
Commits
-------
7a7165ee0d Allow running PHPUnit with "xdebug.scream" ON
Since https://github.com/symfony/symfony/pull/25733 the Kernel attempts to unlink the legacy container while being built.
This throws an error if the file did not exist, for example on a clean install, on the build, which is then silenced.
That's fine on production systems, but on our build we have enabled "xdebug.scream" in order to visualise every errors, which basically un-silences the errors. I believe there should not be a need to silence anything on a usual, clean usage of the system.
Making this `unlink` conditional fixes it.
Could you please approve and merge this PR?
Thanks
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] fix Simple\Psr6Cache proxying of metadata
| 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 | -
Discovered while working on #29236.
Commits
-------
02edc9b049 [Cache] fix Simple\Psr6Cache proxying of metadata
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DomCrawler] return empty string on `Crawler::text()` and `Crawler::html()` instead of an exception
…stead of an exception
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28313
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This changes the behavior when using text and html methods from the Crawler by returning null instead of throwing an exception.
Commits
-------
6a4ce386fe [DomCrawler] Added ability to return a default value in `text()` and `html()` instead of throwing an exception when node is empty.
* 4.2:
[FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
Fix env fallback to an unresolved variable
[DI] map snake-case ids of service subscribers to camel-case autowiring aliases
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
When phpDocumentor isn't installed the *debug:autowiring* returns an empty string for class description. With this fallback the end user will get a description even phpDocumentor isn't installed.
**Edit:** Usage of phpDocumentor is completely removed from debug:autowiring command.
Commits
-------
485ed4dd19 [FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
This PR was merged into the 4.2 branch.
Discussion
----------
[DI] map snake-case ids of service subscribers to camel-case autowiring aliases
| 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 | -
Discovered during the workshop at SymfonyCon Lisbon.
Commits
-------
af17da9f82 [DI] map snake-case ids of service subscribers to camel-case autowiring aliases
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes#29409).
Discussion
----------
Fix env fallback to an unresolved variable
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR fixes a tricky case where an env processor require to resolve another parameter.
For example, allowing a user to either pass a PEM key or the path to a PEM key, I could use this config
```
parameters:
private_key: '%env(default:raw_key:file:PRIVATE_KEY)%'
raw_key: '%env(PRIVATE_KEY)%'
```
here, the default processor, performs a `$container->getParameter('raw_key')` which fail because `raw_key` has to be resolved to.
I'm not sure, if this is the right way to do it, please review it carefully.
Here is my reproduct case
```
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\DependencyInjection\ContainerBuilder;
$containerBuilder = new ContainerBuilder();
$containerBuilder->setParameter('env(PRIVATE_KEY)', 'FOO');
$containerBuilder->setParameter('raw_key', '%env(PRIVATE_KEY)%');
$containerBuilder->setParameter('private_key', '%env(default:raw_key:file:PRIVATE_KEY)%');
$containerBuilder->compile(true);
var_dump($containerBuilder->getParameter('private_key'));
```
Commits
-------
ad6df01b9f Fix env fallback to an unresolved variable
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Console] Test href case conservation
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| 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? | no <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Expecting this test to fail until https://github.com/symfony/symfony/pull/29619 is merged up.
Commits
-------
2b55d1504e [Console] Test href case conservation
* 4.2:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
Fix undefined variable in cache ArrayTrait
fixed public directory of web server and assets install when configured in composer.json
* 4.1:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] fix trailing slash redirections involving a trailing var
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29553
| License | MIT
| Doc PR | -
The code in `PhpMatcherDumper` is terrible, but the good news is that 4.2 is much better already.
The change in `UrlMatcher` is much more readable and implements the same fixed logic.
The new test case is in `UrlMatcherTest`.
Commits
-------
6433f8a3e9 [Routing] fix trailing slash redirections involving a trailing var
* 3.4:
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json