This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Deprecate some public services to private
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | -
Now that we can deprecate public services to private, here is a first pass on the FWB. I think all those services don't need to be public, ie we never need to access them directly in Symfony's code (except in some tests that I had to modify accordingly). I think most of theses services needed to be public before we hooked the AbstractController with a service subscriber. There are definitely more of them that can be deprecated (ie: created workflows and state machines are public but don't need to be ?) but let's start with the easy ones.
Commits
-------
87868baacb [FrameworkBundle] Deprecate some public services to private
This PR was merged into the 5.2-dev branch.
Discussion
----------
Added a FrenchInflector for the String component
I read in [this blog post](https://symfony.com/blog/new-in-symfony-5-1-deprecated-the-inflector-component) this sentence
> Symfony Inflector component converts words between their singular and plural forms (**for now, only in English**)
So I created a FrenchInflector class implementing the InflectorInterface from the String component. This inflector uses regular expressions and it is tested in the FrenchInflectorTest with a lot of the french exceptions.
| Q | A
| ------------- | ---
| Branch | master
| Bug fix | no
| New feature | yes
| Deprecations | no
| License | MIT
| Doc PR | Not yet
Changelog has been updated, but I'm not sure I did it in the good paragraph.
I don't know if I should update the symfony/symfony-docs, but I have created an example and I could create a PR with it, if you want.
```php
<?php
use Symfony\Component\String\Inflector\FrenchInflector;
$inflector = new FrenchInflector();
$result = $inflector->singularize('dents'); // ['dent']
$result = $inflector->singularize('souris'); // ['souris']
$result = $inflector->singularize('messieurs'); // ['monsieur']
$result = $inflector->pluralize('cinquante'); // ['cinquante']
$result = $inflector->pluralize('pou'); // ['poux']
$result = $inflector->pluralize('cheval'); // ['chevaux']
```
**fabbot.io** is detecting a typo, but this is not. The patch done by fabpot suggests to replace the french 'embarras' word by 'embarrass'. I shall not remove or replace it, because "embarras" is an invariant word.
Commits
-------
d903d9a757 Added a FrenchInflector for the String component French inflector implements InflectorInterface, it uses regexp and it is tested in the FrenchInflectorTest
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Add the name of the env to RuntimeException
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR
if you have the name of the env in the exception message it is much easier to find the error
from -> https://github.com/symfony/dependency-injection/pull/20
Commits
-------
00ab757cbb Add the name of the env to RuntimeException
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Security] Use NullToken while checking authorization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37523
| License | MIT
| Doc PR | tbd
This allows voters to grant access to unauthenticated users. E.g. some objects can be viewed by anyone, in this case the voter has to be able to grant access to unauthenticated users.
This *does break* the interface PHPdoc of `TokenInterface`: `getUser()` returns `null` instead of `string|UserInterface`. This is only true when using the new system, so not a real BC break. I think the only thing we can do to "guide" users is to add some custom handling for type errors related to `null` and `UserInterface` methods ("Did you forgot to check for `null` in the Voter?"). Is this something I should add to this PR?
Commits
-------
e37091541c Use NullToken while checking authorization
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Router] allow to use \A and \z as regex start and end
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | —
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Some people are using `\A` and `\z` as alternative for `^` and `$` for route requirements.
E.g.: UUID pattern in ramsey/uuid (many routes broke after updating the lib):
569e93ac4e (diff-23c8536f7d61e7d839fd1c93ce0dd354L30-R31)
References:
https://www.rexegg.com/regex-anchors.html#Ahttps://www.rexegg.com/regex-anchors.html#z
P.S.: It is my first PR into Symfony. Maybe I should fix something, just let me know.
Commits
-------
f752eeeaa6 [Router] allow to use \A and \z as regex start and end
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
Update StopwatchPeriod.php
Adding `__toString()`, analogous to [`StopwatchEvent`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Stopwatch/StopwatchEvent.php#L242)
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | none
Commits
-------
d3c2911f46 Update StopwatchPeriod.php
This PR was merged into the 5.2-dev branch.
Discussion
----------
Fix getTranslationNodeVisitor() return type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37686
| License | MIT
| Doc PR | -
When constructing the `TranslationExtension` with any `NodeVisitorInterface` other than `TranslationNodeVisitor`, you will get a type error when calling `getTranslationNodeVisitor()`. This PR fixes that by extracting a new `TranslationNodeVisitorInterface`.
Commits
-------
c1344257f1 Fix getTranslationNodeVisitor() return type
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Routing] Allow inline definition of requirements and defaults for host
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/14007
This PR extends the support of inline routing requirements and defaults to the host part, which can also contain parameters.
Commits
-------
1501476d52 [Routing] Allow inline definition of requirements and defaults for host
* 5.1:
reduce column length for MySQL 5.6 compatibility
Minor improvement
Removed redundant strtolower in ConsumeMessagesCommand
getContainer cannot return null anymore
HttpClient profiler error
Fix RedisStore constructor signature
Bump Symfony version to 5.1.4
Update VERSION for 5.1.3
Update CHANGELOG for 5.1.3
Bump Symfony version to 4.4.12
Update VERSION for 4.4.11
Update CHANGELOG for 4.4.11
Bump Symfony version to 3.4.44
updated VERSION for 3.4.43
update CONTRIBUTORS for 3.4.43
updated CHANGELOG for 3.4.43
Fix author for class CachePoolClearerCacheWarmer
This PR was merged into the 5.1 branch.
Discussion
----------
Fix author for class CachePoolClearerCacheWarmer
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/pull/35109#discussion_r363985644
| License | MIT
| Doc PR | symfony/symfony-docs#...
Commits
-------
b3d0812976 Fix author for class CachePoolClearerCacheWarmer
* 4.4:
reduce column length for MySQL 5.6 compatibility
Minor improvement
Removed redundant strtolower in ConsumeMessagesCommand
Fix RedisStore constructor signature
Bump Symfony version to 4.4.12
Update VERSION for 4.4.11
Update CHANGELOG for 4.4.11
Bump Symfony version to 3.4.44
updated VERSION for 3.4.43
update CONTRIBUTORS for 3.4.43
updated CHANGELOG for 3.4.43
This PR was merged into the 5.1 branch.
Discussion
----------
HttpClient profiler error
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix
| License | MIT
| Doc PR | symfony/symfony-docs
When no error occurs making http request, the span was red, it is wierd
Commits
-------
5199f1f9f3 HttpClient profiler error
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
Minor improvement
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Related to https://symfony.com/releases
Commits
-------
e80dfe7c67 Minor improvement
This PR was merged into the 4.4 branch.
Discussion
----------
Removed redundant strtolower in ConsumeMessagesCommand
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
Commits
-------
e288834cda Removed redundant strtolower in ConsumeMessagesCommand
This PR was merged into the 5.1 branch.
Discussion
----------
KernelBrowser::getContainer cannot return null anymore
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
This is a pedantic change.
In symfony 4.4, getContainer could return null.
Since symfony 5.0, this is the implementation:
```
public function getContainer()
{
if (!$this->container) {
throw new \LogicException('Cannot retrieve the container from a non-booted kernel.');
}
return $this->container;
}
```
So I updated the phpdoc.
Commits
-------
257549e9c8 getContainer cannot return null anymore
This PR was merged into the 4.4 branch.
Discussion
----------
Fix RedisStore constructor signature
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
This is a fix for a regression from #37590
Commits
-------
6831271feb Fix RedisStore constructor signature
This PR was merged into the 4.4 branch.
Discussion
----------
Allows RedisClusterProxy instance in Lock RedisStore
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37476
| License | MIT
| Doc PR | /
This PR allow clients instance of RedisClusterProxy created by the StoreFactory in #28691 /cc @nicolas-grekas
Commits
-------
8ef63cd6bc Allows RedisClusterProxy instance in Lock RedisStore
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] Fix bad testRetryTransportError in AsyncDecoratorTraitTest
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Issues in the test:
1. `TransportExceptionInterface` is not `use`d (imported)
2. The catch block will not be executed (even the above 1 is fixed) because
the exception (of `chunked-broken`) will be thrown only when `getContent()` is called
The header is OK, status is 200, and we only asserted `getStatusCode()`
So this test made no sense.
Commits
-------
585536a688 [HttpClient] Fix bad testRetryTransportError in AsyncDecoratorTraitTest