This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
While debugging HttpFoundation's functional tests with different PHP binaries, I noticed that the webserver process that is started there would always use the `php` binary from my `$PATH` instead of the binary I'm running PHPUnit with.
This PR attempts to fix this by using the `PHP_BINARY` constant.
Commits
-------
9208c69b21 [HttpFoundation] Make sure we reuse the current PHP binary for the webserver process in functional tests.
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] TextDescriptor::formatControllerLink checked method…
…_exists method before it ensures that $controller is not null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Today I tried PHP8 with Symfony 5.2. - by checking my routes with
```
bin/console debug:router
```
It throws
```
method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
```
The reason is the configured auth route for the login API defined in routes.yaml:
```
authorization::login:
path: '/login'
```
This route has no controller configured and the value of $controller in `TextDescriptor::formatControllerLink` in the FrameworkBundle is `null`. This method has a elseif condition with `method_exists` without a check if $controller is a string or object.
In PHP8 this throws an exception/error and did not work. This PR checks that `$controller` is not null before the method_exists check to prevent this failure.
I'm not sure how to test this in the existing Testsuite
Commits
-------
67bd779ef4 [FrameworkBundle] TextDescriptor::formatControllerLink checked method…
This PR was merged into the 5.3-dev branch.
Discussion
----------
Move @experimental annotations to 5.3
| Q | A
| ------------- | ---
| Branch? | 5.x <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
Commits
-------
b07608c0fe Move @experimental annotations to 5.3
This PR was merged into the 5.2 branch.
Discussion
----------
Fix @experimental annotations
| Q | A
| ------------- | ---
| Branch? | 5.2 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
Commits
-------
07781474bc Fix @experimental annotations
This PR was merged into the 5.1 branch.
Discussion
----------
Add missing entries in .gitattributes
| Q | A
| ------------- | ---
| Branch? | 5.1 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | n/a
Commits
-------
a0e7fc36a3 Add missing entries in .gitattributes
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Ignore stack trace printed by Xdebug 3
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
If we're running HttpFoundation's functional tests with Xdebug 3, a stack trace will be printed when a warning is emitted. This confuses our `cookie_max_age` test currently where we perform a `setcookie()` call that will emit a warning.
I have patched the corresponding fixture so the printed stack trace is ignored.
A failed test can be seen here: https://travis-ci.com/github/symfony/symfony/jobs/452077515#L11078
Commits
-------
b67baa4e7f [HttpFoundation] Ignore stack trace printed by Xdebug 3.
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Add ContextBlock for slack notifier
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This block allows to add small text to the message layout footer
Commits
-------
6687e23c7d Add ContextBlock for slack notifier
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Check for maximum number of buttons in slack action block
| Q | A
| ------------- | ---
| Branch? | 5.x |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Tickets | - |
| License | MIT |
| Doc PR | - |
After having problems with the SlackSectionBlock (https://github.com/symfony/symfony/pull/39236) i thought it would be helpful to also have a check for the maximum elements in the SlackActionsBlock and a test. https://api.slack.com/reference/block-kit/blocks#actions
Edit: The actual documentation says that the maximum are 5 elements but this is outdated. The actual number is 25. The slack support confirmed that.
Can this be added to 5.2 or better to the 5.x branch?
There are also some other implementations of slack blocks like the SlackDividerBlock but they have only a constructor and no additional methods. Should we also add some tests for them even if they have no extra logic?
Commits
-------
a7936d2b0e [Notifier] Check for maximum number of buttons in slack action block
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpClient] throw clearer error when no scheme is provided
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39285
| License | MIT
| Doc PR | N/A
This could be considred a BC break, as previously this would've a `TransportExcepiton`, instead of an `InvalidArgumentException`. But i see no reason to catch this specific error, as it would generally be a configuration error.
Commits
-------
4d821d6c34 [HttpClient] throw clearer error when no scheme is provided
This PR was merged into the 4.4 branch.
Discussion
----------
Fix github pr template and include 5.2 for bugfixes
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
-->
Commits
-------
c53a6d04c8 Fix github pr template and include 5.2 for bugfixes
This PR was merged into the 5.2 branch.
Discussion
----------
Remove not used mailer_transport.xml service config
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
-->
Commits
-------
256b19005d Remove not used mailer_transport.xml service config
* 5.2:
[DependencyInjection] Fixed incorrect report for private services if required service does not exist
Remove Xdebug from php-extra runs.
Fix checking slack section fields limit
This PR was merged into the 4.4 branch.
Discussion
----------
Remove Xdebug from php-extra runs
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Apparently, Travis already bundles Xdebug 3 with their PHP 7.4 binaries. This causes a lot of segfaults in our CI at the moment. This PR removes the Xdebug configuration files from all PHP tarballs that we download for our Travis build.
Commits
-------
1bb0fefbd5 Remove Xdebug from php-extra runs.
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Fixed incorrect report for private services if required service does not exist
…does not exist
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#29359
| License | MIT
| Doc PR | no
looks like `CheckExceptionOnInvalidReferenceBehaviorPass` can be moved to `beforeRemovingPasses` section without any consequences. this solves the problem and all tests still pass
Commits
-------
39bd05c5bc [DependencyInjection] Fixed incorrect report for private services if required service does not exist
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] Fix slack section block
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #...
| License | MIT
| Doc PR | symfony/symfony-docs#...
In SlackSectionBlock fields array is not initialized directly in the constructor so when running tests and trying to add a field to it throws `Undefined index: fields`.
Commits
-------
472fa3b50a Fix checking slack section fields limit
* 5.2:
Fix rate limiter documentation
Fix merge.
fix lexing mapping values with trailing whitespaces
[String] Fix Notice when argument is empty string
[Inflector] Fix Notice when argument is empty string
[Security] fix#39262, more defensive PasswordMigratingListener
[Workflow] Fixed case when the marking store is not defined
[Security] fix#39249, default entry_point compiler pass was returning too early
Fix small typos
This PR was submitted for the 5.x branch but it was merged into the 5.2 branch instead.
Discussion
----------
[RateLimiter] Fix rate limiter documentation
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| License | MIT
The current example in README.md is not working.
Commits
-------
f90f27b63a Fix rate limiter documentation
* 5.1:
Fix merge.
fix lexing mapping values with trailing whitespaces
[String] Fix Notice when argument is empty string
[Inflector] Fix Notice when argument is empty string
Fix small typos
This PR was merged into the 5.2 branch.
Discussion
----------
[Workflow] Fixed case when the marking store is not defined
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39242
| License | MIT
| Doc PR |
---
Since we are using `abstract_arg()` in the [service definition](https://github.com/symfony/symfony/blob/v5.2.0/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.php#L25) (where we used `null` before), and since there is a validation mechanism that ensure all abstract arg are resolved, the container compilation failed.
But if the marking store is not defined (which is legit), we want to fallback on the raw PHP implementation.
That's why, now, I replace the abstract arg by null, and everything seems OK
Commits
-------
bd38cceaa8 [Workflow] Fixed case when the marking store is not defined
This PR was merged into the 5.1 branch.
Discussion
----------
[String] Fix Notice when argument is empty string
| Q | A
| ------------- | ---
| Branch? | 5.1 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
PHP Notice is generated when we pass empty string to `singularize` or `pluralize` method.
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->singularize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
```
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->pluralize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
PHP Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
```
**Background**:
When `\Symfony\Component\PropertyAccess\PropertyAccessorInterface::setValue` is used with `_` property, then it calls \Symfony\Component\String\Inflector\EnglishInflector::singularize with empty string.
```
class Check
{
public $_;
}
$check = new Check();
$pr = PropertyAccess::createPropertyAccessorBuilder()
->getPropertyAccessor();
if($pr->isWritable($check, '_')){
$pr->setValue($check, '_', 'test');
}
var_dump($check);
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
...
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
object(Check)#6 (1) {
["_"]=>
string(4) "test"
}
```
P.S.
Another solution is to include empty string in \Symfony\Component\String\Inflector\EnglishInflector::$uninflected
```
private static $uninflected = [
'',
'atad',
'reed',
'kcabdeef',
'hsif',
'ofni',
'esoom',
'seires',
'peehs',
'seiceps',
];
```
If this PR is not relevant please close and sorry for inconvenience.
Commits
-------
88c2b9be62 [String] Fix Notice when argument is empty string
This PR was merged into the 4.4 branch.
Discussion
----------
[Inflector] Fix Notice when argument is empty string
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
Fixing issue when we call `Inflector` with empty string:
```
\Symfony\Component\Inflector\Inflector::singularize('');
```
```
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
...
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
```
Fix for 5.1 https://github.com/symfony/symfony/pull/39244
Commits
-------
2dfe342452 [Inflector] Fix Notice when argument is empty string