* 2.7:
Using FQ name for PHP_VERSION_ID
[Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
Harden the debugging of Twig filters and functions
bumped Symfony version to 2.7.29
updated VERSION for 2.7.28
update CONTRIBUTORS for 2.7.28
updated CHANGELOG for 2.7.28
This PR was merged into the 2.7 branch.
Discussion
----------
Using FQ name for PHP_VERSION_ID
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22650, replaces #23000
| License | MIT
| Doc PR | n/a
Commits
-------
f91a020b84 Using FQ name for PHP_VERSION_ID
This PR was merged into the 3.3 branch.
Discussion
----------
[EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22970
| License | MIT
| Doc PR | -
If we decide to go this way, we might drop ClosureProxyArgument entirely because we won't need it internally. I'll propose it in another PR for discussion if this one is accepted.
This PR allows "high-order" listeners, as `array(Closure, method)`. Closure is called to get the actual instance when needed only.
How does it look to you? (I'll add tests once confirmed)
Commits
-------
c17a009d66 [EventDispatcher] Handle laziness internally instead of relying on ClosureProxyArgument
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix CacheCollectorPass priority
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony/pull/22960#issuecomment-305460507
It was run before optimization, so child definitions were not resolved yet.
Commits
-------
28b253ab40 Fix CacheCollectorPass priority
This PR was merged into the 3.3 branch.
Discussion
----------
[Routing] Allow GET requests to be redirected. Fixes#23004
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23004
| License | MIT
| Doc PR | NA
GET requests didn't get the same redirect treatment as HEAD requests. I've also added tests cases for all the different trailing/non-trailing slash situations.
Commits
-------
71d4e366a9 [Routing] Allow GET requests to be redirected. Fixes#23004
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
The issue is documented here.
The current symfony code works when `intl.use_exception` is off. however, it's on on PHP 7+ and the issue is reproducible. See https://3v4l.org/PllP1 and https://3v4l.org/3XnKI
Commits
-------
f42c73f [Form] Fix \IntlDateFormatter timezone parameter usage to bypass PHP bug #66323
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Deal with inlined non-shared services
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no (fixing a non released bug fix)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A non-shared service can be inlined several times.
Commits
-------
996698d [DI] Deal with inlined non-shared services
This PR was squashed before being merged into the 3.3 branch (closes#22965).
Discussion
----------
[Cache] Ignore missing annotations.php
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes (different in 3.2)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Avoids the following notices if cache is not warmed up (i.e. `cache:clear --no-warmup` > hit the browser).
```
Warning: include(<base-path>/app/cache/<env>/annotations.php): failed to open stream: No such file or directory
Warning: include(): Failed opening '<base-path>/app/cache/<env>/annotations.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
```
Commits
-------
e8f70c75b9 [Cache] Ignore missing annotations.php
This PR was squashed before being merged into the 3.3 branch (closes#22993).
Discussion
----------
[DI] Autowiring exception thrown when inlined service is removed
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes (on a new & internal method)
| Tests pass? | yes
| Fixed tickets | #22977
| License | MIT
| Doc PR | n/a
We suppress autowiring exceptions if a service is ultimately removed from the container. This fixes a bug where we incorrectly report that a service was NOT removed, when really, it WAS removed. This happens when `ServiceA` is inlined in `ServiceB`... but then `ServiceB` is removed from the container for being unused.
Commits
-------
793b9a001f [DI] Autowiring exception thrown when inlined service is removed
This PR was merged into the 3.3 branch.
Discussion
----------
Better DI type deprecation message
| Q | A
| ------------- | ---
| Branch? | 3,3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22951
| License | MIT
| Doc PR | n/a
This is the most common autowiring deprecation:
```php
public function __construct(UserPasswordEncoder $encoder)
```
You *should* type-hint `UserPasswordEncoderInterface`
Current deprecation message:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won’t be supported in version 4.0. You should rename (or alias) the "security.user_password_encoder.generic" service to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoder" instead.
Updated message:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. Try changing the type-hint for argument "$encoder" of method "AppBundle\Service\TestServiceSubscriber::__construct()" to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface" instead.
This only happens if we detect that there is a service/alias in the container (e.g. `...\UserPasswordEncoderInterface`) for the type-hint (`...\UserPasswordEncoder)`. Otherwise, if there is no correct type-hint in the container, we give the old recommendation (about aliasing).
The only complex case (of giving good directions on *where* to fix things) is with a class that implements `ServiceSubscriberInterface` (where the type-hint is in the `getSusbcribedServices()` method). In that case, the notice is:
> Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. Try changing the type-hint for "Symfony\Component\Security\Core\Encoder\UserPasswordEncoder" in "AppBundle\Service\TestServiceSubscriber" to "Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface" instead.
Commits
-------
a990d5c558 Improving deprecation message when hitting the "deprecated type" lookup, but an alias is available
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Allow empty globs
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22950
| License | MIT
| Doc PR | -
This considers globs as valid even if they return no matches when they have a prefix (and when that prefix exists, according to `$ignoreErrors`).
This means there is an edge-case:
`*.abc` with at least one match is OK, but when it has no match, it falls back to regular import, then usually will fil.
But rewriting this to `./*.abc` resolves the ambiguity and turns this into a glob that won't fail if no matches are found.
This should provide the expected behavior in most cases (but ambiguous described one of course).
Commits
-------
c5b9c1a8c8 [Config] Allow empty globs
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] Support unknown format in LoggerDataCollector
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22952
| License | MIT
| Doc PR | ~
The new expected format for the compiler log is `CompilerPassClass: Message`. However, this is not enforced by the old logging method as seen in schmittjoh/JMSDiExtraBundle#276
This PR adds the ability to read those lines without crashing with `Uncaught Notice: Undefined offset: 1`.
Please note that I have not tested this in an application so testers are welcome to confirm this fix!
Commits
-------
a8dfbb1180 Support unknown compiler log format
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Don't throw Autowire exception for removed service with private __construct
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none (was talking to a user)
| License | MIT
| Doc PR | n/a
Suppose you have:
```php
class A
{
private function construct() {}
}
```
This service will fail to be autowired. But, like other autowiring failures, if this service will ultimately be removed from the container, this exception should be ignored. This fixes that. Unless someone is using the `AutowirePass` directly inside a `try/catch`, there is no BC break (the behavior change is that the exception is now stored, instead of being thrown).
This also clarifies (in the test & phpdoc) that `AutowirePass` always throws `AutowiringFailedException`s.
Thanks!
Commits
-------
2d3e44e11e Fixing a bug where an autowiring exception was thrown even when that service was removed
This PR was squashed before being merged into the 3.3 branch (closes#22968).
Discussion
----------
[Profiler] Fix text selection & click on file links on exception pages
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see comment below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #22957, #22978 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
I don't really know the purpose of this css rule here, but I admit it's quite frustrating not to be able to select something here.
This PR also prevents the following annoying behavior (selecting text collapses/uncollapses traces):
![mai-30-2017 18-26-29](https://cloud.githubusercontent.com/assets/2211145/26593977/3afbc510-4566-11e7-9114-8934ba6126a2.gif)
About the trick used, I think the browser support is safe enough: https://caniuse.com/#search=window.getSelection
EDIT: new commit added which allows to fix#22978
Commits
-------
8618399e42 [Profiler] Fix clicking on links inside toggle
ff6151b15f [Profiler] Fix text selection on exception pages
This PR was merged into the 2.7 branch.
Discussion
----------
Harden the debugging of Twig filters and functions
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Removing the environment and context arguments is now based on Twig metadata rather than on some wild guessing which might go wrong:
- the environment argument may not be typehinted
- the context argument may not be named `$context`
- an argument may be named `$context` without being the special context argument
Commits
-------
63a8aff2c8 Harden the debugging of Twig filters and functions
The specific report was for a service with a private constructor. This also clarifies
that the AutowirePass throws AutowiringFailedException for all situations. And a bug
was fixed in the constructor of AutowiringFailedException
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Remove extra arg in call to TraceableAdapter::start()
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Leftover from previous implementation
Commits
-------
a379319 Remove extra arg in call to TraceableAdapter::start()
This PR was merged into the 3.3 branch.
Discussion
----------
[Cache] Fix decoration of TagAware adapters in dev
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22956
| License | MIT
| Doc PR | n/a
Commits
-------
28e615a Fix decorating TagAware adapters in dev