This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add comment about bind with empty password
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | /
When LDAP server allows unauthenticated binds, calling the method `bind` with a blank password will return a positive response.
This is not an issue when using High Level classes of Symfony, because this case is handled in `LdapBindAuthenticationProvider` and `CheckLdapCredentialsListener`.
And passing a blank password could be a valid use case for the low level class `Connection`.
This PR adds a comment on the parameter `$password` to let people Know about this
Commits
-------
63a8570a42 Add a warning comment on ldap empty password
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix undefined index for inconsistent command name definition
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fixes#38015
| License | MIT
| Doc PR | -
The issue happens when the command name is set via construct/setName() and is routed via a command loader under a different name, which causes `Application::get(): Command` to return null (return type violation) with a notice. This makes it throws a proper CommandNotFoundException as expected.
Commits
-------
d59140e857 Fix undefined index for inconsistent command name definition
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Psr16Cache does not handle Proxy cache items
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38006
| License | MIT
Add test for Psr16Cache along with a ProxyAdapter
Commits
-------
e525fa1055 [Cache] Psr16Cache does not handle Proxy cache items
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Serializer] fixed fix encoding of cache keys with anonymous classes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#36589
| License | MIT
| Doc PR | -
Commits
-------
3a4675359d [Serializer] fixed fix encoding of cache keys with anonymous classes
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The current message is `TypeError: Argument 4 passed to Symfony\Component\HttpClient\Response\MockResponse::fromRequest() must implement interface Symfony\Contracts\HttpClient\ResponseInterface, instance of Generator given`.
I lost some time with this because I was passing a callable that returns a \Generator instead of passing the resulting \Generator directly. We could support that case but I guess with the added exception message, it is clear we don't support it at all.
Commits
-------
564dce39f8 [HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Do not pass the base uri twice to scoped http clients
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I looked at my dumped scoped http client PHP file and I noticed the base uri was passed two times. I thought there was a bug somewhere in my configuration. Actually, we only need to pass it as the method argument here.
Commits
-------
e2fce0d89f [FrameworkBundle] Do not pass the base uri twice to scoped http clients
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] Backport support for typed properties (PHP 7.4)
| Q | A
| ------------- | ---
| Branch? | 4.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 #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/13719 to be fixed
Backports #34557 as suggested.
One of my workmate hit this issue with the Serializer component and it was not obvious for him why it was not working, without hint.
Commits
-------
1b19f255a3 [PropertyInfo] Backport support for typed properties (PHP 7.4)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Create a predictable symlink pointing to the local install
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
Static analysis tools such as PHPStan need to be able to autoload classes provided by to work. It's also useful to use the assertions provided by PHPUnit with other testing tools such as Behat.
When using `simple-phpunit`, PHPUnit isn't installed in the `vendor/` directory, consequently other tools cannot autoload its classes.
A workaround is to configure these tools to load the autoloader installed by `simple-phpunit`. Example with PHPstan:
```neon
parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9.2-0/vendor/autoload.php
```
However, the path of the autoloader isn't predictable: it depends of PHPUnit version.
This PR changes `simple-phpunit` to create a symlink with a predictable path (`vendor/.phpunit/phpunit`) pointing to the currently used version of PHPUnit, so it is possible to hardcode this value in config files.
The symlink is recreated before every run, so if a different version of PHPUnit must be used because the PHP version in use is different from the previous run (frequent when developing libraries compatible with multiple PHP versions), it still works.
Commits
-------
bf7654f245 [PhpUnitBridge] Create a predictable symlink pointing to the local install
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
| Q | A
| ------------- | ---
| Branch? | 4.4
| 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
Move the polyfill method introduced in #37960 in the `Assert` trait. Sorry I noticed this trait later.
Commits
-------
0426113eda [PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[PhpUnit] Add polyfill for assertMatchesRegularExpression()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | yes
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
`assertRegExp()` is now deprecated in favor of `assertMatchesRegularExpression`.
Commits
-------
33eccd2a00 [PhpUnit] Add polyfill for assertMatchesRegularExpression()