* 4.4:
fixed CS
[Validator] Add a new constraint message when there is both min and max
fixed CS
[Bundles] Rename getPublicPath() as getPublicDir()
Remove experimental notice from components
[LDAP] add new option implemented in php 7.1
Replace missing message parameter
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.4: (53 commits)
Fix Twig 1.x compatibility
Deprecating templateExists method
[Translator] Improve farsi(persian) translations for Form
[Validator] Fix Changelog for #31511
[Lock][Console] bump lock requirement in console
[Lock] minor: add missing alias for PersistenStoreInterface
Improve fa translations
Dynamic bundle assets
[Lock] rename and deprecate Factory into LockFactory
[Debug] Restoring back the state of the Debug component (1st step)
Spell "triggering" properly
[Lock] Fix tests
Added tests to cover the possibility of having scalars as services.
fixed CS
[Lock] Split \"StoreInterface\" into multiple interfaces with less responsability
[VarDumper] Let browsers trigger their own search on double CMD/CTRL + F hit
[Validator] Allow to use property paths to get limits in range constraint
Fix missing deprecations
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
...
* 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
----------
[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)
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 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
----------
[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 5.0-dev branch.
Discussion
----------
[DependencyInjection][ProxyManagerBridge] Added type-hints to LazyProxy classes and interfaces
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR adds type-hints to the LazyProxy namespace of the DepenencyInjection component.
It also updates implementations of the LazyProxy interfaces inside the ProxyManager bridge. The consequence is that ProxyManagerBridge 5.0 won't work with DependencyInjection 4.4 anymore. If that is a problem, please tell me and I revert the ProxyManager part.
Commits
-------
211b718e28 Added type-hints to LazyProxy classes and interfaces.
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 5.0-dev branch.
Discussion
----------
[Console] [5.0] Add all type-hint
| Q | A
| ------------- | ---
| Branch? | master
| 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 | Contributo to #32179 <!-- #-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.
-->
Add all type-hint to console component whenever it's possible
Commits
-------
26624ed529 [Console] [5.0] Add all type-hint
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
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
* 4.4:
fixed deprecation message
[Translation] deprecate passing a null locale
[Intl] Exclude root language
[Stopwatch] Deprecate passing null in Section::get() method.
[Mime] add check for openssl when using SMime
[HttpClient] Add $response->toStream() to cast responses to regular PHP streams
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 5.0-dev branch.
Discussion
----------
[Templating] Added type-hints to all classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR added type-hints to all classes of the templating component.
Commits
-------
5626830e38 [Templating] Added type-hints to all classes.
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 5.0-dev branch.
Discussion
----------
[BrowserKit] [5.0] Add type-hint to all classes
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | Contribute to #32179 <!-- #-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.
-->
We are adding the type-hint to all BrowserKit classes ;).
Commits
-------
be0e4bd781 [BrowserKit] [5.0] Add type-hint to browserkit classes
This PR was merged into the 5.0-dev branch.
Discussion
----------
[DomCrawler] [5.0] add type-hint whenever possible
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | Contribute to #32179 <!-- #-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 type hint to DomCrawler
Commits
-------
580b126a35 [DomCrawler] [5.0] add type-hint whenever possible
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 5.0-dev branch.
Discussion
----------
[5.0][Filesystem] add parameter type hints
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 | #32179
| License | MIT
| Doc PR | N/A
This PR adds parameter type hints to the Filesystem component.
Commits
-------
ba7dab67b3 [5.0][Filesystem] add parameter type hints
This PR was merged into the 5.0-dev branch.
Discussion
----------
[5.0][Finder] add parameter type-hints
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 | #32179
| License | MIT
| Doc PR | N/A
This PR adds parameter type hints to the Finder component.
Commits
-------
7f98903d05 [5.0][Finder] add parameter type-hints
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
* 4.4:
[PhpUnitBridge] fix running simple-phpunit on Windows
fixed UPGRADE
fixed phpdocs
fixed phpdocs
[ErrorCatcher] Fixed some escaping in XML errors
[Messenger] fix broken key normalization
[FrameworkBundle] Allow creating chained cache pools by providing several adapters
[FrameworkBundle] Use default_locale as default value for translator.fallbacks
This PR was squashed before being merged into the 5.0-dev branch (closes#32218).
Discussion
----------
[5.0] [Translator] Add parameter type-hints where possible
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Adding scalar typehints in Translator.
Commits
-------
470996f708 [5.0] [Translator] Add parameter type-hints where possible
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Workflow] Added parameter typhint where possible
| Q | A
| ------------- | ---
| Branch? | mas
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ye
| Fixed tickets | partially #32179
| License | MIT
| Doc PR |
Commits
-------
62e615b095 [Workflow] Added parameter typhint where possible
This PR was squashed before being merged into the 5.0-dev branch (closes#32234).
Discussion
----------
[PropertyAccess] Add type-hints to public interfaces and classes
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to public interfaces and classes of the PropertyAccess component. Some docblocks without valuable information got also removed.
Commits
-------
91138a9815 [PropertyAccess] Add type-hints to public interfaces and classes
This PR was squashed before being merged into the 5.0-dev branch (closes#32273).
Discussion
----------
[Process] [5.0] Replace docblocks by type-hints
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | continuation of https://github.com/symfony/symfony/pull/24722 and checks for #32179
| License | MIT
| Doc PR | N/A
This PR adds replace docblocks by type hints in the Process component. Some docblocks without valuable information got also removed.
Commits
-------
5c964c5554 [Process] [5.0] Replace docblocks by type-hints
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Config] finish adding parameter types
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yno
| 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 | #32179
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Completes some missing things in #32201
Commits
-------
2ca83545c2 [Config] finish adding parameter types
This PR was merged into the 4.4 branch.
Discussion
----------
Fix phpdocs
| 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
Backported from #32286
<!--
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
-------
4acddef91b fixed phpdocs
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Allow creating chained cache pools by providing several adapters
| 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 #30984, follows https://github.com/symfony/symfony-docs/pull/11813
This PR allows defining several adapters for one pool. When doing so, this defines a chain pool.
The benefit is that all chained pools get automatic namespace and lifetime, so things are transparent:
```yaml
pools:
my_chained_pool:
default_lifetime: 12
adapters:
- cache.adapter.array
- cache.adapter.filesystem
- {name: cache.adapter.redis, provider: 'redis://foo'}
```
(see fixtures for example of PHP/XML config)
/cc @Nyholm @pborreli FYI
Commits
-------
29ba091898 [FrameworkBundle] Allow creating chained cache pools by providing several adapters
This PR was merged into the 5.0-dev branch.
Discussion
----------
[CssSelector] [5.0] Add type-hint whenever possible
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | contribute to #32179 <!-- #-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 type hint to css selector ;).
Commits
-------
3e647d4289 [CssSelector] [5.0] Add type-hint whenever possible
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Change Length::$allowEmptyString default to false & make it optional
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | yes <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | should pass after #32372 <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31528 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | ~TODO: change default value and mention it's optional~ Done. Thx @javiereguiluz
Commits
-------
26b804e82d [Validator] Change Length::$allowEmptyString default to false & make it optional
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorCatcher] Fixed some escaping in error renderers
| 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 | -
| License | MIT
| Doc PR | not needed
Fixes this: https://github.com/symfony/symfony/pull/32364/files#r300394620
Commits
-------
1413bdc [ErrorCatcher] Fixed some escaping in XML errors
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorCatcher] Pretty print JSON formatted errors
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | not needed
A long string with JSON contents is not very useful to quickly parse the error contents, so I propose to "pretty print" the JSON errors.
Commits
-------
ab926d2 [ErrorCatcher] Pretty print JSON formatted errors
* 4.4: (33 commits)
[DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
[FrameworkBundle] reset cache pools between requests
[HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client
Use ConnectionRegistry instead of RegistryInterface.
Fixes windows error
Improving the request/response format autodetection
[Messager] Simplified MessageBus::__construct()
[WIP][Mailer] Overwrite envelope sender and recipients from config
[Messenger] Added more test for MessageBus
[Mime] Updated some PHPDoc contents
[PropertyAccess] Adds entries to CHANGELOG and UPGRADE
fixed typo
[FrameworkBundle] Simplified some code in the DI configuration
[Filesystem] added missing deprecations to UPGRADE-4.3.md
[Filesystem] depreacte calling isAbsolutePath with a null
Fix authentication for redis transport
only decorate when an event dispatcher was passed
[Messenger] Added support for auto trimming of redis streams
[FrmaeworkBundle] More simplifications in the DI configuration
...
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
| 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 | -
Spotted in and needed by #32294
Commits
-------
b06d0003a3 [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
This PR was merged into the 5.0-dev branch.
Discussion
----------
[ExpressionLanguage] [5.0] add type-hints whenever possible
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | Contribute to #32179 <!-- #-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.
-->
Add type-hint whenever possible.
Commits
-------
26f6509361 [ExpressionLanguage] [5.0] add type-hints whenever possible
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Security] Added type-hints to auth providers, tokens and voters
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR adds type declarations to authentication providers, tokens and voters.
Commits
-------
8c46b95ec2 [Security] Added type-hints to auth providers, tokens and voters.
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Security] Added type-hints to password encoders
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR adds type declarations to all implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface`.
Commits
-------
d763e63210 [Security] Added type-hints to password encoders.
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Use ConnectionRegistry instead of RegistryInterface
| 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
This PR changes the constructor type-hint on `DoctrineTransportFactory` from `Symfony\Bridge\Doctrine\RegistryInterface` to the smaller `Doctrine\Common\Persistence\ConnectionRegistry`. Since we only call the `getConnection()` method, this interface is sufficient.
This change allows to use the factory without the Doctrine bridge and makes it easier to use it stand-alone.
Commits
-------
ce6a5ad235 Use ConnectionRegistry instead of RegistryInterface.
This PR was squashed before being merged into the 4.4 branch (closes#32348).
Discussion
----------
[HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
| 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 | n/a
| License | MIT
| Doc PR | n/a
Follow up PR to #32344: if both `Accept` and `Content-Type` are defined, `Accept` must take the lead because it explicitly tells what format the client expect as a response.
Before:
```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'
[snip]
content-type: text/xml
```
After:
```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'
[snip]
content-type: application/json
```
Actually, I'm not sure that inferring the content type of the response using the `Content-Type` provided for the request body is a good idea. The HTTP RFC explicitly states that `Accept` must be used to hint a preferred response format (`Content-Type` on the request indicates the type of associated its the body). I would be in favor of being more conservative: use `Accept` if provided (a best practice anyway), and fallback to the default value (HTML by default) otherwise. WDYT?
Commits
-------
60d997df75 [HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
* 4.3:
Fixes windows error
[Messenger] Added more test for MessageBus
fixed typo
[Filesystem] added missing deprecations to UPGRADE-4.3.md
Fix authentication for redis transport
only decorate when an event dispatcher was passed
[FrmaeworkBundle] More simplifications in the DI configuration
Fixing validation for messenger transports retry_strategy service key
Removed unused field.
Remove @internal annotations for the serilize methods
[Lock] Stores must implement `putOffExpiration`
Annotated correct return type for getInEdges()/getOutEdges().
deprecate the framework.templating option
* 4.2:
Fixes windows error
Removed unused field.
[Lock] Stores must implement `putOffExpiration`
Annotated correct return type for getInEdges()/getOutEdges().
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation][HttpKernel] Improving the request/response format autodetection
| 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 | -
Mainly for API-based apps, currently the response header `Content-Type` (if no provided) is guessed based on the request format (`_format` attribute), falling back to `html` by default.
Especially for the new error renderer system, where any kind of error can occur and it becomes an http response, this PR improves this guesser mechanism by taking into account also the `Content-type` of the request.
Example:
```bash
$ curl -X POST -H 'Content-Type: application/json' -i 'https://127.0.0.1:8000/login'
```
**before:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: text/html; charset=UTF-8 # <- inaccurate
...
{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Most of the 3rd-party bundles that I know (`api-platform/core`, `FOSRestBundle`) need a dedicated listener to achieve it right.
**after:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: application/json
...
{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Of course, this applies to all kind of responses, as long as the `Content-Type` is not explicitly provided. So, as a last chance, the `Accept` heading of the request is also taken into account to detect the preferred format:
```bash
$ curl -H 'Accept: application/json' -i 'https://127.0.0.1:8000/userinfo'
HTTP/2 404
cache-control: no-cache, private
content-type: application/json
...
{"title":"Not Found","status":404,"detail":"No route found for \"GET \/userinfo\""}
```
They could be other places in the code where this new method could also be useful, please advise :)
WDYT?
Commits
-------
1952928471 Improving the request/response format autodetection
This PR was merged into the 4.2 branch.
Discussion
----------
[Lock] Stores must implement `putOffExpiration`
| 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 | /
Following https://github.com/symfony/symfony/pull/32198#pullrequestreview-256165051 every stores MUST implement the method `putOffExpiration` either by ignoring the arguments (by design they lock forever) or using a mechanism to define the expiration.
It was a mistake to add the dockblock `@throws NotSupportedException` tell me if it's a BC break, I'll create a dedicated PR for it.
Commits
-------
c986c86d1c [Lock] Stores must implement `putOffExpiration`
This PR was merged into the 4.3 branch.
Discussion
----------
[Mime] Remove @internal annotations for the serialize methods
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes (it's not really a bug)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Currently, when we extend the `Symfony\Component\Mime\Message` and `Symfony\Component\Mime\MessageRaw` classes of the Mime component, we get 2 deprecation messages:
```
The "Symfony\Component\Mime\Message::__serialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```
and
```
The "Symfony\Component\Mime\Message::__unserialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```
However, we need to add properties to the new class, and so, we need to extend `__serialize()` and `__unserialize()` methods in the same way as `Symfony\Bridge\Twig\Mime\TemplatedEmail`, to know, retrieve the serialization of the parent class:
```php
public function __serialize(): array
{
return [$this->foo, $this->bar, $this->baz, parent::__serialize()];
}
public function __unserialize(array $data): void
{
[$this->foo, $this->bar, $this->baz, $parentData] = $data;
parent::__unserialize($parentData);
}
```
But given that the third-party components use another namespace, we get the 2 deprecation messages, while the 2 methods must be inevitably used and extended. Of course, the methods `serialize()` and `unserialize()` are always marked by the `@internal` annotation and the `final` keyword.
This PR so deletes the 2 deprecation messages that should not be displayed.
Commits
-------
8544a35e52 Remove @internal annotations for the serilize methods
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Added more test for MessageBus
| 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 |
[This code](bed50fd542/src/Symfony/Component/Messenger/MessageBus.php (L33-L49)) is quite hard to understand. So It must be covered by tests.
More over, it will help people to understand how it works
Commits
-------
5f4ab23991 [Messenger] Added more test for MessageBus
This PR was merged into the 4.4 branch.
Discussion
----------
[Messager] Simplified MessageBus::__construct()
| 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 |
The third path deals with generator (or other king of iterator that are
not an IteratorAggregate). It means, very few cases in practice
The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.
The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.
Commits
-------
6b5671f5ae [Messager] Simplified MessageBus::__construct()
The third path deals with generator (or other king of iterator that are
not an IteratorAggregate). It means, very few cases in practice
The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.
The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] add static cache to ContextFactory
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no (performance...)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32073, https://github.com/api-platform/api-platform/issues/1159
| License | MIT
| Doc PR | no
The issue is very very well described here #32073, and was also discussed a few weeks ago with @dunglas here https://github.com/api-platform/api-platform/issues/1159.
`ContextFactory::createFromReflector` is heavy, and it's called redundanlty
by `Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor` for each property
and methods. Avoid that by parsing it only once and then use static cache
This is a quite big performance problem.
![Deepin Capture-écran_zone de sélection _20190626142041](https://user-images.githubusercontent.com/84887/60179692-8471c480-981e-11e9-9e3c-3f9c0b83b01b.png)
Commits
-------
063e880861 [PropertyInfo] add static cache to ContextFactory
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Add support for NTLM authentication
| 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 | -
Someone mentioned NTLM auth on Twitter, so here we are, this adds support for it.
Requires curl.
Commits
-------
548f4fd0ea [HttpClient] Add support for NTLM authentication
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix authentication for redis transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32304
| License | MIT
| Doc PR | symfony/symfony-docs#... TODO
This will implement support for password in redis stream transport.
Commits
-------
bedae5dde9 Fix authentication for redis transport
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Annotated correct return type for getInEdges()/getOutEdges()
| 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 changed annotation was quite helpful when analyzing `PhpDumper` for #32266.
Commits
-------
28882f52cb Annotated correct return type for getInEdges()/getOutEdges().
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Add a Length::$allowEmptyString option to reject empty strings
| 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? | 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 | Todo (change the warning on top of https://symfony.com/doc/current/reference/constraints/Length.html)
which defaults to `true` in 4.4 but will trigger a deprecation if not set explicitly
in order to make the default `false` in 5.0.
While it could be solved now thanks to #29641 by using both `@Length(min=1)` & `@NotBlank(allowNull=true)` constraints,
as expressed in https://github.com/symfony/symfony/issues/27876#issuecomment-403307783 and following comments, the `@Length(min=1)` behavior doesn't match our expectations when reading it: it feels logical to invalidate empty strings, but it actually doesn't.
Hence the proposal of making the behavior of rejecting empty strings the default in 5.0.
In my opinion, the flag could even be removed later.
Commits
-------
e113e7f812 [Validator] Add a Length::$allowEmptyString option to reject empty strings
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel][DX] Improve the error message when not defining the controller as a service but using construct parameters
| 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 | 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.
-->
I'm working with newcomers to the symfony framework ATM and one of them has got stuck in this errors trying to understand why the constructor argument declared as a a service would not work and didn't check if the controller was declared as a service itself.
I feel like this could be improve to be really specific since "such" is not that specific ;).
Commits
-------
c670d5120e [HttpKernel][DX] Improve the error message when not defining the controller as a service but using contruct parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[Filesystem] deprecate calling isAbsolutePath with a 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? | 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
This PR is a result of #32247 and deprecates calling `Filesystem::isAbsolutePath()` with a `null` value.
Commits
-------
93190182f6 [Filesystem] depreacte calling isAbsolutePath with a null
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Document the new exceptions thrown by the code
| 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 | not needed
While deciding if we should document #31547 I saw that the new exceptions weren't documented in the code. I don't know if this is the place where this should be added.
Commits
-------
0d27af93ea [Ldap] Document the new exceptions thrown by the code
This PR was merged into the 4.2 branch.
Discussion
----------
[DependencyInjection] Removed unused field
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
A minor issue I discovered while analyzing the DI component for #32238: `AnalyzeServiceReferencesPass` defines a private field `$expressionLanguage` that is not used.
Commits
-------
58651409b4 Removed unused field.
This PR was squashed before being merged into the 4.4 branch (closes#32317).
Discussion
----------
[Mime] Updated some PHPDoc contents
| 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 | not needed
While documenting #30981 I found some PHPDoc info not clear enough. This "improves" it, but if you don't like it, it's OK to close this. Thanks.
Commits
-------
9432f1f970 [Mime] Updated some PHPDoc contents
This PR was squashed before being merged into the 4.4 branch (closes#32269).
Discussion
----------
[PropertyAccess] Adds entries to CHANGELOG and UPGRADE
| 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
In PR #32241 I missed to add entries to the CHANGELOG and UPGRADE file.
Commits
-------
c4afbf376f [PropertyAccess] Adds entries to CHANGELOG and UPGRADE
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Drop support for ApacheRequest
| 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 |
`ApacheUrlMatcher` has been [deprecated in 2.7](https://github.com/symfony/symfony/pull/12728) and removed in 3.0
I think we forgot to remove this class too.
This class in never used in symfony, and there are no more reference in
the documentation.
Commits
-------
f82e28c533 [HttpFoundation] Deprecated ApacheRequest
This PR was squashed before being merged into the 4.4 branch (closes#31825).
Discussion
----------
[Messenger] Added support for auto trimming of redis 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 | will submit if concept is okay
Right now the Redis stream will just grow indefinitely. However, there are means to have it delete old entries from time to time.
Note: I could not use the `XADD mystream MAXLEN ~ 1000 *` notation because the PHP redis extension does not support the `MAXLEN` option afaics so I went for the extra `XTRIM` command.
I explicitly enabled the approximate flag because it makes absolutely no sense to hardcode the limit for us although we could even have this configurable too (but I don't think we should).
The whole idea of this PR is to enable occasional trimming of the stream so it doesn't grow forever, so when you configure something like `20000` it may well happen that trimming only happens at `25000` depending on your settings.
Ping @soyuka @alexander-schranz @chalasr :)
Commits
-------
7fe06bc5f6 [Messenger] Added support for auto trimming of redis streams
This PR was merged into the 5.0-dev branch.
Discussion
----------
[CSRF] add more parameter types
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #32179
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Those have been missing in #32208
Commits
-------
d442028063 [CSRF] add more parameter types
* 4.4:
[PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
[Lock] add an InvalidTTLException to be more accurate
[Workflow] Deprecated DefinitionBuilder::setInitialPlace()
[Debug] Fix CHANGELOG after ErrorCatcher renaming
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Ldap] [5.0] add type-hint to interface and implementation
| Q | A
| ------------- | ---
| Branch? | 5.0
| 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 | Contribute to #32179 <!-- #-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 the type-hint to the Ldap interfaces and implementation
Commits
-------
03f2e90b70 [Ldap] [5.0] add type-hint to interface and implementation
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] add parameter type hints to the Validator component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR |
Commits
-------
df3a5cbd11 add parameter type hints to the Validator component
This PR was merged into the 5.0-dev branch.
Discussion
----------
[DependencyInjection] Added type-hints on compiler passes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
First part of type-hints for the DependencyInjection component. I've started with the compiler passes and since there's quite a lot of them, I've decided to split them off.
Commits
-------
d5bc28ad20 [DependencyInjection] Added type-hints on compiler passes.
This PR was squashed before being merged into the 5.0-dev branch (closes#32201).
Discussion
----------
[Config] Add type-hints to public interfaces and classes
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to all public interfaces of the Config component.
Commits
-------
e069dc4eda [Config] Add type-hints to public interfaces and classes
This PR was merged into the 5.0-dev branch.
Discussion
----------
[OptionResolver] Add type-hints to OptionResolver class
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to the `OptionResolver` class.
Commits
-------
b26b37dffc [OptionResolver] Add type-hints to OptionResolver class
This PR was merged into the 5.0-dev branch.
Discussion
----------
[PropertyInfo] Add type-hints to public interfaces and classes
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to public interfaces and classes of the PropertyInfo component. Some docblocks without valuable information got also removed.
Commits
-------
fe3b165354 [PropertyInfo] Add type-hints to public interfaces and classes
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Asset] Add type-hints to public interfaces and classes
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to all public interfaces of the Asset component.
Commits
-------
065fdc146c [Asset] Add type-hints to public interfaces
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] [5.0] Add type-hints to serializer interface
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #32179 <!-- #-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.
-->
This PR adds type-hints to the serializer component ;).
Commits
-------
68b588cf45 [Serializer] [5.0] Add type-hints to serializer interface
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] add an InvalidTTLException to be more accurate
| 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 | 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.
-->
This adds a new exception to be more precise when using wrong ttl.
Commits
-------
37509192d8 [Lock] add an InvalidTTLException to be more accurate
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Debug] Remove all deprecated classes that were moved to the ErrorCatcher component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
https://github.com/symfony/symfony/pull/31694#discussion_r298601576
Commits
-------
8ce3a89ac2 [Debug] Remove all deprecated classes that were moved to the ErrorCatcher component
This PR was squashed before being merged into the 4.4 branch (closes#32241).
Discussion
----------
[PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache 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<!-- required for new features -->
This PR is related to https://github.com/symfony/symfony/pull/32234#discussion_r298415012
Commits
-------
9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
* 4.4:
fix merge
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test case
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
fix Debug component dependencies
[Cache] work aroung PHP memory leak
[Finder] docblock fixes
pass error code as a string
[travis] not all components have a master branch
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
Catch JsonException and rethrow in JsonEncode
* 4.3:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test case
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Cache] work aroung PHP memory leak
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
* 4.2:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Cache] work aroung PHP memory leak
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.3 branch.
Discussion
----------
[Validator] remove invalid test case
| 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 |
Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.
Commits
-------
9000c1eab4 remove invalid test case
* 3.4:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] work aroung PHP memory leak
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32220
| License | MIT
| Doc PR | -
Works around https://bugs.php.net/76982, as identified by @goetas in the linked issue.
Commits
-------
5d55b91fae [Cache] work aroung PHP memory leak
This PR was squashed before being merged into the 3.4 branch (closes#32215).
Discussion
----------
[HttpFoundation] Throw exception when the "session" extension is not loaded
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31305
| License | MIT
Should I target `3.4` or `master` instead? This change does not alter behavior, but makes the failure more clear.
Commits
-------
b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] remove invalid test cases
| 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 |
Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.
Commits
-------
d1261e78a4 remove invalid test cases
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] pass error code as a string
| 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
-------
901fe0d7c5 pass error code as a string
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
It can return an array of objects
| 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
-------
379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
ContextFactory::createFromReflector is heavy, and it's called redundanlty
by Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor for each property
and methods. Avoid that by parsing it only once and then use static cache
* 4.3:
fix Debug component dependencies
[travis] not all components have a master branch
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
This PR was merged into the 3.4 branch.
Discussion
----------
Catch JsonException and rethrow in JsonEncode
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License | MIT
| Doc PR | not applicable
PR #31860 provided handling of PHP 7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.
PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.
IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`
Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`
Commits
-------
9c76790ee8 Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
| 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 | N/A
| License | MIT
| Doc PR | N/A
As the deprecated `Symfony\Component\HttpKernel\Client` does not extend `Symfony\Component\HttpKernel\HttpKernelBrowser`, it has not retained the correct PHPDoc from before.
The order of inheritance was changed in https://github.com/symfony/symfony/pull/31881, but the PHPDoc was never restored.
Commits
-------
332135186a [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
* 4.4:
[Mailer] fixed tests on Windows
[PhpUnitBridge] fix tests
[Mailer] fixed error message when connecting to a stream raises an error before connect()
[Mailer] fixed timeout type hint
improve error messages in the event dispatcher
[Security/Core] work around sodium_compat issue
bumped Symfony version to 4.3.3
updated VERSION for 4.3.2
updated CHANGELOG for 4.3.2
bumped Symfony version to 4.2.11
updated VERSION for 4.2.10
updated CHANGELOG for 4.2.10
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
Fixed type annotation.
* 4.3:
[Mailer] fixed tests on Windows
[PhpUnitBridge] fix tests
[Mailer] fixed error message when connecting to a stream raises an error before connect()
[Mailer] fixed timeout type hint
improve error messages in the event dispatcher
[Security/Core] work around sodium_compat issue
bumped Symfony version to 4.3.3
updated VERSION for 4.3.2
updated CHANGELOG for 4.3.2
bumped Symfony version to 4.2.11
updated VERSION for 4.2.10
updated CHANGELOG for 4.2.10
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
Fixed type annotation.
This PR was merged into the 4.4 branch.
Discussion
----------
Add ErrorHandler component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | #25905, #26448
| License | MIT
| Doc PR | TODO
Mainly for API-based apps that don't require TwigBundle to get the correct exception response according to the request format (aka `_format` attribute).
![exception_response](https://user-images.githubusercontent.com/2028198/55509651-713dc700-562a-11e9-8b98-bef3b0229397.gif)
✔️ [RFC7807](https://tools.ietf.org/html/rfc7807) compliant for JSON and XML formats.
---
This introduce a new `ErrorRenderer` service that render a `FlattenException` into a given format:
```php
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\JsonErrorRenderer;
$renderers = [
new HtmlErrorRenderer(),
new JsonErrorRenderer(),
// ...
];
$errorRenderer = new ErrorRenderer($renderers);
return new Response(
$errorRenderer->render($exception, $request->getRequestFormat()),
$exception->getStatusCode(),
$exception->getHeaders()
);
```
The built-in error renderers are:
| Format | Class |
| --- | --- |
| html | HtmlErrorRenderer |
| json | JsonErrorRenderer |
| xml, atom | XmlErrorRenderer |
| txt | TxtErrorRenderer |
And you can add your own error renderer by implementing the `ErrorRendererInterface` and tagging it with `error_handler.renderer` in your service definition.
Creating your own error renderer for a built-in format will end up replacing the related built-in error renderer.
Demo: https://github.com/yceruto/error-handler-app ([add custom error renderer](06fc647841))
Commits
-------
7057244890 Added ErrorHandler component
* 4.2:
[Security/Core] work around sodium_compat issue
bumped Symfony version to 4.2.11
updated VERSION for 4.2.10
updated CHANGELOG for 4.2.10
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
* 3.4:
[Security/Core] work around sodium_compat issue
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
* 4.4: (43 commits)
[PhpunitBridge] Read environment variable from superglobals
[Bridge/PhpUnit] Fix PHP5.5 compat
[PhpUnitBridge] More accurate grouping
fixed CS
[Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder
Extract unrecoverable exception to interface
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] require libsodium >= 1.0.14
[Workflow] re-add workflow.definition tag to workflow services
[Security/Core] Don't use ParagonIE_Sodium_Compat
revert #30525 due to performance penalty
collect called listeners information only once
[Lock] fix missing inherit docs in RedisStore
[Messenger] fix retrying handlers using DoctrineTransactionMiddleware
[Mailgun Mailer] fixed issue when using html body
[Messenger] make all stamps final and mark stamp not meant to be sent
[HttpClient] fix timing measurements with NativeHttpClient
add return type declaration
use proper return types in ErrorHandler and ArgumentResolver
...
* 4.3: (34 commits)
[PhpunitBridge] Read environment variable from superglobals
[Bridge/PhpUnit] Fix PHP5.5 compat
[PhpUnitBridge] More accurate grouping
fixed CS
Extract unrecoverable exception to interface
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] require libsodium >= 1.0.14
[Workflow] re-add workflow.definition tag to workflow services
[Security/Core] Don't use ParagonIE_Sodium_Compat
revert #30525 due to performance penalty
collect called listeners information only once
[Lock] fix missing inherit docs in RedisStore
[Messenger] fix retrying handlers using DoctrineTransactionMiddleware
[Mailgun Mailer] fixed issue when using html body
[HttpClient] fix timing measurements with NativeHttpClient
[HttpClient] fix dealing with 1xx informational responses
add test to avoid regressions
fix mirroring directory into parent directory
fix typos
...
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailgun Mailer] fixed issue when using html body
| 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 |
I tested the `symfony/mailgun-mailer` and get an issue when using the `api` scheme with a templated email cause we try to manipulate a stream whereas the `Symfony\Component\Mime\Email::getHtmlBody()` could return also a string (in my case it is one).
The issue :
```
stream_get_meta_data() expects parameter 1 to be resource, string given
```
Commits
-------
afbefe131b [Mailgun Mailer] fixed issue when using html body
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Doctrine Connection find and findAll now correctly decode headers
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31916
| License | MIT
| Doc PR | N/A
The Doctrine transport `Connection` class methods `find` and `findAll` did not JSON-decode the headers of the envelope after retrieving it from Doctrine. The `get` method, however, did this correctly.
I added two tests to verify the results of `find` and `findAll` and then added the JSON-decoding to the `Connection` class. I moved the JSON-decoding to a separate method to avoid duplicate code.
Commits
-------
3aec2acce5 [Messenger] Doctrine Connection find and findAll now correctly decode headers
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Allow writing portable "prepared" command lines
| 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 | #23778 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11802 <!-- required for new features -->
Hey here, it's me, again !
I've talked with @nicolas-grekas and he gave me a new way of writing this feature that will not be a problem for people using things like {{ toto }} since we are using the linux style of using envvar, the replaced arguments is only replaced when using windows.
This should not break anything and work as expected!
see https://github.com/symfony/symfony/pull/24763
This makes `"$FOO"` work seamlessly on Linux and on Windows to reference an env var (that can be provided when calling e.g. the "run" method)
Commits
-------
3f8354f58f [Process] Allow writing portable "prepared" command lines
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix dealing with 1xx informational responses
| 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 | -
I never had a look at 1xx status codes until today.
This PR fixes reading them when using curl.
If one wonders:
- `NativeHttpClient` uses `fopen()`, which skips informational parts as allowed by the HTTP spec and doesn't give any way to access their response headers.
- `CurlHttpClient` allows reading informational responses using the progress callback or via the getInfo() method. That's the way if you need to implement e.g. HTTP 103 early hints.
Commits
-------
412411d795 [HttpClient] fix dealing with 1xx informational responses
This PR was merged into the 4.4 branch.
Discussion
----------
use proper return types in ErrorHandler and ArgumentResolver
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | tiny
| 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 those things while reviewing #31996 which missed some return types due to using `return` instead of `return null`.
It's part of fixing #17201 (due to #10717). See also #30869 that somebody was stumbling over.
Commits
-------
2f9121b74d use proper return types in ErrorHandler and ArgumentResolver
This PR was merged into the 5.0-dev branch.
Discussion
----------
Make Symfony\Component\Debug\ExceptionHandler::setFileLinkFormat accept Null as a return type
fixes#32150
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #32150 <!-- #-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.
-->
Make `Symfony\Component\Debug\ExceptionHandler::setFileLinkFormat` accept null as a return type.
Since Symfony requires PHP 7.2+ and that PHP feature was introduced in 7.1, I use that feature instead of changing the default value of the variable.
Commits
-------
e6cb7d866a Remove return type from ExceptionHandler::setFileLinkFormat
This PR was merged into the 4.2 branch.
Discussion
----------
[Lock] fix missing inherit docs in RedisStore
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | <!-- 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 is a missing inheritdoc in the RedisStore for the waitAndSave method.
Commits
-------
71eb8cfe99 [Lock] fix missing inherit docs in RedisStore
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Routing] Add type-hints to all public interfaces
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR adds type-hints to all interfaces of the Routing component to give them a more php7-like feeling. Adding these type-hints on master should not be a breaking change because we require php 7.2 there, which allows downstream classes/interfaces to remove a type-hint from a method signature.
Notes:
* There is also an implementation of `RedirectableUrlMatcherInterface` in the Framework Bundle. I did not upgrade its interface in order to keep the bundle compatible with Routing 4.4.
* We could apply similar changes to the `Route`, `RouteCollection` etc. in a follow-up PR. This PR only concentrated on the interfaces and their implementations.
Commits
-------
457b3227f7 [Routing] Add type-hints to all public interfaces.
This PR was merged into the 5.0-dev branch.
Discussion
----------
[EventDispatcher] Add type-hints to EventDispatcherInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
This PR adds type-hints to `EventDispatcherInterface` to give it a more php7-like feeling. Adding these type-hints on master should not be a breaking change because we require php 7.2 there, which allows downstream classes/interfaces to remove a type-hint from a method signature.
Commits
-------
2bc94721b1 [EventDispatcher] Add type-hints to EventDispatcherInterface.
* 4.2:
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] Don't use ParagonIE_Sodium_Compat
collect called listeners information only once
add test to avoid regressions
fix typos
Turkish translation added to Form Component
* 3.4:
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] Don't use ParagonIE_Sodium_Compat
collect called listeners information only once
add test to avoid regressions
fix typos
Turkish translation added to Form Component
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] collect called listeners information only once
| 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
-------
2ad32df6e0 collect called listeners information only once
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] make all stamps final and mark stamp not meant to be sent
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| 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 |
Some newer stamps were already final. This makes all of them final. Also marks all stamps that are not meant to be sent using the new `NonSendableStampInterface`. This makes it easier to see which stamps are actually important and required to persist in a queue for certain functionality, like the `BusNameStamp` for the `RoutableMessageBus`
Commits
-------
013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] No need for retry to require SentStamp
| 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 |
Fixes 2) in #32049
@weaverryan the SentStamp in the worker seems totally irrelevant. You always want to send messages back to the transport where they came from for retry. The only relevance I can potentially see is for the SyncTransport. Messages received async from worker might be routed to the SyncTransport. Using the SentStamp would redeliver the messages into the SyncTransport instead of the async. But that doesn't seem to have any use-case. I'm running the worker which handles the messages immediately. So basically there is no difference if they go to the Sync or Async transport from within the worker.
Commits
-------
0034dee641 [Messenger] make retry logic work without SentStamp
This PR was merged into the 5.0-dev branch.
Discussion
----------
[5.0] Add return types in final classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #31981
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This is the first step for the issue #31981
I have some questions:
- ~I have not added type for methods with `@inheritdoc` annotation, should I?~
- ~Don't we want to type also functions without `@return` annotation? (still in `final` classes)~
- ~If yes is the answer of the previous one, do we also want the `void` return type?~
- ~I have also added the return type in the `DependencyInjection` PhpDumper, but is it also wanted? (if yes, I will clean a bit the code changed)~
- ~Should we update the documentation's code samples when they display `final` classes?~
Todo:
- [x] Adjust the PR, following the answers of the questions
- [x] Add return type also when there is no `@return`, or with `@inheritdoc`
- [x] [src/Symfony/Component/Debug/ErrorHandler.php#L383](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L383) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] [src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50) `@return` annotation is not correct according to the return, investigate and adjust if needed
- [x] Do a PR on documentation to add return type on code snippets with final classes => unneeded as they were already typed
Commits
-------
ca5ae1989e Replace @return annotation by return type in final classes
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Catch missing scheme in DSN
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
The `Symfony\Component\Mailer\Transport::createTransport()` method parses and validates a passed DSN. I noticed that we never check if the DSN contains a valid scheme, but we always assume that the scheme is present in then parse result. If someone passes a DSN without a scheme to that method, they would almost certainly run into a PHP notice.
This PR makes sure that a scheme is present in the URL and throws a proper exception otherwise.
Commits
-------
3eba36c088 [Mailer] Catch missing scheme in DSN.
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fixing passing debug info to progress callback
| 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 | -
NativeHttpClient already has it.
Commits
-------
dc55cf826a [HttpClient] fixing passing debug info to progress callback
This PR was merged into the 3.4 branch.
Discussion
----------
[Filesystem] add test to avoid regressions
| 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 |
Commits
-------
0d7d1f81bc add test to avoid regressions
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32009
| License | MIT
| Doc PR |
This will fix#32009.
Thank you @brpauwels for the report.
I consider it safe to remove the `DispatchAfterCurrentBusStamp` because its meaning disappear after we handled the "current bus".
T0: We add the stamp
T1: We put the envelope on an internal queue in `DispatchAfterCurrentBusMiddleware`
T2: We handle the current bus.
T3: We start processing our internal queue.
At T3 there we are "after current bus", that is why we dont need the stamp any more.
Commits
-------
91f1680b3f [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add users extraFields in ldap component
| 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? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo when validated, before merge <!-- required for new features -->
As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.
Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.
Commits
-------
bcfff04797 [Ldap] Add users extra_fields in ldap component
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add exception for mapping ldap errors
| 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 | #28677 <!-- #-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 the master branch.
-->
Maybe we could add more exception code since the list has a lot of errors, maybe we could add a class that maps the error to the right exeptions. see https://www.php.net/manual/en/function.ldap-errno.php
Commits
-------
1b29cb1a5f [Ldap] Add exception for mapping ldap errors
* 4.4:
fix order of items in upgrade file
fix translation domain
tag the FileType service as a form type
don't validate IP addresses from env var placeholders
[Validator] Fix GroupSequenceProvider annotation
[Messenger] fix delay exchange recreation after disconnect
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
* 4.3:
fix translation domain
tag the FileType service as a form type
don't validate IP addresses from env var placeholders
[Validator] Fix GroupSequenceProvider annotation
[Messenger] fix delay exchange recreation after disconnect
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
* 4.2:
fix translation domain
tag the FileType service as a form type
[Validator] Fix GroupSequenceProvider annotation
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
* 3.4:
fix translation domain
tag the FileType service as a form type
[Validator] Fix GroupSequenceProvider annotation
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
This PR was squashed before being merged into the 3.4 branch (closes#32044).
Discussion
----------
[Validator] Fix GroupSequenceProvider annotation
| 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 |
The possibility was added in https://github.com/symfony/symfony/pull/19982, just forgot to fix this annotation back then.
Commits
-------
bf6d2532de [Validator] Fix GroupSequenceProvider annotation
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Fix AuthenticationException::getToken typehint
| 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 | symfony/symfony-docs#... <!-- required for new features -->
The token may be not set when throwing AuthenticationException.
<!--
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
-------
a9705a0143 Fix AuthenticationException::getToken typehint
This PR was merged into the 4.4 branch.
Discussion
----------
Add BC layer for updated constructor types
| 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 | -
Reverts some CS changes done in #32066 + replaces its BC breaks by a BC layer.
Our CI is too good, it bites us hard when we break our own rules :)
Commits
-------
c34fcd91d1 Add BC layer for updated constructor types
This PR was merged into the 4.3 branch.
Discussion
----------
[Lock] Fix expired lock not cleaned in ZooKeeper
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | ,p
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31426
| License | MIT
| Doc PR | NA
Following #32071 for 4.3 branch
context:
When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.
Issue is, that the lock is not removed which avoid other process to acquire that lock.
This PR clean state of store when a LockExpiredException is triggered in PDO and ZooKeepeer.
Commits
-------
4f808ef4f4 Fix Expiring lock in PDO and ZooKeeper
* 4.4:
[Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
[Cache] fix versioning with SimpleCacheAdapter
[Messenger] fix AMQP delay queue to be per exchange
Fix expired lock not cleaned
Fine tune constructor types
[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
[HttpFoundation] Fix SA/phpdoc JsonResponse
[DI] Show the right class autowired when providing a non-existing class in constructor
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
[Messenger] improve logs
[Messenger] fix delay delivery for non-fanout exchanges
Parameterize Mailgun's region
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
Add statement to fileLink to ignore href code when no fileLink.
[Routing] fix absolute url generation when scheme is not known
* 4.3:
[Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
[Cache] fix versioning with SimpleCacheAdapter
[Messenger] fix AMQP delay queue to be per exchange
Fix expired lock not cleaned
[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
[HttpFoundation] Fix SA/phpdoc JsonResponse
[DI] Show the right class autowired when providing a non-existing class in constructor
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
[Messenger] improve logs
[Messenger] fix delay delivery for non-fanout exchanges
Parameterize Mailgun's region
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
Add statement to fileLink to ignore href code when no fileLink.
[Routing] fix absolute url generation when scheme is not known
* 4.2:
[Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
[Cache] fix versioning with SimpleCacheAdapter
Fix expired lock not cleaned
[HttpFoundation] Fix SA/phpdoc JsonResponse
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[Routing] fix absolute url generation when scheme is not known
* 3.4:
Fix expired lock not cleaned
[HttpFoundation] Fix SA/phpdoc JsonResponse
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[Routing] fix absolute url generation when scheme is not known
This PR was squashed before being merged into the 4.3 branch (closes#32052).
Discussion
----------
[Messenger] fix AMQP delay queue to be per exchange
| 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 | #32050
| License | MIT
| Doc PR |
this makes the delay/retry work when having several exchanges or renaming your exchange.
also the delay setup did not declare the target exchange. so if you only do delayed messages for a connection, auto-setup forgot to actually create the target exchange.
Commits
-------
5bc3364167 [Messenger] fix AMQP delay queue to be per exchange
This PR was merged into the 4.4 branch.
Discussion
----------
Fine tune constructor types
| 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 | symfony/symfony-docs#... <!-- required for new features -->
Fine tunes some constructor types that have been added in #24722
Form names as integer was only a workaround as forms names are used as array keys which get transformed to int. So it was added as a workaround in https://github.com/symfony/symfony/pull/6355#discussion_r2422205
With typehints added in #24722 those were mostly auto-cast anyway, e.g. in FormBuilder. There are only a few integer form names remaining documented, in the main entry points of the Form component (`\Symfony\Component\Form\FormInterface::add`). Internally it's always a string now. So I could remove some int docs which also fixes#30032 what @xabbuh tried to do.
Some of these changes we're just not done before because of broken tests. It's mainly a missing explicit mock for `TranslationInterface::trans` which returned null. If we had return types hints in interfaces, this wouldn't happen.
Commits
-------
507794a575 Fine tune constructor types
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31913
| License | MIT
| Doc PR | -
As spotted in the linked issue, we are missing this type of exception. It's a bug at the contracts level.
Commits
-------
3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
This PR was merged into the 4.4 branch.
Discussion
----------
Prepare for PHP 7.4 preload
| 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 | -
PHP 7.4 preloading is not compatible with declaring the same class twice in if/else blocks.
Let's split the ones we have in several files.
Commits
-------
7cf3fb4a21 Prepare for PHP 7.4 preload
This PR was merged into the 4.3 branch.
Discussion
----------
[DI] Show the right class autowired when providing a non-existing class
| 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 | #31997 <!-- #-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.
-->
This gets the last current id before the error and pass it to the callback in order to get the right error message.
Commits
-------
fbda90af6e [DI] Show the right class autowired when providing a non-existing class in constructor
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] fix delay delivery for non-fanout exchanges
| 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 | symfony/symfony-docs#... <!-- required for new features -->
Fixes two bugs and outdated phpdoc:
1. When your exchange is not of type fanout, but direct for example, then delivery of delayed (retrying) messages does not work. This is because the delay logics adds a routing key to message. It was fixed if you have a custom routing key in #31355. But if you have no routing key, it still changed the routing key which means the message will not be delivery from your direct exchange to your queue anymore after being in the delay exchange. For fanout, which is the default, it does not matter because the routing key is ignored.
2. also fix dsn parsing of plain `amqp://` which is a valid URI that parse_url cannot handle when you want to pass all parameters as options
Commits
-------
0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
This PR was squashed before being merged into the 3.4 branch (closes#32025).
Discussion
----------
SimpleCacheAdapter fails to cache any item if a namespace is used
| Q | A
| ------------- | ---
| Branch? |3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This is a backport of #32019
The SimpleCacheAdapter extends AdapterTestCase.
When adding a namespace, the AdapterTestCase adds ":" after the namespace:
https://github.com/symfony/symfony/blob/v4.3.1/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L37
The namespace is prepended to the cache key.
But in PSR-16, the ":" is a forbidden character.
As a result, the cache key is invalid and cache is not persisted. If you use Psr16Adapter + a namespace, the cache simply does not work.
As per @nicolas-grekas advices, a NS_SEPARATOR const is added to change the namespace separator for the `SimpleCacheAdapter` to "_" (that is compatible with PSR-16).
The first commit of this PR starts with an additional test and no fix (to showcase the problem).
Commits
-------
ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
| 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 | -
On Windows, curl has no cabundle configured by default.
Commits
-------
a2960a3318 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
This PR was squashed before being merged into the 4.4 branch (closes#31287).
Discussion
----------
[Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- 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 | #27534 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | tbd.
### Description
This PR introduces a new `find(string $nodePath)`method in the `ArrayNodeDefinition` class, which helps you finding the right node to prepend configuration to ease configuration tree manipulation.
### How to use it
```php
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
...
$rootNode
->children()
->arrayNode('social_media_channels')
->children()
->booleanNode('enable')->end()
->arrayNode('twitter')->end()
->arrayNode('facebook')->end()
->arrayNode('instagram')->end()
->end()
->end()
->end()
;
$this->changeSocialMediaChannelConfiguration($rootNode->find('social_media_channels.enable'));
$this->addTwitterConfiguration($rootNode->find('social_media_channels.twitter'));
$this->addFacebookConfiguration($rootNode->find('social_media_channels.facebook'));
$this->addInstagramConfiguration($rootNode->find('social_media_channels.instagram'));
return $treeBuilder;
}
private function changeSocialMediaChannelConfiguration(NodeDefinition $node)
{
$node
->defaultTrue()
;
}
private function addTwitterConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
private function addFacebookConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
private function addInstagramConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
}
```
Commits
-------
e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
This PR was squashed before being merged into the 3.4 branch (closes#32007).
Discussion
----------
[Serializer] Handle true and false appropriately in CSV encoder
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27642
| License | MIT
| Doc PR | -
Previously, if `true` was passed in as a value to the CSV encoder then `fputcsv()` would correctly treat it as 1. However, if `false` was passed in, it would be treated as a blank value. `null` would also be treated as a blank value.
This fix makes it consistent so that true and false will map to 1 and 0, while null maps to an empty string.
Commits
-------
89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder
This PR was squashed before being merged into the 4.4 branch (closes#31959).
Discussion
----------
[DomCrawler][Feature][DX] Add Form::getName() method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | symfony/symfony-docs#11705
The PR adds `Symfony\Component\DomCrawler\Form::getName` method.
The method is actually a syntax sugar but can improve DX when dealing with tests. For example, in the snippet
```php
$client = static::createClient();
$crawler = $client->request('GET', '/post/hello-world');
$form = $crawler->selectButton('submit')->form();
$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';
```
the prefix in field name (`my_form`) is form name, which is generated by Symfony automatically. The method, added in the PR helps to get that name in a most obvious way.
Commits
-------
ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] improve logs
| 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 |
| License | MIT
| Doc PR |
The logs are currently very confusing and duplicated:
- When handled sync the uncaught error it logged and displayed by the console / http error handler anyway. Currently it the warning is duplicated and useless:
```
14:26:11 WARNING [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
14:26:11 ERROR [console] Error thrown while running command "{class}". Message: "OUCH, THAT HURTS! GO TO MOM!"
In HandleMessageMiddleware.php line 82:
[Symfony\Component\Messenger\Exception\HandlerFailedException]
OUCH, THAT HURTS! GO TO MOM!
```
- When handling async is was even confusing because the actual error was logged as warning and the retry (which is a good thing) was the error.
```
13:48:15 WARNING [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
13:48:15 ERROR [messenger] Retrying {class} - retry #1.
```
Now it's must clearer and adds even context like the delay:
```
16:20:11 ERROR [messenger] Error thrown while handling message {class}. Dispatching for retry #3 using 4000 ms delay. Error: "OUCH, THAT HURTS! GO TO MOM!"
...
16:20:15 CRITICAL [messenger] Error thrown while handling message {class}. Removing from transport after 3 retries. Error: "OUCH, THAT HURTS! GO TO MOM!"
```
Commits
-------
2ac7027b71 [Messenger] improve logs
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] fix absolute url generation when scheme is not known
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 | #25491
| License | MIT
| Doc PR |
This fixes two edge cases in the url generator:
1. when the context scheme is not known (empty) generating an absolute url would return an invalid url starting with `://host/path`. #25491 handled the case when the host is unknown which makes sense. but the way it was done, created this new problem.
2. non-http(s) urls do not require a host. e.g. typical `file:///path` urls. url generator is fixed to be in line with rfc3986
Commits
-------
8e04222976 [Routing] fix absolute url generation when scheme is not known
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] caster for HttpClient's response dumps all info
| 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 | -
No need to dump the internal structure for responses IMHO, here is a caster that dumps the info instead:
![image](https://user-images.githubusercontent.com/243674/59434490-efb5a280-8deb-11e9-8714-5f1ccbc208b1.png)
Commits
-------
2b268379f5 [VarDumper] caster for HttpClient's response dumps all info
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] fix dumping objects that implement __debugInfo()
| 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 | -
Right now it fails if the return value is not an array + it doesn't dump the original details from the object's internals.
Commits
-------
a9d0038ec0 [VarDumper] fix dumping objects that implement __debugInfo()
* 4.4:
fixed CS
fixed CS
fixed CS
fixed CS
Do not log or call the proxy function when the locale is the same
Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
[HttpClient] fix closing debug stream prematurely
[Mailer] made code more robust
Restore compatibility with php 5.5
fixed sender/recipients in SMTP Envelope
collect called listeners information only once
[HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2
[HttpKernel] Remove TestEventDispatcher.
* 4.3:
fixed CS
fixed CS
fixed CS
Do not log or call the proxy function when the locale is the same
Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
[HttpClient] fix closing debug stream prematurely
[Mailer] made code more robust
Restore compatibility with php 5.5
fixed sender/recipients in SMTP Envelope
collect called listeners information only once
[HttpKernel] Remove TestEventDispatcher.
This PR was squashed before being merged into the 4.3 branch (closes#32014).
Discussion
----------
Do not log or call the proxy function when the locale is the same
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I was the one creating the PR for logging the change of the locale but ATM I am filled with logs of translator about switching the locale from "en" to "en".. Not sure why.
Commits
-------
31bdfb372c Do not log or call the proxy function when the locale is the same
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix closing debug stream prematurely
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31985
| License | MIT
| Doc PR | -
@ElGecko76 can you please confirm this fixes the issue for you?
I'm not able to reproduce so I can't myself. Thanks.
Commits
-------
21857a1edb [HttpClient] fix closing debug stream prematurely
This PR was merged into the 4.3 branch.
Discussion
----------
Fix sender/recipients in SMTP Envelope
| 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 | #31986
| License | MIT
| Doc PR | n/a
<!--
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
-------
7a2f9bf134 fixed sender/recipients in SMTP Envelope
* 4.4:
add back possibility to use form themes without translations
[HttpClient] fix Psr18Client handling of non-200 response codes
[HttpClient] make Psr18Client implement relevant PSR-17 factories
[WebProfilerBundle] fix FC with HttpFoundation v5
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
Changed EventDispatcherInterface dependency from Component to Contracts
fix handling nested embeddables
[WebProfilerBundle] Select default theme based on user preferences
[FrameworkBundle] Allow dots in translation domains
Added FormInterface to @return Form::getClickedButton docblock
* 4.3:
add back possibility to use form themes without translations
[HttpClient] fix Psr18Client handling of non-200 response codes
[WebProfilerBundle] fix FC with HttpFoundation v5
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
fix handling nested embeddables
Added FormInterface to @return Form::getClickedButton docblock
* 4.2:
[WebProfilerBundle] fix FC with HttpFoundation v5
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
Added FormInterface to @return Form::getClickedButton docblock
* 3.4:
[WebProfilerBundle] fix FC with HttpFoundation v5
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
Added FormInterface to @return Form::getClickedButton docblock
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] make Psr18Client implement relevant PSR-17 factories
| 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 should help use the component with libs that consume only PSR-18.
Commits
-------
1c0baf689d [HttpClient] make Psr18Client implement relevant PSR-17 factories
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] test case is not legacy
| 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 | -
At least it's green.
/cc @xabbuh @HeahDude
Commits
-------
9ad324ba29 [Form] test case is not legacy
This PR was squashed before being merged into the 4.4 branch (closes#31321).
Discussion
----------
[DI] deprecates tag !tagged in favor of !tagged_iterator
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #31289
| License | MIT
| Doc PR | tbd.
### Todo
- [x] fix tests
Commits
-------
ab8fb1868f [DI] deprecates tag !tagged in favor of !tagged_iterator
This PR was merged into the 5.0-dev branch.
Discussion
----------
[DI] remove deprecated code paths
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
@ro0NL there is still one legacy test in ValidateEnvPlaceholdersPassTest, I'll let you remove it if you don't mind, please :)
Commits
-------
3ff69f09f1 [DI] remove deprecated code paths
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Add Button type back to Form::getClickedButton docblock
| 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 commit 56429a6f08 the `Button` type was removed from the return doc block.
I suspect this was an oversight because, AFAIK, the [recommended way](https://symfony.com/doc/current/form/multiple_buttons.html) to check the name of a clicked button would require a return type of `Button` or `SubmitButton`.
The effect is that our static analysis checks are failing.
```
Call to an undefined method
Symfony\Component\Form\ClickableInterface::getName().
```
Commits
-------
b71d589071 Added FormInterface to @return Form::getClickedButton docblock
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] Remove last deprecated/obsolete paths
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #28316, #28709, #31030, #27020, #29896, 16f8a13810 (r201060750) <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This should fix the last deprecations & obsolete code paths for the Serializer component.
Commits
-------
c703b355b8 [Serializer] Remove last deprecated/obsolete paths
This PR was merged into the 5.0-dev branch.
Discussion
----------
[HttpKernel] remove all deprecated event and replace their use
| Q | A
| ------------- | ---
| Branch? | master
| 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 |to check<!-- 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.
-->
Extract the whole event & listener part from https://github.com/symfony/symfony/pull/31672#issuecomment-499648703 to its own PR to ease the removal of deprecated code from HttpKernel.
Commits
-------
be5f641308 Fix annotations
48073ddcf9 [HttpKernel] remove all deprecated event and replace their use
* 4.4:
Fixing bug where PropertyInfoLoader tried to add validation to non-existent properties
[TwigBundle] fix tests
[travis] increase concurrency
[FrameworkBundle] fix FC with HttpKernel v5
* 4.4:
[Validator] relax low dep
[Validator] fix conflict rule
[Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional)
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
avoid service id conflicts with Swiftmailer
[Form] fix usage of legacy TranslatorInterface
[Serializer] Fix DataUriNormalizer docblock & composer suggest section
[Validator] v4 conflicts with translation v5
* 4.3:
[Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional)
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
avoid service id conflicts with Swiftmailer
[Form] fix usage of legacy TranslatorInterface
[Serializer] Fix DataUriNormalizer docblock & composer suggest section
This PR was merged into the 4.2 branch.
Discussion
----------
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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.
-->
This should be fixed in 4.2 because the deprecation has been introduced in 4.2 as said by @stof in https://github.com/symfony/symfony/pull/31932/files#r291600094
Commits
-------
caabd92f89 [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
* 4.4:
Several components are incompatible with HttpKernel 5.0
[Validator] fix deprecation layer of ValidatorBuilder
[HttpKernel] Fix missing use for request and response classes
bumped Symfony version to 4.3.2
updated VERSION for 4.3.1
updated CHANGELOG for 4.3.1
* 4.3:
[Validator] fix deprecation layer of ValidatorBuilder
[HttpKernel] Fix missing use for request and response classes
bumped Symfony version to 4.3.2
updated VERSION for 4.3.1
updated CHANGELOG for 4.3.1
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix wrong DateTime on outdated ICU library
| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |
There is a problem, when server uses outdated version of ICU (php-intl).
It throws no exeption or debug message on unexisting Timezone. So sometimes you can get wrong DateTime in Forms, because Intl uses 'Etc/Unknown' (UTC+0) instead correct Timezone. And it happens very unobvious.
I added `\IntlExeption` for that cases.
Commits
-------
a6025ab5ee Change IntlTimeZone to DateTimeZone
* 4.4:
[HttpKernel] fix link to source generation
[Doctrine Bridge] Check field type before adding Length constraint
[FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
[Cache] Pass arg to get callback everywhere
Fix DoctrineBridge upgrade 5.0
[FramworkBundle][HttpKernel] fix KernelBrowser BC layer
Add a missing quote in getValue() DocBlock
[Messenger] Add runtime check for ext redis version
[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
minor: ChoiceType callable deprecation after/before seems wrong
* 4.3:
[HttpKernel] fix link to source generation
[Doctrine Bridge] Check field type before adding Length constraint
[FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
[Cache] Pass arg to get callback everywhere
Fix DoctrineBridge upgrade 5.0
[FramworkBundle][HttpKernel] fix KernelBrowser BC layer
Add a missing quote in getValue() DocBlock
[Messenger] Add runtime check for ext redis version
[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
minor: ChoiceType callable deprecation after/before seems wrong
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] Pass arg to get callback everywhere
| 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 | -
Some adapters does not pass an useless "save" bool arg. However, that makes a `CallbackInterface` callable unusable with them since the arg is required in the interface.
Commits
-------
d03eb033bb [Cache] Pass arg to get callback everywhere
This PR was merged into the 5.0-dev branch.
Discussion
----------
[BrowserKit] remove deprecated code
| Q | A
| ------------- | ---
| Branch? | master
| 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 the master branch.
-->
This PR removed all deprecated code from BrowserKit.
Commits
-------
e05de9ee56 [BrowserKit] remove deprecated code
* 4.4:
[Cache] Fixed undefined variable in ArrayTrait
[HttpClient] revert bad logic around JSON_THROW_ON_ERROR
[HttpKernel] Fix handling non-catchable fatal errors
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[HttpClient] add $response->cancel()
[Security] added support for updated \"distinguished name\" format in x509 authentication
* 4.3:
[Cache] Fixed undefined variable in ArrayTrait
[HttpClient] revert bad logic around JSON_THROW_ON_ERROR
[HttpKernel] Fix handling non-catchable fatal errors
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[HttpClient] add $response->cancel()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was squashed before being merged into the 4.3 branch (closes#31864).
Discussion
----------
[Cache] Fixed undefined variable in ArrayTrait
| 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 |
So once again (see https://github.com/symfony/symfony/pull/29591) my test suite managed to find an error in ArrayTrait in cache. This time it was this PR: https://github.com/symfony/symfony/pull/31395 later improved by https://github.com/symfony/symfony/pull/31590 that introduced `$id` to logging, which I guess should be `$key`? So this PR changes it to `$key`, ~but my tests **still fail** as there is no `$this->namespace` in `ArrayAdapter` (is this the only class that uses this ArrayTrait?). But I don't know what to do about it. Maybe @nicolas-grekas has some answers?~
Commits
-------
8568923491 [Cache] Fixed undefined variable in ArrayTrait
* 4.2:
[HttpKernel] Fix handling non-catchable fatal errors
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor
…r in RedirectResponse constructor.
| 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 | #31862 <!-- #-prefixed issue number(s), if any -->
| License | MIT
Perform a case-insensitive check on `$headers` in \Symfony\Component\HttpFoundation\RedirectResponse::__construct()
Commits
-------
b5e6c99a3b [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
* 3.4:
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] add $response->cancel()
| 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 | https://github.com/symfony/symfony-docs/pull/11668
An alternative to #31845 and #31842.
Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.
I think we're early enough since 4.3/1.1 to do it.
That will save us some headaches in the short term.
Commits
-------
c402418723 [HttpClient] add $response->cancel()
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] revert bad logic around JSON_THROW_ON_ERROR
| 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 | -
Same as #31869, reverts #31861
Commits
-------
846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4
This PR was squashed before being merged into the 5.0-dev branch (closes#31824).
Discussion
----------
[Workflow] Remove BC layers and deprecated codes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
To do:
* [x] Component
* [x] Framework intergration
Commits
-------
cbb8b22753 [FrameworkBundle][Workflow] Remove BC layers and deprecated codes
08dc494294 [Workflow] Remove BC layers and deprecated codes
* 4.4:
[Console] Add check for Konsole/Yakuake to disable hyperlinks
[HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
[HttpClient] work around PHP 7.3 bug related to json_encode()
[VarDumper] fix dumping the cloner itself
Rename the Symfony Mailer service config to avoid conflict with SwitMailer
Set default crypto method - Fix#31105
[Form] add missing symfony/service-contracts dependency
[HttpClient] Don't throw InvalidArgumentException on bad Location header
* 4.3:
[Console] Add check for Konsole/Yakuake to disable hyperlinks
[HttpClient] work around PHP 7.3 bug related to json_encode()
[VarDumper] fix dumping the cloner itself
Rename the Symfony Mailer service config to avoid conflict with SwitMailer
Set default crypto method - Fix#31105
[Form] add missing symfony/service-contracts dependency
[HttpClient] Don't throw InvalidArgumentException on bad Location header
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Don't throw InvalidArgumentException on bad Location header
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31776
| License | MIT
| Doc PR | -
Instead, just stop following redirections and throw a `RedirectionExceptionInterface` as usual when throwing is not disabled.
Commits
-------
4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Set default crypto method
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31105
| License | MIT
| Doc PR | -
This PR fixes#31105 by providing `STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT` as default crypto method when none is defined in user options and TLS is enabled.
Commits
-------
4f0ad25fab Set default crypto method - Fix#31105
This PR was squashed before being merged into the 4.3 branch (closes#31849).
Discussion
----------
[Console] Add check for Konsole/Yakuake to disable hyperlinks
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31809
| License | MIT
| Doc PR |
Added check for environment variable set by Konsole and other relateds terminal emulators.
A ticket has been opened to Konsole team to support this feature someday: https://bugs.kde.org/show_bug.cgi?id=408288
Commits
-------
14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks
This PR was merged into the 4.3 branch.
Discussion
----------
[VarDumper] fix dumping the cloner itself
| 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 | -
Having PHP references inside the cloner badly breaks it when it finds itself in the dumped graph.
Let's remove this optimization, and skip dumping cloners by default as a bonus.
Commits
-------
3cd56cb018 [VarDumper] fix dumping the cloner itself
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] work around PHP 7.3 bug related to json_encode()
| 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 is the remaining of ##31860 for upper branches.
Commits
-------
42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode()
This PR was squashed before being merged into the 4.4 branch (closes#31658).
Discussion
----------
[HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | #31323 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
Passing argument to `Request::isMethodSafe()` should have been deprecated in 4.1. As mentionned there: https://github.com/symfony/http-foundation/blob/master/Request.php#L1435-L1452
We also remove Exceptions throwed when you call `Request::isMethodSafe()` or `Request::isMethodSafe(true)`
Commits
-------
59fa1bd127 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
This PR was merged into the 4.3 branch.
Discussion
----------
[Form] add missing symfony/service-contracts dependency
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31844
| License | MIT
| Doc PR | -
`ResetInterface` is needed by `CachingFactoryDecorator`, which is used in `CoreExtension`, so this is a mandatory dep.
Commits
-------
8639bcca3d [Form] add missing symfony/service-contracts dependency
* 4.4:
Fix inconsistency in json format regarding DST value
changed type hints
conflict with HttpKernel component 5.0
do not process private properties from parent class
[HttpClient] fix unregistering the debug buffer when using curl
don't add embedded properties to wrapping class metadata
[Messenger] set amqp content_type based on serialization format
[Mailer] fixed the possibility to set a From header from MessageListener
* 4.3:
Fix inconsistency in json format regarding DST value
changed type hints
do not process private properties from parent class
[HttpClient] fix unregistering the debug buffer when using curl
don't add embedded properties to wrapping class metadata
[Messenger] set amqp content_type based on serialization format
[Mailer] fixed the possibility to set a From header from MessageListener
The `$expected` template seems not to be consistent.
It will change when the DST value is 0 (it'll not have `dst_savings` for
example)
This patch takes care of the issue, by adding proper condition.
Sponsored-by: Platform.sh
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] set amqp content_type based on serialization format
| 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 | #31736
| License | MIT
| Doc PR |
Commits
-------
dee077016d [Messenger] set amqp content_type based on serialization format
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] add MigratingPasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Split from #31153: the proposed `MigratingPasswordEncoder` is able to validate password using a chain of encoders, and encodes new them using the best-provided algorithm.
This chained encoder is used when the "auto" algorithm is configured. This is seamless for 4.3 app.
Commits
-------
765f14c80e [Security] add MigratingPasswordEncoder
* 4.4:
Extract Abstract Doctrine Middleware
[Translation] refactor ArrayLoader::flatten
[TwigBundle] mark TemplateIterator as internal
Improved error message on create a form builder with invalid options
[Security] add PasswordEncoderInterface::needsRehash()
[HttpClient] add $response->cancel()
Add clear Entity Manager middleware (closes#29662)
[FrameworkBundle] Add missing BC layer for deprecated ControllerNameParser injections
[Validator] Improve TypeValidator to handle array of types
Add exception as HTML comment to beginning and end of `exception_full.html.twig`
[Validator] Add compared value path to violation parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Improve TypeValidator to handle array of types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31330
| License | MIT
| Doc PR | tbd.
The `@Type` constraint is now able to handle multiple types:
```php
/**
* @var string|array
* @Assert\Type(type={"string", "array"})
*/
private $name;
```
and will pass when `$name` is either of type `string` or `array`.
Commits
-------
c8100f34f8 [Validator] Improve TypeValidator to handle array of types
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Add compared value path to violation parameters
| 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
While it's not really useful to use as a placeholder in the violation message template (compared to hard-coding it into the message. Nor it is really user-friendly),
it becomes handy in conjunction with #29130 for any mapping logic on client-side.
Commits
-------
2da226a57f [Validator] Add compared value path to violation parameters
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Fix the possibility to set a From header from MessageListener
| 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 | #31733
| License | MIT
| Doc PR | n/a
<!--
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
-------
f4254e6f5e [Mailer] fixed the possibility to set a From header from MessageListener
This PR was squashed before being merged into the 4.4 branch (closes#31661).
Discussion
----------
[Translation] refactor ArrayLoader::flatten
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
5b0544691e [Translation] refactor ArrayLoader::flatten
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] add $response->cancel()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
(BC break allowed by the `@experimental` annotation)
Canceling a response is already possible but requires registering a progress function and throwing an exception from it. This new method aims at making this much simpler.
/cc @jderusse as we discussed this on Slack.
Commits
-------
549930e820 [HttpClient] add $response->cancel()
This PR was merged into the 4.4 branch.
Discussion
----------
[Form][DX] Improved error message on create a form builder with invalid options
| 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 | -
**before**
> The required option "class" is missing.
**after**
> An error has occurred resolving the options of the form "App\Form\MyEntityType": The required option "class" is missing.
Commits
-------
37c7a2bf09 Improved error message on create a form builder with invalid options
* 4.4:
[Translation] Fixed case sensitivity of lint:xliff command
fix type hint for salt in PasswordEncoderInterface
Add missing deprecations for PHP templating layer
Simplify code - catch \Throwable capture all exceptions
Collect locale details earlier in the process in TranslationDataCollector
fix typo in PR #31802
update italian validator translation
Add missing translations
[Messenger] Deprecate passing a bus locator to ConsumeMessagesCommand constructor
[SecurityBundled] Forbid security-http >= 5.0
[Security][Guard] Forbid security-http >= 5.0
[TwigBridge] suggest Translation Component when TranslationExtension is used
[Monolog] Setup the LoggerProcessor after all other processor
* 4.3:
[Translation] Fixed case sensitivity of lint:xliff command
fix type hint for salt in PasswordEncoderInterface
Simplify code - catch \Throwable capture all exceptions
Collect locale details earlier in the process in TranslationDataCollector
fix typo in PR #31802
update italian validator translation
Add missing translations
[TwigBridge] suggest Translation Component when TranslationExtension is used
* 4.2:
[Translation] Fixed case sensitivity of lint:xliff command
fix type hint for salt in PasswordEncoderInterface
Simplify code - catch \Throwable capture all exceptions
fix typo in PR #31802
update italian validator translation
Add missing translations
This PR was squashed before being merged into the 4.2 branch (closes#31786).
Discussion
----------
[Translation] Fixed case sensitivity of lint:xliff command
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | (not needed)
I was checking some errors of `lint:xliff` (https://travis-ci.org/EasyCorp/EasyAdminBundle/jobs/540053551#L657) and saw this:
```
ERROR in src/Resources/translations/EasyAdminBundle.sr_RS.xlf
* There is a mismatch between the language included in the file name ("EasyAdminBundle.sr_RS.xlf") and the "sr-rs" value used in the "target-language" attribute of the file.
ERROR in src/Resources/translations/EasyAdminBundle.zh_CN.xlf
* There is a mismatch between the language included in the file name ("EasyAdminBundle.zh_CN.xlf") and the "zh-cn" value used in the "target-language" attribute of the file.
```
This was suspicious, so I checked the XLIFF standard and it says (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language):
```
target-language:
Unlike the other XLIFF attributes, the values are not case-sensitive.
```
So, it's valid that `zh-cn` is the target language and `zh-CN` is the file extension. This PR fixes that.
Commits
-------
ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command
This PR was merged into the 4.3 branch.
Discussion
----------
[Translator] Collect locale details earlier in the process
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31600
| License | MIT
| Doc PR | N/A
The [LocaleAwareListener](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php) class reverts the locale back to the default locale when the request has finished. But the `TranslationDataCollector` only collects the locale in `lateCollect`, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.
The PR moves the `locale` and `fallback_locales` from `lateCollect` to `collect`, so that the information can be captured earlier, before the `LocaleAwareListener` is run.
Commits
-------
5c394eeb79 Collect locale details earlier in the process in TranslationDataCollector
* 4.4:
[SecurityBundle][Workflow] Forbid security-core 5.x
[Security\Core] Make SodiumPasswordEncoder validate BCrypt-ed passwords
[MonologBridge] RouteProcessor class is now final to ease the the removal of deprecated event
[Validator] Fix TimezoneValidator default option
[Messenger] Inject RoutableMessageBus instead of bus locator
[DomCrawler] Fix type error with null Form::$currentUri
[Contracts] Fixed typos
[Security][Http] Forbid security-core 5.x
do not enable validator auto mapping by default
[HttpClient] remove unused argument
* 4.3:
[Security\Core] Make SodiumPasswordEncoder validate BCrypt-ed passwords
[Validator] Fix TimezoneValidator default option
[Messenger] Inject RoutableMessageBus instead of bus locator
[DomCrawler] Fix type error with null Form::$currentUri
[Contracts] Fixed typos
do not enable validator auto mapping by default
[HttpClient] remove unused argument
This PR was squashed before being merged into the 4.3 branch (closes#31744).
Discussion
----------
[Validator] Fix TimezoneValidator default option
| 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 | #... <!-- #-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.
-->
Commits
-------
ee71cdbae4 [Validator] Fix TimezoneValidator default option
* 4.4:
[HttpKernel] Make DebugHandlersListener internal
HttpKernel 4.4 is incompatible with Console 5 because of the EventDispatcher changes.
Add missed use class for Symfony\Bundle\FrameworkBundle\Test\WebTestCase::$client
bump Twig bridge dependency
[HttpClient] Minor fix in an error message
Fix parameter documentation for Inflector::pluralize() method
Use a more appropriate group when deprecating mode
Marked several components as incompatible with EventDispatcher 5.
bumped Symfony version to 4.3.1
updated VERSION for 4.3.0
updated CHANGELOG for 4.3.0
[FrameworkBundle] fix test fixture using deprecated controller and add missing deprecation
exchanged $rootDir and $fileLinkFormatter arguments in DebugCommand
[FrameworkBundle] Add a validation on the messenger section
* 4.3:
Add missed use class for Symfony\Bundle\FrameworkBundle\Test\WebTestCase::$client
[HttpClient] Minor fix in an error message
Fix parameter documentation for Inflector::pluralize() method
Use a more appropriate group when deprecating mode
bumped Symfony version to 4.3.1
updated VERSION for 4.3.0
updated CHANGELOG for 4.3.0
[FrameworkBundle] fix test fixture using deprecated controller and add missing deprecation
[FrameworkBundle] Add a validation on the messenger section
This PR was squashed before being merged into the 5.0-dev branch (closes#31699).
Discussion
----------
[Serializer] Unified normalizers/encoders config through default context solely
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 | #28709 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
As planned in #28709.
Split into two commits to ease review.
Commits
-------
914577eaa9 [Serializer] Unified normalizers/encoders config through default context solely
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Make DebugHandlersListener internal
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Required to remove the legacy `Event` argument type declaration from its `configure()` method in 5.0.
Unlocks #31689
Commits
-------
1a8db293c6 [HttpKernel] Make DebugHandlersListener internal
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Security] remove the has_role() security expression function
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
c99dfdf119 remove the has_role() security expression function
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Minor fix in an error 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 | -
| License | MIT
| Doc PR | -
Fixes this:
![image](https://user-images.githubusercontent.com/73419/58624608-e9de9e00-82d0-11e9-9558-3f52388f1531.png)
Commits
-------
2da9e3f717 [HttpClient] Minor fix in an error message
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Remove legacy regions option in TimezoneType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
<!--
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.
-->
Commits
-------
5b5edd10cc [Form] Remove legacy regions option in TimezoneType
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Throw exception for invalid form buttons name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See https://github.com/symfony/symfony/pull/28969
Commits
-------
6deeaa42ae Validating form buttons name
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Remove legacy code related to getExtendedType() method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Ref: https://github.com/symfony/symfony/pull/24530
Commits
-------
208b729bca Remove legacy code related to getExtendedType() method
* 4.4:
[Intl] Improve the error message when country code is wrong
Fix tests
[Intl][4.3] Cleanup internal api
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
* 4.3:
[Intl] Improve the error message when country code is wrong
Fix tests
[Intl][4.3] Cleanup internal api
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
* 4.2:
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] Remove CsvEncoder "as_collection" deprecation & change default value
| Q | A
| ------------- | ---
| Branch? | master <!-- 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 (AppVeyor failure unrelated. See https://github.com/symfony/symfony/pull/31685/files) <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27715 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
As planned in #27715
Commits
-------
22dd071b03 [Serializer] Remove CsvEncoder "as_collection" deprecation & change default value
This PR was merged into the 4.3 branch.
Discussion
----------
Fix tests
| 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 | #31638
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
733f017904 Fix tests
This PR was merged into the 5.0-dev branch.
Discussion
----------
[5.0] Update CHANGELOG.md
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
<!--
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.
-->
Commits
-------
6183d2b84c [5.0] Update CHANGELOG.md
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] Throw exception on invalid normalizers/encoders passed to Serializer
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #27819 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
As planned in #27819
Commits
-------
5ab6ad409d [Serializer] Throw exception on invalid normalizers/encoders passed to Serializer
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Remove deprecated implementation of ChoiceLoaderInterface in intl forms
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See previous PR https://github.com/symfony/symfony/pull/26825 (4.1)
Commits
-------
b22cbf41c0 Remove deprecated implementation of ChoiceLoaderInterface in intl forms
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Messenger] minor: Remove logging middleware
| Q | A
| ------------- | ---
| Branch? | master
| 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 | https://github.com/symfony/symfony-docs/pull/11619 <!-- 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.
-->
Removes the LoggingMiddlewere
Commits
-------
2e6fbd5210 [Messenger] minor: Remove logging middleware
This PR was squashed before being merged into the 5.0-dev branch (closes#31671).
Discussion
----------
[Intl] Cleanup legacy API
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-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 the master branch.
-->
Commits
-------
67105d24e6 [Intl] Cleanup legacy API
This PR was merged into the 5.0-dev branch.
Discussion
----------
[HttpKernel] Cleanup legacy in ConfigDataCollector
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
See #28939
Commits
-------
09ca33cde4 [HttpKernel] Cleanup legacy in ConfigDataCollector
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove DateTime support in date/time validators
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
See #25015
Commits
-------
37c1cbbed3 [Validator] Remove DateTime support in date/time validators
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove fallback dependency checks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
See #28644
Commits
-------
aa84cfdb7b [Validator] Remove fallback dependency checks
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove checkDNS option in Url
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| 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 -->
See #25516
Commits
-------
885703f189 [Validator] Remove checkDNS option in Url
* 4.4:
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-RC1
updated CHANGELOG for 4.3.0-RC1
Create an abstract HTTP transport and extend it in all HTTP transports
Updated "experimental" annotations for 4.3
* 4.3:
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-RC1
updated CHANGELOG for 4.3.0-RC1
Create an abstract HTTP transport and extend it in all HTTP transports
Updated "experimental" annotations for 4.3
Currently BinaryFileResponse, when configured with X-Accel-Redirect sendfile type,
will only substitute file paths specified in X-Accel-Mapping. But if the provided
file path does not have a defined prefix, then the resulting header will include
the absolute path. Nginx expects a valid URI, therefore this will result in an
issue that is very hard to detect and debug as it will not show up in error logs
and instead the request would just hang for some time and then be re-served
without query parameters(?).
This PR was merged into the 4.3 branch.
Discussion
----------
Create an abstract HTTP transport and extend it in all HTTP transports
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Right now when you try to use an HTTP transport e.g. Mailgun w/o HTTP client installed - the error message is:
> Attempted to load class "HttpClient" from namespace "Symfony\Component\HttpClient".
Did you forget a "use" statement for "Http\Client\HttpClient"?
Not clear enough about what to do. After this PR the error message will be:
> You cannot use "Symfony\Component\Mailer\Bridge\Mailgun\Http\MailgunTransport" as the HttpClient component is not installed. Try running "composer require symfony/http-client".
Actually, we already have a similar check for API:
2c9a1960a1/src/Symfony/Component/Mailer/Transport/Http/Api/AbstractApiTransport.php (L37-L44)
Commits
-------
3c8d63ca82 Create an abstract HTTP transport and extend it in all HTTP transports
Use AssertEquals for these two specific case will do a better job,
since it'll convert both '0.1' and result of `getContent()` into PHP's
internal representation of floating-point and compares them and it should be fine.
Using `AssertSame` for this tests brings floating-point serialization
into consideration which of course will be php.ini specific.
In order not missing the type assertion point that `AssertSame` does,
we also perform `assertInternalType('string'...`
Sponsored-by: Platform.sh
* 4.3:
[HttpClient] make $response->getInfo('debug') return extended logs about the HTTP transaction
fix typo
Fixes a small doc blocks syntax error
Small grammar mistake in documentation
[Messenger] Use real memory usage for --memory-limit
[Workflow] Do not trigger extra guard
* 4.2:
fix typo
Fixes a small doc blocks syntax error
Small grammar mistake in documentation
[Messenger] Use real memory usage for --memory-limit
[Workflow] Do not trigger extra guard
This PR was merged into the 3.4 branch.
Discussion
----------
FragmentListener - fix typo in annotation
| 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 |
Just a small typo I've found in fragment listener :)
Commits
-------
b6ff836a49 fix typo
* 4.3:
[Messenger] Disable the SchemaAssetsFilter when setup the transport
[Messenger] Fix missing auto_setup for RedisTransport
[Contracts] split in one package per sub-contracts
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Disable the SchemaAssetsFilter when setup the transport
| 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 | #31623
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
8cbb8f89ad [Messenger] Disable the SchemaAssetsFilter when setup the transport
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix missing auto_setup for RedisTransport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Should be my last PR for messenger 4.3's Redis transport :)
Not having it makes it inconsistent with other transports and is especially annoying in tests.
Commits
-------
d27bc2a87d [Messenger] Fix missing auto_setup for RedisTransport
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] Do not trigger extra guards
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31582
| License | MIT
| Doc PR |
---
With this patch, guards are executed only on wanted transitions
**Note for merger**: This is already fixed (in a different manner) in 4.2, So this patch should not be included in 4.2, instead take: #31585 or discard changes of Workflow class but keep tests
Commits
-------
ad0619748e [Workflow] Do not trigger extra guard
* 4.3:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 4.2:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 3.4:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 4.3: (22 commits)
[Messenger] Fix incorrect error when symfony/serializer is missing
Allow WrappedListener to describe uncallable listeners.
[HttpClient] fix handling exceptions thrown before first mock chunk
[Filesystem] fix wrong method call casing
[HttpClient] fix test
[Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector
Don't reference symfony/security
[HttpClient] display proper error message on TransportException when curl is used
[FrameworkBundle] fix named autowiring aliases for TagAwareCacheInterface
[Cache] improve logged messages
[FrameworkBundle] improve cs
[Mime][HttpFoundation] Added mime type audio/x-hx-aac-adts
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-BETA2
updated CHANGELOG for 4.3.0-BETA2
[HttpClient] Only use CURLMOPT_MAX_HOST_CONNECTIONS & CURL_VERSION_HTTP2 if defined
[Security] fixed a fatal error when upgrading from 4.2
[HttpClient] Allow arrays as query parameters
Throws UnrecoverableMessageHandlingException when passed invalid entity manager name for Doctrine middlewares
[Messenger] Make redis Connection::get() non blocking by default
...
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix handling exceptions thrown before first mock chunk
| 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 | -
Discovered while fixing a 60s timeout on a test case, which this fixes too.
Commits
-------
812b0172f4 [HttpClient] fix handling exceptions thrown before first mock chunk
This PR was merged into the 4.3 branch.
Discussion
----------
Allow WrappedListener to describe uncallable listeners
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31493
| License | MIT
| Doc PR | N/A
This is a follow-up to #31493. The previous PR did not fix the problem completely. We also need to make sure that a listener that is not callable is not passed to `Closure::fromCallable()`.
Note: It would probably be a good idea to give the developer a hint about uncallable listeners. Currently, such a listener causes an exception at the worst possible point of time: when collecting the profile information. This breaks the toolbar without any helpful feedback, as I've described [here](https://github.com/symfony/symfony/pull/31493#issuecomment-492921480).
This PR allows the `WrappedListener` class to describe a listener for the profiler even if the listener is not callable, which was the behavior in Symfony 4.2.
Commits
-------
bc3f598bfe Allow WrappedListener to describe uncallable listeners.
The temp-file that the test currently creates is `/tmp/log`.
This may exist on many platforms already (including `platform.sh` app containers).
With the proposed patch way the collision will be less likely.
Sponsored-by: Platform.sh
This PR was merged into the 4.3 branch.
Discussion
----------
[Cache] improve logged messages
| 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 improved already in #31395, but the patch was incomplete.
This PR fixes this.
Commits
-------
257f3f176e [Cache] improve logged messages
This PR was squashed before being merged into the 4.4-dev branch (closes#31437).
Discussion
----------
[Cache] Add Redis Sentinel support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#11545
This change adds support for Redis Sentinel clusters to the Cache component Redis adapter.
The DSN format is syntactically equivalent to cluster support, but adds a new parameter `redis_sentinel` that should be set to the sentinel service name.
This support requires the use of predis as the underlying connection library. The redis extension does not support sentinel at this time.
Commits
-------
80e8b21525 [Cache] Add Redis Sentinel support
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix using bindings with locators of service subscribers
| 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 | -
Spotted during the workshop in Sao Paulo, with @tsantos84, @andreia and others :)
Commits
-------
7146b95303 [DI] fix using bindings with locators of service subscribers
This PR was squashed before being merged into the 3.4 branch (closes#31568).
Discussion
----------
[Process] Fix infinite waiting for stopped process
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31548
| License | MIT
### Description
Add a regression test `Symfony\Component\Process\Tests\ProcessTest:testWaitStoppedDeadProcess` to reproduce the related bug #31548 . It consists of one file `ErrorProcessInitiator.php`, which executes as another process because otherwise if `Process::wait()` goes in an infinite loop (which is test checks) it will be impossible to handle it and stop test correctly.
The second commit contains bug fix, which is only `$this->checkTimeout();` call, that prevents infinite loop.
Commits
-------
6b9ee1e1c5 [Process] Fix infinite waiting for stopped process
This PR was merged into the 4.4-dev branch.
Discussion
----------
[DI] deprecate short callables in yaml
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11589
This deprecates defining factories as `foo:method` instead of `['@foo', 'method']` in yaml.
This is confusing syntax and misses the opportunity to raise an error when one does a typo and uses a single colon instead of two.
This basically reverts #19190
Commits
-------
f8a04fdda6 [DI] deprecate short callables in yaml
- CURLMOPT_MAX_HOST_CONNECTIONS is available since PHP 7.0.7 and cURL 7.30.0
- CURL_VERSION_HTTP2 is available since PHP 5.5.24 and 5.6.8 and cURL 7.33.0
This PR was merged into the 4.3 branch.
Discussion
----------
[Ldap] add a test on parsing the rdn
| 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 | 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 the master branch.
-->
One more test on the rdn directly.
- [x] When #31552 has been merged this one needs to be rebased.
Commits
-------
0abe32b085 [Ldap] add a test on parsing the rdn
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Add "non sendable" stamps
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31460
| License | MIT
| Doc PR | not needed
Fixes a bug where Symfony serialization of the AmqpReceivedStamp sometimes caused problems.
It's still a mystery why the `AmqpReceivedStamp` caused a segfault *sometimes* when going through the Symfony serializer or the `VarDumper`. But, that stamp really didn't need to be sent on redelivery anyways.
I don't love making the removal the responsibility of the serializers, but it didn't work well anywhere else.
Cheers!
Commits
-------
34e7781c5c Adding a new NonSendableStampInterface to avoid sending certain stamps
* 4.3: (23 commits)
minor: add some test in the ldap component
[Workflow] Update MethodMarkingStore
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
adding experimental note
[HttpClient] add missing argument check
[Messenger] Fix undefined index on read timeout
[Workflow] use method marking store
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
[EventDispatcher] Removed "callable" type hint from WrappedListener constructor
prevent deprecation when filesize matches error code
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[WebProfilerBundle][Form] The form data collector return serialized object when profiler bundle attends object
[Validator] Add the missing translations for the Danish ("da") locale
[PropertyAccess] Add missing property to PropertyAccessor
[Cache] fix saving unrelated keys in recursive callback calls
[Serializer] Fix denormalization of object with variadic constructor typed argument
...
* 4.2:
minor: add some test in the ldap component
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
prevent deprecation when filesize matches error code
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[Validator] Add the missing translations for the Danish ("da") locale
[PropertyAccess] Add missing property to PropertyAccessor
[Cache] fix saving unrelated keys in recursive callback calls
[Serializer] Fix denormalization of object with variadic constructor typed argument
Allow set 'None' on samesite cookie flag
Making cache rebuild correctly with MessageSubscriberInterface return values
Fix finding parent definition
* 3.4:
minor: add some test in the ldap component
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[Validator] Add the missing translations for the Danish ("da") locale
[Serializer] Fix denormalization of object with variadic constructor typed argument
Allow set 'None' on samesite cookie flag
This PR was merged into the 3.4 branch.
Discussion
----------
[Ldap] add a test to getResources and binding
| 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 | 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 the master branch.
-->
We could add more unit tests, but this is a beginning.
Commits
-------
d08f195502 minor: add some test in the ldap component
This PR was squashed before being merged into the 4.3 branch (closes#31536).
Discussion
----------
[Workflow] Update MethodMarkingStore
| Q | A
| ------------- | ---
| Branch? | 4.3 (related to deprecation of single/multiple marking store)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | .
| License | MIT
| Doc PR | already documented
Minor fix
Commits
-------
c8636523d3 [Workflow] Update MethodMarkingStore
This PR was merged into the 4.3 branch.
Discussion
----------
[Workflow] use method marking store
| Q | A
| ------------- | ---
| Branch? | 4.3 (related to deprecation of single/multiple marking store)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | .
| License | MIT
| Doc PR | already documented
I think the deprecation of old marking store, the single one in the statemachine, was not patched here
Or did i miss something?
Thank you
Cc @lyrixx
Commits
-------
a2191678b7 [Workflow] use method marking store
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] adding experimental disclaimer in readme
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Mailer Component is marked as experimental in code, but not in readme.
got confused while checking the readme files of the new components
Commits
-------
5175f6fffc adding experimental note
This PR was squashed before being merged into the 3.4 branch (closes#31421).
Discussion
----------
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
If controller, or one of its methods, contain a unicode character and you run:
```
./bin/console debug:router
```
you get this:
![Zrzut ekranu 2019-05-8 o 14 00 48](https://user-images.githubusercontent.com/35422131/57374545-71863080-719b-11e9-999e-fe0a5051c089.png)
This PR fixes it into this:
![Zrzut ekranu 2019-05-8 o 14 00 59](https://user-images.githubusercontent.com/35422131/57374616-92e71c80-719b-11e9-9d13-5370213c22f7.png)
Commits
-------
7ab52d3c36 [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
If the included file contains an error, it hides the real error. This
makes debugging harder.
How to reproduce:
```
composer create-project symfony/skeleton symfony-3.4 3.4
cd symfony-3.4
composer req monolog
```
Add to `monolog.yaml`:
```yaml
elasticsearch:
type: "elasticsearch"
elasticsearch:
host: 'elasticsearch'
port: '9200'
index: 'ep_php_logs_dev'
level: 'debug'
tags: 'monolog.logger'
channels: ['!event']
```
This will fail because the the \Elastica\Client class does not exist.
But this error will be hidden by the `ClassNotFoundFatalErrorHandler`
because it will try to load the `Symfony\Component\Kernel\Client` and
this class extends `Symfony\Component\BrowserKit\Client`. The last one
is a soft dependency...
---
Before
```
Fatal error: Uncaught Error: Class 'Symfony\Component\BrowserKit\Client' not found in /tmp/symfony-3.4/vendor/symfony/http-kernel/Client.php:31
```
After:
```
Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "Client" from namespace "Elastica".
Did you forget a "use" statement for another namespace? in /tmp/symfony-es/var/cache/dev/ContainerWXN4mS9/srcApp_KernelDevDebugContainer.php:303
```
* origin/4.3:
deprecate calling createChildContext without the format parameter
[EventDispatcher] Fix interface name used in error messages
[FrameworkBundle] Add cache configuration for PropertyInfo
Update dependencies in the main component
Drop useless executable bit
[Doctrine][PropertyInfo] Detect if the ID is writeable
Add transport in subscriber's phpdoc
[Validator] Autovalidation: skip readonly props
[DI] default to service id - *not* FQCN - when building tagged locators
[Cache] Log a more readable error message when saving into cache fails
Update WorkflowEvents.php
[Messenger] On failure retry, make message appear received from original sender
[Messenger] remove send_and_handle option which can be achieved with SyncTransport
Fixing tests - passing pdo is not wrapped for some reason in dbal
Changing how RoutableMessageBus fallback bus works
[Serializer] Fix BC break: DEPTH_KEY_PATTERN must be public
[FrameworkBundle] Fixed issue when a parameter container a '%'
Fix the interface incompatibility of EventDispatchers
[TwigBundle] fixed Mailer integration in Twig
[Form] Add intl/choice_translation_locale option to TimezoneType
This PR was merged into the 4.3 branch.
Discussion
----------
Fix the interface incompatibility of EventDispatchers
The `LegacyEventDispatcherProxy` now implements the full
`EventDispatcherInterface` from the `EventDispatcherBundle`.
Before it just implemented the Interface from the `Contracts` Bundle,
that made it incompatible with the `WrappedListener`.
This fixes#31457.
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31457
| License | MIT
| Doc PR | /
Commits
-------
bdeeae1510 Fix the interface incompatibility of EventDispatchers
This PR was merged into the 4.3 branch.
Discussion
----------
[DI] default to service id - *not* FQCN - when building tagged locators
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
While reviewing #30926 I realized that defaulting to the FQCN is a shortcut that isn't useful enough.
Defaulting to the service id provides the same experience in practice because service ids are FQCN by default.
But when they aren't, the service id is the proper index to default to when building the locator.
Commits
-------
52e827c9cf [DI] default to service id - *not* FQCN - when building tagged locators
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Add `from_transport` in subscriber's phpdoc
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | ø
| BC breaks? | ø
| Deprecations? | ø
| Tests pass? | yes
| Fixed tickets | #30958
| License | MIT
| Doc PR | ø
Add the `from_transport` to the subscriber's phpdoc as it was missed from the original PR.
Commits
-------
6a542cd738 Add transport in subscriber's phpdoc
This PR was merged into the 4.3 branch.
Discussion
----------
[Form] Add intl/choice_translation_locale option to TimezoneType
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #28836
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11503
final step :)
for now i think any form of grouping is a user concern (i.e. by GMT offset or area name); see #31293 + #31295
having a special built in `group_by' => 'gmt_offset'` util would be nice, and can be done in the future.
includes #31434
Commits
-------
001b930611 [Form] Add intl/choice_translation_locale option to TimezoneType
This PR was merged into the 4.3 branch.
Discussion
----------
[Validator] Autovalidation: skip readonly props
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| 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
Read-only properties (such as an autogenerated ID) must be skipped during the validation (it makes no sense to validate a RO property anyway).
This is an allowed BC break because this feature will be introduced in 4.3.
Commits
-------
e7dc5e1045 [Validator] Autovalidation: skip readonly props
This PR was merged into the 4.3 branch.
Discussion
----------
[Cache] Log a more readable message when trying to cache an unsupported type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #29710 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Improved the warning risen when trying to save something that has a non-supported type in the Simple cache.
For instance, let's say the following code:
```php
class TestCommand extends Command
{
private $cache;
public function __construct(CacheInterface $cache)
{
parent::__construct();
$this->cache = $cache;
}
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
$n = $this->cache->get('n', function () {
return function () {
return rand(0,10);
};
});
dump($n());
}
}
```
Running this code will give the following:
```
14:32:03 WARNING [cache] Could not save key "n" in cache: the Closure type is not supported.
0
```
Commits
-------
21ba3c07a0 [Cache] Log a more readable error message when saving into cache fails
This PR was squashed before being merged into the 3.4 branch (closes#31438).
Discussion
----------
[Serializer] Fix denormalization of object with variadic constructor typed argument
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31436
| License | MIT
This PR adds a test to demonstrate the bug, and a fix to squash it.
Commits
-------
c8c3c56cc8 [Serializer] Fix denormalization of object with variadic constructor typed argument
This PR was merged into the 4.2 branch.
Discussion
----------
[Messenger] Making cache rebuild correctly when message subscribers change
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31409
| License | MIT
| Doc PR | not needed
An edge-case that's identical to `EventSubscriberInterface`: when the return value of `getHandledMessages()` changes, the container needs to be rebuilt.
If you're wondering why these checks aren't in their own resource class, see #25984 - it's something we probably should do, but haven't done yet.
Commits
-------
d88446be07 Making cache rebuild correctly with MessageSubscriberInterface return values
This PR was merged into the 4.2 branch.
Discussion
----------
[Validator] Fix finding translator parent definition in compiler pass
| 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 |
Method `ChildDefintion::getParent()` returns a string, but here it is expected to return an object of class `Definition` in order to call `getClass` on it in the loop.
Commits
-------
d261bb5dd1 Fix finding parent definition
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] remove send_and_handle which can be achieved with SyncTransport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| 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 |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11236
The send_and_handle option is pretty awkward and we don't need it anymore because the same thing can be achieved with the SyncTransport from #30759
So the following example from the doc in https://symfony.com/doc/current/messenger.html#routing
```yaml
framework:
messenger:
routing:
'My\Message\ThatIsGoingToBeSentAndHandledLocally':
senders: [amqp]
send_and_handle: true
```
is the same as
```yaml
framework:
messenger:
routing:
'My\Message\ThatIsGoingToBeSentAndHandledLocally':
senders: [amqp, sync]
```
https://github.com/symfony/symfony/pull/31401#pullrequestreview-235396370
Commits
-------
4552b7f5b2 [Messenger] remove send_and_handle option which can be achieved with SyncTransport
This PR was squashed before being merged into the 4.3 branch (closes#31425).
Discussion
----------
[Messenger] On failure retry, make message appear received from original sender
| Q | A
| ------------- | ---
| Branch? | master (4.3)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31413
| License | MIT
| Doc PR | symfony/symfony-docs#11236
Fixes a bug when using the transport-based handler config from #30958. This also adds a pretty robust integration test that dispatches a complex message with transport-based handler config, failures, failure transport, etc - and verifies the correct behavior.
Cheers!
Commits
-------
80b5df270f [Messenger] On failure retry, make message appear received from original sender
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix routable message bus default bus
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
In #31288, we gave the `RoutableMessageBus` a "default" bus. We did that by using the `MessageBusInterface` service in the locator. But, no such service exists - I think that was just a huge oversight (and maybe @dirk39 named a bus this in the project he was testing on?). The services in the locator are very simply the keys under `framework.messenger.buses` or the default, which is a single `messenger.bus.default` id. There is an alias in the container for `MessageBusInterface`, but this is not added to the locator (and adding it would be a bit awkward, as `MessengerPass` is in the component and the interface alias is entirely a framework thing).
Cheers!
Commits
-------
42e0536d8f Changing how RoutableMessageBus fallback bus works
The `LegacyEventDispatcherProxy` now implements the full
`EventDispatcherInterface` from the `EventDispatcherBundle`.
Before it just implemented the Interface from the `Contracts` Bundle,
that made it incompatible with the `WrappedListener`.
This fixes#31457.
This PR was merged into the 4.3 branch.
Discussion
----------
[DomCrawler] fix HTML5 parser integration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted while reviewing #30892
The current logic is context-dependent: by changing the order of calls, you can get different behaviors.
Commits
-------
ba83bdadb1 [DomCrawler] fix HTML5 parser integration
This PR was merged into the 4.3 branch.
Discussion
----------
[Intl] Revise timezone name generation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (inlcluding intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This is the final polishing needed for #31294 :)
I've realized it's much easier to de-duplicate by processing fallback locales separate, and then only keep the diff compared to a specific locale. More or less the same approach `LocaleDataGenerator` already follows. I was trying to be clever and filter based on inheritance in a single process; bad idea.
Includes https://github.com/ro0NL/symfony/commit/31591d0 (ref #31432)
Commits
-------
bfdb4ed492 [Intl] Revise timezone name generation
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Simplifying SyncTransport and fixing bug with handlers transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
This is still a WIP, because it's not quite working and tests are a TODO. However, the basic idea is there. This makes SyncTransport less "weird". It acts more like a real transport... except that it "receives" and re-dispatches its message immediately.
The bug I'm trying to fix is related to the transport-based handling config that @sroze introduced. It doesn't currently play nice with the sync transport due to the unnatural way that I made it originally.
Cheers!
Commits
-------
8a49eb8660 Simplifying SyncTransport and fixing bug with handlers transport
* 4.3:
[Routing] Fixed unexpected 404 NoConfigurationException
[DI] Removes number of elements information in debug mode
[Contracts] Simplify implementation declarations
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
* 4.2:
[Routing] Fixed unexpected 404 NoConfigurationException
[DI] Removes number of elements information in debug mode
[Contracts] Simplify implementation declarations
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
* 3.4:
[DI] Removes number of elements information in debug mode
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] Fixed unexpected 404 NoConfigurationException
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31199
| License | MIT
This is the patch for 4.2+
We need a different patch for 3.4 that is more complex, I think.
Commits
-------
aa71a42a49 [Routing] Fixed unexpected 404 NoConfigurationException
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Commands with an alias should not be recognized as ambiguous when using register
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25355
| License | MIT
| Doc PR |
I think when passing an alias, it should not be treated as a ambiguous command since it's configured to response to it.
I've [pushed a commit](2f5209a687) that reproduce the bug and with this patch it does work.
Commits
-------
ae7ee46465 [Console] Commands with an alias should not be recognized as ambiguous
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Add FallbackTrait for data generation
| 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 is the last architectural change for the Intl data compilation. Promised.
It fixes de-duplicating a locale from its fallback locale. The problem is it uses a while-loop, comparing the locale to each fallback locale.
Given
- `root` (val=A)
- `ur` (val=B)
- `ur_IN` (val=A)
We have an edge case where a locale (ur_IN) override its fallback locale (ur), setting/restoring the value back to the root locale. This happens for the GMT format in the timezone bundle i know of ... in this case the `ur_IN` locale needs to write its own value.
The current approach is a while-loop comparing each fallback locale (ur, root) to the current locale (ur_IN). Eventually comparing `ur_IN <> root`, which causes a wrong diff, as such `ur_IN` falls back to `ur` providing the wrong value (val=B, where val=A is expected).
The new approach uses recursion so we only compare `ur <> ur_IN`, where `ur_IN` on itself is compared to `root`.
4.2) https://github.com/ro0NL/symfony/commit/e24d8e6
4.3) https://github.com/ro0NL/symfony/commit/31591d0
Commits
-------
36ddfd58b9 [Intl] Add FallbackTrait for data generation
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Fixing missed tests from #31355
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
Tests I missed from #31355 - sorry about that!
Commits
-------
ab3744961d Fixing missed tests from #31355
This PR was squashed before being merged into the 4.3-dev branch (closes#31249).
Discussion
----------
[Translator] Set sources when extracting strings from php files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Set metadata about filenames and line numbers when extracting translatable strings from php files. This PR complements #30909 and #31248, as those PRs implement support for dumping the filenames and line numbers to Po and Qt file formats.
Commits
-------
f05d4e41be [Translator] Set sources when extracting strings from php files
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Adding final routing key to delay queue name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31241
| License | MIT
| Doc PR | n/a
Fixes#31241.
When we delay, we create a queue whose `x-message-ttl` matches the delay length and `x-dead-letter-routing-key` matches the original routing key used for the message. However, before this PR, the original routing key was not part of that queue's name. The result is that if two messages were delayed by the same length, but with different routing keys, the second would try to "redeclare" the existing delay queue with a new `x-dead-letter-routing-key`, resulting in an error similar to:
> Server channel error: 406, message: PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-routing-key' for queue 'delay_queue_1000'
Integration test was improved to catch this.
Cheers!
Commits
-------
9940e71ae1 fixing a bug where the delay queue name did not contain the final routing key
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Dotenv] Test do not use putenv
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The related pull request is https://github.com/symfony/symfony/pull/31062.
If the `$usePutenv` flag is set to `false`, `putenv` won't be executed. I just add a small test for this situation.
Commits
-------
6d1a76e998 Test do not use putenv
This PR was squashed before being merged into the 4.3-dev branch (closes#31403).
Discussion
----------
[Intl][4.3] Apply localeDisplayPattern and fix locale generation
| Q | A
| ------------- | ---
| Branch? | master
| 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 -->
Follow up of #31337 & #31402 for 4.3 / master
Commits
-------
ed04f242d2 recompile
504db27860 re-apply api changes for TimezoneDataGenerator
c443e78dde re-apply translator parents.json generation
bf50b61f2a [Intl] Apply localeDisplayPattern and fix locale generation
* 4.2:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
[Intl] Cleanup
bumped Symfony version to 4.2.9
updated VERSION for 4.2.8
updated CHANGELOG for 4.2.8
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Cleanup
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| 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 -->
cleanup of #31365 for 3.4 + some other stuff to keep in sync across branches
Commits
-------
70a941ec0c [Intl] Cleanup
This PR was squashed before being merged into the 4.3-dev branch (closes#31060).
Discussion
----------
[Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes, but acceptable [1]
| Deprecations? | no [1]
| Tests pass? | yes
| Fixed tickets | #30871, #31054
| License | MIT
| Doc PR | symfony/symfony-docs#... (TODO)
Makes the API endpoint for the `NotCompromisedPasswordValidator` configurable. The endpoint includes the placeholder which will be replaced with the first digits of the password hash for k-anonymity.
The endpoint can either be set via constructor injection of the validator if the component is used standalone, or via the framework configuration of symfony/framework-bundle.
[1] As discussed in #31054, the validator is not in a stable release yet, therefore the BC break is considered acceptable. No deprecation / BC layer is necessary.
Commits
-------
f6a80c214d [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
* 3.4:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Fix Redis Connection::get() after reject()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
If a message is rejected, another consumer cannot read from the stream because the first subsequent call to `\Redis::xreadgroup()` returns false for some reason.
Reproducer: https://github.com/chalasr/redis-transport-bug
ping @alexander-schranz
Commits
-------
c05273f793 [Messenger] Fix Redis Connection::get() after reject()
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] fix wrong use of generator returns
| 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? | no <!-- 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 |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
I've seen this problem many times: Mixing `yield` with `return []`.
Unfortunately it cannot be forbidden at the compiler level because it's actually a feature: https://www.php.net/manual/de/generator.getreturn.php
But usually not intended that way.
Also added some other minor cleanups I've found.
Commits
-------
e8a09e9d85 [Messenger] fix wrong use of generator returns
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make the exception messages consistent across the board
| 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? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
<!--
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.
-->
Commits
-------
84c67193bc made the esception messages consistent across the board
This PR was squashed before being merged into the 4.3-dev branch (closes#31354).
Discussion
----------
[Intl][Validator] Handle alias locales/timezones
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #31022
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
both timezones and locales have aliases (either thru deprecation/migration/etc.)
for locales we compile a mapping, for timezones we dont. yet we can benefit partial alias support thru DateTimeZone, which knows about most timezone IDs already.
both the timezone + locale validator already support aliases. Connsequently, we should support aliases in `Timezones::exists()` + `Locales::exists()` as well IMHO.
so far so good; the catch is; with this PR `Locales::getName()` supports aliases, whereas `Timezones::getName()` doesnt. I think it's reasonable for now, until we compile the timezone mapping so we can widen the timezone ID conversion here.
Commits
-------
0a9be0df6e [Intl][Validator] Handle alias locales/timezones
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Rename Regions to Countries
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Because that's what the current region data is about; country codes.
This makes things consistent across the board; i.e. CountryType, CountryValidator
This allows a possible other region subset (e.g "continents") to distinct. Thus having `Countries::class` + `Continents::class` both reading from the `region` data. By then data should be compiled under different keys.
Current class is master only, so now or never :)
The alternative approach would be `Regions::getCountryNames [,getContinentNames, etc.]`, which is harder to scale, and should also be decided for 4.3 ideally.
Commits
-------
49aee67f46 [Intl] Rename Regions to Countries
This PR was squashed before being merged into the 3.4 branch (closes#31377).
Discussion
----------
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
| 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/24072
| License | MIT
| Doc PR | -
Previously, a bug existed whereby for multi-select questions, the auto-complete would only work for the first answer supplied by the user. On all subsequent answers, the auto-complete would not appear.
Now it works as expected:
![screenshot](https://user-images.githubusercontent.com/2110222/57158657-8c147e80-6e16-11e9-94f7-a9bc95506545.png)
Commits
-------
59321fe031 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Keep preferred choices order in ChoiceType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5136
| License | MIT
| Doc PR | todo
#EUFOSSA
Commits
-------
340a2fb3f8 Keep preferred_choices order
This PR was merged into the 3.4 branch.
Discussion
----------
Reword VarDumper description
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
It is hard to understand what "Built on top" refers to, and even when
knowing, the sentence looks weird.
![Untitled](https://user-images.githubusercontent.com/657779/57011659-15ebfe00-6c03-11e9-9b85-5c00cfc15026.png)
The description of [the Github repository](https://github.com/symfony/var-dumper) has the same issue and should be changed.
Commits
-------
6024e16ea1 Reword VarDumper description
* 4.2:
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
[Workflow] Fixed dumping when many transition with same name exist
relax assertions in tests
fix ConsoleFormatter - call to a member function format() on string
Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
[Validator] Translate messages into Japanese
Fix Thai translation in validators.th.xlf
[FramworkBundle] mark any env vars found in the ide setting as used
* 3.4:
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
[Workflow] Fixed dumping when many transition with same name exist
fix ConsoleFormatter - call to a member function format() on string
This PR was merged into the 3.4 branch.
Discussion
----------
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
| 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 | -
This reverts commit 029fb2e7e3, reversing
changes made to 9dad29d61c.
Reverts #30620
Replaces #31215
We don't need to solve this in 3.4
Making the session resettable should be done on master, by implementing `ResetInterface`.
On 3.4 apps, one should write a dedicated `SessionResetter` that would implement the reverted logic.
Commits
-------
4177331915 Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
This PR was squashed before being merged into the 4.3-dev branch (closes#31288).
Discussion
----------
[Messenger] RoutableMessageBus route to default bus
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31200
| License | MIT
| Doc PR | Not needed
Hi! I modified the behaviour of RoutableMessageBus to route message without BusNameStamp to default bus instead of raise an exception.
Made with ❤️ by [![Open Source Saturday](https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F-open%20source%20saturday-F64060.svg)](https://www.meetup.com/it-IT/Open-Source-Saturday-Milano/)
Commits
-------
c4e5e83b56 [Messenger] RoutableMessageBus route to default bus
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Allow intl timezones
| Q | A
| ------------- | ---
| Branch? | master
| 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 | ref #28836
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11502
This PR considers the ICU timezones (#28831) as valid, as well as the PHP ones.
Both can be used in `DateTimeZone`, but expired timezones cannot be used with `IntlTimeZone`. The `intlCompatibility` option ensures compatibility between both.
Practically this allows for both `UTC` and `Etc/UTC`, where the latter should be preferred. I.e. currently `Etc/UTC` is considered an invalid timezone ... which it's not.
Commits
-------
7294b59c65 [Validator] Allow intl timezones
This PR was squashed before being merged into the 4.3-dev branch (closes#30970).
Discussion
----------
[Messenger] Adding failure transport support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31231
| License | MIT
| Doc PR | symfony/symfony-docs#11236
This adds "failure" transport support for messenger, so that messages that fail on *all* their retries can be collected in one spot and retried later if wanted:
```yml
framework:
messenger:
failure_transport: failed
transports:
async:
dsn: 'amqp://'
failed:
dsn: 'doctrine://default?queue_name=failed'
routing:
'App\Message\SmsNotification': async
```
In this setup, `SmsNotification` would be retried 3 times on the `async` transport (current behavior) and then finally sent to the `failed` transport. The `failed` transport can be consumed like a normal transport, but should usually be handled & consumed by one of the new commands:
**> bin/console messenger:failed:show**
<img width="861" alt="Screen Shot 2019-04-10 at 3 15 45 PM" src="https://user-images.githubusercontent.com/121003/55917329-ddc54280-5ba3-11e9-878c-af3c653643de.png">
**> bin/console messenger:failed:show 217**
<img width="804" alt="Screen Shot 2019-04-10 at 3 15 55 PM" src="https://user-images.githubusercontent.com/121003/55917360-f33a6c80-5ba3-11e9-9f12-a8c57a9a7a4b.png">
**> bin/console messenger:failed:purge 217**
<img width="835" alt="Screen Shot 2019-04-10 at 3 16 07 PM" src="https://user-images.githubusercontent.com/121003/55917383-ff262e80-5ba3-11e9-9720-e24176b834f7.png">
**> bin/console messenger:failed:retry 217**
<img width="737" alt="Screen Shot 2019-04-10 at 3 16 29 PM" src="https://user-images.githubusercontent.com/121003/55917396-09482d00-5ba4-11e9-8d51-0bbe2b4ffc14.png">
**> bin/console messenger:failed:retry 218 -vv**
<img width="1011" alt="Screen Shot 2019-04-10 at 3 20 39 PM" src="https://user-images.githubusercontent.com/121003/55917503-6512b600-5ba4-11e9-9365-4ac87d858541.png">
**Note** (This screenshot is ugly - need to make the dump of the message and the exception more attractive)
Or you can run `bin/console messenger:failed:retry` without any argument, and it will consume the failed messages one-by-one and ask you if you want to retry/handle each. By passing
Cheers!
Commits
-------
36487e5f44 [Messenger] Adding failure transport support
* 3.4:
relax assertions in tests
[Validator] Translate messages into Japanese
Fix Thai translation in validators.th.xlf
[FramworkBundle] mark any env vars found in the ide setting as used
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Extra timezone tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Guarantees timezone data integrity. Ideally to go before #31292 :)
Commits
-------
a3cac2b4c9 [Intl] Extra timezone tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Compile localized timezone offset name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
A tiny follow up of #31295
Commits
-------
7a40d207b7 [Intl] Compile localized timezone offset name
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Translator] Add sources when dumping qt files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR implements similar functionality as #30909, but for Qt files. Currently, only the Qt element `location` is supported, so only `sources` metadata is included in the dump.
Commits
-------
ff7577d650 Add sources when dumping qt files
This PR was squashed before being merged into the 4.3-dev branch (closes#31306).
Discussion
----------
[DI] Improve exception message on missing $ of named argument
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | -
| New feature? | -
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #31265 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | not related
<!--
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.
-->
### Description
As described in #31265, missing the prefix `$` in an argument name:
```
App\Word\WordChecker:
arguments:
checkers:
- '@App\Word\Checker\StaticWordChecker'
- '@App\Word\Checker\BannedWorldListChecker'
```
led to the following error:
`Invalid service "App\Word\WordChecker": the value of argument "checkers" of method "__construct()" must be null, an instance of Symfony\Component\DependencyInjection\Reference or an instance of Symfony\Component\DependencyInjection\Definition, array given.`
As this error message is quite confusing I changed it to:
`Invalid service "App\Word\WordChecker": Did you forget to add the "$" prefix to argument checkers`
### Todo
- [x] add a unit test
Commits
-------
d0e44996f9 [DI] Improve exception message on missing $ of named argument
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] [DX] NotNormalizableValueException should note which attribute failed to denormalize when possible
| 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? | no <!-- 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 | #29230 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR
<!--
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.
-->
This is the idea of a fix discussed with @stof about the improvment of serializer error message. Now we can try a implementation lis this one. This is linked to EUFOSSA even if this has been done not in the hackathon.
Commits
-------
59942b40d1 [Serializer] [DX] NotNormalizableValueException should note which attribute failed to denormalize when possible
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Change the phrasing of the deauthenticated event
| 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? | no <!-- 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 | <!-- 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.
-->
Fixing @fabpot's review.
Commits
-------
fa92272dc1 [Security] Change the phrasing of the deauthenticated event
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Fix LocaleDataGenerator
| Q | A
| ------------- | ---
| Branch? | master
| 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 -->
Forgotten in #28846
The `getName()` method for scripts/regions/languages is stilled needed during locale generation.
Commits
-------
137ce3f6d2 [Intl] Fix LocaleDataGenerator
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] fix skipping h2push test case
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30975
| License | MIT
| Doc PR | -
Commits
-------
3aaa742d40 [HttpClient] fix skipping h2push test case
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Allows to register handlers on a specific transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30110
| License | MIT
| Doc PR | symfony/symfony-docs#11236
With the #30008 pull-request in, we can now do the following:
```yaml
framework:
messenger:
transports:
events:
dsn: amqp://guest:guest@127.0.0.1/%2f/events
options:
queues:
3rdparty:
binding_keys: [ 3rdparty ]
projection:
binding_keys: [ projection ]
events_3rdparty: amqp://guest:guest@127.0.0.1/%2f/events?queues[3rdparty]
events_projection: amqp://guest:guest@127.0.0.1/%2f/events?queues[projection]
routing:
'App\Message\RegisterBet': events
```
This will bind two queues to the `events` exchange, fantastic:
<img width="325" alt="Screenshot 2019-04-07 at 10 26 27" src="https://user-images.githubusercontent.com/804625/55680861-af373580-591f-11e9-8f1e-2d3b6ddba2fd.png">
---
Now, in this setup, the message will be duplicated within the `3rdparty` & `projection` queues. If you just run the consumer for each transport, it will consume the message and call all the handlers. You can't do different things based on which queue you have consumed the message. **This pull-request adds the following feature:**
```php
class RegisterBetHandler implements MessageSubscriberInterface
{
public function __invoke(RegisterBet $message)
{
// Do something only when the message comes from the `events_projection` transport...
}
/**
* {@inheritdoc}
*/
public static function getHandledMessages(): iterable
{
yield RegisterBet::class => [
'from_transport' => 'events_projection',
];
}
}
```
---
In the debugger, it looks like this:
<img width="649" alt="Screenshot 2019-04-07 at 10 29 55" src="https://user-images.githubusercontent.com/804625/55680892-1d7bf800-5920-11e9-80f7-853f0201c6d8.png">
Commits
-------
f0b2acd67d Allows to register handlers on a specific transport (and get rid of this handler alias)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Ensure that a TransportException is thrown on redis error
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
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.
-->
Commits
-------
1857395137 [Messenger] Ensure that a TransportException is thrown on redis error
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add WorkerStoppedEvent
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
In 4.2, one was able to decorate a transport and hook into `TransportInterface::stop()` to perform some business tasks when the `messenger:consume` process gets killed.
In 4.3 the `stop()` logic has been moved to `Worker` which cannot be decorated when used via `messenger:consume`.
This PR adds a marker event dispatched when the worker is stopped to provide the same capability.
Briefly discussed with @weaverryan.
My use case:
I have a temporary CSV file locally which grows while consuming jobs.
This file is uploaded to AWS S3 and squashed once a while (every 5minutes). It is also uploaded when the `messenger:consume` process gets stopped (to store the remaining lines).
For the former (time-based upload), I can listen on `WorkflowMessageHandledEvent` to make the upload happens in case the 5 minutes delay is elapsed. This solves the latter.
Commits
-------
0e7898b622 [Messenger] Add WorkerStoppedEvent
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Dispatch an event when "logout user on change" steps in
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #26902 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11450 <!-- 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.
-->
This adds a new event when the user has been changed and has been log out from the apps, it allow someone to register to this event and do something with either to token or the refreshedUser.
Commits
-------
40e42183b8 [Security] Dispatch an event when "logout user on change" steps in
* 4.2:
[TwigBridge] Require twig ^1.40|^2.9
[Serializer] Fix tests
Use the apply tag instead of the filter tag
Updated some translation files
[Translator] Preserve default domain when extracting strings from php files
* 3.4:
[TwigBridge] Require twig ^1.40|^2.9
[Serializer] Fix tests
Use the apply tag instead of the filter tag
Updated some translation files
[Translator] Preserve default domain when extracting strings from php files
This PR was squashed before being merged into the 4.3-dev branch (closes#31242).
Discussion
----------
Update LoggingTranslator to log the change of a locale
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I would like to see inside my logs that the translator changed the locale. I've had a case that I spent significant amount of time trying to debug it.
Commits
-------
20380f9afe Update LoggingTranslator to log the change of a locale
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a redis stream transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Yes
| Fixed tickets | #28681
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11341
As discussed in #28681 this will refractor @soyuka implementation of redis using the redis stream features so we don't need to handle parking the messages ourself and redis is doing it for us.
Some interesting links about streams:
- https://redis.io/topics/streams-intro
- https://brandur.org/redis-streams
```
+-----------R
| GET | -> XREADGROUP
+-----------+
|
| handleMessage
V
+-----------+ No
| failed? |---------------------------+
+-----------+ |
| |
| Yes |
V |
+-----------+ No |
| retry? |---------------------------+
+-----------+ |
| |
| Yes |
V V
+-----------R +-----------R
| REJECT | -> XDEL | ACK | -> XACK
+-----------+ +-----------+
```
**GET**: Will use `XREADGROUP` to read the one message from the stream
**REJECT**: Reject will just remove the message with `XDEL` from the stream as adding it back to the stream is handled by symfony worker itself
**ACK**: Will use the `XACK` Method to ack the message for the specific group
The sender will still be simple by calling the `XADD` redis function.
#EU-FOSSA
Commits
-------
ff0b8554ea Refractor redis transport using redis streams
7162d2ec1d Implement redis transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make error message more clear
| 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? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
When you get the following error message `No transport supports the given DSN "...".`, you might think that this relates to a mailer transport or a messenger transport. Let's make this real clear.
<!--
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.
-->
Commits
-------
cdcb6c9969 made error message more clear
This PR was squashed before being merged into the 4.3-dev branch (closes#30888).
Discussion
----------
[serializer] extract normalizer tests to traits
eufossa
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Relates to #30818
| License | MIT
| Doc PR | -
As discussed with @joelwurtz, extract normalizer functionality tests into traits to ensure consistent behaviour of all normalizers.
* [x] Rebase when #30977, #30950 and #30907 are merged to master **blocker**
* [x] Clean up order of trait inclusion and methods in the tests
* [x] Clean up fixture classes of the traits. I started having one class named the same as the trait, where possible
Stuff that we should do eventually, but can also do in separate pull requests, after this one has been merged:
* [ ] Extract all features that we can (the existing normalizer tests should more or less only have the legacy tests in them, all functionality should be in trait)
* [ ] Run test coverage and increase coverage so that we cover all important features and all relevant error cases.
Commits
-------
2b6ebea73c [serializer] extract normalizer tests to traits
This PR was squashed before being merged into the 3.4 branch (closes#31275).
Discussion
----------
[Translator] Preserve default domain when extracting strings from php files
| 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 |
Use default domain when extracting translation strings with `null` as domain.
Commits
-------
ca77d9a33e [Translator] Preserve default domain when extracting strings from php files
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make the email validator a hard requirement of mailer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
I think it makes sense to have the email address validator as a hard requirement of Mailer... as I don't see how you can send emails without an email address :)
Commits
-------
5ad2cb1b5a made the email validator a hard requirement of mailer
This PR was squashed before being merged into the 4.3-dev branch (closes#31195).
Discussion
----------
[Form] Add intltimezone input to TimezoneType
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #22302 (ref #28836)
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11463
cc @rvanlaak
Commits
-------
e169dfb968 [Form] Add intltimezone input to TimezoneType
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing] do not encode comma in query and fragment
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #27266
| License | MIT
| Doc PR |
Commits
-------
76f6c97416 [Routing] allow comma and other reserved chars without special meaing to not be encoded in the query and fragment
* 4.2:
Fix url matcher edge cases with trailing slash
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
Fix left-associative ternary deprecation warnings for PHP 7.4
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
[Security] Cleanup "Digest nonce has expired." translation
Intercept redirections only for HTML format
[PhpUnitBridge] fix reading phpunit.xml on bootstrap
resolve class name parameters
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
* 3.4:
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
Intercept redirections only for HTML format
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
This PR was squashed before being merged into the 4.2 branch (closes#31240).
Discussion
----------
Fix url matcher edge cases with trailing slash
| Q | A
| ------------- | ---
| Branch? | master / 4.2 (not sure whether this should've been against 4.2)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (I think... if so, in obscure route configurations like the ones that broke in 4.2.7 ;) )
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30721
| License | MIT
As stated in #30721 the "redirecting" (compiled) UrlMatcher ignored host-requirements when doing a 'matched url except for trailing slash difference'-redirect.
With routes like this, you'd get 404's rather than 200's on the second routes.
```yaml
host1.withTrail:
path: /foo/ # host2/foo would become host2/foo/ due to this partial path-match
host: host1
host2.withoutTrail: # A request for host2/foo should match this route
path: /foo # host2/foo/ does not match this path
host: host2
```
This was caused by too eagerly testing whether a route could've worked with an additional trailing slash.
If it could be, that would result in an attempt to redirect _before_ testing the host.
The original url would get the additional slash and prior to actually redirecting, it'd be retested against the available routes. _That new url_ would actually match no routes, since now the host check for the first routes would actually be executed and fail the match for those routes. The adjusted path in the route does not match the second sets of routes...
This PR moves the trailing-slash check to after the host checks. I've added several tests with variants on these edge cases.
*Note:* This is a bug in 4.2 (and 4.3).
I fixed it against master. It appears 4.2's PhpMatcherTrait was renamed to CompiledUrlMatcherTrait in 4.3. But that made it loose its history.
So I'm not sure how to proceed from here. I can rebase it on 4.2 and do the change in PhpMatcherTrait, but that would probably fail to merge in master? I'm not nearly proficient enough in Symfony PR's to know how to solve all this ;)
@nicolas-grekas also asked for these or similar tests to be added to 3.4 as 'proof' those routes worked in that version as well. I have not (yet) done so.
The tests did work on the non-redirecting UrlMatcher without change (i.e. just running UrlMatcherTest), which implies - to me at least - the routes where properly defined and should not result in 404's simply because a RedirectableUrlMatcherInterface _can_ do redirects.
Actually, since I needed to change UrlMatcher as well, I'm not convinced these bugs where totally absent in 3.4. They didn't occur with the compiled version, since the host check was the very first if-statement in that humongous if-tree it generated.
PS, the branch name is a bit dramatic ;)
Commits
-------
4fcfa9d85c Fix url matcher edge cases with trailing slash
This PR was merged into the 3.4 branch.
Discussion
----------
Fix name and phpdoc of ContainerBuilder::removeBindings
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29944#discussion_r276718323
| License | MIT
| Doc PR | N/A
<!--
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.
-->
Commits
-------
c93194d1db Fix name and phpdoc of ContainerBuilder::removeBindings
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] ease testing and allow forking the middleware stack
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31179
| License | MIT
| Doc PR | -
A less radical alternative than #31185 that preserves laziness and addresses the linked issue.
Commits
-------
3bdf4b0e0f [Messenger] ease testing and allow forking the middleware stack
This PR was merged into the 4.2 branch.
Discussion
----------
[Form] resolve class name parameters
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31052
| License | MIT
| Doc PR |
Commits
-------
5235be4aa3 resolve class name parameters
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Cache] Add optimized FileSystem & Redis TagAware Adapters
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes _TODO: src/**/CHANGELOG.md_
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28250
| License | MIT
| Doc PR | symfony/symfony-docs#... TODO
Reduces cache lookups by 50% when using TagAware, by changing logic of how tag information is stored to avoid having to look it up on getItem(s) calls.
For Filesystem symlinks are used, for Redis "Set" datatype is used.
Commits
-------
3278cb1c7e [Cache] Add optimized FileSystem & Redis TagAware Adapters
Reduces cache lookups by 50% by changing logic of how tag information is
stored to avoid having to look it up on getItem(s) calls.
For Filesystem symlinks are used, for Redis "Set" datatype is used.
This PR was squashed before being merged into the 4.2 branch (closes#31023).
Discussion
----------
[Routing] Fix route URL generation in CLI context
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30996
| License | MIT
| Doc PR | -
This fixes#30996 and makes URL generation in the CLI context behave the same as it does in the web context where the `LocaleListener` sets the default locale (to the router context).
The Travis CI failure is related to the fact that the constraint for `symfony/routing` should be bumped to `^4.2.6` in the composer.json of the FrameworkBundle (when it gets tagged).
Commits
-------
4a1ad4a5d6 [Routing] Fix route URL generation in CLI context
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Update the ICU data to 64.2
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? |no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, including intl-data group
| Fixed tickets | -
| License | MIT
| Doc PR | -
It didn't take long for the ICU team to release a new version.
From their [changelog](http://site.icu-project.org/download/64#TOC-ICU4C-Download), 64.2 provides bug fixes and:
* Draft Unicode 12.1 data integration
* Updated locale data imported from CLDR 35.1
* Support for the new Japanese era "Reiwa" (令和).
Commits
-------
9aa2349ac6 [Intl] Update the ICU data to 64.2
* 4.2:
[HttpFoundation] fix tests
[Routing] fix trailing slash matching with empty-matching trailing vars
[Routing] fix matching trailing vars with defaults
[Validator] fix LegacyTranslatorProxy
call method with Translator component only
bumped Symfony version to 4.2.8
updated VERSION for 4.2.7
updated CHANGELOG for 4.2.7
bumped Symfony version to 3.4.27
updated VERSION for 3.4.26
updated CHANGELOG for 3.4.26
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] fix trailing slash matching with empty-matching trailing vars
| 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 | -
Reported by @bmack in https://github.com/symfony/symfony/pull/31107#issuecomment-484681404
This highlights a small inconsistency that exists for a long time (checked on 2.7 at least):
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.*'])` matches `/en-en/`
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.+'])` doesn't match it
(while both match `/en-en` and `/en-en/foo`)
This PR ensures the former behavior is preserved, while #31167 redirects the later to `/en-en`.
Commits
-------
d6da21ac19 [Routing] fix trailing slash matching with empty-matching trailing vars
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Add NativePasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds a new `NativePasswordEncoder` that defaults to the best available hashing algo to `password_hash()`. Best is determined by "us" or "php", the goal being that this will change in the future as new algos are published.
This provides a native encoder that we should recommend using by default.
Commits
-------
28f7961c55 [Security] Add NativePasswordEncoder
* 4.2:
Revert "bug #30423 [Security] Rework firewall's access denied rule (dimabory)"
[FrameworkBundle] minor: remove a typo from changelog
[VarDumper] fix tests with ICU 64.1
[VarDumper][Ldap] relax some locally failing tests
[Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
Make MimeTypeExtensionGuesser case insensitive
Fix get session when the request stack is empty
[Routing] fix trailing slash redirection with non-greedy trailing vars
[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] fix trailing slash redirection with non-greedy trailing vars
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30863, #31066
| License | MIT
| Doc PR | -
Fixes redirecting `/123/` to `/123` when the route is defined as `/{foo<\d+>}`
Commits
-------
d88833d27a [Routing] fix trailing slash redirection with non-greedy trailing vars
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31092, #31025
| License | MIT
| Doc PR | -
This allows defining a translator that implements only the new interface and use it with ValidatorBuilder.
ping @dvdknaap, @snebes since you were affected.
Commits
-------
a12656eaad [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This PR was merged into the 4.2 branch.
Discussion
----------
[HttpKernel] Fix get session when the request stack is empty
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
This bug happen behind an exception on a kernel response event, when one collector (e.g. `RequestDataCollector`) is trying to get the request session and the request stack is currently empty.
**Reproducer**
https://github.com/yceruto/get-session-bug (`GET /`)
See logs on terminal:
```bash
Apr 15 20:29:03 |ERROR| PHP 2019-04-15T20:29:03-04:00 Call to a member function isSecure() on null
Apr 15 20:29:03 |ERROR| PHP PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function isSecure() on null in /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/SessionListener.php:43
Apr 15 20:29:03 |DEBUG| PHP Stack trace:
Apr 15 20:29:03 |DEBUG| PHP #0 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php(59): Symfony\Component\HttpKernel\EventListener\SessionListener->getSession()
Apr 15 20:29:03 |DEBUG| PHP #1 /home/yceruto/demos/getsession/vendor/symfony/http-foundation/Request.php(707): Symfony\Component\HttpKernel\EventListener\AbstractSessionListener->Symfony\Component\HttpKernel\EventListener\{closure}()
Apr 15 20:29:03 |DEBUG| PHP #2 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php(65): Symfony\Component\HttpFoundation\Request->getSession()
Apr 15 20:29:03 |DEBUG| PHP #3 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/Profiler/Profiler.php(167): Symfony\Component\HttpKernel\DataCollector\RequestDataCollector->collect(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Respo in /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/SessionListener.php on line 43
```
Friendly ping @nicolas-grekas as author of the previous PR https://github.com/symfony/symfony/pull/28244
Commits
-------
d62ca37ab6 Fix get session when the request stack is empty
* 3.4:
Revert "bug #30423 [Security] Rework firewall's access denied rule (dimabory)"
[FrameworkBundle] minor: remove a typo from changelog
[VarDumper][Ldap] relax some locally failing tests
[Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
Make MimeTypeExtensionGuesser case insensitive
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Added the missing translations for the Tagalog ("tl") locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | No
| New feature? | No
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes
| Fixed tickets | #30192
| License | MIT
| Doc PR |
[Validator] This pull request will add the missing translations for the Tagalog ("tl") locale.
Commits
-------
6ab574b7c9 [Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Make MimeTypeExtensionGuesser case insensitive
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Some mime types have a camelCase word in them.
The Apache HTTPD project list items are all lower case.
So I suggest making the $mimeType string lowercase while checking the array key.
That way, we can keep the list in sync.
Example: xlsm file mime type is `application/vnd.ms-excel.sheet.macroEnabled.12`
The key that matches the xlsm extension in the `$defaultExtensions` array is `application/vnd.ms-excel.sheet.macroenabled.12`
Example xlsm file:
https://github.com/vermeirentony/xlsm-example
Commits
-------
e294ee6b9a Make MimeTypeExtensionGuesser case insensitive
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Add a separator in the remember me cookie hash
Based on #89
Commits
-------
a29ce2817c [Security] Add a separator in the remember me cookie hash
* 4.2:
bumped Symfony version to 4.2.7
updated VERSION for 4.2.6
updated CHANGELOG for 4.2.6
bumped Symfony version to 3.4.26
updated VERSION for 3.4.25
update CONTRIBUTORS for 3.4.25
updated CHANGELOG for 3.4.25
Workaround for \DateInterval::createFromDateString()
[DoctrineBridge] [DX] Update exception text in ManagerRegistry::resetService to avoid confusion.
Missing Lithuanian translations added to validator component.
* 3.4:
bumped Symfony version to 3.4.26
updated VERSION for 3.4.25
update CONTRIBUTORS for 3.4.25
updated CHANGELOG for 3.4.25
Workaround for \DateInterval::createFromDateString()
Missing Lithuanian translations added to validator component.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Remove base64_encode & use addslashes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | already covered by existing issue
In #30814, we base64_encoded messages because some transports (specifically DoctrineTransport + Postgresql & SQS) do not allow binary data.
The downside is that the messages become unreadable, which makes it much less convenient to debug your messages with 3rd party monitoring tools, for example.
This PR replaces base64_encode with addslashes. Another alternative (that I first tried in this PR) was to use a blob type, which Drupal does in its code (https://www.drupal.org/project/drupal/issues/690746). But, it still meant that binary data could cause problems with other transports, like SQS.
I also put all the serializer config under a nice, neat `serializer` key under messenger.
Best seen with `?w=1`.
Cheers!
Commits
-------
70b448d120 Reorganizing messenger serializer config and replacing base64_encode with addslashes
This PR was squashed before being merged into the 4.3-dev branch (closes#31040).
Discussion
----------
[BrowserKit] Fixed BC-break introduced by rename of Client to Browser
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/31039
| License | MIT
| Doc PR |
Since #30541 the inheritance hierarchy of `\Symfony\Component\BrowserKit\Client` has changed. Notably the test.client no longer is an instance of `\Symfony\Component\BrowserKit\Client`.
This PR uses `class_alias` to fix the class hierarchy similarly as has been done in Twig. In this case I copied the approach of `Twig_TokenParser_AutoEscape` and `\Twig\TokenParser\AutoEscapeTokenParser`
Commits
-------
6a94dea5cd [BrowserKit] Fixed BC-break introduced by rename of Client to Browser
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] Use name converter when normalizing constraint violation list
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
When using name converter with serializer and the default ConstraintViolationListNormalizer, returned propertyPaths was not converted to the same format.
<!--
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.
-->
Commits
-------
dd93b707cc Use name converter when normalizing constraint violation list
This PR was squashed before being merged into the 4.3-dev branch (closes#28846).
Discussion
----------
[Intl] Simplify API
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #18368
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11221
Simplifies the Intl API. It greatly reduces the no. of boilerplate classes in this component. Very over complicated, much wow :)
Solving (IMHO):
```php
class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface
```
Which seems very over complicated just to provide static data.
```php
// before
Intl::getLanguageBundle()->getLanguageName() // string | null
// after
Languages::getName() // string
Languages::exists() // bool
```
I left out Canonicalization on puropose, that's a new topic to me.
- [x] Languages
- [x] Locales
- [x] Currencies
- [x] Regions
- [x] Scripts
- [ ] Timezones (#28831)
- [x] Update constraints
- [x] Update form types
Thoughts?
Commits
-------
d6b67d469a [Intl] Simplify API
* 4.2:
Skip testing the phpunit-bridge on not-master branches when $deps is empty
more tests
[DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
[DI] fix removing non-shared definition while inlining them
* 3.4:
Skip testing the phpunit-bridge on not-master branches when $deps is empty
more tests
[DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Overriding services autowired by name under _defaults bind not working
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28326
| License | MIT
This is an implementation of ideas and suggestions of @nicolas-grekas and @GuilhemN.
Commits
-------
7e805eae2b more tests
35a40ace6f [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] Document the state object that is passed around by the HttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
In an attempt to make the code of the new HttpClient component more understandable, I've introduced internal classes that document the `$multi` object that is being passed around between *Client and *Response classes.
My goal is to make the code more accessible to potential contributors and static code analyzers.
Commits
-------
20f4eb3204 Document the state object that is passed around by the HttpClient.
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
* 4.2:
Catch empty deprecation.log silently (fixes#31050)
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
* 3.4:
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
This PR was merged into the 3.4 branch.
Discussion
----------
Optimize SVGs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | / <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | / <!-- required for new features -->
Used [svgo](https://github.com/svg/svgo) to optimize the svgs. I kept the `viewBox` attribute to keep the aspects when SVGs are rescaled.
I also added `insert_final_newline = false` to the `.editorconfig` file because the newlines are removed from the SVGs and there's only one line left.
Commits
-------
4614cea9d2 Optimize SVGs
This PR was merged into the 3.4 branch.
Discussion
----------
property normalizer should also pass format and context to isAllowedAttribute
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | found while working on https://github.com/symfony/symfony/pull/30888
| License | MIT
| Doc PR | -
the context and format are optional parameters to `isAllowedAttribute`, but should be forwarded. due to this omission, the PropertyNormalizer was ignoring the 'attributes' context option (and does in version 4 also ignore the 'ignore_attributes' context option - that one is a property on the normalizer class in version 3 and therefore not ignored here)
Commits
-------
13e2fb735d property normalizer should also pass format and context to isAllowedAttribute
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Dotenv] Improve Dotenv messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | no
| License | MIT
| Doc PR | no
This PR improves a little bit of some messages from https://github.com/symfony/symfony/pull/31062
The first, passive sentences may be more suitable here because the value couldn't change by itself. It is changed by us - human.
The second, if we use **The default value of $usePutenv" argument of "%s\'s constructor**, we have to pass `__CLASS__` as the second parameter of `sprintf` function instead of `__METHOD__`. So, I suggest using **The default value of $usePutenv" argument of "%s"**.
Finally, the deprecation warning of `Dotenv::__construct()` is very long. Let's separate it into 2 pieces for readable reason.
Commits
-------
e871a6a83a Improve Dotenv messages
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mailer] fixed roundrobin test one dead which should recover
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP <!-- please add some, will be required by reviewers -->
| License | MIT
| Doc PR | n/a
The Test `testSendOneDeadButRecover` is not checking the recovery part of its job. I fixed that by adding more `send` calls and added another test so that both recoveries (within retry period and not within retry period) are covered.
The `RoundRobinTransport` had a bug where the transport is dead but not yet in the `retryPeriod`. In that case the transport would not have been added back to the stack and thus got lost. Fixed that but that required an additional check if all transports are dead to prevent an infinite loop.
Commits
-------
5d4d4e7a71 fixed roundrobin dead transport which should recover
ccbb171312 fixed roundrobin dead transport which should recover
* 4.2:
fixed bad merge
Show more accurate message in profiler when missing stopwatch
CS Fixes: Not double split with one array argument
[Serializer] Add default object class resolver
Remove redundant animation prefixes
Remove redundant `box-sizing` prefixes
[VarExporter] support PHP7.4 __serialize & __unserialize
Rework firewall access denied rule
MetadataAwareNameConverter: Do not assume that property names are strings
[VarExporter] fix exporting classes with private constructors
fixed CS
Fix missing $extraDirs when open_basedir returns
This PR was squashed before being merged into the 4.3-dev branch (closes#31062).
Discussion
----------
[Dotenv] Deprecate useage of "putenv"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
From discussions on https://github.com/symfony/recipes/pull/571, I think it is a good idea to make people opt-in to using `putenv`.
In Symfony 5.0 we will just change the value of the constructor. As an alternative, we could decide we want to remove `putenv` in Symfony 5.0. If so, I would also deprecate `$usePutenv=true`.
Commits
-------
8e45fc043e [Dotenv] Deprecate useage of \"putenv\"
* 3.4:
Show more accurate message in profiler when missing stopwatch
CS Fixes: Not double split with one array argument
Remove redundant animation prefixes
Remove redundant `box-sizing` prefixes
Rework firewall access denied rule
fixed CS
Fix missing $extraDirs when open_basedir returns
This PR was merged into the 3.4 branch.
Discussion
----------
CS Fixes: Not double split with one array argument
| Q | A
| ------------- | ---
| Branch? | 3.4 (master from #31063)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | None
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
Commits
-------
a56bf552ad CS Fixes: Not double split with one array argument
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security][TokenInterface] Prepare for the new serialization mechanism
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Continuation of https://github.com/symfony/symfony/pull/30965
Commits
-------
e6455ea2d8 [Security][TokenInterface] Prepare for the new serialization mechanism
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
This PR was squashed before being merged into the 4.3-dev branch (closes#31044).
Discussion
----------
[HttpClient] Do not allow setting both json and body
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30769
| License | MIT
| Doc PR | n/a
This will keep developers from using both the options `$options['body']` and `$options['json']`. Using both results in only json being the body of the request, which might lead to unexpected results.
Commits
-------
601adf5de7 [HttpClient] Do not allow setting both json and body
This PR was squashed before being merged into the 4.3-dev branch (closes#31021).
Discussion
----------
[Cache] Added command for list all available cache pools
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/9782
| License | MIT
| Doc PR |
Commits
-------
5c210e6fd5 [Cache] Added command for list all available cache pools
This PR was squashed before being merged into the 4.2 branch (closes#31026).
Discussion
----------
[Serializer] Add default object class resolver
| 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 | -
The commit 1d8b5af3f0 introduce a BC break because before that commit the `extractAttributes` the `$object` can be a string which contain the fully qualified name of an object.
To fix the BC break and preserve the new feature, I suggest to create a default object class resolver if it is not set by the developer.
Commits
-------
dd5b8f16f5 [Serializer] Add default object class resolver
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] MetadataAwareNameConverter: Do not assume that property names are strings
| Q | A
| ------------- | ---
| Branch? | 4.2 (class introduced in v4.2.3)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/api-platform/core/pull/2709
| License | MIT
| Doc PR | n/a
When this class was introduced, there was an assumption made about the type of `propertyNames` and therefore a `: ?string` return type was introduced in the fallbacks/normalization private methods. Because symfony doesn't use strict mode yet (compatibility issues with php IIRC), when using a non-string property name (for example the integer `0` which is a valid property name in an array), it will convert the integer to a string.
This is not good, especially if you have a name converter that returns the given property name (ie no transformation) you'll have it's type changed which isn't correct.
I've discovered this bug while working on adding this name converter in api platform (https://github.com/api-platform/core/pull/2709).
Commits
-------
af1e136ca0 MetadataAwareNameConverter: Do not assume that property names are strings
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Rework firewall's access denied rule
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~~#30099~~, #28229
| License | MIT
| Doc PR |
Follow tickets provided above to reproduce bugs. (there are also some project examples)
~~In addition, I'm looking for someone who knows an answer to [this](https://github.com/symfony/symfony/issues/30099#issuecomment-468693492) regarding rework in this PR.~~
Commits
-------
5790859275 Rework firewall access denied rule
Test coverage added in #30997 did a good job of validating previous
behaviour, but didn't adequately cover the new callback logic. Added
coverage for new methods on the Question object.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Config] Deprecate TreeBuilder::root
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? |
| Fixed tickets | #29876
| License | MIT
| Doc PR | —
Alternative idea to #31015. Or is the `root` method still needed?
It would look like this:
![Screenshot 2019-04-09 01 15 04](https://user-images.githubusercontent.com/330436/55762865-fbd85900-5a64-11e9-9680-0870c85d1c09.png)
Commits
-------
ff6bc79eba Deprecate TreeBuilder::root
This PR was merged into the 4.3-dev branch.
Discussion
----------
fix tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
* use legacy group when using the deprecated `hinclude_default_template`
templating config option
* conflict with DependencyInjection 4.2 in the HttpKernel component to
be able to rely on five values being retrieved from the values of the
`BoundArgument` class
* let the TwigBundle conflict with versions of FrameworkBundle that do
not ship the `url_helper` service
Commits
-------
682855fa7d fix tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Console] Add callback support to Console\Question autocompleter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | minor edge case, see below
| Deprecations? | no
| Tests pass? | yes (with expanded coverage)
| Fixed tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#11349
Autocompletion is a useful feature, but it's not always possible to anticipate every input the user could provide in advance. For instance, if we're allowing the user to input a path to a file, it's not practical to populate an array with every file and directory in the filesystem, but we can easily build a callback function that populates its suggestions based on the path already inputted.
This change replaces the autocomplete logic that accepts an array of suggestions with an architecture that uses a callback function to populate suggestions in real time as the user provides input.
The first commit adds a test class covering all methods of the `Question` object, while the second commit modifies the `Question` object to accept and store a callback function. The existing `[gs]etAutocompleterValues()` methods are preserved, but instead of being referenced directly from the `QuestionHelper`, they create and call their own callbacks to emulate the current behaviour.
There is one edge case that is changed, as documented in the test: when a `Traversable` object is passed to `setAutocompleterValues()`, the return value of `getAutocompleterValues()` will be the unpacked (array) form of that object rather than the object itself. The unpacking is done lazily and cached on the callback function.
Commits
-------
caad562c11 [Console] Add callback support to Console\Question autocompleter
In order to enable more dynamic use cases such as word-by-word
autocomplete and path-based autocomplete, update the autocomplete logic
of the Question object and its helper to accept a callback function.
This function is called on each keystroke and should return an array of
possibilities to present to the user.
The original logic only accepted an array, which required
implementations to anticipate in advance all possible input values.
This change is fully backwards-compatible, but reimplements the old
behaviour by initializing a "dumb" callback function that always returns
the same array regardless of input.
* use legacy group when using the deprecated `hinclude_default_template`
templating config option
* conflict with DependencyInjection 4.2 in the HttpKernel component to
be able to rely on five values being retrieved from the values of the
`BoundArgument` class
* let the TwigBundle conflict with versions of FrameworkBundle that do
not ship the `url_helper` service
This PR was squashed before being merged into the 4.3-dev branch (closes#30978).
Discussion
----------
[HttpClient] Allow the HTTP_PROXY environment variable lookup with phpdbg
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
`phpdbg` and `embed` are two other legit PHP SAPI's hence should be allowed.
Commits
-------
fbd439e0bd [HttpClient] Allow the HTTP_PROXY environment variable lookup with phpdbg
This PR was merged into the 4.2 branch.
Discussion
----------
[Console] fix buildTableRows when Colspan is use with content too long
| Q | A
| ------------- | ---
| Branch? | 4.2 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes ( new test added TableTest::testWithColspanAndMaxWith)
| Fixed tickets | https://github.com/symfony/symfony/issues/30701
| License | MIT
| Doc PR | no
<!-- fix for keeping ColumnMaxwith when Content is too long
Commits
-------
1cf9659b5f fix buildTableRows when Colspan is use with content too long
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] take setIgnoredAttributes() deprecation into account
| 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
-------
4134be127a take setIgnoredAttributes() deprecation into account
* 4.2:
[serializer] validate that the specified callbacks and max_depth_handler are actually callable
[Serializer] Respect ignored attributes in cache key of normalizer
fix resetting the COLUMN environment variable
Fix TestRunner compatibility to PhpUnit 8
Fix dark themed componnents
prevent mixup of the object to populate
* 3.4:
[Serializer] Respect ignored attributes in cache key of normalizer
fix resetting the COLUMN environment variable
Fix TestRunner compatibility to PhpUnit 8
prevent mixup of the object to populate
This PR was squashed before being merged into the 3.4 branch (closes#30907).
Discussion
----------
[Serializer] Respect ignored attributes in cache key of normalizer
EUFOSSA
| 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 | -
Do not share the attributes cache in object normalizer when using a different setting for the ignoredAttributes setting.
In Symfony 4.2, the setter is deprecated in favor of the ignored_attibutes option in the $context. When merging this up, we will however still need to respect the field as well for BC, the cache key does not look at the default context (apart from the deprecated modifiers, the default context is immutable)
There might be performance regression for some use cases, but also could be a performance improvement when using 'attributes' in the context with lists of objects of the same class.
Commits
-------
926d228877 [Serializer] Respect ignored attributes in cache key of normalizer
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Add Argon2idPasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #28093
| License | MIT
| Doc PR | TODO
Currently we have a `Argon2iPasswordEncoder` that may hash passwords using `argon2id` instead of `argon2i` (platform-dependent) which is not good.
This deprecates producing/validating `argon2id` hashed passwords using the `Argon2iPasswordEncoder`, and adds a `Argon2idPasswordEncoder` able to produce/validate `argon2id` hashed passwords only.
#EUFOSSA
Commits
-------
0c82173b24 [Security] Add Argon2idPasswordEncoder
This PR was merged into the 3.4 branch.
Discussion
----------
[serializer] prevent mixup in normalizer of the object to populate
EUFOSSA
| 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 | -
OBJECT_TO_POPULATE is meant to specify the top level object. The implementation left the option in the context and it would be used whenever we have the first element that matches the class. #30607 (to master) introduces the feature to also keep the instances of attributes to deeply populate an existing object tree. In both cases, we do not want the mix up to happen with what the current OBJECT_TO_POPULATE is.
Commits
-------
fdb668e051 prevent mixup of the object to populate
This PR was merged into the 4.3-dev branch.
Discussion
----------
Prepare for the new serialization mechanism
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
#eufossa
Should I maybe split this component by component ?
https://wiki.php.net/rfc/custom_object_serialization has been accepted.
Best viewed in "split" mode.
This work is kind of required for https://github.com/symfony/symfony/issues/30304 so we don't trigger 30 deprecations from our own code base.
Commits
-------
d412e77a9c Prepare for the new serialization mechanism
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mailer] allow user/pass on dsn while using failover/roundrobin
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
this PR provides two things:
1. It is possible now to user `username` and `password` in a failover or round robin transport when using smtp
2. Fixed a type problem with `username` and `password` for the smtp transport as `getUsername()` cannot return `null` because of its signature but if no `username` is provided then the property would have been `null`. Fixed with setting an empty string as default. Same for `password`. (This was discovered by adding a test - yeah!)
Commits
-------
4518ac56a1 allow user/pass on dns while using failover/roundrobin and type fix for username/password
This PR was merged into the 3.4 branch.
Discussion
----------
Make tests independent from each other
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | n/a
Environment variables set in a test need to be restored to their
previous values or unset if we want to be able to run tests
independently.
Credits to @ostrolucky for spotting this issue, I'm available for help when merging this in more recent branch (issues may appear then).
Created during the EU-FOSSA hackathon
Commits
-------
00883fc409 Make tests independent from each other
This PR was merged into the 4.3-dev branch.
Discussion
----------
Allow env processor to resolve `::`
| 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 | N/A
The env processor resolve to null when no fallback are provided. ie. `env(default::NOT_EXISTS)`
Issue is that the regexp does not allow such pattern. thus made the feature unusable.
Commits
-------
6b6c24c618 Allow env processor to resolve `::`
* 4.2:
fix tests
fix PHPUnit 4.8 compatibility
[Debug] Fixed error handling when an error is already handled when another error is already handled (5)
sync validator translations
* 3.4:
fix PHPUnit 4.8 compatibility
[Debug] Fixed error handling when an error is already handled when another error is already handled (5)
sync validator translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Fixed error handling when an error is already handled when another error is already handled (5)
| 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 |
---
Please, don't ask how to reproduce it :)
Commits
-------
a36c7315f4 [Debug] Fixed error handling when an error is already handled when another error is already handled (5)
This PR was squashed before being merged into the 3.4 branch (closes#30979).
Discussion
----------
Fix the configurability of CoreExtension deps in standalone usage
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet, but will allow fixing them
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When using the Forms entrypoint to configure the component, there was no chance to configure dependencies of the CoreExtension, as the one registered without argument was first and would win.
The builder now delays the prepending of the CoreExtension to do it only if the CoreExtension is not registered explicitly.
We discovered that when trying to fix tests for the FileType, where we wanted to pass a Translator to it.
Commits
-------
934118b131 Fix the configurability of CoreExtension deps in standalone usage
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] Experimental for ObjectListExtractor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30904
| License | MIT
| Doc PR | -
Related to #30818
I want to mark this class as `@expiremental` until we have the full refactoring done of the Serializer, also this would allow change needed if some behavior was not correctly taken into care in 4.3
Mark also `final` for the default implementation as we don't want that to be extendable and user should use composition over inheritance.
Commits
-------
b0cdf45464 Set object list extractor as expiremental, and use final for default implementation
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing][ObjectRouteLoader] Allow invokable route loader services
| Q | A
| ------------- | ---
| Branch? | master
| 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/11333
#eufossa
Fall back by default on the `__invoke` method when it is not configured.
Using a regex is easier to check that the format is valid, at least for the time we have to supports the single column notation.
TODO :
- [x] Changelog entry
- [x] Doc PR
Commits
-------
5bf7ad44e1 [Routing][ObjectRouteLoader] Allow invokable route loader services
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] fix using ProxyAdapter inside TagAwareAdapter
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30400
| License | MIT
| Doc PR | -
EUFOSSA
After some debugging this is my first attempt to fix this issue @nicolas-grekas 😊 Let's discuss it.
without the fix the test fails like this:
```
Testing Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest
F 1 / 1 (100%)
Time: 28 ms, Memory: 4.00MB
There was 1 failure:
1) Symfony\Component\Cache\Tests\Adapter\TagAwareAndProxyAdapterIntegrationTest::testIntegration
Failed asserting that Array &0 (
'tag1' => 0
'tag2' => 0
) is identical to 'bar'.
/var/www/symfony/src/Symfony/Component/Cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php:26
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Commits
-------
98b9be9b6a [Cache] fix using ProxyAdapter inside TagAwareAdapter
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DIC] Add a `require` env var processor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#11313
This adds a new `require` processor that will `require()` the PHP file given as input value and return the value `return`ed from that file. Leverages opcaching (yay!).
#EUFOSSA
Commits
-------
03da3a22b1 Add a `require` env var processor
This PR was squashed before being merged into the 4.3-dev branch (closes#30964).
Discussion
----------
[HttpKernel] Add a "short" trace header format, make header configurable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#11340
This pull requests adds the first usage of `array_key_first` to the Symfony code base. Additionally, it makes it possible to configure the `HttpCache` to also add a "trace" header in production.
The `HttpCache` is a convenient, low-barrier yet performant way of accelerating the application. By having the "trace" information returned as a header in production as well, you can write it to server log files. For example, with Apache you can use `%{X-Symfony-Cache}o` in the `LogFormat` directive to log response headers.
With the information in the log files, you can easily process it from logfile processing/system metrics tools to find out about cache performance, efficiency and the URLs that might need extra cache tweaking.
<img width="1040" alt="Bildschirmfoto 2019-04-07 um 11 43 23" src="https://user-images.githubusercontent.com/1202333/55681763-6e90e980-592a-11e9-900f-e096350531c2.png">
The "short" format will only output information for the main request to avoid leaking internal URLs for ESI subrequests. I also chose a concise format like `stale/valid/store` because that's much easier to parse out of logfiles (no whitespace, no need for quotes etc.).
If you're not comfortable with having `Symfony` in the header name that way, the header name can be changed through a configuration setting as well.
#FOSSHackathon
Commits
-------
9a2fcc9392 [HttpKernel] Add a \"short\" trace header format, make header configurable
* 4.2:
fix translating file validation error message
[Validator] Add missing Hungarian translations
Improving deprecation message of the Twig templates directory src/Resources/views
[3.4] [Validator] Add missing french validation translations.
[Validator] Only traverse arrays that are cascaded into
Handle case where no translations were found
[Validator] Translate unique collection message to Hungarian
fix tests
Run test in separate process
Use a class name that does not actually exist
[Profiler] Fix dark theme elements color
fix horizontal spacing of inlined Bootstrap forms
[Translator] Warm up the translations cache in dev
turn failed file uploads into form errors
* 3.4:
fix translating file validation error message
[Validator] Add missing Hungarian translations
[3.4] [Validator] Add missing french validation translations.
[Validator] Only traverse arrays that are cascaded into
Handle case where no translations were found
[Validator] Translate unique collection message to Hungarian
fix tests
Run test in separate process
Use a class name that does not actually exist
fix horizontal spacing of inlined Bootstrap forms
[Translator] Warm up the translations cache in dev
turn failed file uploads into form errors
This PR was merged into the 4.3-dev branch.
Discussion
----------
Fix Lock test suite
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | na
Commits
-------
1f66e7b2be Fix Lock test suite
This PR was squashed before being merged into the 4.3-dev branch (closes#30862).
Discussion
----------
[Routing] UrlHelper to get absolute URL for a path
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
I noticed that I need to generate absolute urls quite often. For example when normalizing uploads in API. I found Twig's `absolute_url()` really helpful, but obviously `Symfony\Bridge\Twig\Extension\HttpFoundationExtension` cannot be used as a normalizer's argument service.
In this PR I propose to extract `HttpFoundationExtension::generateAbsoluteUrl` and `HttpFoundationExtension::generateRelativePath` to separate interfaces which could be used on their own. Although this could be just a final class helper, I thought that we might leave a possibility for decoration here. That's why I created interfaces.
- [x] Split `HttpFoundationExtension` into two interfaces
- [x] Deprecate `HttpFoundationExtension::generateAbsoluteUrl` and `HttpFoundationExtension::generateRelativePath`
- [x] Add service definitions
- [x] Fix tests
- [ ] Add docs
Commits
-------
388d8f548c [Routing] UrlHelper to get absolute URL for a path
This PR was squashed before being merged into the 4.3-dev branch (closes#30607).
Discussion
----------
[Serializer] Add Support of recursive denormalization on object_to_populate
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Pending
| Fixed tickets | #21669
| License | MIT
| Doc PR | Pending
Currently the deserialization re-create new sub-object with object_to_populate.
This option permit to make object_to_populate recursive.
Commits
-------
5b723865b1 [Serializer] Add Support of recursive denormalization on object_to_populate
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Translate unique collection message to Hungarian
| 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 | -
<!--
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.
-->
Commits
-------
6a732dc031 [Validator] Translate unique collection message to Hungarian
This PR was merged into the 3.4 branch.
Discussion
----------
Handle case where no translations were found
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Right now, the program emits a warning when trying to use max() on an
empty array.
Commits
-------
79b1fb8333 Handle case where no translations were found
This PR was squashed before being merged into the 4.3-dev branch (closes#30429).
Discussion
----------
[Form] group_by as callback returns array
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30315
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
4c04601036 [Form] group_by as callback returns array
This PR was squashed before being merged into the 3.4 branch (closes#29800).
Discussion
----------
[Validator] Only traverse arrays that are cascaded into
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27090
| License | MIT
| Doc PR | -
Previously, array properties were traversed even if they were not annotated `Valid`.
Commits
-------
7db9200279 [Validator] Only traverse arrays that are cascaded into
This PR was merged into the 4.3-dev branch.
Discussion
----------
Use env variable to create anytype of lock store
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27555
| License | MIT
| Doc PR | NA
In lock configuration, at the moment, env variable are only able to resolve DNS which are able to create RedisStore and MemcachedStore.
This PR update the StoreFactory to be able to also create connection at runtime.
Commits
-------
6b57ea996c Use env variable to create anytype of lock store
This test calls code that defines some environment variables, which in
turn trigger the registration of a the deprecation error handler, which
causes unexpected issues when testing other components.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] add return type hints for ObjectPropertyListExtractorInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
@nicolas-grekas as just discussed here the type-hint + phpdoc cleanup as follow-up for https://github.com/symfony/symfony/pull/30904😉
cc @joelwurtz
Commits
-------
7628972285 [Serializer] add return type hints for ObjectPropertyListExtractorInterface
Using "Foo", a class name that corresponds to no less than 22 fixture
classes, results in the first found "Foo" being loaded when one is
found by the ClassNotFoundFatalErrorHandler error handler, I am not sure
exactly why, but it is not really a big issue because this is a fatal
error handler and execution is not supposed to continue after that.
Except that is very much the case when running the whole test suite
sequentially with ./phpunit . Then we arrive to the DI component test
suite, and a failure happens because \\foo was not supposed to be defined:
> Failed asserting that exception message 'The definition for "\foo" has
> no class attribute, and appears to reference a class or interface in the
> global namespace. Leaving out the "class" attribute is only allowed for
> namespaced classes. Please specify the class attribute explicitly to get
> rid of this error.' contains 'The definition for "\foo" has no class.'.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Uses an `AmqpStamp` to provide flags and attributes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28885
| License | MIT
| Doc PR | ø
Using the `AmqpStamp` you can configure the flags and any attribute (such as `delivery_mode`).
Commits
-------
56fa574023 Uses an `AmqpStamp` to provide flags and attributes
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mime][BrowserKit] Add FormUrlEncoded - Fix content-type in HttpBrowserPost
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30867
| License | MIT
| Doc PR | NA
This PR use the content-type `x-www-form-urlencoded` when posting a form with the HttpBrowser.
Commits
-------
aecca9778e Use FormUrlEncoded when posting non-binary data
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] Removed undefined variable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
The variable `$noProxy` is accessed here before it is defined.
`EU-FOSSA`
Commits
-------
69f0a0b3bf Removed undefined variable.
This PR was squashed before being merged into the 4.3-dev branch (closes#28937).
Discussion
----------
Improve Translator caching
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27600
| License | MIT
| Doc PR | N/A
Add DirectoryResources to MessageCatalogues when loaded.
So that when a file is added to one of the directories the cache for all MessageCatalogues will be invalidated.
All directories must be added to all MessageCatalogues because we can't predict for which locale files will be added to each individual directory.
Also, now that the translator keeps track of its own directories for caching the container no longer needs to it. This means that when a translation changes or is added the container no longer needs to be fully rebuilt, saving a considerable amount of time (compilation time went down from ~4 seconds to ~1 second on each translation change/add in our project).
Commits
-------
a5246589cf Improve Translator caching
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] provide new ObjectPropertyListExtractorInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | related to https://github.com/symfony/symfony/issues/30818
| License | MIT
| Doc PR | -
EUFOSSA Hackathon
As discussed with @joelwurtz this adds a new `ObjectPropertyListExtractorInterface` and a default implementation.
See https://github.com/symfony/symfony/issues/30818
> A new interface will be provided ObjectPropertyListExtractorInterface (name can change), that allow getting attributes based on an object. A default implementation will be provided that use the PropertyListExtractorInterface and a class resolver, as the latter one only rely on class name, it may be important to have this distinction (this will allow features that rely on a specific value of the object to get the current property list, like exclusion policy)
Commits
-------
997270f7ac [Serializer] provide new ObjectPropertyListExtractorInterface
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Workflow] The TransitionEvent is able to modify the context
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
EUFOSSA
ping @HeahDude
Commits
-------
62ab775154 [Workflow] The TransitionEvent is able to modify the context
This PR was merged into the 4.3-dev branch.
Discussion
----------
Add "input" option to NumberType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24793
| License | MIT
| Doc PR | TODO
This PR replaces #24793 in (partially) fixing how Doctrine's DECIMAL type is handled by the Form component.
Previously, DECIMAL was mapped to the regular NumberType. That confuses Doctrine's change detection, depending on the DB platform.
Examples:
| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | '8' | 8 | 8
| SQLite | 8.123 | '8.123' | 8.123 | 8.123
| PostgreSQL | 8.000 | '8.000' | 8 | 8
| PostgreSQL | 8.123 | '8.123' | 8.123 | 8.123
The value in the Doctrine entity changes before and after submit. Hence Doctrine believes an update is necessary.
This PR introduces an `input` option to NumberType (similar to DateType), that can be set to `'number'` (default) or `'string'`. If set to `'string'`, the conversion is as follows:
| DB | DB value | Doctrine entity before submit | Form input | Doctrine entity after submit
| --- | --- | --- | --- | ---
| SQLite | 8.000 | **'8'** | 8 | **'8.000'**
| SQLite | 8.123 | '8.123' | 8.123 | '8.123'
| PostgreSQL | 8.000 | '8.000' | 8 | '8.000'
| PostgreSQL | 8.123 | '8.123' | 8.123 | '8.123'
You see that this does not completely solve this issue for SQLite. However, @Ocramius and I agree that this is something to be fixed by Doctrine, since Doctrine is providing the database abstraction.
That fix should be done in the SqlitePlatform object in Doctrine as part of another PR and should be backwards compatible with the current Doctrine version (i.e. opt in via configuration).
Compared to #24793, this PR does not introduce a new type but instead makes the NumberType more flexible. Also, this PR does not introduce the `force_full_scale` option since that should be solved by Doctrine as described above.
Commits
-------
3f25734647 Added new option "input" to NumberType
fb2b37a8f3 add force_full_scale option to handle all cases
40f25121c3 [DoctrineBridge] Add decimal form type
This PR was merged into the 3.4 branch.
Discussion
----------
[Translator] Warm up the translations cache in dev
| 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 | -
This PR fixes a bug in development when using the DataCollectorTranslator: because it's not implementing WarmableInterface, the translations cache is not built during cache:clear during development.
Commits
-------
a5f1afca15 [Translator] Warm up the translations cache in dev
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Fix a wrong error when using a factory
…d a call
| 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? | no <!-- 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 | #30885 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
<!--
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.
-->
This a work in progress, it needs tests, firstly I wanted to ask the author to test and tell if it's ok.
Commits
-------
5d4e3a2d57 [WIP] [DependencyInjection] Fix a wrong error when using a factory and a call
This PR was squashed before being merged into the 4.3-dev branch (closes#30906).
Discussion
----------
[symfony/HttpKernel] Throws an error when the generated class name is invalid.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30845
| License | MIT
Commits
-------
c976866566 [symfony/HttpKernel] Throws an error when the generated class name is invalid.
Whenever libxml_use_internal_errors() is called, the previous value for
it should be restored. This used to be the case in this piece of code,
but it was wrongly removed in e53bf5839b ,
which has the nasty side effect of making the Validator component test
suite break with this message:
Validation failed: No DTD found!
This PR was merged into the 4.2 branch.
Discussion
----------
[Messenger] Uses the `SerializerStamp` when deserializing the envelope
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29970
| License | MIT
| Doc PR | ø
Uses the `SerializerStamp` when decoding the message.
Commits
-------
ab55e8e7ef Uses the SerializerStamp when deserializing the envelope
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DomCrawler] Improve Crawler HTML5 parser need detection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | kind of
| New feature? | no
| BC breaks? | no
| Deprecations? | no>
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Live from #eu-fossa
Follow up of https://github.com/symfony/symfony/pull/29306
This PR introduces a better detection mechanism to choose when to parse using the HTML5 parser or not, and fix a subcrawler parsing issue as well.
@stof I'd be super interested by your review :) !
Commits
-------
9bbdab68ef [DomCrawler] Improve Crawler HTML5 parser need detection
This PR was squashed before being merged into the 4.3-dev branch (closes#30901).
Discussion
----------
Renamed NotPwned to NotCompromisedPassword
| 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? | no <!-- 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 | -
| License | MIT
| Doc PR | -
<!--
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.
-->
Commits
-------
2f648b04ae Renamed NotPwned to NotCompromisedPassword
* 4.2: (45 commits)
[Form] various minor fixes
Ensure the parent process is always killed
bugfix: the terminal state was wrong and not reseted
[Console] Fix inconsistent result for choice questions in non-interactive mode
Define null return type for Constraint::getDefaultOption()
[Routing] Fix: annotation loader ignores method's default values
[HttpKernel] Fix DebugHandlersListener constructor docblock
Skip Glob brace test when GLOB_BRACE is unavailable
bumped Symfony version to 4.2.6
updated VERSION for 4.2.5
updated CHANGELOG for 4.2.5
bumped Symfony version to 3.4.25
updated VERSION for 3.4.24
update CONTRIBUTORS for 3.4.24
updated CHANGELOG for 3.4.24
[EventDispatcher] cleanup
fix testIgnoredAttributesInContext
Re-generate icu 64.1 data
Improve PHPdoc / IDE autocomplete for config tree builder
[Bridge][Twig] DebugCommand - fix escaping and filter
...
* 3.4:
[Form] various minor fixes
bugfix: the terminal state was wrong and not reseted
[Console] Fix inconsistent result for choice questions in non-interactive mode
Define null return type for Constraint::getDefaultOption()
[HttpKernel] Fix DebugHandlersListener constructor docblock
Skip Glob brace test when GLOB_BRACE is unavailable
bumped Symfony version to 3.4.25
updated VERSION for 3.4.24
update CONTRIBUTORS for 3.4.24
updated CHANGELOG for 3.4.24
[EventDispatcher] cleanup
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Php doc fixes and cs + optimizations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | ~
| License | MIT
| Doc PR | ~
<!--
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.
-->
Some micro optimizations may target master with some profiling but I would like some reviews first. Thanks!
Commits
-------
56429a6f08 [Form] various minor fixes
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Ensure message is handled only once per handler
Add check to ensure that a message is only handled once per handler
Add try...catch to run all handlers before throwing exception
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #27215
| License | MIT
| Doc PR | Todo
This would make error handling and retrying of messages much more easier. As statet here https://github.com/symfony/symfony/pull/27008#issuecomment-384677065 there is currently no way to retry a for all failed handlers if there are mutliple handlers and just some throw an exception.
Also if an Exception in an handler occurs the execution chain is disrupted and the other handlers are never invoked.
With this change it is easily possible to create an userland middleware that catches the `ChainedHandlerFailedException` and does some custom retry logic. If you ensure that the `HandledStamps` on the `Envelope` are preserved the message will be handled just by the failed handlers
Commits
-------
2e5e910229 Rename exception, add change log and a few other things
e6e4cde5fc Ensure message is handled only once per handler
This PR was merged into the 4.3-dev branch.
Discussion
----------
[messenger] Adds a stamp to provide a routing key on message publishing
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29950
| License | MIT
| Doc PR | symfony/symfony-docs#11236
Adds a stamp allowing to set a `routing_key` at `MessageBus::dispatch()` level.
```php
$message = (new Envelope('message'))->with(new RoutingKeyStamp('routing_key'));
$bus->dispatch($message);
```
Commits
-------
a515635f18 Simply code and rename "configuration" to "options"
3151b54b7a [messenger] AMQP configurable routing key & multiple queues
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Workflow] Fixed initial places when no places are configured
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
EUFOSSA
I introduced a BC break in #30468 and this PR fix it.
With the full stack framework, when one does not configure the
initial_place(s) the DIC set `[]` for the initial values.
So it removes the initials values guessed in `Definition::addPlace()`
Commits
-------
76fd9c35b7 [Workflow] Fixed initial places when no places are configured
I introduced a BC break in #30468 and this PR fix it.
With the full stack framework, when one does not configure the
initial_place(s) the DIC set `[]` for the initial values.
So it removes the initials values guessed in `Definition::addPlace()`
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Make MessengerPass less strict when auto-register handlers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | not needed
This allows you to auto-register handlers that have more than one argument, which is useful when having custom middleware to pass more parameters.
#symfonyconhackday2018
Commits
-------
49ab2cd9d9 Make MessengerPass less strict when auto-register handlers
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix stty not reset when aborting in QuestionHelper::autocomplete()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #30861 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none
<!--
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.
-->
Commits
-------
f54389b95c bugfix: the terminal state was wrong and not reseted
If you try to run the test suite but do not have a redis instance
running, the parent process that was supposed to be killed will never be
as the thing being thrown is not an exception.
This results in the test suite hanging forever at the end.
In this patch, the exception is thrown again, and then caught in the trait, and
the parent gets killed as it should.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] test DoctrineTransport on travis and appveyor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes ? WIP
| Fixed tickets |
| License | MIT
| Doc PR |
Currently tests on the `Symfony\Component\Messenger\Tests\Transport\Doctrine\DoctrineIntegrationTest` are skipped because there is no `MESSENGER_DOCTRINE_DSN` environment variable is not defined.
This PR update the travis and AppVeyor configuration to run these tests.
This is a WIP. I'm not a Travis/AppVeyor user so this clearly need more work
Commits
-------
8f81f55a46 [Messenger] test DoctrineTransport on travis and appveyor
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a "in-memory://" transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29040
| License | MIT
| Doc PR | Todo
Add a new `InMemoryTransport` for test purpose, usable by starting your DSN by `in-memory://`
Commits
-------
8f8c82e009 Make the in-memory transport resettable
fe759205c5 Add a "null://" transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] logger integration
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #30502 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Commits
-------
26d15c8bbe [HttpClient] log requests, responses and pushes when they happen
fc6ba7efad [HttpClient] logger integration
This PR was squashed before being merged into the 4.3-dev branch (closes#30757).
Discussion
----------
[Messenger] Adding MessageCountAwareInterface to get transport message count
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs#11236
This adds a new optional interface that receivers should implement to give an approximate number of the messages "waiting" to be handled. Why? Because, with this, you could design a system that dynamically adds/removes worker processes if a specific transport is getting slammed and needs help. Creating that system could be something we discuss for core later, but this at least makes it possible - and means it could be implemented by the user or in a bundle... which I might do if we don't get it in core ;).
Commits
-------
fc5b0cf570 [Messenger] Adding MessageCountAwareInterface to get transport message count
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpKernel][Framework] Locale aware services
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Added a `LocaleAwareInterface` (and also a new service tag `kernel.locale_aware`) to be implemented on services that require the current locale at request time.
Also, refactored the actual Translator service to implement the overmentioned interface
Todo :
* [ ] Documention PR (will be written after some feedback)
Commits
-------
b9ac645d8b Locale aware service registration
This PR was squashed before being merged into the 4.3-dev branch (closes#29306).
Discussion
----------
[DomCrawler] Optionally use html5-php to parse HTML
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP
| Fixed tickets | https://github.com/symfony/symfony/issues/29280, https://github.com/symfony/symfony/issues/28596
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10700
This PR introduces the possibility to parse HTML content in the Crawler using the html5-php library (https://github.com/Masterminds/html5-php). This allows for better support of HTML5 and fix many unexpected behaviors and inconsistencies of the native DOM extension.
Commits
-------
4050ec4257 [DomCrawler] Optionally use html5-php to parse HTML
This PR was squashed before being merged into the 4.3-dev branch (closes#30255).
Discussion
----------
[DependencyInjection] Invokable Factory Services
| Q | A
| ------------- | ---
| Branch? | `master`
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#11014
> Failing test is in the Twig bridge, and outside of the the scope of this PR.
Allow referencing invokable factory services, just as route definitions reference invokable controllers.
This functionality was also added for service configurators for consistency.
## Example
```php
<?php
namespace App\Factory;
class ServiceFactory
{
public function __invoke(bool $debug)
{
return new Service($debug);
}
}
```
```yaml
services:
App\Service:
# Prepend with "@" to differentiate between service and function.
factory: '@App\Factory\ServiceFactory'
arguments: [ '%kernel.debug%' ]
```
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serviceshttp://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<!-- ... -->
<service id="App\Service"
class="App\Service">
<factory service="App\Factory\ServiceFactory" />
</service>
</services>
</container>
```
```php
<?php
use App\Service;
use App\Factory\ServiceFactory;
use Symfony\Component\DependencyInjection\Reference;
$container->register(Service::class, Service::class)
->setFactory(new Reference(ServiceFactory::class));
```
Commits
-------
23cb83f726 [DependencyInjection] Invokable Factory Services
This PR was merged into the 4.3-dev branch.
Discussion
----------
[PropertyInfo] Use a single cache item per method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29977
| License | MIT
| Doc PR | none
Replaces https://github.com/symfony/symfony/pull/30523 with a rebase to master.
This PR changes how property metadata is cached, significantly reducing the number of calls made between PHP and the backend cache. Instead of storing one cache item per method and set of arguments, a single cache item is stored per method. This matches well with real-world use, where most properties in an object will need to be inspected.
Note that the absolute numbers in the above PR are best case. In production environments where memcache is on a remote server, we were seeing multiple seconds consumed by memcache calls.
Commits
-------
2a4f8a11d4 [PropertyInfo] Use a single cache item per method
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows creating scoped HTTP clients in one line:
```php
$client = ScopingHttpClient::forBaseUri($client, 'http://example.com');
```
`$client` now resolves relative URLs using the provided base URI.
If one also adds default options as 3rd argument, these will be applied conditionally when a URL matching the base URI is requested.
This PR also tweaks `MockHttpClient` to make it return `MockResponse` on its own when no constructor argument is provided, easing tests a bit.
Commits
-------
2b9b8e5707 [HttpClient] Add ScopingHttpClient::forBaseUri() + tweak MockHttpClient
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DI] Add support for "wither" methods - for greater immutable services
| Q | A
| ------------- | ---
| Branch? | master
| 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/10991
Let's say we want to define an immutable service while still using traits for composing its optional features. A nice way to do so without hitting [the downsides of setters](https://symfony.com/doc/current/service_container/injection_types.html#setter-injection) is to use withers. Here would be an example:
```php
class MyService
{
use LoggerAwareTrait;
}
trait LoggerAwareTrait
{
private $logger;
/**
* @required
* @return static
*/
public function withLogger(LoggerInterface $logger)
{
$new = clone $this;
$new->logger = $logger;
return $new;
}
}
$service = new MyService();
$service = $service->withLogger($logger);
```
As you can see, this nicely solves the setter issues.
BUT how do you make the service container create such a service? Right now, you need to resort to complex gymnastic using the "factory" setting - manageable for only one wither, but definitely not when more are involved and not compatible with autowiring.
So here we are: this PR allows configuring such services seamlessly.
Using explicit configuration, it adds a 3rd parameter to method calls configuration: after the method name and its parameters, you can pass `true` and done, you just declared a wither:
```yaml
services:
MyService:
calls:
- [withLogger, ['@logger'], true]
```
In XML, you could use the new `returns-clone` attribute on the `<call>` tag.
And when using autowiring, the code looks for the `@return static` annotation and turns the flag on if found.
There is only one limitation: unlike services with regular setters, services with withers cannot be part of circular loops that involve calls to wither methods (unless they're declared lazy of course).
Commits
-------
f455d1bd97 [DI] Add support for "wither" methods - for greater immutable services
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient][Contracts] rename "raw_headers" to "response_headers"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A preliminary step before adding the `request_headers` info on responses to ease debugging.
Commits
-------
0b21268bf5 [HttpClient][Contracts] rename "raw_headers" to "response_headers"
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Add file links for described classes in debug:form command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
![debug_form_file_link](https://user-images.githubusercontent.com/2028198/55357775-d1eac980-549b-11e9-8aa8-500aee629753.png)
Commits
-------
dcba01d212 Add file links for described classes
This PR was merged into the 4.3-dev branch.
Discussion
----------
New PHPUnit assertions for the WebTestCase
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | replaces #29990
| License | MIT
| Doc PR | n/a
While reviewing #29990, and working on some tests, I realized that we could do better by adding PHPUnit constraint classes in various components that are then used in WebTextCase.
**Before**
```php
<?php
namespace App\Tests;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testSomething()
{
$client = static::createClient();
$crawler = $client->request('GET', '/test');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->assertContains('Hello World', $crawler->filter('h1')->text());
}
}
```
**After**
```php
<?php
namespace App\Tests;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testSomething()
{
$client = static::createClient();
$client->request('GET', '/test');
$this->assertResponseIsSuccessful();
$this->assertSelectorTextContains('h1', 'Hello World');
}
}
```
Commits
-------
4f91020c8d added PHPUnit assertions in various components
2f8040ee84 Create new PHPUnit assertions for the WebTestCase
This PR was squashed before being merged into the 4.3-dev branch (closes#27738).
Discussion
----------
[Validator] Add a HaveIBeenPwned password validator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo
This PR adds a new `Pwned` validation constraint to prevent users to choose passwords that have been leaked in public data breaches.
The validator uses the https://haveibeenpwned.com/ API. The implementation is similar to the one used by [Firefox Monitor](https://blog.mozilla.org/futurereleases/2018/06/25/testing-firefox-monitor-a-new-security-tool/). It allows to not expose the password hash using a k-anonymity model. The specific implementation for HaveIBeenPwned has been [described in depth by Cloudflare](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/).
Usage:
```php
// Rejects the password if is present in any number of times in any data breach
class User
{
/** @Pwned */
public $plainPassword;
}
// Rejects the password if is present more than 5 times in data breaches
class User
{
/** @Pwned(maxCount=5) */
public $plainPassword;
}
// Customize the error message
class User
{
/** @Pwned(message='Please select another password, this one has already been hacked.') */
public $plainPassword;
}
```
Commits
-------
ec1ded898a [Validator] Add a HaveIBeenPwned password validator
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] bug fixes in Doctrine Transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Just tested the new Doctrine transport and I've see 3 bugs so far :
- [x] The message is not return by the transport
- [x] The headers column must be of type TEXT and not just STRING
- [ ] When using the PhpSerializer the message is truncated (PR: https://github.com/symfony/symfony/pull/30814)
The body in database looks like this :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"
```
The body given by the serializer is the following :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"Symfony\Component\Messenger\Envelopestamps";a:3:{s:49:"Symfony\Component\Messenger\Stamp\SerializerStamp";a:1:{i:0;O:49:"Symfony\Component\Messenger\Stamp\SerializerStamp":1:{s:58:"Symfony\Component\Messenger\Stamp\SerializerStampcontext";a:0:{}}}s:46:"Symfony\Component\Messenger\Stamp\BusNameStamp";a:1:{i:0;O:46:"Symfony\Component\Messenger\Stamp\BusNameStamp":1:{s:55:"Symfony\Component\Messenger\Stamp\BusNameStampbusName";s:21:"messenger.bus.default";}}s:43:"Symfony\Component\Messenger\Stamp\SentStamp";a:1:{i:0;O:43:"Symfony\Component\Messenger\Stamp\SentStamp":2:{s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderClass";s:64:"Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport";s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderAlias";s:16:"environment.stop";}}}s:45:"Symfony\Component\Messenger\Envelopemessage";O:34:"App\Message\EnvironmentStopMessage":1:{s:51:"App\Message\AbstractEnvironmentMessageenvironment";O:22:"App\Entity\Environment":5:{s:26:"App\Entity\Environmentid";s:36:"3bade252-b7a9-4188-82bd-3e68129e0da7";s:37:"App\Entity\EnvironmentrepositoryUrl";s:6:"string";s:30:"App\Entity\Environmentbranch";s:6:"string";s:33:"App\Entity\EnvironmenthostNames";a:1:{i:0;N;}s:27:"App\Entity\Environmentenv";a:2:{s:7:"APP_ENV";s:4:"prod";s:7:"APP_VAR";s:13:"example value";}}}}
```
Commits
-------
27466498d0 [Messenger] Fix get in Doctrine Transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] base64_encoding inside PhpSerializer to avoid null characters
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30805
| License | MIT
| Doc PR | not needed
Hi!
As pointed out in #30805, the `PhpSerializer` creates strings with null bytes. This apparently causes problems on at least some database systems (I didn't notice, but @vincenttouzet did). I also read that, for example, SQS doesn't like null characters. And, in general, because we're sending this data over a transport, `base64_encoding` data is pretty standard.
Does anyone see any downsides?
Cheers!
Commits
-------
fe7ad812c7 base64_encoding inside PhpSerializer to avoid null characters
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Process] Added more detail to the exception when the CWD is invalid
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
When using panther with "special" directory structure, the message is
not really usefull. Let's add the CWD to the exception
Commits
-------
d27858f77b [Process] Added more detail to the exception when the CWD is invalid
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Remove unused option in the Doctrine transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR remove the unused option `loop_sleep` in the Messenger Doctrine transport
Commits
-------
4811400372 [Messenger] Remove unused option in the Doctrine transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Inflector] Support pluralization in the inflector
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet
| Fixed tickets | N/A
| License | MIT
| Doc PR | Not Yet
At present the inflector only supports singularizing plural words, this PR adds the capability to pluralize singular words.
Commits
-------
06920a79c4 Support pluralization in the inflector
This PR was squashed before being merged into the 4.3-dev branch (closes#28637).
Discussion
----------
[Validator] add number constraints
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28608
| License | MIT
| Doc PR | tbd.
I added the following constraints:
* `Positive`
* `PositiveOrZero`
* `Negative`
* `NegativeOrZero`
Commits
-------
01870398eb [Validator] add number constraints
This PR was squashed before being merged into the 3.4 branch (closes#30781).
Discussion
----------
[Intl] Update the ICU data to 64.1
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes, including the intl-data group
| Fixed tickets | -
| License | MIT
| Doc PR | -
http://site.icu-project.org/download/64
Commits
-------
ae2cb6f5c5 [Intl] Update the ICU data to 64.1
This PR was squashed before being merged into the 4.3-dev branch (closes#30754).
Discussion
----------
[Messenger] New messenger:stop-workers Command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Kinda of #29451
| License | MIT
| Doc PR | symfony/symfony-docs#11236
o/ me again.
This requires and is built on top of #30708
When you deploy, all workers need to be stopped and restarted. That's not currently possible, unless you manually track the pids and send a SIGTERM signal. We can make that much easier :).
Now run:
```
bin/console messenger:stop-workers
```
And it will signal to all workers (even if they're distributed on other servers) that they should stop, once they finish processing their current message. This is done via a key in `cache.app`.
Cheers!
Commits
-------
58971627f5 [Messenger] New messenger:stop-workers Command
This PR was merged into the 4.3-dev branch.
Discussion
----------
[EventDispatcher] Fix BC/FC layer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Fixes
> TypeError: Argument 3 passed to Symfony\Component\EventDispatcher\EventDispatcher::doDispatch() must be an instance of Symfony\Component\EventDispatcher\Event
Spotted in https://github.com/lexik/LexikJWTAuthenticationBundle/pull/637
Commits
-------
caa0aded89 [EventDispatcher] Fix BC layer
This PR was merged into the 4.3-dev branch.
Discussion
----------
Changing to MessageDecodingFailedException so that invalid messages are rejected
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30649
| License | MIT
| Doc PR | not needed for bug fix
Bug fix if a message body is completely blank. I'm fixing this on master only, because in 4.2 and earlier, there is actually no system in place to fail serialization and cause the messages to be rejected. In 4.3, we just need to throw this exception.
Cheers!
Commits
-------
4be827d3ca Changing to MessageDecodingFailedException so that invalid messages are rejected
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Updating SyncTransport for recent changes + tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
When making the `SyncTransport`, I neglected having at least one test in each of these classes, which allowed the test suite to pass, even after some interface changes made these classes fail. Fixed all of that :)
Commits
-------
2df023be46 Updating SyncTransport for recent changes + tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger][DX] Allow stamps to be passed directly to MessageBusInterface::dispatch()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | TODO
Me again o/!
This proposal is *purely* for DX. With `DelayStamp`, the proposal of QueueNameStamp and future things like `AmqpRoutingKeyStamp`, stamps are becoming more common for end users to use. This changes how it looks to use them:
```php
// before
$bus->dispatch(new Envelope(new SendSmsNotification('Hi!'), new DelayStamp(10), new QueueNameStamp('low')));
// after
$bus->dispatch(new SendSmsNotification('Hi!'), [new DelayStamp(10), new QueueNameStamp('low')]);
```
It's definitely a BC break, which is allowed because the component is experimental, though it should be minimized. This BC break shouldn't be felt by most end users, as creating your own bus is an advanced use-case. Even if you decorated it, you'll get an obvious error.
Commits
-------
e861de7e61 Allow stamps to be passed directly to MessageBusInterface::dispatch()
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a Doctrine transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#10616
| DoctrineBundle PR | doctrine/DoctrineBundle#868
As discussed with @sroze at PHPForum in Paris I've worked on adding a Doctrine transport to the Messenger component.
Actually `AMQP` is the only supported transport and it could be a good thing to support multiple transports. Having a Doctrine transport could help users to start using the component IMHO (Almost all projects use a database).
# How it works
The code is splitted betwwen this PR and the one on the DoctrineBundle : doctrine/DoctrineBundle#868
## Configuration
To configure a Doctrine transport the dsn MUST have the format `doctrine://<entity_manager_name>` where `<entity_manager_name>` is the name of the entity manager (usually `default`)
```yml
# config/packages/messenger.yaml
framework:
messenger:
transports:
my_transport: "doctrine://default?queue=important"
```
## Table schema
Dispatched messages are stored into a database table with the following schema:
| Column | Type | Options | Description |
|--------------|----------|--------------------------|-------------------------------------------------------------------|
| id | bigint | AUTO_INCREMENT, NOT NULL | Primary key |
| body | text | NOT NULL | Body of the message |
| headers | text | NOT NULL | Headers of the message |
| queue | varchar(32) | NOT NULL | Headers of the message |
| created_at | datetime | NOT NULL | When the message was inserted onto the table. (automatically set) |
| available_at | datetime | NOT NULL | When the message is available to be handled |
| delivered_at | datetime | NULL | When the message was delivered to a worker |
## Message dispatching
When dispatching a message a new row is inserted into the table. See `Symfony\Component\Messenger\Transport\Doctrine::publish`
## Message consuming
The message is retrieved by the `Symfony\Component\Messenger\Transport\Doctrine\DoctrineReceiver`. It calls the `Symfony\Component\Messenger\Transport\Doctrine::get` method to get the next message to handle.
### Getting the next message
* Start a transaction
* Lock the table to get the first message to handle (The lock is done with the `SELECT ... FOR UPDATE` query)
* Update the message in database to update the delivered_at columns
* Commit the transaction
### Handling the message
The retrieved message is then passed to the handler. If the message is correctly handled the receiver call the `Symfony\Component\Messenger\Transport\Doctrine::ack` which delete the message from the table.
If an error occured the receiver call the `Symfony\Component\Messenger\Transport\Doctrine::nack` method which update the message to set the delivered_at column to `null`.
## Message requeueing
It may happen that a message is stuck in `delivered` state but the handler does not really handle the message (Database connection error, server crash, ...). To requeue messages the `DoctrineReceiver` call the `Symfony\Component\Messenger\Transport\Doctrine::requeueMessages`. This method update all the message with a `delivered_at` not null since more than the "redeliver timeout" (default to 3600 seconds)
# TODO
- [x] Add tests
- [x] Create DOC PR
- [x] PR on doctrine-bundle for transport factory
- [x] Add a `available_at` column
- [x] Add a `queue` column
- [x] Implement the retry functionnality : See #30557
- [x] Rebase after #29476
Commits
-------
88d008c828 [Messenger] Add a Doctrine transport
This PR was squashed before being merged into the 4.3-dev branch (closes#30569).
Discussion
----------
[FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | #27787, symfony/symfony-docs#7988 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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.
-->
Create a very late controller argument value resolver to throw an intuitive error message when controller fails because it is not registered as a service.
Commits
-------
fbfc623b72 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator][DoctrineBridge][FWBundle] Automatic data validation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes<!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11132
This feature automatically adds some validation constraints by inferring existing metadata. To do so, it uses the PropertyInfo component and Doctrine metadata, but it has been designed to be easily extendable.
Example:
```php
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class Dummy
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
public $id;
/**
* @ORM\Column(nullable=true)
*/
public $columnNullable;
/**
* @ORM\Column(length=20)
*/
public $columnLength;
/**
* @ORM\Column(unique=true)
*/
public $columnUnique;
}
$manager = $this->managerRegistry->getManager();
$manager->getRepository(Dummy::class);
$firstOne = new Dummy();
$firstOne->columnUnique = 'unique';
$firstOne->columnLength = '0';
$manager->persist($firstOne);
$manager->flush();
$dummy = new Dummy();
$dummy->columnNullable = 1; // type mistmatch
$dummy->columnLength = '012345678901234567890'; // too long
$dummy->columnUnique = 'unique'; // not unique
$res = $this->validator->validate($dummy);
dump((string) $res);
/*
Object(App\Entity\Dummy).columnUnique:\n
This value is already used. (code 23bd9dbf-6b9b-41cd-a99e-4844bcf3077f)\n
Object(App\Entity\Dummy).columnLength:\n
This value is too long. It should have 20 characters or less. (code d94b19cc-114f-4f44-9cc4-4138e80a87b9)\n
Object(App\Entity\Dummy).id:\n
This value should not be null. (code ad32d13f-c3d4-423b-909a-857b961eb720)\n
Object(App\Entity\Dummy).columnNullable:\n
This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```
It also works for DTOs:
```php
class MyDto
{
/** @var string */
public $name;
}
$dto = new MyDto();
$dto->name = 1; // type error
dump($validator->validate($dto));
/*
Object(MyDto).name:\n
This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```
Supported constraints currently are:
* `@NotNull` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@Type` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@UniqueEntity` (using Doctrine's `unique` metadata)
* `@Length` (using Doctrine's `length` metadata)
Many users don't understand that the Doctrine mapping doesn't validate anything (it's just a hint for the schema generator). It leads to usability and security issues (that are not entirely fixed by this PR!!).
Even the ones who add constraints often omit important ones like `@Length`, or `@Type` (important when building web APIs).
This PR aims to improve things a bit, and ease the development process in RAD and when prototyping. It provides an upgrade path to use proper validation constraints.
I plan to make it opt-in, disabled by default, but enabled in the default Flex recipe. (= off by default when using components, on by default when using the full stack framework)
TODO:
* [x] Add configuration flags
* [x] Move the Doctrine-related DI logic from the extension to DoctrineBundle: doctrine/DoctrineBundle#831
* [x] Commit the tests
Commits
-------
2d64e703c2 [Validator][DoctrineBridge][FWBundle] Automatic data validation
This PR was squashed before being merged into the 3.4 branch (closes#30660).
Discussion
----------
[Bridge][Twig] DebugCommand - fix escaping and filter
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The PR fixes:
- output escaping was not done for decorated consoles
- filter was not applied when using format json
+ added some tests for paths currently not tested
Commits
-------
7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Remove the mention of handler in the `ReceiverInterface::get` phpdoc.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/30708#pullrequestreview-220830730
| License | MIT
| Doc PR | ø
As spotted by @Tobion, we don't have an handler as an argument anymore.
Commits
-------
9c63112d7c Remove the mention of handler in the phpdoc.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[PropertyAccess] Allow Can Accessor in Property Access
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 |
| License | MIT
| Doc PR |
- Added ability to support `can` methods in the property access
in order to be compatible with PropertyInfo component
which allows for `can` accessors
Commits
-------
a4c95745bb [PropertyAccess] Allow Can Accessor in Property Access
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Filesystem] Fix mirroring a directory into itself or in his child with realpath checks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none / PR #29857
| License | MIT
| Doc PR | n/a
This this the continuity of #29857 by @Fleuv
Fix a bug while trying to mirror a directory into itself or in a child
Adding handle real path checks when mirroring.
Commits
-------
8011f494d4 Handling relative/absolute path
59437a4af9 Skipping iterations in the mirror() method where the iterated file's path name is equal to the target path
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Debug] Mimic __toString php behavior in FlattenException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#
The `Symfony\Component\Debug\Exception\FlattenException` object is returned by `Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector::getException` method, but the docblock of this method indicates that it should return `\Exception` object.
As the `FlattenException` class should behave as much as possible like a php `\Exception` object, it should implement the same methods as `\Exception`.
This PR is adding `__toString` and `getTraceAsString` methods. Those methods are (in my opinion) the most useful methods of a `\Exception` object. A potential use case (where i am stumbled across this inconsistency) is to get the last exception of a request in a `WebTestCase` using the profiler and printing the trace.
Commits
-------
514a1b506c [Debug] Mimic __toString php behavior in FlattenException
This PR was squashed before being merged into the 4.3-dev branch (closes#29495).
Discussion
----------
[Ldap] Implement pagination
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yno
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | N/A (cannot test at the moment)
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Implement pagination support in the ExtLdap adapter. In a more abstract sense, other adapters should use a query's pageSize option to determine if pagination is being needed. Pagination is required in some environments that frequently query for more results than the remote server is willing to allow.
BC break was avoided by having Query->getResource() return the first result, if available.
A small hack is included to work around php-ldap failing to reset pagination properly; the LDAP_OPT_SERVER_CONTROLS are sent with every request, whether pagination has been 'reset' by sending a 0-page request or not. This appears to be a php-ldap bug that will need to be addressed there, but we can work-around it for now by doing both: setting the 0-page option *and* unsetting the OID directly. This was resulting in odd results, like queries returning 0 results or returning < server_page_size results for a query that should have returned >= server_page_size.
Commits
-------
b96347485c [Ldap] Implement pagination
This PR was squashed before being merged into the 4.3-dev branch (closes#29448).
Discussion
----------
[Ldap] Entry move support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no (see [1])
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A (see [2])
Add Move support to the ldap EntryManagerInterface and the ExtLdap adapter. This is used to re-parent an entry to another part of the directory. The interface to do so need not be complicated, requiring only the entry to be moved and the parent DN to be moved to.
Underlying implementations may require a 'newrdn' attribute -- this is generally the RDN w.r.t. the immediate parent of the entry, which is easily parsed.
I've attempted to implement it as the rename functionality was originally implemented: adding an interface to be deprecated effective immediately, presumably to allow it to be backported without breaking existing interfaces, and then implementing this interface in the ExtLdap adapter.
[1] I do not have the capacity to run the ldap tests for this locally due to current $work situation; I have no reason to believe this test will fail as written, though. This functionality has been used as currently implemented (against Windows ADS) for some time in my production environment, so it has been functionally tested otherwise.
[2] No doc PR has been created for this feature addition, since it's a minor addition. The LDAP documentation should likely be amended to include rename functionality as well as this.
Commits
-------
32743c850f [Ldap] Entry move support
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mailer] Fix SMTP support when a message cannot be sent
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
<!--
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.
-->
Commits
-------
3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent
This PR was merged into the 3.4 branch.
Discussion
----------
Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
…ed in "ignored_attributes"
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30453
| License | MIT
The GetSetMethodNormalizer class correctly ignores the attributes specified in "ignored_attributes"
Commits
-------
606d8d370d Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
This PR was merged into the 4.3-dev branch.
Discussion
----------
Fix some exception previous type hints
| 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? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
follow-up for #30729
Commits
-------
f92efeb429 fixed some exception previous type hints
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Finder] Throw a dedicated exception for non-existing directory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes [1]
| New feature? | yes
| BC breaks? | no
| Deprecations? | no [2]
| Tests pass? | yes
| Fixed tickets | #30723
| License | MIT
| Doc PR | N/A [3]
Makes `Finder::in()` throw a `DirectoryNotFoundException` instead of an `InvalidArgumentException` if one of the directories is not found.
This behavior is more consistent with the `AccessDeniedException` for files which are unreadable due to insufficient permissions.
To keep backward compatibility, the new exception class inherits from `InvalidArgumentException`.
[1] A valid, but non-existent directory name is IMHO not an invalid argument
[2] However, it may be semantically better to extend from `RuntimeException`, This would require a deprecation.
[3] Possible exceptions are currently not explained at https://symfony.com/doc/current/components/finder.html
Commits
-------
48d5f94cda Throw a dedicated exception for non-existing directory
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Adding the "sync" transport to call handlers synchronously
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs#11236
This adds a `sync://` transport that just calls the handlers immediately. Why? This allows you to route your messages to some "async" transport. But then, when developing locally or running your tests, you can choose to run them synchronously instead:
```yml
# config/packages/messenger.yaml
framework:
messenger:
transports:
async: '%env(MESSENGER_TRANSPORT_DSN)%'
routing:
'App\Message\SmsNotification': async
'App\Message\OtherMessage': async
```
```
# .env
# by default, handle this sync
MESSENGER_TRANSPORT_DSN=sync://
```
```
# .env.local on production (or set this via real env vars)
# on production, use amqp
MESSENGER_TRANSPORT_DSN=amqp://.......
```
Cheers!
Commits
-------
3da5a438aa Adding the "sync" transport to call handlers synchronously
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Contracts][EventDispatcher] move the Event class to symfony/contracts
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Will allow decoupling more components in 5.0
Commits
-------
a4ce08ec30 [Contracts][EventDispatcher] move the Event class to symfony/contracts
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Fix routes annotation loading with glob pattern
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29747
| License | MIT
| Doc PR | n/a
Loading routes annotation loading with glob pattern triggers an error if one of the targetted directory contains an abstract class. This fixes it
Commits
-------
c7c45a13a7 [Routing] Fix routes annotation loading with glob pattern
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Simplify the compile binary
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | -
| License | MIT
| Doc PR | -
The intl docker image comes with build-essential packages now, so there's no need for additional installation steps.
re #30584
Commits
-------
b3184c26ad [Intl] Simplify the compile binary
This PR was squashed before being merged into the 3.4 branch (closes#30737).
Discussion
----------
[Validator] Improve constraint default option check
| 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
Any constraint without default option used as annotation with unnamed first argument (for example, `@Assert\Collection(1)`) throws an exception with an ugly message `The options "" do not exist in constraint Collection`.
This PR makes constraint check the default option in the annotation case in the same way it checks it in the "real" code case. So the exception will be `No default option is configured for constraint Collection.`
Commits
-------
915912e18e [Validator] Improve constraint default option check
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Lock] Added MongoDBStore
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes (requires `ext-mongodb` and `mongodb/mongodb` to test)
| Fixed tickets | #27345
| License | MIT
| Doc PR | symfony/symfony-docs#9807
**Testing caveat**
In order to test this, the test environment needs `ext-mongodb` and `mongodb/mongodb`.
I have both written the test and tested `Symfony\Component\Lock\Store\MongoDbStore` and it does pass in an environment with `ext-mongodb` and `mongodb/mongodb`.
**Description**
We should support Semaphore Locks with a MongoDB back end to allow those that already use MongoDB as a distributed storage engine.
Symfony already partially supports MongoDB for session storage: `Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler`
**Example**
```php
$client = new MongoDb\Client();
$store = new Symfony\Component\Lock\Store\MongoDbStore(
$client
array(
'database' => 'my-app',
)
);
$lockFactory = new Symfony\Component\Lock\Factory($store);
$lock = $lockFactory->createLock('my-resource');
```
This is a squashed pull request of https://github.com/symfony/symfony/pull/27346
Commits
-------
9c04639dc3#27345 Added Lock/Store/MongoDbStore
- Added ability to support `can` methods in the property access
in order to be compatible with PropertyInfo component
which allows for can accessors
Signed-off-by: RJ Garcia <rj@bighead.net>
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] use "nyholm/psr7" by default in Psr18Client
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This makes the factory arguments of `Psr18Client` optional, with a fallback to using `Nyholm\Psr7\Factory\Psr17Factory` when no factories are provided.
Commits
-------
f2222e4bf5 [HttpClient] use "nyholm/psr7" by default in Psr18Client
This PR was merged into the 4.3-dev branch.
Discussion
----------
Add optional parameter `prefetching` for AMQP connection
Add prefetching connection parameter to setup channel prefetch count.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When setting up AMQP transport connection, it can be interesting to configure prefetching on a channel, which is not currently possible.
Commits
-------
47777eedd6 Add optional parameter `prefetching` in connection configuration, to setup channel prefetch count
Makes Finder::in() throw a DirectoryNotFoundException instead of an InvalidArgumentException if one of the directories is not found.
This behavior is more consistent with the AccessDeniedException for files which are unreadable due to insufficient permissions.
To keep BC, the new exception class inherits from InvalidArgumentException.
This PR was squashed before being merged into the 4.3-dev branch (closes#30606).
Discussion
----------
[Validator] allow brackets in the optional query string
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30603
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Add the `allowBrackets` option from the Url constraint to allow brackets in the optional query string.
Commits
-------
40dc4c89df [Validator] allow brackets in the optional query string
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a command to setup transports
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR add a `SetupTransportsCommand` that allow to setup the transports.
Actually the `AMQPTransport` is setup only if debug is enabled. With this PR the new `messenger:setup-transports` will setup all declared transports.
Commits
-------
fbb534a838 [Messenger] Add a command to setup transports
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mime] Add BodyRendererInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a
| License | MIT
| Doc PR | n/a
<!--
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.
-->
Commits
-------
0c9d684d0a [Mime] added BodyRendererInterface
This PR was squashed before being merged into the 4.3-dev branch (closes#30664).
Discussion
----------
[Finder] Get filename without extension
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30655
| License | MIT
| Doc PR |
Commits
-------
821e55ab80 [Finder] Get filename without extension