This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes#21291).
Discussion
----------
[Ldap] Ldap username case fix
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20486
| License | MIT
| Doc PR |
Commits
-------
c91689ba2d [Ldap] Using Ldap stored username instead of form submitted one
6641b79d58 [Ldap] load users with the good username case
This PR was merged into the 3.2 branch.
Discussion
----------
[Debug] Fix fatal error when changing ErrorHandler loggers if an exception is buffered
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21304
| License | MIT
| Doc PR | -
Prevents a fatal error when setting a new logger if the bootstrapping logger buffered an exception that does not extend `ErrorException`.
@nicolas-grekas The faulty behaviour was added by 8f245493f4, so this PR is against 3.2 and not 2.8.
Commits
-------
a6527f8 [Debug] Fix fatal error when changing ErrorHandler loggers if an exception is buffered
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Always autowire the constructor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no (because method autowiring has been introduced in 3.3)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Always try to autowire the constructor even if it has not been configured explicitly. It doesn't make sense to autowire some methods but not the constructor. It will also allow to write shorter definitions when using method autowiring:
```yaml
services:
Foo\Bar: { autowire: ['set*'] }
```
instead of
```yaml
services:
Foo\Bar: { autowire: ['__construct', 'set*'] }
```
Commits
-------
be3d11faa9 [DependencyInjection] Always autowire the constructor
This PR was merged into the 3.1 branch.
Discussion
----------
[Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
| Q | A
| ------------- | ---
| Branch? | master / 3.1
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes (fail on php 7.1 unrelated?)
| Fixed tickets | https://github.com/symfony/symfony/issues/21274
| License | MIT
| Doc PR | -
This PR fixes an issue with the UniqueEntityValidator in case the entity being validated uses a composite primary key via relations to other entities whose classes do not have a `__toString` method.
Commits
-------
b3ced8608b [DoctrineBridge] Fixed invalid unique value as composite key
5aadce3989 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
This PR was merged into the 3.2 branch.
Discussion
----------
simple-phpunit requires the zip extension
without the zip extension enabled, i get `PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in .../vendor/bin/simple-phpunit:46`
| Q | A
| ------------- | ---
| Branch? | 3.2 (first version containing the script)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21060
| License | MIT
| Doc PR | -
Commits
-------
6628e76e62 simple-phpunit requires the zip extension
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Debug] Trigger deprecation on `@final` annotation in DebugClassLoader - prepare making some classes final
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | follows https://github.com/symfony/symfony/pull/19734
| License | MIT
| Doc PR | |
BC promises become quickly huge but making classes `final` can limit these promises.
At the same time, many classes of the symfony codebase are not meant to be extended and could be `final`; that's the goal of this PR: prepare making them final in 4.0 by triggering deprecations in their constructor:
```php
public function __construct()
{
if (__CLASS__ !== get_class($this)) {
@trigger_error(sprintf('Extending %s is deprecated since 3.3 and won\'t be supported in 4.0 as it will be final.', __CLASS__), E_USER_DEPRECATED);
}
}
```
I updated two classes for now but we can do much more if you like it.
Commits
-------
c2ff111986 [Debug] Trigger deprecation on `@final` annotation in DebugClassLoader
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Remove synthetic services from methodMap + generated methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
For synthetic services, the generated methods are just dead code to fill opcache ;)
And having them in "methodMap" prevents using the property for checking if a service comes from a (non-synthetic) definition or not.
This prepares some changes that we'd like to do in 4.0, see #19668.
Commits
-------
c1e1e999f3 [DI] Remove synthetic services from methodMap + generated methods
This PR was merged into the 3.3-dev branch.
Discussion
----------
[VarDumper] Add search keyboard shortcuts
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21174
| License | MIT
| Doc PR | Worth to mention?
So, this PR simply adds the following shortcuts to navigate between matches, based on main browsers conventions:
- <kbd>CTRL/CMD</kbd> + (<kbd>shift</kbd>* +) <kbd>G</kbd>
- (<kbd>shift</kbd>* +) <kbd>ENTER</kbd>
- (<kbd>shift</kbd>* +) <kbd>F3</kbd>
_* <kbd>shift</kbd> allows to go backwards_
At first, I wanted to add a help box somewhere, but:
- I don't know where to place it. As the var dumper is now used everywhere in the profiler, it should not be importune and should work in narrowed places.
- We use those shortcuts in order to replicate the main softwares/browsers behavior. So we may not need it at all.
This PR also fixes a minor issue where pressing a key not changing the input would have restarted the search query.
Commits
-------
58fe4315ae [VarDumper] Add search keyboard shortcuts
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Mark generated containers as final
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
So that we don't have to care anymore about BC for protected methods in generated containers.
Will leverage deprecations triggered in #20493
Commits
-------
ce0ee1e484 [DI] Mark generated containers as final
This PR was merged into the 3.3-dev branch.
Discussion
----------
[WebServerBundle] add missing use
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
```
$ bin/console server:run 0.0.0.0:80 -vvv
[OK] Server listening on http://0.0.0.0:80
// Quit the server with CONTROL-C.
[2017-01-15 14:41:59] php.DEBUG: Warning: proc_open(/dev/tty): failed to open stream: No such device or address {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\SilencedErrorContext: {\"severity\":2,\"file\":\"/srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php\",\"line\":1000})"}
[Symfony\Component\Debug\Exception\ClassNotFoundException]
Attempted to load class "Process" from namespace "Symfony\Bundle\WebServerB
undle\Command".
Did you forget a "use" statement for "Symfony\Component\Process\Process"?
Exception trace:
() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php:121
Symfony\Bundle\WebServerBundle\Command\ServerRunCommand->Symfony\Bundle\WebServerBundle\Command\{closure}() at n/a:n/a
call_user_func() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:1345
Symfony\Component\Process\Process->Symfony\Component\Process\{closure}() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:1450
Symfony\Component\Process\Process->readPipes() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:388
Symfony\Component\Process\Process->wait() at /srv/vendor/symfony/symfony/src/Symfony/Component/Process/Process.php:210
Symfony\Component\Process\Process->run() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/WebServer.php:47
Symfony\Bundle\WebServerBundle\WebServer->run() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php:135
Symfony\Bundle\WebServerBundle\Command\ServerRunCommand->execute() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:262
Symfony\Component\Console\Command\Command->run() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:860
Symfony\Component\Console\Application->doRunCommand() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:190
Symfony\Component\Console\Application->doRun() at /srv/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:80
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /srv/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at /srv/bin/console:27
server:run [-d|--docroot DOCROOT] [-r|--router ROUTER] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<addressport>]
```
<!--
- Bug fixes must be submitted against the lowest 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 the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
2ae5834 add missing use
This PR was merged into the 3.3-dev branch.
Discussion
----------
[VarDumper] Fixed typo in new search input
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| 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-->
I guess both work out.. but using `of` notation is way more common.
Btw chrome search doesnt show `0 of 0` (at least not initially).. maybe worth it?
/cc @ogizanagi
Commits
-------
f8d63a6 [VarDumper] Fixed typo in new search input
This PR was merged into the 3.1 branch.
Discussion
----------
[DX][Cache] Set right cacheItem type hint on AdapterInterface getters
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fixes missing cache item type hint on pool getters so methods on Symfony CacheItem
is correctly suggested when using IDE's or api documentation.
As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921
_Note: Specifically sets array of CacheItems as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned. If Sami does not still support this we can adjust to what was originally suggested._
Commits
-------
5f7baa5 [DX][Cache] Set right type hint for cacheItem on AdapterInterface getters
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Cache] Relax binary-constraint on Memcached connections
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If it's green then it's PSR-6 compliant.
Commits
-------
284d363 [Cache] Relax binary-constraint on Memcached connections
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBundle] do not lose already set method calls
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21281
| License | MIT
| Doc PR |
Commits
-------
cb1a4b7 [TwigBundle] do not lose already set method calls
The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflow apply all possible
transitions with the same name.
This PR was merged into the 2.7 branch.
Discussion
----------
#20411 fix Yaml parsing for very long quoted strings
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20411
| License | MIT
| Doc PR | no
This fixes#20411, a YAML string with too many backslash escapes can trigger a `PREG_BACKTRACK_LIMIT_ERROR` error in the Yaml parser.
There should be no behavioural change other than the bug fix
I have included a test which fails before this fix and passes after this fix.
Commits
-------
51bca66#20411 fix Yaml parsing for very long quoted strings
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fixes missing type hint for cache item on pool getters so methods on Symfony CacheItem
is correclty suggested when using IDE's or api documentation.
As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921
Note: Specifically sets array of items as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned.
* 3.2:
[Cache] Using strpbrk() instead of strcspn() is faster
bumped Symfony version to 3.2.3
updated VERSION for 3.2.2
updated CHANGELOG for 3.2.2
bumped Symfony version to 3.1.10
updated VERSION for 3.1.9
updated CHANGELOG for 3.1.9
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Using strpbrk() instead of strcspn() is faster
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Keys validation using strpbrk is faster.
Eg on some micro bench:
- `isset($a[strcspn($a, '{}()/\@:')])`: 278ms
- `false !== strpbrk($a, '{}()/\@:')`: 183ms
Commits
-------
d68c451 [Cache] Using strpbrk() instead of strcspn() is faster
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Profiler] Fix inline dump rendering
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
I introduced a minor rendering issue in #21109 when adding a clearfix behavior to the `pre.sf-dump` element:
|Before|After|
|-------|-----|
|
<img width="890" alt="screenshot 2017-01-12 a 19 57 34" src="https://cloud.githubusercontent.com/assets/2211145/21903782/6989eb36-d901-11e6-8f02-99c4a8356725.PNG">|<img width="892" alt="screenshot 2017-01-12 a 19 52 56" src="https://cloud.githubusercontent.com/assets/2211145/21903721/407d3bbc-d901-11e6-901b-3f5b65bee650.PNG">|
This will fix the issue by removing it, as we don't need this behavior for inline dumps.
Commits
-------
81e2641 [Profiler] Fix inline dump rendering
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Skip test if xdebug.file_link_format is defined.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
---
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.
Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
Commits
-------
7f15bc3 [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
This PR was merged into the 2.7 branch.
Discussion
----------
CS: apply is_null
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not related
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
47feb18 CS: apply is_null
This PR was merged into the 2.7 branch.
Discussion
----------
DX: remove invalid inheritdoc
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not related
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
those classes do not extend anything, inherit docs on them are wrong
Commits
-------
9e36436 DX: remove invalid inheritdoc