This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix trying to access array offset on value of type int
| Q | A
| ------------- | ---
| Branch? | 5.0
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
|Tests pass?| yes
| License | MIT
PHP 7.4 throws an error exception when you are trying to access an array by an integer key.
I got this error while I was running a console command:
```
ErrorException: Trying to access array offset on value of type int
at /my/project/vendor/symfony/console/Input/ArrayInput.php:110
Exception trace:
/my/project/vendor/symfony/console/Input/ArrayInput.php:110
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/my/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/my/project/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:179
/my/project/vendor/symfony/console/Command/Command.php:255
/my/project/vendor/laravel/framework/src/Illuminate/Console/Command.php:166
/my/project/vendor/symfony/console/Application.php:934
/my/project/vendor/symfony/console/Application.php:273
/my/project/vendor/symfony/console/Application.php:149
/my/project/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
/my/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
/my/project/artisan:37
```
Commits
-------
069d214210 [Console] Fix trying to access array offset on value of type int
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead.
Discussion
----------
[Process] add tests for php executable finder if file does not exist
| Q | A
| ------------- | ---
| Branch? | master?
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets |
| License | MIT
| Doc PR |
regarding Process component, I just noticed there is no test covers the case when the PHP binary is not valid so I added the test to make sure it works as expected also it increases the coverage of the process component
Commits
-------
2b62dc3fc5 [Process] add tests for php executable finder if file does not exist
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Make sure we get the correct number of values from redis::mget()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Redis might not be reachable when invoking `redis->mget($ids)`, the call returns `false` instead of an array.
This change makes sure the return value is properly check, including the correctness of the parameters to invoke `array_combine($ids, $cacheValues);`.
From the documentation:
> Returns the combined array, FALSE if the number of elements for each array isn't equal.
Commits
-------
685c36c3d2 [Cache] Make sure we get the correct number of values from redis::mget()
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes#34533).
Discussion
----------
[Monolog Bridge] Fixed accessing static property as non static.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#34505
| License | MIT
| Doc PR | N/A
Commits
-------
aa045d10b9 [Monolog Bridge] Fixed accessing static property as non static.
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#34459).
Discussion
----------
Improve Symfony description
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | none <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | none
According to https://symfony.com/stats/downloads :)
Commits
-------
465f092aeb Improve Symfony description
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#34564).
Discussion
----------
[Validator] Add Japanese translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
6cea35a108 [Validator] Add Japanese translation
This PR was merged into the 3.4 branch.
Discussion
----------
Remove some unused methods parameters
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This PR removes some useless private method parameters.
Commits
-------
026730e913 Remove some unused methods parameters
This PR was squashed before being merged into the 3.4 branch (closes#34385).
Discussion
----------
Avoid empty "If-Modified-Since" header in validation request
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Just noticed that when a response has been cached that is `public` and has an `maxAge` but does _not_ provide `Last-Modified`, the validation subrequest will have an empty `If-Modified-Since` header value.
Commits
-------
960faef66f Avoid empty \"If-Modified-Since\" header in validation request
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 -->
| Tickets | N/A <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | N/A
Spotted while working on https://github.com/symfony/symfony/pull/34456.
Not sure it should really qualify as a bugfix, but the `ContextualValidatorInterface::validate` method is expected to return the instance. If [chaining in a validator](https://github.com/symfony/symfony/pull/34456/files#diff-0e6e3106aa637d750d47e86a14cef8d4R43), trying to use this test methods would throw an error, trying to call a method on `null`.
Commits
-------
8d1f32613b [Validator] ConstraintValidatorTestCase: add missing return value to mocked validate method calls
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Finder] Fixed docs
minor docblock fix
Commits
-------
e7d0787a4d [Finder] Fixed docs
This PR was merged into the 3.4 branch.
Discussion
----------
Adjust pull request template for 5.1
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Now that 5.0-RC1 has been released (btw: 🎉👏🍾 ), I assume that new features should go to master again.
Commits
-------
c194fffaef Adjust pull request template for 5.0 branchout
This PR was squashed before being merged into the 3.4 branch (closes#34422).
Discussion
----------
Update HttpKernel.php
phpstan-symfony (0.11.6) level 5
Parameter #2 $values of method Symfony\Component\HttpFoundation\HeaderBag::set() expects array|string, int given.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR |
Commits
-------
7b7f966711 Update HttpKernel.php
This PR was merged into the 3.4 branch.
Discussion
----------
Add conflict rule for Monolog 2
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27857, symfony/monolog-bundle#300
| License | MIT
| Doc PR | N/A
Depending on the monorepo has been best practice in Symfony 3 and is discouraged but still possible in Symfony 4. If the Symfony Standard Edition was used to bootstrap the application, Monolog is installed as dependency of the MonologBundle. Thus, if we released a MonologBundle that indicates compatibility with Monolog 2, those application would be bumped to Version 2 although MonologBridge 3.4 is not ready for it. The goal is to prevent this from happening.
This PR adds a conflict rule for Monolog 2 to the 3.4 branch. Assuming this gets merged before the next Symfony releases (3.4.30, 4.2.11, 4.3.3), my plan would be to bump MonologBundle's dependencies like this:
```diff
"require": {
- "monolog/monolog": "~1.22",
- "symfony/monolog-bridge": "~3.4|~4.0"
+ "monolog/monolog": "~1.22|~2.0",
+ "symfony/monolog-bridge": "^3.4.30|~4.2.11|^4.3.3|^5.0"
}
```
If I'm not mistaken, this should remove any possible combination of Symfony 3/4 and Monolog 2.
Projects depending on individual packages instead of the monorepo should be safe already because MonologBridge 3.x/4.x locks Monolog at version 1.
Commits
-------
d53b91a45a Add conflict rule for Monolog 2.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Allow redirecting to URLs that contain a semicolon
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| License | MIT
URLs that contain a semicolon cannot be redirected to at least in MS Edge and IE10.
Take the following example...
```
# https://ad.doubleclick.net/ddm/clk/450721234;254801234;l
// After redirect...
# https://ad.doubleclick.net/ddm/clk/450721234
```
Wrapping the URL in single quotes fixes the issue ([related reading](https://www.w3.org/TR/WCAG20-TECHS/H76.html))
Commits
-------
bd0637ebe4 [HttpFoundation] Allow redirecting to URLs that contain a semicolon
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.
Discussion
----------
[HttpFoundation] Fix MySQL column type definition.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? |no
| Deprecations? | no
| Tickets | Fix#34409
| License | MIT
| Doc PR | symfony/symfony-docs#12641
Fix wrong MySQL column type definition causing Numeric value out of range exception.
Commits
-------
51c5f69274 Fix MySQL column type definition.
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.
Discussion
----------
Link the right file depending on the new version
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix url doc upgrading to 4.x
| License | MIT
Link the right file depending on the new version
Commits
-------
7e38d83ad0 Link the right file depending on the new version
This PR was merged into the 3.4 branch.
Discussion
----------
[Finder] Allow ssh2 stream wrapper for sftp
Same fix as #28604 but for the ssh2.sftp wrapper.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#28604 maybe
| License | MIT
| Doc PR |
Without this patch, we can't use the finder with ssh2.sftp connections.
```php
$connection = \ssh2_connect('host', 22);
\ssh2_auth_password($connection, 'user', 'pass');
$sftp = \ssh2_sftp($connection);
$path = "ssh2.sftp://".intval($sftp)."/";
$finder = new Finder();
foreach ($finder->in($path)->files() as $directory) {
dump(file_get_contents($directory));
}
```
Without the patch:
> RecursiveDirectoryIterator::__construct(ssh2.sftp://838): failed to open dir: operation failed
Commits
-------
e6c9d77b63 [Finder] Allow ssh2 stream wrapper for sftp
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] Require symfony/twig-bundle
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Starting from a fresh 3.4 I did `composer require symfony/web-profiler-bundle --dev` but it fails on post install cache clear because 8a68d2d358/src/Symfony/Bundle/WebProfilerBundle/Resources/config/profiler.xml (L13) needs the `twig` service that is declared in the `TwigBundle`.
`symfony/twig-bundle` is already a hard depency of the `WebProfilerBundle` on 4.3+ (cf cac37caa7d).
Commits
-------
78dad79fec [WebProfilerBundle] Require symfony/twig-bundle
This PR was merged into the 3.4 branch.
Discussion
----------
Allow returning null from NormalizerInterface::normalize
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes?
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Looking at the code, it seems that a normalizer might be called with a `null` value for `$data`, and thus it's only sensible that it be allowed to return `null` too:
7064ff35f2/src/Symfony/Component/Serializer/Serializer.php (L141-L148)
Updating the phpdoc to match.
Commits
-------
1c8edc55ad Allow returning null from NormalizerInterface::normalize