This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Registering basic exception handler to handle early failures
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This behavior was previously handled by the removed `ExceptionHandler` class in https://github.com/symfony/symfony/pull/32637.
As this method is mainly called during Kernel boot, where nothing is yet available, the Response content is always HTML. Otherwise, If all goes well on booting, this exception handler will be replaced in `DebugHandlersListener` class:
8073b8abfb/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php (L139)
where the advanced exception handler mechanism is activated.
Commits
-------
a2077a2369 Registers basic exception handler to handle early failures
This PR was merged into the 4.3 branch.
Discussion
----------
Revert "bug #33092 [DependencyInjection] Improve an exception message"
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As reminded by @ro0NL in https://github.com/symfony/symfony/pull/33092#issuecomment-520138148, it looks like we forgot that `CheckDefinitionValidityPass` already checks and suggests for leading slashes.
Why didn't you get the exception from `CheckDefinitionValidityPass` @fabpot?
Commits
-------
ed590ca16b Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
This PR was squashed before being merged into the 4.3 branch (closes#33124).
Discussion
----------
[Config] Add handling for ignored keys in ArrayNode::mergeValues.
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33101
| License | MIT
| Doc PR | N/A
Fix case where normalized data accepting and keeping ignored keys is rejected during merge.
Commits
-------
311e1c4e9e [Config] Add handling for ignored keys in ArrayNode::mergeValues.
This PR was merged into the 3.4 branch.
Discussion
----------
[Router] Fix TraceableUrlMatcher behaviour with trailing slash
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32149
| License | MIT
| Doc PR | ¤
<!--
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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
This pull requests fixes the bug #32149. This issue was about TraceableUrlMatcher having a wrong behaviour regarding trailing slashes (according to UrlMatcher and documentation).
With this pull requests, the test class TraceableUrlMatcherTest now extends UrlMatcherTest, to prevent such behaviour digression.
Thanks @nicolas-grekas for his feedback on the issue #32149
Commits
-------
fd1cb443fd [Router] Fix TraceableUrlMatcher behaviour with trailing slash
This PR was merged into the 3.4 branch.
Discussion
----------
[Security/Core] UserInterface::getPassword() can return null
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Our very own `User` class can return null already.
Commits
-------
00d7f8cde7 [Security/Core] UserInterface::getPassword() can return null
This PR was merged into the 3.4 branch.
Discussion
----------
Fix inconsistent return points
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17201 in preparation for #33228
| License | MIT
| Doc PR | N/A
Inconsistent return points in methods prevent adding return types. I thought, I'll give it a try and fix them. After this PR, PhpStorm's inspection still finds 39 issues, but as far as I can tell, they're either false positives or fixture code.
Commits
-------
f5b6ee9de1 Fix inconsistent return points.
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] add return-types to generated containers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A chunk of #33236 ready for 4.4
Commits
-------
917091955c [DI] add return-types to generated containers
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Make LdapUser implement EquatableInterface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Bugfix because it is required for password migrations https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Ldap/Security/LdapUserProvider.php#L128
Commits
-------
ae255095ea [Ldap] Make LdapUser implement EquatableInterface
This PR was merged into the 4.3 branch.
Discussion
----------
Fix handling for session parameters
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
b8c9e40980 Fix handling for session parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Remove the auth mode DSN option and support in the eSMTP transport
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | -
The authentication mode can be automatically negotiated between the Mailer and the SMTP server. There is an option to force it to a given auth mode, but I don't see any valid use case. So, let's remove that feature.
Commits
-------
34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport
* 4.3:
[Routing] Add a param annotation for $annot.
[DI] fix docblock
[Console] fix docblock
Add missing translations for Armenian locale
[Process] Added missing return type.
[Process] Doc block backport.
Added doc block for Registry::supports().
[Cache] Fix predis test
Don't duplicate addresses in Sendgrid Transport
Remove unnecessary statement
Fix some docblocks.
[Messenger] make delay exchange and queues durable like the normal ones by default
Cancel delayed message if handler fails
Added tests for #32370
* 3.4:
[Routing] Add a param annotation for $annot.
[DI] fix docblock
Add missing translations for Armenian locale
[Process] Doc block backport.
Fix some docblocks.
This PR was merged into the 4.4 branch.
Discussion
----------
[Monolog] Added ElasticsearchLogstashHandler
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR was initially [submitted on Monolog](https://github.com/Seldaek/monolog/pull/1334).
It has been refused , but Jordi suggested to add it to the symfony bridge. So here we go :)
---
ATM, there are few options to push log to Elastic Stack in order to play with them:
* install logstash and use a Gelf handler. It works but you have to install logstash and configure it. Not an easy task. More over, it need an extra PHP package
* use the ES handler: It does not play well with context and extra: Kibana is not able to filter on nested object. And this handler is tightly coupled to the ElasticaFormatter formater. More over, it need an extra PHP package
* use something to parse file logs. This is really a bad idea since it involves a parsing... More over a daemon is needed to do that (file beat / logstash / you name it)
This is why I'm introducing a new Handler.
* There is not need to install anything (expect ES, of course)
* It play very well with Kibana, as it uses the Logstash format
* It requires symfony/http-client, but in a modern PHP application (SF 4.3) this dependency is already present
* It slow down a bit the application since it trigger an HTTP request for each logs. But symfony/http-client is non-blocking. If you want to use it in production, I recommend to wrap this handler in a buffer handler or a cross-finger handle to have only one HTTP call.
---
Some performance consideration en a prod env with a buffer handler + this one
* with push to ES: https://blackfire.io/profiles/f94ccf35-9f9d-4df1-bfc5-7fa75a535628/graph
* with push to ES commented: https://blackfire.io/profiles/6b66bc18-6b90-4341-963f-797f7a7a689c/graph
As you can see, as requests are made synchronously, there is no penalty on `AppKernel::Handler()` 😍! But the PHP worker has more work to do, and it's busy much more time (about X2)
I explained everything in the PHP Doc Block
---
This is what you can expect **out of the box**
![image](https://user-images.githubusercontent.com/408368/59916122-9b7b7580-941e-11e9-9a22-f56bc1d1a288.png)
Commits
-------
1587e9a4e2 [Monolog] Added ElasticsearchLogstashHandler
This PR was squashed before being merged into the 4.4 branch (closes#33212).
Discussion
----------
[VarDumper] Add test dump image
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33107. <!-- #-prefixed issue number(s), if any -->
| 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
8393a9b5c1 [VarDumper] Add test dump image
This PR was merged into the 4.4 branch.
Discussion
----------
Add types to private and final methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
Backports from #33154.
Commits
-------
1b880677d4 Add types to private and final methods.
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers
| Q | A
| ------------- | ---
| Branch? | 4.3 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes (thanks @Nyholm)
| Fixed tickets | #32370
| License | MIT
| Doc PR | -
This is a fix for #32370. There is no need for anything sophisticated. There is no recursion or fancy stuff going on, just a queue of message handled sequentially. A simple variable is enough to keep track of the queue state.
Thanks @Nyholm for the test, it would clearly have been the hardest part of the job.
Commits
-------
1f5c8a6790 Cancel delayed message if handler fails
35c76a385d Added tests for #32370
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] InMemoryTransport handle acknowledged and rejected messages
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs/pull/12045 <!-- required for new features -->
This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.
For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.
See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project
Commits
-------
71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] make delay exchange and queues durable like the normal ones by default
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32891
| License | MIT
| Doc PR |
This also imrproves BC of #32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.
Commits
-------
e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Full alpha3 language support
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33136
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
I'll validate some more cases with tests.
Commits
-------
29aee2ddf2 [Intl] Full alpha3 language support
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32936
| License | MIT
| Doc PR | symfony/symfony-docs#...
**Issue**
There is no easy way to catch PHP warnings, though some progress has been made in this area for PHP 8.0 (https://wiki.php.net/rfc/consistent_type_errors).
**Before**
```php
$file = file_get_contents('unknown.txt');
// PHP Warning: file_get_contents(unknown.txt): failed to open stream: No such file or directory
// workaround:
$file = @file_get_contents('unknown.txt');
if (false === $file) {
$e = error_get_last();
throw new \ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
}
```
**After**
```php
$file = ErrorHandler::call('file_get_contents', 'unknown.txt');
// or
$file = ErrorHandler::call(static function () {
return file_get_contents('unknown.txt');
});
// or (PHP 7.4)
$file = ErrorHandler::call(fn () => file_get_contents('unknown.txt'));
```
All credits to @nicolas-grekas https://github.com/symfony/symfony/issues/32936#issuecomment-518152681 and @vudaltsov for the idea.
Commits
-------
0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into `\ErrorException`
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Validate country preferred alpha code mapping
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Use the same approach for the preferred alpha2-to-alpha3 code mapping, like Languages does. It provides us some more support in terms of maintenance.
The added `CD => COD` was previously implied based on ordering upstream.
Commits
-------
345305904b [Intl] Validate region preferred alpha code mapping
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Don't duplicate addresses in Sendgrid Transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33135
| License | MIT
| Doc PR | N/A
Sendgrid requires the `to`, `cc` and `bcc` fields to be unique
Commits
-------
2706a9763f Don't duplicate addresses in Sendgrid Transport
The casting of `$id` to string inside the second foreach loop in `\Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap` is redundant, as the variable is not used after the casting inside nor outside the loop (while still in the loop, it gets overriden upon next iteration).
Fixes#33206
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] fixed a PHP notice when there is no function in the stack trace of an Exception
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Under certain circumstances, the `function` is not present in the stack trace. That's the case for instance when an error occurs on a line like this one `return require "somefile";`.
Commits
-------
ddb47358ae [Console] fixed a PHP notice when there is no function
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30123
| License | MIT
| Doc PR | TODO
I wanted to push something to show the advancement and get feedback.
I pushed two versions : one with dedicated functions for code clarity (DebugClassLoader.php) and one withtout (DebugClassLoader___.php). It would be nice if some people with Blackfire could compare the performances.
So let's be clear, we are never gonna be able to cover all cases! We can however cover the vast majority.
Current non covered cases and problems :
- We assume that if there is more than 2 returned types, we cannot do anything. Even if it could technically be possible.
- We assume that any returned type that doesn't fit our "returnable" types list is a class. We don't check at all if this class actualy exists.
- We don't handle spaces in types. The types stop at the first space.
- That means we don't handle (yet) the callable type with spaces (cf https://github.com/symfony/symfony/issues/29969)
- Vendor code extending other vendor core triggers the deprecations 😕
Commits
-------
aa338c8b42 Import return annotations from vendors
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Explicit check
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This avoids a little conflict with #33140
data is not impacted (today), but i like to make our data selection as explicit as possible and avoid ever pulling in `deprecated` or e.g. `legacy` languages.
Commits
-------
fbd4ce4c5c [Intl] Explicit check
This PR was merged into the 3.4 branch.
Discussion
----------
Partially Revert "Remove trailing space in all markdown files"
This reverts commit 5a3c19846e22399f5ce43d366346dd404e2f825f.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33142
| License | MIT
| Doc PR | -
Commits
-------
2aec7df12c Partially Revert "Remove trailing space in all markdown files"
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix docblocks in Container*
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Backport from master.
Internally, services can be of any kind, but only `object|null` is allowed for public services.
Commits
-------
8e4d08fe95 [DI] fix docblocks in Container*
This PR was merged into the 3.4 branch.
Discussion
----------
Fix getMaxFilesize() returning zero
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32790
| License | MIT
With #32790 a BC break got introduced. Previously an empty `upload_max_filesize` returned `PHP_INT_MAX` but after the changes from #32790 it returns `0`.
Setting `upload_max_filesize` or `post_max_size` to `0` or `''` disables the limit so for both cases `PHP_INT_MAX` should be returned.
Commits
-------
f4c2ea5b73 Fix getMaxFilesize() returning zero
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] deprecate support for non-object services
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32411
| License | MIT
| Doc PR | -
Follows #32432 /cc @derrabus
Prepares for adding the `?object` return-type on master.
Commits
-------
7c01c4c80c [DI] deprecate support for non-object services
This PR was squashed before being merged into the 4.4 branch (closes#32845).
Discussion
----------
[HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32453
| License | MIT
| Doc PR | TODO
We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures.
The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure.
We have recently added the `getPublicDir()` method in https://github.com/symfony/symfony/pull/31975, here I'm removing it in favor of hardcoding a new convention.
I've added some functional tests in which I've changed everything to this structure:
```
-- ModernBundle
|-- config/
|-- public/
|-- src/
|-- ModernBundle.php
|-- templates/
|-- translations/
```
WDYT?
Commits
-------
6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] XliffLintCommand: allow .xliff file extension
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| License | MIT
I ran into a problem with XLIFF files having an *.xliff extension and a "target-language" attribute.
The command always outputted: There is a mismatch between the language included in the file name and the value used used in the "target-language" attribute of the file.
The "target-language" attribute was set to "en" and the filename was also "menu.en.xliff".
After reading the source code, I realized that this regex does not respect other valied file extensions such as "xliff" for these files and therefore throws this (rather confusing) error.
Commits
-------
dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension
This PR was merged into the 4.4 branch.
Discussion
----------
[Serializer] Encode empty objects as objects, not arrays
Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.
Often PHP code is relaxed about the difference betweens arrays and objects, and particularly empty arrays are ambiguous. This preserves objects that would otherwise have turned into arrays as objects in the encoding.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | No
| Deprecations? | No
| Tests pass? | yes
| Fixed tickets | #23019
| License | MIT
| Doc PR | I'll do it if/when this might be merged
Commits
-------
f28e826627 [Serializer] Encode empty objects as objects, not arrays
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] Add type declarations to private DefaultChoiceListFactory methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
These are the type declarations that can be safely added to private methods of the `DefaultChoiceListFactory` without breaking BC.
Commits
-------
9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods
* 4.3:
cs fix
Fix return statements
[TwigBridge] add missing dep
Add false type to ChoiceListFactoryInterface::createView $label argument
Update UPGRADE guide of 4.3 for EventDispatcher
[SecurityBundle] display the correct class name on the deprecated notice
This PR was merged into the 4.3 branch.
Discussion
----------
[SecurityBundle] display the correct class name on the deprecated notice
| Q | A
| ------------- | ---
| Branch? | 4.3 <!-- see below -->
| Bug fix? | yes
| New feature? |no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->
| 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
8e64b9a7ec [SecurityBundle] display the correct class name on the deprecated notice
This PR was merged into the 3.4 branch.
Discussion
----------
Fix return statements
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Discovered while working on #30323
This will sync the code from 3.4 up to master, where adding return types will require these.
Commits
-------
2bc05c83b4 Fix return statements
* 4.3:
cleanups
Disable PHPUnit result cache on the CI
[Security] Cleanup "Digest nonce has expired." translation
[Translation] Highlight invalid translation status
Added translations in validator for Serbian Cyrillic
Added translations in validator for Serbian Latin
[EventDispatcher] wrong Request class
[DependencyInjection] improved exception message
This PR was merged into the 3.4 branch.
Discussion
----------
Disable PHPUnit result cache on the CI
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We don't need it and disabling it works around the segfault on 4.3
Commits
-------
912d7db7dd Disable PHPUnit result cache on the CI
This PR was squashed before being merged into the 3.4 branch (closes#33096).
Discussion
----------
Added translations in validator for Serbian Cyrillic
Resolves#30188
Should be able for merges in branches >3.4, not sure how to do that tho :(
Commits
-------
23d4a23b46 Added translations in validator for Serbian Cyrillic
This PR was squashed before being merged into the 3.4 branch (closes#33097).
Discussion
----------
Added translations in validator for Serbian Latin
[Validator] Added translations
Related to #30188
Working on Serbian Cyrillic I saw that Latin translations are also missing some translations so this is a PR related to that. As said in the Cyrillic PR this should be able to be merged in all branches above 3.4, but I am not sure how to do that.
Commits
-------
fbe7362362 Added translations in validator for Serbian Latin
This PR was merged into the 4.3 branch.
Discussion
----------
[DependencyInjection] Improve an exception message
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When defining a service with an id that is also a class name, you might have an error message like `Class “” used for service “\App\Some\Service” cannot be found.` if your is starts with a backslash.
The new error message is now hopefully less cryptic: `Service definition "\App\Some\Service" has no class, and its name looks like a FQCN but it starts with a backslash; remove the leading backslash.`
Commits
-------
3647ccaeca [DependencyInjection] improved exception message
This PR was merged into the 3.4 branch.
Discussion
----------
Fix unitialized variable in DeprecationErrorHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In some case the variable `isAtLeastPhpUnit83` were not initialized (see https://github.com/symfony/symfony/pull/33079/files#r312406060).
This PR initialize it when needed.
Commits
-------
310e5c7549 Fix unitialized variable in DeprecationErrorHandler
This PR was merged into the 4.4 branch.
Discussion
----------
Add compatibility trait for PHPUnit constraint classes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Similar to the SetUpTearDownTrait, this trait removes the pain of dealing with method signature changes. The `PHPUnit\Framework\Constraint\Constraint` class added return type hints in PHPUnit 7 which this trait will take care of.
Commits
-------
908c8c1f15 Add compatibility trait for PHPUnit constraint classes
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Support ISO 3166-1 Alpha-3 country codes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20313
| Doc PR | symfony/symfony-docs#12105
| License | MIT
This is a pre-requiste for fixing #20313 and only handles the changes to the INTL component.
Commits
-------
848f60e905 Support ISO 3166-1 Alpha-3 country codes
This PR was merged into the 4.4 branch.
Discussion
----------
[DoctrineBridge] Invokable event listeners
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11992
Invokable Doctrine entity listeners will likely be supported in the next version of the DoctrineBundle (cf https://github.com/doctrine/DoctrineBundle/pull/989).
I think it would also be great to support it for Doctrine event listeners.
Commits
-------
47e872a826 [DoctrineBridge] Allow invokable event listeners
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Allow objects implementing __toString() to be used as violation messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | I didn't see a doc on violations to update, but I'm happy to do documentation if somone can suggest the best place to do it.
Currently in the Drupal project we use Translatable Markup object to hold most strings and currently pass them in as Constraint Violation messages. In Symfony 3 this works but with the added typehinting in Symfony 4, these markup objects are rendered into strings at the time of the violation creation. This causes any html in the message string to be considered unsafe by twig later in our rendering process. This pr explicitly allows objects implementing a __toString() method to be used as violation messages, and the violation will save and return the original stringable object.
See https://www.drupal.org/project/drupal/issues/3029540 For our Drupal issue on the subject.
Commits
-------
79f4dcd2dc [Validator] Allow objects implementing __toString() to be used as violation messages
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fix negative DateInterval
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33052
| License | MIT
| Doc PR | NA
This PR adds support for negative and signed DateInterval
Commits
-------
abb8a676ba Fix negative DateInterval
This PR was merged into the 4.3 branch.
Discussion
----------
[VarDumper] Fix test patern to handle callstack with/without return typehint
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
The TestCase::tearDownAfterClass methods does not always have the same signature which change the output of the reflection. This use another methods for testing
Commits
-------
feaadd1c0b Fix tst patern to handle callstack with/without return typehint
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | maybe <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31317 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
the $first param has been deprecated in the get methid
and we are adding a $key parameter to all to get all values from a key as arrays
Do we deprecated the get method ? if so this will be a little bigger in terms of changes.
Commits
-------
2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix s-maxage=3 transient test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
sometime the http server returns a `s-maxage=3` header (https://travis-ci.org/symfony/symfony/jobs/569326531)
This PR fixes tests to allow both 2 and 3
Commits
-------
f019b5214d Fix s-maxage=3 transient test
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix data loss when streaming as a PHP resource
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've just experienced failures like:
> StreamWrapper::stream_read - read 822 bytes more data than requested (9014 read, 8192 max) - excess data will be lost
This fixes it.
Commits
-------
99884e63b5 [HttpClient] fix data loss when streaming as a PHP resource
This PR was squashed before being merged into the 3.4 branch (closes#32800).
Discussion
----------
Improve some URLs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
fab17a4487 Improve some URLs
This PR was merged into the 4.3 branch.
Discussion
----------
Fix deprecations on 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
Fix deprecations in branch 4.3
note: remaining deprecation `assertStringContainsString` will be fixed in #32977
* [ ] fix tests in branch 3.4 in #32981
Commits
-------
8fd16a6bee Fix deprecation on 4.3
This PR was merged into the 4.3 branch.
Discussion
----------
Disable typehint patch on PHPUnit
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR removes the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` patch and adds a `: void` typehint on `setup` and `tearDown` methods in order to be compatible with PHPUnit 8
Commits
-------
a5af6c4cd7 Disable phpunit typehint patch on 4.3 branch
This PR was merged into the 4.3 branch.
Discussion
----------
Make HttpClientTestCase compatible with PHPUnit8
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
the abstract class `HttpClientTestCase` may be extends by end user and execute by both PHPUnit 8 and bellow. Adding a return typehint on it will force all users extending it to add it too and would be a BC Break.
Note. I don't know how to trigger a deprecation here and help user to add it.
Commits
-------
55daf15353 Fix compatibility with PHPUnit 8
* 3.4:
consistently throw NotSupportException
[HttpKernel] Clarify error handler restoring process again
[Intl] fix nullable phpdocs and useless method visibility of internal class
Resilience against file_get_contents() race conditions.
This PR was merged into the 4.4 branch.
Discussion
----------
remove some more useless phpdocs
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Fix some leftovers from #32974 and #32786
Commits
-------
9be4d171e0 remove some more useless phpdocs
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] fix nullable phpdocs and useless method visibility of internal class
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
Fix stuff found in #32525
Commits
-------
63b71b5ade [Intl] fix nullable phpdocs and useless method visibility of internal class
This PR was merged into the 4.4 branch.
Discussion
----------
Turned return type annotations of private methods into php return types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
As discussed with @nicolas-grekas in https://github.com/symfony/symfony/pull/30323#issuecomment-518638124, this PR attempts to turn `@return` annotations on private methods into return type declarations.
Commits
-------
f54ca001fe Turned return type annotations of private methods into php return types.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Clarify error handler restoring process again
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |https://github.com/symfony/symfony/issues/33024
| License | MIT
| Doc PR | -
Commits
-------
4ee54f0e84 [HttpKernel] Clarify error handler restoring process again
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle][Config] Ignore exceptions thrown during reflection classes autoload
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32499 with PHP 7.3+
| License | MIT
| Doc PR | -
The behavior when an exception is thrown in a class loader changed in PHP 7.3 (cf https://3v4l.org/OQPk9). That means that the `throwOnRequiredClass` trick that is done in the parent class of these cache warmers (`AbstractPhpFileCacheWarmer`) does not work anymore with PHP7.3+.
Commits
-------
dbd9b75d86 [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload
This PR was merged into the 3.4 branch.
Discussion
----------
Fix some return type annotations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This PR fixed some incorrect return type declarations I discovered while working on #32993.
Commits
-------
0a78dc0f6f Fix some return type annotations.
* 4.3:
Fix inconsistent return points.
pass translation parameters to the trans filter
[Mime] fixed wrong mimetype
[ProxyManagerBridge] Polyfill for unmaintained version
[HttpClient] Declare `$active` first to prevent weird issue
Remove deprecated assertContains
[HttpClient] fix tests
SCA: dropped unused mocks, duplicate import and a function alias usage
Added correct plural for box -> boxes
[Config] fix test
Fix remaining tests
Improve fa (persian) translation
This PR was merged into the 4.3 branch.
Discussion
----------
[TwigBridge] pass translation parameters to the trans filter
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This was reported by @voltel on the Symfony Slack.
Commits
-------
daac024057 pass translation parameters to the trans filter
This PR was squashed before being merged into the 4.3 branch (closes#32986).
Discussion
----------
[Mime] fixed wrong mimetype
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32816
| License | MIT
When creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's no `application/` prefix for the first mimetype of this extension.
In this PR, all mimetypes without a prefix are removed.
Commits
-------
e1722c529a [Mime] fixed wrong mimetype
* 3.4:
[ProxyManagerBridge] Polyfill for unmaintained version
SCA: dropped unused mocks, duplicate import and a function alias usage
[Config] fix test
Improve fa (persian) translation
This PR was squashed before being merged into the 3.4 branch (closes#32992).
Discussion
----------
[ProxyManagerBridge] Polyfill for unmaintained version
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
The current implementation of proxy-manager triggers a PHP 7.4 deprecation `ReflectionType::__toString`, and the patch won't be applied to a version prior to 2.5 (see https://github.com/Ocramius/ProxyManager/pull/484) will older version of proxy-manager (2.1 to 2.4 are also compatible with php 7.4).
This PR fixes the implementation of `ProxiedMethodReturnExpression` for version prior to 2.5
Commits
-------
33f722d86e [ProxyManagerBridge] Polyfill for unmaintained version
This PR was squashed before being merged into the 4.3 branch (closes#32989).
Discussion
----------
[HttpClient] Declare `$active` first to prevent weird issue
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | - <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32833 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | no
In some undefined cases we can have the following error while using the WebTestCase/CurlHttpClient in PHPUnit:
![Sélection_999(101)](https://user-images.githubusercontent.com/2103975/62543336-0ad9e700-b85e-11e9-8b7f-d5b49e1d2d0d.png)
This is really weird because `$active` is a reference and so it does not need to be declared before, but doing that fixes the issue. (https://github.com/symfony/symfony/issues/32833#issuecomment-518658222)
I can't add tests because we were not able to reproduce the issue...
Commits
-------
ba030f0022 [HttpClient] Declare `$active` first to prevent weird issue
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] fix getName() when transport is null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ee4192ebc7 fix getName() when transport is null
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Relax max duration test assertion
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
cf https://travis-ci.org/symfony/symfony/jobs/568304532 - It looks like with the curl client, the actual duration can be a little less than the configured max duration. Note that the same test did not fail on the PR...
Commits
-------
3cbb978b00 [HttpClient] Relax max duration test assertion
This PR was squashed before being merged into the 4.4 branch (closes#32964).
Discussion
----------
add yceruto as code owner of the ErrorRenderer component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
df6e73dd2d add yceruto as code owner of the ErrorRenderer component
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Improve fa (persian) translation
| Q | A
| ------------- | ---
| Branch? | >= 3.4 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
4afdfd765d Improve fa (persian) translation
This PR was squashed before being merged into the 4.4 branch (closes#31546).
Discussion
----------
[Dotenv] Use default value when referenced variable is not set
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11956 <!-- required for new features -->
In bash you have the option to define a default variable like this:
```bash
FOO=${VARIABLE:-default}
```
When VARIABLE is not set
```bash
FOO=${VARIABLE:-default} #FOO=default
```
When VARIABLE is set:
```bash
VARIABLE=test
FOO=${VARIABLE:-default} #FOO=test
```
If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature.
Commits
-------
790dbad149 [Dotenv] Use default value when referenced variable is not set
* 4.3:
bump phpunit-bridge cache-id
Use assertStringContainsString when needed
Use assert assertContainsEquals when needed
Use assertEqualsWithDelta when required
* 3.4:
bump phpunit-bridge cache-id
Use assertStringContainsString when needed
Use assert assertContainsEquals when needed
Use assertEqualsWithDelta when required
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertEqualsWithDelta when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated paramèter `$delta` of methods `assertEquals` by the dedicated method `assertEqualsWithDelta`
Commits
-------
3a0a901fdb Use assertEqualsWithDelta when required
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertContainsEquals when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated paramèter `$checkForObjectIdentity` of methods `assertContains` by the dedicated method `assertContainsEquals`
Commits
-------
f842e59685 Use assert assertContainsEquals when needed
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertStringContainsString when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated assertContains to comparre string by the dedicated method `assertStringContainsString`
Commits
-------
058ef39bae Use assertStringContainsString when needed
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add support for the profiler
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | closes#31592
| License | MIT
| Doc PR | n/a
Web profiler for the Mailer.
Commits
-------
f152314e28 [Mailer] added support for the profiler
This PR was merged into the 3.4 branch.
Discussion
----------
Use PHPUnit short class name in tests comments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
92bd9ec4b7 Use Phpunit FQDN in tests comments
This PR was squashed before being merged into the 3.4 branch (closes#32935).
Discussion
----------
[Form] Fix inconsistencies
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
- ~~Use `@inheritdoc` in `Button` and `ButtonBuilder` where the method does satisfy the contract.~~
- ~~Add `This method should not be invoked` in all unsupported methods in `Button` and `ButtonBuilder` for consistency.~~
- ~~Fix the misused `idempotent` term in implementations of the `getFormConfig` method. It is wrong in the sense that the method does not always return the same result. You can `setAttribute` for instance and `getFormConfig` will return a different config object.~~
- ~~Add `if ($this->locked)` checks in the supported mutators.~~
- ~~Fix the arguments contract in the `ChoiceListFactoryInterface` — now it supports `PropertyPathInterface` explicitly. The downside of it — breaking LSP in the `DefaultChoiceListFactory`.~~
- Fix the `$label` phpdoc of the `ChoiceView` (arised in https://github.com/symfony/symfony/pull/32237).
- Use `PropertyPathInterface` instead of `PropertyPath` in `PropertyAccessDecorator` of the choice factory.
- Fix `ArrayChoiceList::flatten` type hints.
These changes are debatable, so feel free to correct me if I am wrong at some point.
Ping @xabbuh , @HeahDude , @yceruto , @nicolas-grekas
Commits
-------
360711ce4e [Form] Fix inconsistencies
* 4.3:
Minor fixes
[HttpClient] Minor fixes
Use namespaced Phpunit classes
[Messenger] Fixed ConsumeMessagesCommand configuration
[Form] remove leftover int child phpdoc
Support DateTimeInterface in IntlDateFormatter::format
[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
fixed phpdocs
Use PHPunit assertion
[Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
* 3.4:
Minor fixes
Use namespaced Phpunit classes
[Form] remove leftover int child phpdoc
Support DateTimeInterface in IntlDateFormatter::format
[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
Use PHPunit assertion
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32879 <!-- #-prefixed issue number(s), if any -->
| License | MIT
The PHPUnit method [handleError](https://github.com/sebastianbergmann/phpunit/blob/8.2.5/src/Util/ErrorHandler.php#L38) was renamed to [__invoke](https://github.com/sebastianbergmann/phpunit/blob/8.3/src/Util/ErrorHandler.php#L71) in v8.3.
So we should check in Symfony [DeprecationErrorHandler](https://github.com/symfony/symfony/blob/v4.3.3/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php) if method `handleError` exists, otherwise call `__invoke`
It works with phpunit v8.2.5 and 8.3.2.
The PHPUnit handler is called when I trigger some error, e.g `iconv('fdsfs', 'fsdfds', '');`
Commits
-------
0c9539fdb4 [PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Support DateTimeInterface in IntlDateFormatter::format
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32898
| License | MIT
| Doc PR | N/A
Add support for `DateTimeInterface` to `IntlDateFormatter::format` which is supported since PHP 7.1.5.
Since this component supports PHP from 7.1.3, should version checks be added, to only support DateTimeInterface if PHP is >= 7.1.5 or should the minimum required PHP version bumped to 7.1.5?
Commits
-------
b1e160c41e Support DateTimeInterface in IntlDateFormatter::format
This PR was squashed before being merged into the 3.4 branch (closes#32941).
Discussion
----------
Use namespaced Phpunit classes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | need #32940
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR simplify tests by using PhpUnit namespace introduced in #32940
It also makes compatible with PHPUnit 8 (removed class PHPUnit_Framework_MockObject_MockObject)
Commits
-------
797ea2e4e2 Use namespaced Phpunit classes
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Add polyfill for PhpUnit namespace
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR provides PhpUnit >= 6 Namespaces class.
This will simplify tests that have to be compatible with multiple version of PHPUnit
```diff
- if (class_exists('PHPUnit_Foo')) {
- PHPUnit_Foo::bar():
- } else {
- \PHPUnit\Foo::bar();
- }
+ \PHPUnit\Foo::bar();
```
WIP => waiting for #32941 to be green
Commits
-------
b7520f738d Add polyfill for PhpUnit namespace
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] add support for opportunistic password migrations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31139
| License | MIT
| Doc PR | -
| Maker PR | symfony/maker-bundle#389
With this last piece, we'll provide opportunistic password migrations out of the box.
This finishes the story drafted in #31153, see there for more info.
Commits
-------
2cfc5c7dd6 [Security] add support for opportunistic password migrations
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] Legacy test should implement legacy interface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
This was updated wrongly when working on the removing the interface usage.
Commits
-------
920db2fc18 [Lock] Legacy test should implement legacy interface
This PR was merged into the 4.3 branch.
Discussion
----------
[Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/32676#pullrequestreview-270269786
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
includes #32918
Commits
-------
867e3de92f [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
This PR was merged into the 3.4 branch.
Discussion
----------
[cs-fixer] Use PhpUnit native assertions in filsystem checks
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
This PR change the minimal value of PhpUnit introduced in #32885 in branche 3.4.
Note: `5.6` is the highest value at the time.
Commits
-------
226bdd18fb Use PHPunit assertion
* 4.3:
[FrameworkBundle] Detect indirect env vars in routing
Remove calls to deprecated function assertAttributeX
[Intl] Order alpha2 to alpha3 mapping
[Routing] added a warning about the getRouteCollection() method
Allow sutFqcnResolver to return array
[HttpFoundation] Revert getClientIp @return docblock
* 3.4:
[FrameworkBundle] Detect indirect env vars in routing
Remove calls to deprecated function assertAttributeX
[Intl] Order alpha2 to alpha3 mapping
[Routing] added a warning about the getRouteCollection() method
Allow sutFqcnResolver to return array
[HttpFoundation] Revert getClientIp @return docblock
* 4.3:
[Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
Create mailBody with only attachments part present
[Messenger] Fix incompatibility with FrameworkBundle <4.3.1
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I feel like this might be easier to understand.
This is also the word I used in the doc.
Commits
-------
d2c4bf0da8 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix incompatibility with FrameworkBundle <4.3.1
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32738
| License | MIT
| Doc PR | -
Aims to fix an edge case where you install (or upgrade to) symfony/messenger >=4.3.1 while having symfony/framework-bundle <4.3.1 installed.
Commits
-------
5d739704f2 [Messenger] Fix incompatibility with FrameworkBundle <4.3.1
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add security LdapUser and provider
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Moves `LdapUserProvider` from `Security\Core` to the Ldap component, the provider now deals with a new `LdapUser` aware of its ldap `Entry` (should help in #31843).
Commits
-------
6736cdfec3 [Ldap] Add security LdapUser and provider
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
It's been quite a tunnel these days with @jderusse but here we are: the phpunit-bridge is now a fully working polyfill for newest PHPUnit features. All related PRs have been merged as "minor" but they are now ready for prime time, hence this PR that I'd like to be merged as "feature", to make it part of the changelog of Symfony 4.4.
As of version 4.4, the `simple-phpunit` script will run an augmented version of PHPUnit, that will provide the newest assertions of PHPUnit 8 even if you happen to be running PHPUnit 4.8+ (because you still need to test on PHP 5.5, as Symfony does.)
The bridge currently provides polyfills for the methods that are needed to make our tests pass on PHP 7.4 with no deprecations:
- #32878#32907 `assertString(Not)ContainsString(IgnoringCase)`, `assertEqualsWithDelta` and `assert(Not)ContainsEquals`
- #32875 `expectException*`, which replace `@expectedException*` annotations
- #32846 `assertIs*`, which replace `assertInternalType`
- #32865 `create(Partial)Mock`
- #32931 `assert(File|Directory)(Not)(Exists|IsReadable|IsWritable)`
More polyfills might be added if you need them. PRs welcome as usual.
As of #32882, when the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` is set to `1`, `simple-phpunit` will also [patch](884669b83b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php (L149)) the source of PHPUnit 8 to remove the `void` return-type on `setUp*`/`tearDown*`. This is required when the same codebase must be tested against PHP 5.5 up to 7.4+ (as does our branch 3.4). For codebases that don't want or can't run their tests with `simple-phpunit` but want to run their PHP 5.5 tests with PHPUnit 8, the bridge provides a new `SetUpTearDownTrait` that allows a [smooth transition](c59a4d2dec/src/CachePoolTest.php (L21)) to it.
Along the path, we also created a new tool for our CI: it's now possible to submit a new polyfill on the current feature-branch (4.4 these days) and test it with a PR on another branch. See #32887 for the patch.
All these new features have been added to achieve PHP 7.4 support on branch 3.4. There are still many deprecations that need to be fixed, all tracked in #32844. It should be a pretty nice list of "good first issues". Thank you @luispabon, @tweichart, @Alexander1000 BTW.
A big specific thank you to @jderusse for the help!
Let's rock PHP 7.4, can't wait for your PRs, see you on #32844 :)
Commits
-------
271211b1f6 [PhpUnitBridge] make the bridge act as a polyfill for newest PHPUnit features
This PR was squashed before being merged into the 4.3 branch (closes#32836).
Discussion
----------
[Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32585
| License | MIT
| Doc PR |
I edited the Doctrine Transport Connection class to use `?` placeholders in the query builder instead of named repositories as this resulted in a compatibility issue with SQL Server.
Commits
-------
fc0e4baf2f [Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
This PR was squashed before being merged into the 3.4 branch (closes#32838).
Discussion
----------
[FrameworkBundle] Detect indirect env vars in routing
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32366
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This detects indirect env parameters in routing, which doesnt work according to #32366.
cc @nicolas-grekas @bendavies please verify, as im not really into routing internals
Commits
-------
ceaa1b33d0 [FrameworkBundle] Detect indirect env vars in routing
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] type cannot be a FormTypeInterface anymore
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
Found in #32237. This style of adding FormTypes has been removed in sf 3. Could also be merged in 3.4 if preferred. But there was an outdated, broken test. So 4.4 seems enough as well.
Commits
-------
6ee0d53c31 [Form] type cannot be a FormTypeInterface anymore
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Add alias to FlattenException to avoid BC break
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32473
| License | MIT
| Doc PR | -
Commits
-------
44b0e7d58c Created alias to FlattenException to avoid BC break
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Order alpha2 to alpha3 mapping
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/32676#discussion_r310201575
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
to move forward with #32676
Commits
-------
724f1f524f [Intl] Order alpha2 to alpha3 mapping
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add message events logger
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | refs #31592, refs #32409, refs #31947, refs #31747
| License | MIT
| Doc PR | n/a
To allow testing emails and for the web profiler, we need a way to store all sent/queued messages.
Commits
-------
7642178d76 [Mailer] added message events logger
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Allow sutFqcnResolver to return array
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #...
| License | MIT
| Doc PR |
Phpunit handle multiple covers annotation:
```
/**
* @covers ClassOne
* @covers ClassTwo
*/
```
The coverage solver was only allowed to return `ClassOne` or `ClassTwo` since it was transformed to `[ClassName]`. Returning `[ClassOne, ClassTwo]` was transform to [[ClassOne, ClassTwo]]` which was creating an error with phpunit. This PR fixed this case.
Commits
-------
1451c0b915 Allow sutFqcnResolver to return array
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Remove calls to deprecated function assertAttributeX
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR remove unecessary call to assertAttribute and replace assertAttributeX by Reflection when no alternative is available.
Commits
-------
d098c11539 Remove calls to deprecated function assertAttributeX
This PR was squashed before being merged into the 4.3 branch (closes#32814).
Discussion
----------
Create mailBody with only attachments part present
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32811
| License | MIT
Commits
-------
b500f92921 Create mailBody with only attachments part present
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Add a warning about the getRouteCollection() method
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
In #19274, we tried to deprecate `RouterInterface::getRouteCollection()`, but failed at doing so. I propose to add a warning about why one should never use it at runtime as a first step.
Commits
-------
8863f0675d [Routing] added a warning about the getRouteCollection() method
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add a name to the transports
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Having a name for Transports helps identify them (useful for instance in the profiler when one uses several mailers).
Commits
-------
2412dfe71f [Mailer] added a name to the transport
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Add AbstractPart::asDebugString()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
That helps debugging issues and will be displayed in the web profiler Mailer panel.
Commits
-------
f36c8c9881 [Mime] added AbstractPart::asDebugString()
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] Add flag to dump NULL as ~
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/12071
This PR adds the ability to dump `null` as `~` by a new Flag `Yaml::DUMP_NULL_AS_TILDE`:
```diff
- foo: null
+ foo: ~
```
Todos:
- [x] Fix/add tests
Commits
-------
749c11d94c [Yaml] Add flag to dump NULL as ~
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Revert getClientIp @return docblock
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
This PR reverts https://github.com/symfony/symfony/pull/22418, see the comment https://github.com/symfony/symfony/pull/22418#issuecomment-513256687
Commits
-------
7568d3452d [HttpFoundation] Revert getClientIp @return docblock
* 4.3:
Fix tests on console
cs fix
Fix path to phpunit binary
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
* 3.4:
Fix tests on console
cs fix
Fix path to phpunit binary
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix tests not executed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
bfd5d4e362 Fix tests on console
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| License | MIT
In additional for PR: https://github.com/symfony/symfony/pull/32862
Commits
-------
faef73888e [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Remove use of ForwardCompatTrait
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
With #32882 the ForwardCompatibilityTrait is injected in TestCase which now act as a true polyfill
Commits
-------
ac6242f36b Remove use of ForwardCompatTrait
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Inject ForwardCompatibiliy in TestCase
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replace the previous trait `ForwardCompatTestTrait` by injecting forward compatibility code in phpunit itself which allow to use the polyfill methods in tests without changing the code.
when using `simple_phpunit` the env variable `$PHPUNIT_REMOVE_RETURN_TYPEHINT=1` (default 0) removes the `: void` typehint in public and protected methods (allow to use 7.4 8 in 3.4 branch)
note: once merged, all tests have to be fixed. see #32889
Commits
-------
016bd8dd91 Inject ForwardCompatibiliy in TestCase
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes#32870).
Discussion
----------
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Tests pass? | yes
| Fixed tickets | #32853
| License | MIT
Commits
-------
7cf9ed613b#32853 Check if $this->parameters is array.
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Add polyfill for methods assertNan, assertFinite and assertInfinite
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
Provide pollyfile for methods `assertFinite`, `assertInfinite` and `assertNan`
Commits
-------
3450c1705e [PhpUnitBridge] Add polyfill for methods assertNan, assertFinite and assertInfinite
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] added debug info to TransportExceptionInterface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | ~
In 4.4, you can get the debug information for the SMTP/HTTP data via `$message->getDebug()` (see #32583). But the data are probably even more important when there is an exception. That's what I implemented in this PR.
Commits
-------
39ebb84602 [Mailer] added debug info to TransportExceptionInterface
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Fix error not being thrown properly
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When the SMTP server returns a fatal error, the error is not thrown properly as catched and another error (empty) is thrown. That makes debugging very difficult and what we would expect anyway.
Commits
-------
15dbe4b948 [Mailer] fixed error that is masked by another error
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBridge] add parameter type declarations to private methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
5de019801c add parameter type declarations to private methods
This PR was merged into the 3.4 branch.
Discussion
----------
Replace calls to setExpectedException by Pollyfill
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | need #32869 to be merged
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
PhpUnit method `setExceptionException` has been deprecated seens 5.7. This PR replace theme by `exceptException` provide by the pollyfill.
Commits
-------
41c02d7ead Replace calls to setExpectedException by Pollyfill
This PR was squashed before being merged into the 4.4 branch (closes#32504).
Discussion
----------
[ErrorRenderer] Add DebugCommand for easy debugging and testing
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
![debug-error-renderer](https://user-images.githubusercontent.com/2028198/61086533-170a8a00-a401-11e9-89a6-3b8195ba80c1.gif)
This command helps you test built-in renderers and others provided by third-party packages (thinking API-Platform, FOSRestBundle, etc.) without requiring the TwigBundle preview mechanism.
<del>This also fixes a bug in `ErrorRendererPass` related to the order of priorities.</del>
Commits
-------
97c89686b1 [ErrorRenderer] Add DebugCommand for easy debugging and testing
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBundle] Twig's namespaces can be null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32860
| License | MIT
| Doc PR | -
Commits
-------
c11f200 Twig's namespaces can be null
This PR was merged into the 4.3 branch.
Discussion
----------
Sync "not implementing the method" deprecations messages
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Suggested in https://github.com/symfony/symfony/pull/32747#discussion_r309307289
Useful for consistency and for future reference for similar messages.
Commits
-------
f6fae1c361 Sync "not implementing the method" deprecations messages
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fix deprecation assertInternalType - 4.4
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead
follow #32846 for 4.4 branch
Commits
-------
51ba6651aa Fix assertInternalType deprecation in phpunit 9
* 4.3:
Fix assertInternalType deprecation in phpunit 9
Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
This PR was merged into the 4.3 branch.
Discussion
----------
[PhpUnitBridge] Fix deprecation assertInternalType - 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead
follow #32846 for 4.3 branch
Commits
-------
aa58789542 Fix assertInternalType deprecation in phpunit 9
This PR was squashed before being merged into the 4.3 branch (closes#32854).
Discussion
----------
Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | https://github.com/symfony/symfony/issues/32844
| License | MIT
| Doc PR | n/a
Please bear with me as this is my first pr to symfony. Branched off 4.3 as requested here: https://github.com/symfony/symfony/issues/32844
Tests currently do not pass due to:
```
PHP Fatal error: Declaration of Symfony\Bridge\Monolog\Logger::reset() must be compatible with Monolog\Logger::reset(): void in /home/luis/Projects/symfony/src/Symfony/Bridge/Monolog/Logger.php on line 23
```
Commits
-------
97bcb5da50 Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBridge] revert added type declarations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Even after the merge the `deps="low"` job still times out. Let's revert and debug the root cause first.
Commits
-------
d18d646113 revert added type declarations
This PR was merged into the 4.4 branch.
Discussion
----------
add parameter type declarations to private methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
1b2aaa4a06 add parameter type declarations to private methods
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Allow dumping the container in one file instead of many files
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #32119
As spotted by @lyrixx, putting all service factories in one big container can be easier to manage with workers. It could also play well with PHP7.4's preloading.
This PR adds a `container.dumper.inline_factories` parameter to enable this behavior.
When it is set to true, a single big container file is created.
Commits
-------
c893986815 [DI] Allow dumping the container in one file instead of many files
This PR was squashed before being merged into the 4.4 branch (closes#32665).
Discussion
----------
[ErrorHandler] Relax transition to the new Debug class
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Alternative of https://github.com/symfony/recipes/pull/630
This would solve the bug in `bin/console.php` and `public/index.php` for existing projects migrating to 4.4 without requiring symfony/debug.
/cc @nicolas-grekas
Commits
-------
3216caf430 [ErrorHandler] Relax transition to the new Debug class
This PR was squashed before being merged into the 4.4 branch (closes#32812).
Discussion
----------
[ErrorHandler] Added type declarations where possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've added type declarations where possible (method parameters & return types). DocBlocks were replaced too if the type declarations made them redundant.
Void returns were replaced whenever necessary.
Also on one occasion the setting of the exceptionHandler was replaced by a function call, which did practically the same thing.
Commits
-------
ab6aae1a29 [ErrorHandler] Added type declarations where possible
This PR was squashed before being merged into the 4.4 branch (closes#32831).
Discussion
----------
[Security] Revise UserPasswordEncoderInterface::needsRehash()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This reuses the encoded password from the user for the `UserPasswordEncoderInterface`, similar we dont pass the encoded string to `isPasswordValid()`.
This differs from the non-user aware `PasswordEncoderInterface`
cc @nicolas-grekas did i miss something?
Commits
-------
c5a283d417 [Security] Revise UserPasswordEncoderInterface::needsRehash()
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Preserve the case of headers when sending them
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32819
| License | MIT
| Doc PR | -
Some hosts are case sensitive, let's present headers in the submitted form.
Commits
-------
9ac85d5d8b [HttpClient] Preserve the case of headers when sending them
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] update type of form $name arguments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32821
| License | MIT
| Doc PR | -
An alternative to #32821: where a string is expected, passing an int is fine, per PHP casting rules.
Commits
-------
6d4dcadd66 [Form] update type of form $name arguments
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap][Security] use right arguments count in security factories
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |#32808 <!-- #-prefixed issue number(s), if any -->
| 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Fix the arguments counts in factories.
Commits
-------
652a063fdf [Ldap][Security] use right arguments count in sercurity factories
* 4.3:
Fix travis script
minor fix for wrong case
[HttpFoundation] Fix `getMaxFilesize`
[Cache] fix warning on PHP 7.4
[Console] fix warning on PHP 7.4
Don't add value of (default/static) objects to the signature
fix(yml): fix comment in milti line value
Make sure trace_level is always defined
Fix bindings and tagged_locator
Recompile container when translations directory changes
* 3.4:
Fix travis script
minor fix for wrong case
[HttpFoundation] Fix `getMaxFilesize`
[Cache] fix warning on PHP 7.4
[Console] fix warning on PHP 7.4
Don't add value of (default/static) objects to the signature
fix(yml): fix comment in milti line value
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] minor fix for wrong method name case
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Minor replacement of wrong case for function name, needs to be fixed in 3.4 as hinten [here](https://github.com/symfony/symfony/pull/32812#discussion_r308815666).
Commits
-------
8b2d67b minor fix for wrong case
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] fix comment in multi line value
| Q | A
| ------------- | ---
| Branch? | 4.3 and lower <!-- see below -->
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32667 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Comments after blank lines are read as value in yaml.
```
`$yaml = <<<YAML
parameters:
abc
# Comment
YAML;
var_dump(Symfony\Component\Yaml\Yaml::parse($yaml));`
```
**Result before fix:**
```
array(1) {
["parameters"]=>
string(13) "abc
# Comment"
}
```
**Result after fix:**
```
array(1) {
["parameters"]=>
string(3) "abc"
}
```
Commits
-------
dd945e375c fix(yml): fix comment in milti line value
This PR was squashed before being merged into the 3.4 branch (closes#32790).
Discussion
----------
[HttpFoundation] Fix `getMaxFilesize`
When checking for the maximum size of an uploaded file you can't just rely on `upload_max_filesize` since the request might also exceed `post_max_size`. Also discussed in contao/contao#498
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
54107bac33 [HttpFoundation] Fix `getMaxFilesize`
This PR was merged into the 4.4 branch.
Discussion
----------
Ensure $request->hasSession() is always checked before calling getSession()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7b2c326719 Ensure $request->hasSession() is always checked before calling getSession()
This PR was merged into the 4.3 branch.
Discussion
----------
Recompile container when translations directory changes
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32706
| License | MIT
| Doc PR | N/A
The list of translation resources is cached by the container, so when adding a new translation file, the container needs to be recompiled otherwise the translator won't know about the new file.
Commits
-------
7f2e7e2e9a Recompile container when translations directory changes
This PR was merged into the 4.3 branch.
Discussion
----------
[DependencyInjection] Fix bindings and tagged_locator
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Working `tagged_locator`
```yaml
App\XXX:
arguments:
$taggedLocator: !tagged_locator { tag: 'my_tag', index_by: 'my_key' }
```
Not working `tagged_locator`
```yaml
App\XXX:
bind:
$taggedLocator: !tagged_locator { tag: 'my_tag', index_by: 'my_key' }
```
Currently `ResolveBindingsPass` is executed after `ServiceLocatorTagPass`, which produces empty service locators when using `bind`.
I'm proposing to change the optimization passes order, so that this issue is solved.
I'm not confident with the impact, so let's discuss about it.
Commits
-------
bf4c713ad7 Fix bindings and tagged_locator
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix dumping Doctrine-like service graphs (bis)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30091, #29637
| License | MIT
| Doc PR | -
Dumping the container while accounting for circular references is hard :)
Commits
-------
a37f3e0807 [DI] Fix dumping Doctrine-like service graphs (bis)
ee491444f4 Failing test case for complex near-circular situation + lazy
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] do not stopwatch sections when profiler is disabled
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
the toolbar and profiler panel disable to profiler which then does not set the X-Debug-Token. so when the header does not exist, do not call the stopwatch methods with `null` which violates the contract and does not make sense. found with #32242
Commits
-------
8718cd1b15 [HttpKernel] do not stopwatch sections when profiler is disabled
This PR was merged into the 4.4 branch.
Discussion
----------
[Form][DX] derive default timezone from reference_date option when possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Currently, when `reference_date` and `model_timezone` are provided but are not the same, we get a validation exception:
9216cb75ac/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php (L48-L50)
But that happen even if the `model_timezone` is `null` !
I propose to relax this behavior by passing the time zone of the configured `reference_date` to this `model_timezone` (by default), thus avoiding annoyances.
Commits
-------
a62feea4ad [DX] derive default timezone from reference_date option when possible
the toolbar and profiler panel disable to profiler which then does not set the X-Debug-Token. so when the header does not exist, do not call the stopwatch methods with null which violates the contract and does not make sense
This PR was squashed before being merged into the 4.3 branch (closes#32641).
Discussion
----------
[Messenger] Retrieve table default options from the SchemaManager
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32321 <!-- #-prefixed issue number(s), if any -->
| License | MIT
This PR modify the Connection of the Doctrine Transport. It is now possible to specify a `SchemaConfig` that will be used when generating tables.
If Doctrine is configured as the following :
```yml
# config/packages/doctrine.yaml
doctrine:
dbal:
default_table_options:
charset: 'utf8mb4'
collate: 'utf8mb4_unicode_ci'
```
Then those options are used to create the table.
ping @weaverryan 😉
Commits
-------
93d0dc825e [Messenger] Retrieve table default options from the SchemaManager
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix redis last error not cleared between calls
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Not clearing it gives misleading errors coming from previous calls which makes debugging hard.
@alexander-schranz FYI
Commits
-------
9c263ffca8 [Messenger] Fix redis last error not cleared between calls
This PR was merged into the 4.3 branch.
Discussion
----------
Clarify deprecations for framework.templating
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
After updating to 4.3 I started receiving a bunch of deprecations:
- `Enabling the Templating component is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.`
- `The "templating.cache_warmer.template_paths" service is deprecated since Symfony 4.3 and will be removed in 5.0.`
- `The Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer class is deprecated since version 4.3 and will be removed in 5.0; use Twig instead.`
- `The "templating.finder" service is deprecated since Symfony 4.3 and will be removed in 5.0.`
- `The "templating.locator" service is deprecated since Symfony 4.3 and will be removed in 5.0.`
The main gist here was _"use Twig instead"_, which I'm already doing. Hopefully the changed messages in the upgrade guides/config should guide developers to the solution, as it seems to be as simple as removing the config to prevent all these deprecations from triggering. After removing the templating config, it fixed all these deprecations for me without breaking anything else (from what I could tell).
Commits
-------
1727923086 Clarify deprecations for framework.templating
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Attempt to give more useful source info when using HandleTrait
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
### Before
<img width="1052" alt="Capture d’écran 2019-07-25 à 15 02 03" src="https://user-images.githubusercontent.com/2211145/61883193-3e318300-aefa-11e9-9179-a40c7c5aac93.png">
### After
<img width="1054" alt="Capture d’écran 2019-07-25 à 14 59 27" src="https://user-images.githubusercontent.com/2211145/61883192-3d98ec80-aefa-11e9-8f29-df9c417e8025.png">
which works for both examples using the trait in https://symfony.com/doc/current/messenger/handler_results.html
Commits
-------
9ac7e4223c [Messenger][Profiler] Attempt to give more useful source info when using HandleTrait
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Collect the stamps at the end of dispatch
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Currently, only the stamps added before dispatching the message are shown in the profiler.
This PR adds a section to show stamps after dispatch (`HandledStamp`, `SentStamp`, ...).
![Capture d’écran 2019-07-23 à 15 44 04](https://user-images.githubusercontent.com/2211145/61717102-bb28f500-ad60-11e9-93ec-bb2875d176ce.png)
Commits
-------
ee68b1dfa7 [Messenger][Profiler] Collect the stamps at the end of dispatch
This PR was merged into the 4.2 branch.
Discussion
----------
[DoctrineBridge] add parameter type declarations to private methods
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
8157db4522 add parameter type declarations to private methods
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] added support for Imagine/Image
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
![image](https://user-images.githubusercontent.com/408368/61811135-19c5a000-ae41-11e9-88f1-9f5823e9ca80.png)
Commits
-------
c8d420ddff [VarDumper] added support for Imagine/Image
This PR was merged into the 4.3 branch.
Discussion
----------
[Inflector] Fix pluralizing words ending with "son"
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32713
| License | MIT
| Doc PR | -
<!--
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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
bf608aaf3c Fix pluralizing "season"
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Make transport factory test case public
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, failures looks like irrelevant
| Fixed tickets | -
| License | MIT
| Doc PR | -
`TransportFactoryTestCase` could be useful when you adding custom transport and need cover their transport factory with tests.
Commits
-------
5d64009ae0 [Mailer] Make transport factory test case public
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] use a reference date to handle times during DST
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #18366
| License | MIT
| Doc PR |
Commits
-------
39c98b9a08 use a reference date to handle times during DST
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Rename the new exception controller and mark it as internal
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/32695#discussion_r306965799
| License | MIT
| Doc PR | -
I missed some important details in https://github.com/symfony/symfony/pull/32695
Commits
-------
ba24a51ea4 Rename the new exception controller and mark it as internal
This PR was squashed before being merged into the 4.4 branch (closes#32637).
Discussion
----------
[ErrorHandler] Decouple from ErrorRenderer component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | part of https://github.com/symfony/symfony/issues/32605
| License | MIT
| Doc PR | -
built on top of https://github.com/symfony/symfony/pull/32636 (See 2nd commit only)
Commits
-------
8f13fc013d [ErrorHandler] Decouple from ErrorRenderer component
* 4.3:
[Security/Core] align defaults for sodium with PHP 7.4
fix inline handling when dumping tagged values
[HttpClient] fix canceling responses in a streaming loop
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
[HttpClient] rewind stream when using Psr18Client
Typo in web profiler
[4.3] Remove dead test fixtures
[Routing] Fix CHANGELOG
relax some date parser patterns
Avoid getting right to left style
* 4.2:
fix inline handling when dumping tagged values
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
* 3.4:
fix inline handling when dumping tagged values
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
This PR was squashed before being merged into the 4.4 branch (closes#32587).
Discussion
----------
[Form][Validator] Generate accept attribute with file constraint and mime types option
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes
| Fixed tickets | #29327
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Generate the html `accept` attribute based on the file constraint and mime types option.
Is it necessary to add this feature in the documentation ?
Made with @Timherlaud
_Sorry I have recreated this pull request because I missed my rebase_
Commits
-------
5a7b737ea3 [Form][Validator] Generate accept attribute with file constraint and mime types option
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] repeat preferred choices in list of all choices
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10271
| License | MIT
| Doc PR |
Commits
-------
475c7a469a adapt tests
b946b11d5a [Form] Repeat preferred choices in the main list
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Remove cutting caster to dump full objects
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Obviously, not the ideal solution, but might open the discussion. Not being able to inspect more than 1 level deep in the profiler when dealing with DTOs and VOs in your messages is a pain 😕. You can't either access the `HandledStamp` `result` for instance.
This caster truncating collectors data was originally added in #23465 to mitigate performances issues, especially with the Form profiler. But actually a lot of useful information are now hidden to the developper.
Opting-out per collector might be a start. Either allowing to do it through config, or directly in code where sensible.
Commits
-------
e4fc5c07ab [Messenger][Profiler] Remove cutting caster to dump full objects
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfileBundle] Avoid getting right to left style
| Q | A
| ------------- | ---
| Branch? | >= 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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/roadmap):
- 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 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
162819fef3 Avoid getting right to left style
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] mark all classes as internal
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
those classes are not meant as extension point
Commits
-------
35b0d57692 [WebProfilerBundle] mark all classes as internal
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Decoupling TwigBundle and using the new ErrorRenderer mechanism
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/31398#discussion_r303213713
| License | MIT
| Doc PR | -
Commits
-------
846d3e0e58 Decoupling TwigBundle and using the new ErrorRenderer mechanism
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] rewind streams created from strings
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #32689 for 4.4
Commits
-------
33ed4e43c4 [HttpClient] rewind streams created from strings
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] rewind stream when using Psr18Client
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/11996
| License | MIT
| Doc PR | -
This is not a bug fix technically but just how PSR-7 works.
I'm glad we did not make it a first-class thing in Symfony.
This makes it a bit more practicable if it can be...
Commits
-------
7f4362bd46 [HttpClient] rewind stream when using Psr18Client
This PR was merged into the 3.4 branch.
Discussion
----------
Typo in web profiler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | no ticket
| License | MIT
| Doc PR | N/A
Fixes typo in web profiler. (NB: Despite the branch being created using the GitHub web editor, I have tested this on my machine with a real project.)
Commits
-------
84b3359adc Typo in web profiler
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccess] Fix PropertyAccessorCollectionTest
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In https://github.com/symfony/symfony/pull/32627, I (a script actually) removed 2 fixtures classes from this test class. They are actually used but by tests that don't fail without them 😁 (because they were mocked and it's possible to mock non existing classes).
This PR restores those 2 classes and remove the unneeded mocks so the tests use the real classes and are actually useful.
Commits
-------
a310bac624 [PropertyAccess] Fix PropertyAccessorCollectionTest
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBundle] Deprecating error templates for non-html formats and using ErrorRenderer as fallback
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In the previous [PR](https://github.com/symfony/symfony/pull/31065) we created a new mechanism to render any PHP error/exception in a formatted string, which if the FB is enabled, would return an HTTP Response according to the preferred Request format (html, json, xml, txt, etc.), but when installing the TwigBundle this rendering mechanism is replaced by the current ExceptionController.
This ExceptionController allows us to render custom error pages based on Twig in many formats, just what is already supported with the new ErrorRenderer component, so let's deprecate this in favor of the native.
Commits
-------
bf0c24a634 Deprecating error templates for non-html formats and using ErrorRenderer
* 4.3:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
ignore not existing translator service
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
[Security/Http] Don't mark AbstractAuthenticationListener as internal
Remove dead tests fixtures
Remove more dead tests fixtures
[Mime] Add missing changelog entry for BC-break
[Messenger] fix transport_name option not passing validation
Remove dead tests fixtures
[Debug][ExceptionHandler] Add tests for custom handlers
* 4.2:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
ignore not existing translator service
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
Remove dead tests fixtures
Remove more dead tests fixtures
Remove dead tests fixtures
[Debug][ExceptionHandler] Add tests for custom handlers
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] ignore not existing translator service
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
12bf0b07f8 ignore not existing translator service
* 3.4:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
[Debug][ExceptionHandler] Add tests for custom handlers
This PR was merged into the 4.4 branch.
Discussion
----------
[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/30926#discussion_r281170917
| License | MIT
| Doc PR | -
This PR aims at deprecating some things to have a more consistent code.
### ServiceRouterLoader
1. This class actually fetches an object from a container. In https://github.com/symfony/symfony/pull/30926#discussion_r281170917, it was suggested that it should be renamed to `ContainerRouteLoader`. Actually I think it's better to rename it to `ContainerLoader` since all others route loaders does not have "Route" in their name. Let's be consistent!
2. This class is in a `DependencyInjection` sub directory for historical reasons. Let's remove that! It accepts any PSR-11 container.
### ObjectRouteLoader
1. This class has "Route" in its name too. Let's rename it!
2. This class is supposed to be an abstract implementation for "object" loaders to reuse, but in its code it has a lot of references to "services". Let's remove those references! That means renaming some methods, altering messages, etc.. That also means removing the `supports` method from it to let extending classes implement it.
3. IMHO, this abstract implementation is useless. We sould just deprecate the whole class and move the implemention in the `ContainerLoader` class.
Commits
-------
154810119d [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][ExceptionHandler] Add tests for custom handlers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In https://github.com/symfony/symfony/pull/31694 I mixed many things but the whole PR was closed. I wrote some tests for custom handlers + the handle tests don't use mock anymore
I think they are useful even if the `ExceptionHandler` will disappear in the new component because it will still exists in 4.4 for the next 3 years.
Commits
-------
c53e25332a [Debug][ExceptionHandler] Add tests for custom handlers