This PR was merged into the 4.4 branch.
Discussion
----------
[SecurityGuard] Deprecate returning non-boolean values from checkCredentials()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | prepares #33228
| License | MIT
| Doc PR | TODO
This PR suggests to deprecate implementations of `Symfony\Component\Security\Guard\AuthenticatorInterface::checkCredentials()` that return non-boolean values. This will allow us to add `bool` as return type declaration in the future.
https://github.com/nicolas-grekas/symfony/pull/26#discussion_r317084918
/cc @nicolas-grekas @weaverryan
Commits
-------
a0ca3afeca Deprecate returning non-boolean values from checkCredentials().
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Bump SYMFONY_PHPUNIT_VERSION
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 -->
👋 here we are again :)
i was wondering... cant we just install the latest minor by default, thus `SYMFONY_PHPUNIT_VERSION=8`? There should be no BC breaks, and would reduce the maintenance to one major bump, once a year ... isnt it? 🤔
Commits
-------
9cbd0e8809 [PhpUnitBridge] Bump SYMFONY_PHPUNIT_VERSION
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing return annotations on magic 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 | -
My script had a bug, spotted by reviewing #33267
These annotations express our intention to add real return types in a future major release (likely v6)
Commits
-------
10983fcb17 Add missing return annotations on magic methods
* 4.3:
Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
[Form][PropertyPathMapper] Avoid extra call to get config
[HttpKernel] remove unused fixtures
* 3.4:
Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
[Form][PropertyPathMapper] Avoid extra call to get config
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] remove unused fixtures
| Q | A
| ------------- | ---
| Branch? | 4.3
| 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 |
those are remnants of bundle inheritance that has been removed in sf 4
Commits
-------
5ffec16396 [HttpKernel] remove unused fixtures
This PR was merged into the 3.4 branch.
Discussion
----------
[Form][PropertyPathMapper] Avoid extra call to get config
| 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 | -
Commits
-------
3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config
This PR was merged into the 4.4 branch.
Discussion
----------
Add return types to internal & magic methods when possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33236#33228
| License | MIT
| Doc PR | -
Commits
-------
962dcfeed0 Add return types to internal & magic methods when possible
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Add Address::fromString
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33086
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/12128
This will allow to create a Address from a string such as 'Name <name@example.com>'
Example:
```php
$address = Address::fromString("Name <name@example.com>");
```
Commits
-------
75ea8d0d67 Add Address::fromString
This PR was merged into the 4.4 branch.
Discussion
----------
Mark all dispatched event classes as final
| 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 |
I think we should mark all our Event classes as final. There is no point in people extending them as the libraries that use the event, will only dispatch this event. So extending events in user-land achieves nothing as the subclasses won't be dispatched.
I'm not talking about the base events that are meant to be extended like KernelEvent, but the leaf events like ExceptionEvent, ResponseEvent etc.
Then we can also make them real final in 5.0 as the events are value objects that should not be mocked.
Commits
-------
4bb38eec89 Mark all dispatched event classes as final
This PR was merged into the 4.4 branch.
Discussion
----------
fix deprecated call to setLocale with null
| 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 |
Fix a potentially invalid call since #33272
Commits
-------
26f9afe8d1 fix deprecated call to setLocale with null
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] deprecate global dir to load resources from
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31915 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Replaces #31958
Here two example deprecations by adding files in the deprecated locations:
```
Overwriting the resource "@AcmeBundle/Resources/config/routing.yaml" with "/vagrant/src/Resources/AcmeBundle/config/routing.yaml" is deprecated since Symfony 4.4 and will be removed in 5.0.
Loading the file "foobar.yaml" from the global resource directory "/vagrant/src" is deprecated since Symfony 4.4 and will be removed in 5.0.
```
Commits
-------
aa82566f76 [HttpKernel] deprecate global dir to load resources from
* 4.3:
Do not extend the new SF 4.3 ControllerEvent so we can make it final
Backported return type violation bugfixes.
[FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | unlikely
| 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 |
See https://github.com/symfony/symfony/pull/33152#discussion_r313846346
Remember the ControllerEvent is new in SF 4.3 so we just go back to what it was before 4.3
Commits
-------
00140b6a7c Do not extend the new SF 4.3 ControllerEvent so we can make it final
This PR was merged into the 4.4 branch.
Discussion
----------
Removed calls to Twig\Environment::loadTemplate()
| Q | A
| ------------- | ---
| Branch? | 4.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 prepares #33039. Twig 3 does not have the `loadTemplate()` anymore, so this PR replaces calls to that method.
Commits
-------
ea9e375b0b Removed calls to Twig\Environment::loadTemplate().
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] make polyfill classes abstract, fix edge case
| 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 | -
While working on return types, I keep stumbling on those classes that are `@internal`, but for which we must not add return types, because they're polyfills and are extended by stubs found in the `Resources` folder of the component.
Making the polyfills abstract fixes the linting issue.
This made me discover we have a glitch in the `getPattern()` implementation, that makes our version diverge from intl's. Fixed here too.
On 4.4 because let's not disrupt 3.4.
Commits
-------
c757b95aed [Intl] make polyfill classes abstract, fix edge case
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] deprecate support for null locales
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
e6b6a9d33a deprecate support for null locales
This PR was squashed before being merged into the 4.3 branch (closes#33216).
Discussion
----------
[Mime] Trim and remove line breaks from NamedAddress name arg
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | YES
| New feature? | NO
| 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
This patch trims the name argument of named address in order to avoid some cases where the name is a non-empty input consisting of whitespace and line breaks which would lead to forming of addresses such as `" " <mail@example.org>` <sup>1</sup>
---
In a large Symfony codebase that deals with sending large volumes of email we encountered an issue after the Mailer was changed from PHPMailer to the Symfony Mailer component.
The issue: Some emails would not render correctly as either plaintext or html but instead the original email source with headers and quoted-printable content would render in clients such as MS Outlook 2003, later versions of Outlook and other clients do not seem affected.
After some investigation we found that the error came from a line that looked like this: `$message->addTo(new NamedAddress($contact->getEmailCanonical(), $contact->getFullName()))`.
The `getFullName` method simply concated the first/last name with a space in between. For contacts without either, this resulted in representation 1. This causes MS Outlook 2003 (potentially Outlook 2000 as well but this was not tested) to malfunction and completely fail to render the email.
This patch aims to fix the aforementioned issue.
Commits
-------
e491e3a594 [Mime] Trim and remove line breaks from NamedAddress name arg
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBridge] Mark all classes extending twig as @final
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes-ish
| 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 | refs #33039
| License | MIT
| Doc PR | n/a
Classes defining extensions/nodes/node visitors/token parsers should not be changed. They should be final.
That would also help with Twig 3.0 which introduces type hints (including return types).
Commits
-------
d657459a5f [TwigBridge] Mark all classes extending twig as @final
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] remove patch release BC layer of durable and expiring delay
| 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 |
Removes the small BC layer of #33127 from 4.3 in 4.4
Commits
-------
d5aaf44529 [Messenger] remove patch release BC layer of durable and expiring delay
This PR was merged into the 4.4 branch.
Discussion
----------
[4.4] Add return types on internal|final|private methods (bis)
| 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 | -
Found while working on #33259
`: self` is used for final methods only. I'd have preferred using `: object` but that's not possible on PHP 7.1
Commits
-------
23faee406f [4.4] Add return types on internal|final|private methods (bis)
This PR was merged into the 4.4 branch.
Discussion
----------
Add types to routing and DI configuration traits.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | I don't think so.
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179, #33228
| License | MIT
| Doc PR | N/A
This PR backports the type declarations added to the configurator traits of the Routing and DI components. These traits expose only final methods, so it should be pretty safe to add return types to them.
The only scenario I could make up where this change will break something is if a trait is used to override a method: https://3v4l.org/EAsk8 But I doubt that those traits are used that way.
On master, we've used the `object` return type for the fluent methods. That type is not available on 4.4 where we have to support php 7.1. I'm using `self` instead. Since the methods are final and thus cannot be overridden, I believe that we shouldn't run into covariance issues here, so `self` should be safe.
Commits
-------
1ca30c97e6 Add types to roting and DI configuration traits.
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
This PR was squashed before being merged into the 3.4 branch (closes#32625).
Discussion
----------
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32577
| License | MIT
This PR is to ease integration, as not all test classes are present in all currently
maintained branches.
See https://github.com/symfony/symfony/pull/32617
Commits
-------
775d970927 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] Add missing changelog entry for Factory deprecation
| 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 | None <!-- 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.
-->
Add missing changelog entry for the deprecation of the Factory into LockFactory
Commits
-------
c6daa617b0 [Lock] Add missing changelog entry for Factory deprecation
This PR was squashed before being merged into the 3.4 branch (closes#32632).
Discussion
----------
[HttpFoundation] Fix 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
-------
be53c593dc [HttpFoundation] Fix URLs
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31135
| License | MIT
| Doc PR | -
Prepare for PHP 7.4: use ReflectionReference in VarCloner
Commits
-------
40f24ef676 [VarDumper] finish PHP 7.4 support and add tests
e99a6b85b8 [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Fixed the priority order of the error renderers registration
| 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 | -
Spotted in https://github.com/symfony/symfony/pull/31398 and https://github.com/symfony/symfony/pull/32504
Commits
-------
710b51dcb1 Fixed the priority order of the error renderers registration
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Making debug = false by default and cleanup
| 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 | -
Consistent with other places where the default value is `false`.
Commits
-------
b28986f119 Making debug = false by default and cleanup
When using symfony/framework-bundle with symfony/validator installed but without symfony/translation, the call to setTranslator will error out because of the missing translator service. Thus, the call to setTranslator needs to ignore a missing translator dependency to support this scenario.
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer][DX] Improve exception message for unsupported scheme
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | waiting for Travis
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR improves exception message for unsupported schemes by providing list of available. Throw something like: ` 'The "foo" scheme is not supported for mailer "mailgun". Supported schemes are: "api", "http", "smtp".'`
Commits
-------
8c24a537c7 [Mailer][DX] Improve exception message for unsupported scheme
the doctrine transport connection validates the options and complains about this option, so we remove it before. the purpose is for custom transport factories anyway
This PR was merged into the 3.4 branch.
Discussion
----------
Remove dead tests fixtures
| 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 | -
Once this is merged up to 4.2, I will check 4.2.
Commits
-------
f7e24c2c80 Remove dead tests fixtures
* 4.3:
fix tests
[Validator] Added support for validation of giga values
Fix Debug component tests
[Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes#32325)
[Messenger] pass transport name to factory
This PR was squashed before being merged into the 3.4 branch (closes#32485).
Discussion
----------
[Validator] Added support for validation of giga values
As described in issue #32479
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | just tested on my presta and it works. if further tests are necessary, it would be great if someone could help!
| Fixed tickets | #32479
| License | MIT
| Doc PR |
The validation(function normalizeBinaryFormat) in symfony/src/Symfony/Component/Validator/Constraints/File.php doesn't work with gigabyte values in php.ini.
In the PHP documentation it says "PHP allows shortcuts for byte values, including K (kilo), M (mega) and G (giga). " so in my opinion these values should work.
Thanks to @kijamve for the fix.
Commits
-------
969f2c4a81 [Validator] Added support for validation of giga values
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] pass transport name to factory
| Q | A
| ------------- | ---
| Branch? | 4.3
| 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 | #32526
| License | MIT
| Doc PR |
It's technically a new feature but so tiny I'd be happy to have it in 4.3
Commits
-------
59926c8b59 [Messenger] pass transport name to factory
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix UnrecoverableExceptionInterface handling
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32325
| License | MIT
| Doc PR | no
Fixed the handling of UnrecoverableExceptionInterface-Exceptions like suggested in [the issue thread](https://github.com/symfony/symfony/issues/32325#issuecomment-509351321).
Commits
-------
49bb7435f1 [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes#32325)
* 4.3:
Properly handle optional tag attributes for !tagged_iterator
[Mime] rename Headers::getAll() to all()
[Mailer] Fix phpdoc for variadic methods
[HttpClient] fix debug output added to stderr at shutdown
This PR was merged into the 4.3 branch.
Discussion
----------
Properly handle optional tag attributes for !tagged_iterator
| 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 | #32603
| License | MIT
| Doc PR | —
Properly handles all optional array keys when using `!tagged_iterator` in YAML service definitions.
This fixes a regression and adds a test case preventing it from coming up again
Commits
-------
d1c6580192 Properly handle optional tag attributes for !tagged_iterator
This PR was merged into the 4.3 branch.
Discussion
----------
[Mime] rename Headers::getAll() to all()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
For consistency with HttpFoundation.
On 4.3 to cut spreading the previous name asap.
Allowed because the component is experimental.
Commits
-------
9252e75923 [Mime] rename Headers::getAll() to all()
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Move non removing compiler passes to after removing passes
| Q | A
| ------------- | ---
| Branch? | Not sure - feels like something that should only change in a major version but /shrug
| Bug fix? | no
| New feature? | no
| BC breaks? | Is where each pass runs in PassConfig considered an API - not sure.
| Deprecations? | no
| Tests pass? | yes - no tests added because this is a sort of config change
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
At the moment PassConfig adds CheckExceptionOnInvalidReferenceBehaviorPass and ResolveHotPathPass as TYPE_REMOVE. But they don't remove services. This means that if you add a removing pass you need to run before all the other removing passes. You can use priority to do this but I think adding these passes here is logically a bit odd when TYPE_AFTER_REMOVING exists and could be leveraged.
I made this change against the master branch because maybe this is something you'd only want to change in a major version - not sure.
Commits
-------
88196ef4af [DI] Move non removing compiler passes to after removing passes
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Deprecate Process::inheritEnvironmentVariables()
| 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? | yes <!-- 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
IIUC, this method was kept as a BC layer from 3.4 to 4.0 to switch to the "inherit env vars" behavior, inciting developers to opt-in in 3.4. Since 4.0, env vars are always inherited, and this method doesn't allow to opt-out. So, time to remove it?
---
refs:
- https://github.com/symfony/symfony/pull/21470
- https://github.com/symfony/symfony/pull/22836
Commits
-------
af9bad31c6 [Process] Deprecate Process::inheritEnvironmentVariables()
This PR was squashed before being merged into the 4.4 branch (closes#32492).
Discussion
----------
[Lock] feature: lock split interface fix post-merge review
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yesish <!-- 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 | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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.
-->
see https://github.com/symfony/symfony/pull/32198#pullrequestreview-259854210
Commits
-------
8173c475f3 [Lock] feature: lock split interface fix post-merge review
This PR was squashed before being merged into the 4.4 branch (closes#32583).
Discussion
----------
[Mailer] Logger vs debug mailer
| 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
Currently, there is no way to get the network data for the HTTP calls done by the HTTP transports (which makes debugging harder). For SMTP, we do have the network data, but as logs (each SMTP command/response is its own log line which means that the logs are "polluted" and the data is not tied with the sent message).
This pull request adds a `getDebug()` method on `SentMessage`. That allows to get the debug data conveniently in a standardized way (for both SMTP and HTTP transports). I have moved the SMTP logs to this new mechanism and added support for HTTP transports.
Commits
-------
fded3cd68c [Mailer] added support ffor debug info when using SMTP
d2f33d2cfe [Mailer] added debug info for HTTP mailers
* 4.3: (25 commits)
fix merge
[HttpClient] fix debug output added to stderr at shutdown
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
...
* 4.2: (23 commits)
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
[Validator] Add missing en and fr translation ids from 4.4
[Debug][DebugClassLoader] Don't check class if the included file don't exist
...
* 3.4: (23 commits)
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
[Validator] Add missing en and fr translation ids from 4.4
[Debug][DebugClassLoader] Don't check class if the included file don't exist
...
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Path resolution for FCGI configuration
| 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 tiny improvement allows to speedup location of PHP executable if script is runned via FCGI.
PHP configured to be runned via Apache module mod_fcgid(usually on Windows), PHP_SAPI contains 'cgi-fcgi' and PHP_BINARY refer to correct PHP binary executable, same as in case of running via CLI.
Commits
-------
22150bc771 [Process] Path resolution for FCGI configuration
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] XmlEncoder: don't cast padded strings
| 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 | https://github.com/symfony/symfony/pull/23122#discussion_r121886667 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This was a suggestion of @nicolas-grekas in #23122. Which seems to have been forgotten.
But shouldn't we also avoid casting something like `.18`, `+18`, `-18`?
Commits
-------
c1bfaa1de4 [Serializer] XmlEncoder: don't cast padded strings
This PR was squashed before being merged into the 4.4 branch (closes#32471).
Discussion
----------
Add a new ErrorHandler component (mirror of the Debug component)
| 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 | -
On top of https://github.com/symfony/symfony/pull/32470
Commits
-------
b1b6e80a3d Add a new ErrorHandler component (mirror of the Debug component)
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Do not use absolute path when computing the vendor freshness
| 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 |
When one uses Docker with a different mounting point between CLI & FPM,
the cache keeps regenerating because the ComposerResource class see a
different path for each SAPI. For example `/home/app/app/vendor` vs
`/var/www/app/vendor`.
So if you hit FPM, then the CLI, then FPM, each time a new cache is
generated. So the application is quite slow in dev env. And for people
on MacOSX (with docker) is a big pain! And obvisouly, this never
stabilizes !
This occurs a lot when you have a worker, that crash and reboot in the
background, and you browse the web interface. Or when you have something
that hit your API every X secondes, and you are working on a worker.
Commits
-------
2d2e2742c8 [Config] Do not use absolute path when computing the vendor freshness
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Allow to configure VarDumperTestTrait casters & flags
| 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 | TODO: showcase using `setUpVarDumper` in `setUp` or in specific test cases accordingly to the use-case. `tearDownVarDumper` is automatically called after each test case.
The VarDumper component is a great tool in tests to assert objects states.
The ability to register custom casters on need is a nice way to control only the fields you're expecting, or a way to write concise test cases.
Hence this feature allowing to configure casters specifically per test class/case.
Commits
-------
613dbb267d [VarDumper] Allow to configure VarDumperTestTrait casters & flags
When one uses Docker with a different mounting point between CLI & FPM,
the cache keeps regenerating because the ComposerResource class see a
different path for each SAPI. For example `/home/app/app/vendor` vs
`/var/www/app/vendor`.
So if you hit FPM, then the CLI, then FPM, each time a new cache is
generated. So the application is quite slow in dev env. And for people
on MacOSX (with docker) is a big pain! And obvisouly, this never
stabilizes !
This occurs a lot when you have a worker, that crash and reboot in the
background, and you browse the web interface. Or when you have something
that hit your API every X secondes, and you are working on a worker.
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] remove usage of the StoreInterface
| 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 | none <!-- 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.
-->
Followup PR according to the review of @nicolas-grekas in https://github.com/symfony/symfony/pull/32555#discussion_r303749752.
Commits
-------
9988844eb4 [Lock] remove uusage of the StoreInterface
This PR was merged into the 3.4 branch.
Discussion
----------
Container*::getServiceIds() should return strings
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | o
| Tests pass? | yes
| Fixed tickets | #32549
| License | MIT
Cast services ids to string in `Container*::getServiceIds()`
Commits
-------
9c88caad31 Container*::getServiceIds() should return an array of string
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Update Spanish translation for Range validator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | -
Commits
-------
b5a96409b7 Update validators.es.xlf
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] make toStream() throw by default
| 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 | -
For consistency with ->getHeaders()/->getContent().
Commits
-------
90e46ab13b [HttpClient] make toStream() throw by default
* 4.3:
added missing test
[Mailer] Allow register mailer configuration in xml format
fixed CS
[FrameworkBundle] Fix descriptor of routes described as callable array
[Debug][DebugClassLoader] Include found files instead of requiring them
[HttpKernel] fix tests
Adding missing event_dispatcher wiring for messenger.middleware.send_message
This PR was merged into the 4.3 branch.
Discussion
----------
Adding missing event_dispatcher wiring for messenger.middleware.send_message
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32375
| License | MIT
| Doc PR | not needed
This was probably my bad when I added this hook point (it's not used anywhere in the core). Also reported on Slack :).
Cheers!
Commits
-------
90d1b059fd Adding missing event_dispatcher wiring for messenger.middleware.send_message
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] add aliases for LockFactory
| 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 | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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.
-->
see https://github.com/symfony/symfony/pull/32495/files#r302844198, add missing aliases in 4.4 and in 5.0 we just remove the old classes and aliases.
Commits
-------
5f301688ac [Lock] add aliases for LockFactory
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][DebugClassLoader] Don't check class if the included file doesn't exist
| 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 | -
Follow up to https://github.com/symfony/symfony/pull/32500.
If the included file doesn't exist, we need to return or the execution continues (if warnings are not thrown as exceptions) and then an invalid exception is thrown when the class is checked.
For example : "The autoloader expected class "App\Foo\Bar" to be defined in file "/var/www/html/vendor/composer/../../src/Foo/Bar.php". The file was found but the class was not in it, the class name or namespace probably has a typo".
Commits
-------
0185527297 [Debug][DebugClassLoader] Don't check class if the included file don't exist
This PR was squashed before being merged into the 3.4 branch (closes#32536).
Discussion
----------
[Translation] Use HTTPS and fix a url
| 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 -->
| 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.
-->
Commits
-------
e346ee6888 [Translation] Use HTTPS and fix a url
This PR was squashed before being merged into the 3.4 branch (closes#32539).
Discussion
----------
[Validator] Add missing Hungarian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| 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.
-->
It has 2 messages translated to Hungarian introduced in https://github.com/symfony/symfony/pull/27738 and https://github.com/symfony/symfony/pull/32435. AFAIK it should be based on 3.4, but tell me if I should rebase any of the commits.
Commits
-------
2fee9124ba [Validator] Add missing Hungarian translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add Lithuanian translation for Range validator
| 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 | - <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
Translation for #32435.
<!--
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
-------
20ef151eb3 [Validator] Add Lithuanian translation for Range validator
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Name related PHPDoc fixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | relates to #32179
| License | MIT
| Doc PR | n/a
As I started working on #32179 in #32237, I noticed some PHPDoc inconsistencies around the form's name. I have researched the issue thoroughly and here's my proposal:
1. All "factory" methods (`FormFactory::create*`, `ResolvedFormType::createBuilder`, `FormBuilder::create|add`, `Form::add`) currently accept string and integer names. This should not be deprecated, because it's very convenient and natural to pass ints when adding children to types like `ChoiceType` or `CollectionType`.
1. None of the "factory" methods explicitly accepts `null` as a name, although passing `null` works the same as passing `''`. I consider passing `null` in this case to be ugly, so I corrected the builder's constructors mentioning `null` as a possible argument. One should pass an empty string `''` when creating such a form. We could also deprecate passing `null` in a PR targeting 4.4.
1. Currently the name becomes a string in the builder's (or config builder's) constructor. Which means that `FormConfigInterface::getName` always returns a string and thus the form's `$name` property is always a string. All related checks and PHPDocs should be corrected.
1. The "children accessors" (`Form::has|get|remove`, `FormBuilder::has|get|remove`) should accept both strings and ints because they are array-accessible by design (so it does not really matter, if the key is a string or an int). If it's valid to have `$collectionForm->add(1, ItemType::class)`, then it should be valid to do `$collectionForm->get(1)`. And it works in code, but is not mentioned in the PHPDoc.
ping @nicolas-grekas , @xabbuh , @HeahDude
Commits
-------
eae95c4e49 PHPDoc fixes
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing message parameter
| 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 | https://github.com/symfony/symfony/pull/32231#discussion_r301943379
| 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.
-->
Add the missing parameter in the `sprintf()` call.
Found in https://github.com/symfony/symfony/pull/32231#discussion_r301943379
Commits
-------
a060642637 Replace missing message parameter
This PR was squashed before being merged into the 4.4 branch (closes#32435).
Discussion
----------
[Validator] Add a new constraint message when there is both min and max
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | to do
Currently, the failed validation messages in the `Range` constraint doesn't carry a notion of range. This can be confusing and error-prone if we report these messages to the user as-is.
This PR introduces a new message to the `Range` constraint (`This value should be between {{ min }} and {{ max }}.`) that will be displayed if both `min` and `max` are not `null`.
Commits
-------
c5488bcec1 [Validator] Add a new constraint message when there is both min and max
This PR was merged into the 4.4 branch.
Discussion
----------
[LDAP] add new option implemented in php 7.1
| 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 | #18448 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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.
-->
Add new options to the LDAP connection class.
Commits
-------
d1a0ca6b9a [LDAP] add new option implemented in php 7.1
This PR was squashed before being merged into the 4.4 branch (closes#32452).
Discussion
----------
[Bundles] Rename getPublicPath() as getPublicDir()
| 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 | I'll add this if approved
While documenting #31975 (see https://github.com/symfony/symfony-docs/pull/11930) I realized that the `getPublicPath()` method name is not consistent with the rest of Symfony.
In Symfony, "path" is usually associated to routes and we use "dir" for things similar to this:
* `getCacheDir()` and `getLogdir()` to override Symfony structure (https://symfony.com/doc/current/configuration/override_dir_structure.html)
* `binDir`, `configDir`, `srcDir`, `varDir`, `publicDir` in Symfony Flex recipes (https://github.com/symfony/recipes) to override the dir structure
So, this PR proposes to rename `getPublicPath()` as `getPublicDir()`
Commits
-------
4ab2f9955b [Bundles] Rename getPublicPath() as getPublicDir()
This PR was merged into the 4.4 branch.
Discussion
----------
Remove experimental notice from components
| 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
@fabpot:
> Nothing can be marked as experimental in 4.4.
>
> https://github.com/symfony/symfony/pull/32277
Commits
-------
390c9a67bf Remove experimental notice from components
This PR was squashed before being merged into the 4.4 branch (closes#32470).
Discussion
----------
Rename ErrorCatcher to ErrorRenderer (rendering part only)
| 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 | -
Follow up https://github.com/symfony/symfony/pull/32377
Commits
-------
fb5b0429b2 Rename ErrorCatcher to ErrorRenderer (rendering part only)
* 4.3: (26 commits)
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Spell "triggering" properly
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[SecurityBundle] Fix profiler dump for non-invokable security listeners
fixed CS
[Messenger] Doctrine Transport: Support setting auto_setup from DSN
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
Add missing test for workflow dump description
[Intl] Remove --dev from intl compile autoloader
[Messenger] fix publishing headers set on AmqpStamp
Remove call to deprecated method
[Intl] Init compile tmp volume
...
* 4.2:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
Remove call to deprecated method
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
* 3.4:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
This PR was merged into the 4.4 branch.
Discussion
----------
[WebProfilerBundle] Deprecating templateExists method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | not needed
Follow up https://github.com/symfony/symfony/pull/32458, so in 5.0 we can remove these methods safely.
I'm not deprecating the `Symfony\Bundle\TwigBundle\Controller\ExceptionController::templateExists()` method because the whole class is being deprecated in https://github.com/symfony/symfony/pull/31398
See also https://github.com/symfony/symfony/pull/32461
Commits
-------
2e81e45bc3 Deprecating templateExists method
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock][Console] bump lock requirement in console
| 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 | not needed <!-- 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 test of the console component, by bumping the lock requirement
Commits
-------
41de6333db [Lock][Console] bump lock requirement in console
This PR was merged into the 4.3 branch.
Discussion
----------
[PHPUnit Bridge] Spell "triggering" properly
As a side effect, the property name matches the one in the declaration,
which was correct.
| Q | A
| ------------- | ---
| Branch? | 4.3 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
cad5f9a106 Spell "triggering" properly
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] minor: add missing alias for PersistStoreInterface
| 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 | none <!-- #-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.
-->
Add missing alias highlited by @jderusse in order to do:
```
public function __construct(PersistStoreInterface $store) {}
```
Commits
-------
f1e98f2a10 [Lock] minor: add missing alias for PersistenStoreInterface
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] rename and deprecate Factory into LockFactory
| 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? | yes<!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-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.
-->
As highlighted in https://github.com/symfony/symfony/pull/32198#pullrequestreview-255808664 we need to rename the factory to LockFactory for consistency and readability.
Commits
-------
fc75eb9bef [Lock] rename and deprecate Factory into LockFactory
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Added tests to cover the possibility of having scalars as services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32411
| License | MIT
| Doc PR | N/A
Commits
-------
60939d988d Added tests to cover the possibility of having scalars as services.
This PR was squashed before being merged into the 4.4 branch (closes#31975).
Discussion
----------
Dynamic bundle assets
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (new method in interface as annotation)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29213
| License | MIT
| Doc PR | none (yet)
Everything is explained in linked issue
Commits
-------
c16fcc93e2 Dynamic bundle assets
This PR was squashed before being merged into the 4.4 branch (closes#32377).
Discussion
----------
[Debug] Restoring back the state of the Debug component (1st step)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32371
| License | MIT
After a good discussion with @nicolas-grekas, we made the decision to split the current `ErrorCatcher` component into several:
* `ErrorHandler` it would be the Debug component before these changes https://github.com/symfony/symfony/pull/31065, with everything related to ErrorHandler, Debug, DebugClassLoader classes and change its name.
* `ErrorDumper` it would be the current ErrorCatcher but with FlattenException + the new error renderer system only.
This is the first step, then we can deprecate everything for the Debug component in favor of the ErrorHandler and ErrorDumper components, **BUT without moving any code !!**, that would give us more freedom to do it correctly in the new components.
NOTE: For this PR I've copy the `Debug` component directory from the revision prior to merged commit https://github.com/symfony/symfony/pull/31065 in 4.4 branch.
Commits
-------
eda49e295e [Debug] Restoring back the state of the Debug component (1st step)
When using a custom router that inject GET parameters, eg:
```
# services.yaml
parameters:
# Replace default url generator service
router.options.generator_base_class: Combodo\iTop\Portal\Routing\UrlGenerator
```
The path generated by the toolbar JS is HTML entity encoded which breaks the JS call (`&` becomes `&`).
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Let browsers trigger their own search on double CMD/CTRL + F
| 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 | #29748 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Simple way to enhance DX & mitigate #29748
Commits
-------
d2430584cd [VarDumper] Let browsers trigger their own search on double CMD/CTRL + F hit
This PR was squashed before being merged into the 4.4 branch (closes#32198).
Discussion
----------
[Lock] Split "StoreInterface" into multiple interfaces with less responsability
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | Contribute to #28694 <!-- #-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.
-->
We are removing the StoreInterface in order to split into multiple interface, it will help reduce de responsability of the StoreInterface.
Firstly, since not all stores needs to have all the methods of the StoreInterface, we can split this like this in order to limit the methods that are needed for each store.
Secondly, we add supportsX methods in order to avoid throwing exception when a store does not supports a feature it's easier an instance of the special interface or not, and it can return true/false on the support method.
**Really big thanks to** @jderusse for working with me on this, 1-2 hours of talking together, and another 1-2 hours of pre-review :). now giving it to the whole community !
*some time has been sponsored by* @izisolutions
Commits
-------
91fcbea977 [Lock] Split \"StoreInterface\" into multiple interfaces with less responsability
This PR was squashed before being merged into the 4.4 branch (closes#31511).
Discussion
----------
[Validator] Allow to use property paths to get limits in range constraint
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11793
Similar as #22576, but for the `Range` constraint.
Commits
-------
2b509904c8 [Validator] Allow to use property paths to get limits in range constraint
This PR was squashed before being merged into the 3.4 branch (closes#31620).
Discussion
----------
[FrameworkBundle] Inform the user when save_path will be ignored
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no / maybe??
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31611
| License | MIT
When a project is created, framework.yaml or config.yml has handler_id set to ~. This uses the native php SessionHandler object which is instantiated with the save_path setting from php.ini or php-fpm.d/www.conf. If you set a save_path, it is silently ignored. When using mod_php for apache or php-fpm running as apache/nginx this is typically not a big deal (except your session files are stored someplace other than you actually wanted). However if using php-fpm and running as a non-standard user for the distro, it will fail silently. Sessions won't be saved because the setting has no effect. This throws a warning in those cases to inform the user.
_It could be a BC because it changes the default configuration however fixes a 'long standing bug' if you will. Not sure what you want to do about that part._
Commits
-------
a0901294d4 [FrameworkBundle] Inform the user when save_path will be ignored
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] deprecate booting the kernel twices
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31233 <!-- #-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.
-->
This adds a check to see if the kernel has been booted twices in a single test, and throw a deprecation
Commits
-------
905bec4577 [DI] throw an exception when the kernel has been booted twices
This PR was merged into the 3.4 branch.
Discussion
----------
Don't assume port 0 for X-Forwarded-Port
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | none added
| Fixed tickets |
| License | MIT
| Doc PR | -
If you use X-Forwarded-Host but don't provide X-Forwarded-Port, it will default to `0.0.0.0:` which then assumes port `0` instead of following its default assumption based on the scheme.
Commits
-------
adcdd938a4 PHP 5 compat
6c49a0c758 Add test case
c266d6c737 Update Request.php
23db9be884 Don't assume port 0 for X-Forwarded-Port
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] don't redraw progress bar more than every 100ms by default
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no (behavior change)
| BC breaks? | no (behavior change)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of https://github.com/symfony/symfony/pull/26339
Looks like something we can and should do on 4.4 to me.
Commits
-------
df551e945c [Console] don't redraw progress bar more than every 100ms by default
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Added Application::reset()
| 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 |
Symfony leaks a lot in CLI when using the EventDispatcher. I'm working on it.
But instead of fixing the root cause, it can be legit to go quick and to reset all services.
So IMHO, this services should be exposed, and always available
Commits
-------
15ba5791cd [Console] Added Application::reset()
This PR was merged into the 4.4 branch.
Discussion
----------
[WebserverBundle] Deprecate the bundle in favor of symfony local server
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | to do <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Since most of the feature added to the symfony local server (using php-fpm) will be handy for all developers and as said in https://github.com/symfony/symfony/issues/25748#issuecomment-485740082, I agree that we should deprecate the WebserverBundle in favor of the [Symfony Local Server](https://symfony.com/doc/current/setup/symfony_server.html) cc @stof @fabpot
Commits
-------
7307907585 [WebserverBundle] Deprecate the bundle in favor of symfony local server
This PR was merged into the 4.4 branch.
Discussion
----------
[SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462
| Q | A
| ------------- | ---
| Branch? | 4.4
| -- | --
| Bug fix? | yes
| New feature? | no
| BC breaks? | no I think
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ...
| License | MIT
Rebase of #28462. Origin description:
> ```
> [2018-09-13 20:43:38] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException(code: 0): An exception occurred while executing
> ...
> Doctrine\\DBAL\\Driver\\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.phone' in 'field list' at
> ```
>
> Definitely I think this is NOT info, but error.
> And since it's info, it's not logged in production because of `fingers_crossed` with `action_level: error` - so to actually see the real error behind `Authentication request could not be processed due to a system problem.` I had to debug on production. Very bad practice IMHO.
Commits
-------
867eb78cfe [SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Add argument $prefix to AdapterInterface::clear()
| 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 allows clearing `AdapterInterface` implementations by prefix of keys. The goal is to fix an edge case situation in `ProxyAdapter`: right now, when one calls `->clear()` on a proxy adapter that is configured to add a prefix to all the keys passed to the decorated pool, we clear it all; while only the subset that starts with the prefix should be.
Since `AdapterInterface` is an "internal" interface (ie its purpose is to create compatible implementations - *NOT* to be type-hinted for), this is not really a user-facing change.
/cc @Nyholm, this came out after we talked about proxified chain pools
Commits
-------
ad6f6cf900 [Cache] Add argument $prefix to AdapterInterface::clear()
This PR was merged into the 4.4 branch.
Discussion
----------
[ServerBundle] Display all logs by default
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32111
| License | MIT
| Doc PR |
Instead of relying on `-vvv` behavior, we display all logs.
End user has two ways of filtering now:
* with the `--filter` options
* by configuring the handler in `config/dev/monolog.yaml`
Commits
-------
54b0809d2c [ServerBundle] Display all logs by default
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TBA
The way ProgressBar redraw frequency works currently requires to know speed of progress beforehand, which is impossible to know in some situations, e.g. when showing progress of download, or I/O speed. Setting frequency too low relative to progress speed throttles I/O speed and makes progress bar flicker too much, setting it too high makes progress bar unresponsive. Current behaviour IMHO undermines usefulness of ProgressBar.
This is an attempt to replace this with more consistent experience, not requiring to know speed of progress.)
Commits
-------
83edac321e [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods
Instead of relying on `-vvv` behavior, we display all logs.
End user has two ways of filtering now (instead of 3 previously):
* with the `--filter` options
* by configuring the handler in `config/dev/monolog.yaml`
This PR was merged into the 3.4 branch.
Discussion
----------
[Translator] Load plurals from mo files properly
| 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/10152#issuecomment-55522675
| License | MIT
| Doc PR |
Plurals were not handled correctly when loading mo files.
```
msgid "foo"
msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
```
Before, the mo entry above was treated as two entries, which doesn't make sense:
```
'foo' => 'bar'
'foos' => '{0} bar|{1} bars'
```
With this PR, it is treated as one entry:
```
'foo|foos' => 'bar|bars'
```
This PR does the same as #31266, just for mo files instead of po files. Note, however, that the old behavior differed between po and mo files: `'foos' => 'bar|bars'` for po files and `'foos' => '{0} bar|{1} bars'` for mo files.
Commits
-------
97d28b5e4e Load plurals from mo files properly
This PR was squashed before being merged into the 3.4 branch (closes#31266).
Discussion
----------
[Translator] Load plurals from po files properly
| 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/10152#issuecomment-55522675
| License | MIT
| Doc PR |
Plurals were not handled correctly when loading po files.
```
msgid "foo"
msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
```
Before, the po entry above was treated as two entries, which doesn't make sense:
```
'foo' => 'bar'
'foos' => 'bar|bars'
```
With this PR, it is treated as one entry:
```
'foo|foos' => 'bar|bars'
```
Commits
-------
6b69a99230 [Translator] Load plurals from po files properly
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] allow answer to be trimmed by adding a flag
| Q | A
| ------------- | ---
| Branch? | master
| 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 | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11603 <!-- 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 the master branch.
-->
According to https://github.com/symfony/symfony/issues/23210#issuecomment-495998087 we add a new flag in the `Question` class to be able to not trim the answer.
Commits
-------
8f182d811e [Console] allow answer to be trimmed by adding a flag
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] AbstractObjectNormalizer ignores the property types of discriminated classes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27607
| License | MIT
| Doc PR |
As discusses in ticket #27607, when using a discriminator map and the symfony serializer, things go wrong when having two classes in the discriminator map having the same property name. When the function ```validateAndDenormalize``` is called, the function ```getTypes``` would be called with the wrong class name.
If you take a look at the ```getTypes``` function below, I'm not even sure if we still need the part of the discriminator at this place because we already passed the class name of the discriminated class.
```
/**
* @return Type[]|null
*/
private function getTypes(string $currentClass, string $attribute)
{
if (null === $this->propertyTypeExtractor) {
return null;
}
if (null !== $types = $this->propertyTypeExtractor->getTypes($currentClass, $attribute)) {
return $types;
}
if (null !== $this->classDiscriminatorResolver && null !== $discriminatorMapping = $this->classDiscriminatorResolver->getMappingForClass($currentClass)) {
if ($discriminatorMapping->getTypeProperty() === $attribute) {
return [
new Type(Type::BUILTIN_TYPE_STRING),
];
}
foreach ($discriminatorMapping->getTypesMapping() as $mappedClass) {
if (null !== $types = $this->propertyTypeExtractor->getTypes($mappedClass, $attribute)) {
return $types;
}
}
}
return null;
}
```
Commits
-------
9fc56c7e28 [Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
This PR was squashed before being merged into the 4.4 branch (closes#31876).
Discussion
----------
[WebProfilerBundle] Add clear button to ajax tab
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31839
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
For pages that have been open for a long time, the profiler ajax tab can start filling up fast. In #31839 the request to allow the history to be cleared with one click.
The reason why I did not align the button to the right, is because after looking at the other tabs. None of them had items that were aligned to the right. Moved the addEventListener above the ajax tab logic to keep the code consistent.
Ps. Please be nice, this is my first contribution 🍰
<!--
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
-------
6bff4db6d3 [WebProfilerBundle] Add clear button to ajax tab
This PR was merged into the 4.4 branch.
Discussion
----------
[Stopwatch] Deprecate passing null in Section::get() method.
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179<!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This PR is related to https://github.com/symfony/symfony/pull/32242
Commits
-------
ea4817677b [Stopwatch] Deprecate passing null in Section::get() method.
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] deprecate passing a null locale
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | not needed <!-- 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.
-->
According to the discussion in https://github.com/symfony/symfony/pull/32386#discussion_r300590343 it seems that allowing null here was not the right thing to do, so we are deprecating this behaviour.
Commits
-------
088615ddaf [Translation] deprecate passing a null locale
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Remove --dev from intl compile autoloader
| 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 -->
Remove implicit composer default (`jakzal/php-intl` uses latest composer during compile)
Commits
-------
8ffc61692d [Intl] Remove --dev from intl compile autoloader
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Add $response->toStream() to cast responses to regular PHP streams
| 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 adds `$response->toStream()` to cast responses to regular PHP streams, and uses the method in `Psr18Client` and `HttplugClient`.
This means `Psr18Client` and `HttplugClient` will now be lazy past response headers. I'm not sure any other PSR-18 implementation has this behavior. :)
This also adds `StreamWrapper::createResource()` to turn any `ResponseInterface` implementation into a PHP stream.
/cc @Nyholm FYI since we discussed about this recently.
Commits
-------
a59e0af24a [HttpClient] Add $response->toStream() to cast responses to regular PHP streams
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] fix publishing headers set on AmqpStamp
| 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 |
Dispatching a message using an AmqpStamp and setting extra headers with it didn't work. We need to merge the `$attribute['headers']`, not the attributes itself as that will ignore the stamp headers because it's not recursive.
I also made the AmqpStamp a NonSendableStampInterface because it's pointless to serialize the stamp because the stamp already set's the attributes for publishing.
Commits
-------
50b3ec4dc5 [Messenger] fix publishing headers set on AmqpStamp
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Init compile tmp volume
| 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 -->
Fixes
```
Symfony\Component\Filesystem\Exception\IOException: Failed to create "/tmp/icu-data": mkdir(): Permission denied.
```
if the initial volume does not exists docker creates it as root, but the container runs for the current user.
Commits
-------
5e26d96a6b [Intl] Init compile tmp volume
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] add check for openssl when using SMime
| 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 | -
Should also make tests green for the component on Windows.
Commits
-------
f33c67bfc1 [Mime] add check for openssl when using SMime
This PR was squashed before being merged into the 4.4 branch (closes#32402).
Discussion
----------
[Intl] Exclude root language
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 -->
Spotted in #32388
Commits
-------
089cc06c3a [Intl] Exclude root language
This PR was merged into the 4.2 branch.
Discussion
----------
[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass
Closes#32397
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32397
| License | MIT
| Doc PR | -
Removes deprecated call to ReflectionType::__toString() for 7.4 support
Commits
-------
0c52a531e2 Remove call to deprecated method