This PR was merged into the 3.4 branch.
Discussion
----------
[PHPUnit bridge] Avoid running the remove command without any packages
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As the exit code of the command was not checked, the failure was not breaking things, but it was still printing a confusing error message.
This does not apply to versions older than 3.4, as it was impossible to set `SYMFONY_PHPUNIT_REMOVE` to an empty string before (it was applying the default removing rules instead in such case)
Commits
-------
34d2781 Avoid running the remove command without any packages
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI] Top micro benchmarks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This makes Symfony rank 1st most of the time, 2nd within the margin error otherwise.
Follow up of https://github.com/kocsismate/php-di-container-benchmarks/pull/21
Commits
-------
3edf5f1 [DI] Top micro benchmarks
This PR was merged into the 2.7 branch.
Discussion
----------
created validator.tl.xlf for Form/Translations
| Q | A
| ------------- | ---
| Branch? | master / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
6d4e5e0 [Form] Add translations for Tagalog
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Match 77.7x faster by compiling routes in one regexp
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Builds on top of #25961 and http://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html to make routing 77.7x faster (measured when matching the last dynamic route of 400 static + 400 dynamic routes.)
More benchs welcomed.
- [x] check static routes first in a switch
- [x] group same-modifiers regexps
- [x] put condition-less routes in a static map, in a switch's "default"
- [x] match host+pathinfo at the same time
- [x] group same-host regexps in sub-patterns
- [x] consider the host to move more static routes in the static switch
- [x] move static single-route "case" to "default" by adding requirements to $routes
- [x] group same-static-prefix in sub-patterns
- [x] group consecutive same-regex in a single "case"
- [x] move dynamic single-route "case" to "default" by adding requirements to $routes
- [x] extract host variables from the main match and remove the current 2nd match
- [x] extend same-prefix grouping to placeholders
- [x] group same-suffix hosts together
Here is my benchmarking code:
```php
<?php
namespace Symfony\Component\Routing;
require 'vendor/autoload.php';
$routes = new RouteCollection();
for ($i = 0; $i < 400; ++$i) {
$routes->add('r'.$i, new Route('/abc'.$i));
$routes->add('f'.$i, new Route('/abc{foo}/'.$i));
}
$dumper = new Matcher\Dumper\PhpMatcherDumper($routes);
eval('?'.'>'.$dumper->dump());
$router = new \ProjectUrlMatcher(new RequestContext());
$i = 10000;
$s = microtime(1);
while (--$i) {
$router->match('/abcdef/399');
}
echo 'Symfony: ', 1000 * (microtime(1) - $s), "\n";
namespace FastRoute;
$dispatcher = simpleDispatcher(function(RouteCollector $r) {
for ($i = 0; $i < 400; ++$i) {
$r->addRoute('GET', '/abc'.$i, 'r'.$i);
$r->addRoute('GET', '/abc{foo}/'.$i, 'f'.$i);
}
});
$i = 10000;
$s = microtime(1);
while (--$i) {
$dispatcher->dispatch('GET', '/abcdef/399');
}
echo 'FastRoute: ', 1000 * (microtime(1) - $s), "\n";
```
Commits
-------
f933f70483 [Routing] Match 77.7x faster by compiling routes in one regexp
* 4.0:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[TwigBundle][WebProfilerBundle] Fix JS collision
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 3.4:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[TwigBundle][WebProfilerBundle] Fix JS collision
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 2.8:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 2.7:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
This PR was squashed before being merged into the 4.1-dev branch (closes#22447).
Discussion
----------
[WebProfilerBundle] Imply forward request by a new X-Previous-Debug-Token header
| Q | A
| ------------- | ---
| Branch? | 4.1
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
TLDR; imply a "forwarded" request in the profiler if one _returns_ a response with a x-debug-token set. Otherwise dont.
____
Currently a forward request is implied by the WDT/profiler based on the latest sub-request made, however the main request can return it's own response, or one from a non-latest sub-request. The current behavior is a bit misleading imo.
```php
public function indexAction(Request $request)
{
$bar1 = $this->forward(__CLASS__.'::barAction');
$bar2 = $this->forward(__CLASS__.'::bar2Action');
return $bar1;
}
```
It shows the request was forwarded to `bar2Action`. This changes that, so that `barAction` is shown instead. No forward is implied if a new response was returned by `indexAction`.
![image](https://cloud.githubusercontent.com/assets/1047696/25064022/e24d999e-21f1-11e7-8f94-afa3fad7462f.png)
~~Note we dont really need the collector in the framework bundle anymore with this approach.~~ deprecated it.
Commits
-------
07dd09db59 [WebProfilerBundle] Imply forward request by a new X-Previous-Debug-Token header
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Throw 405 instead of 404 when redirect is not possible
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Finishes #25962.
Commits
-------
92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI] Move "include_once" out of closure factories
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
They were previously dumped inside the closures.
Commits
-------
bbcd3d7 [DI] Move "include_once" out of closure factories
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] fix test case
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d317496 [Process] fix test case
This PR was submitted for the master branch but it was squashed and merged into the 2.7 branch instead (closes#26130).
Discussion
----------
[Security][Validator] Add translations for Tagalog
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? |no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
60abecafb9 [Security][Validator] Add translations for Tagalog
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle][WebProfilerBundle] Fix JS collision
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #25894
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#26144).
Discussion
----------
Typo fix in security component translation.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Lithuanian translation typo fix in security component
Commits
-------
a0d8b04f7f Typo fix in security component lithuanian translation.
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DoctrineBridge] Add support for datetime immutable types in doctrine type guesser
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add support for datetime immutable types in doctrine type guesser now that we support `DateTimeImmutable` input in the form component.
Commits
-------
8c94fef7f2 Add support for immutable types in doctrine type guesser
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Drop nofooter option in PlantUmlDumper (dead code)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
I also update the test suite: Dumping a worklow with a state machine
dumper does not make sense.
Commits
-------
9b946471e0 [Workflow] Drop nofooter option in PlantUmlDumper (dead code)