This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Add support for ignoring comments while XML encoding
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
In addition to https://github.com/symfony/symfony/pull/27926 which allowed to ignore XML processing instructions, this PR allows to ignore the XML comments while encoding.
Commits
-------
8f8230ac3a Add support for ignoring comments while XML encoding
This PR was merged into the 2.8 branch.
Discussion
----------
Fix code examples in PHPDoc
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
This PR properly indents the code examples in PHPDoc for a clean render.
Commits
-------
1afb043dc5 Fix code examples in PHPDoc
This PR was squashed before being merged into the 2.8 branch (closes#28310).
Discussion
----------
[Finder] Update PHPdoc append()
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 -->
<!--
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
-------
111d9bc6f5 [Finder] Update PHPdoc append()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Remove the "obscure" message subscriber configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
As described in #28275, all of the configuration can be done using yield and that we could remove the support for other ways (especially the obscure return `[['method', -10]]` syntax) as I believe this would clarify the configuration a lot.
Commits
-------
cf2ad861f5 Remove the "obscure" message subscriber configuration
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Allow interfaces to be type-hinted as well
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27076
| License | MIT
| Doc PR | ø
Interfaces can be type-hinted as well for the message handlers.
Commits
-------
2dbbfbda4e Allow interfaces to be type-hinted as well
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add a --bus option to the messenger:consume-messages command
| 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 | todo
Making it compatible with the multi-bus feature.
Commits
-------
e3f1eecbc1 Bus argument is a required option when multiple buses are defined
539cb62ffe [Messenger] Add a --bus option to the messenger:consume-messages command
Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Only subscribe to a given bus from the MessageSubscriber
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | ø
#27275 introduced the ability to listen to only a few buses from the handler tag. This adds that ability directly from the message subscriber.
It has also highlighted to me that most of the configuration can be done using `yield` (like the example I've added in this PR's tests) and that we could remove the support for other ways (especially the obscure `return [['method', -10]]` syntax) but I believe this should be done **in another pull-request** (that I'm happy to do after this one).
Commits
-------
f60e409011 Only subscribe to a given bus from the MessageSubscriber
This PR was squashed before being merged into the 4.2-dev branch (closes#28070).
Discussion
----------
[Translator] Use ICU parent locales as fallback locales
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12319
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10122
Currently the `Translator` fall backs based on the locale separator (eg `es_AR` to `es`), but the ICU data contains parent locales (eg `es_AR` is a child of `es_419`, as is `es_BO`, `es_EC` etc).
This makes use of the ICU data to add add in these fallbacks. This means the specific locales can be used, but the translations can stored in these groupings (eg `es_419` for Latin American Spanish), as well as adding other sensible fallbacks (eg Cape Verdean Portuguese to `pt_PT`).
Commits
-------
e0f402fc29 [Translator] Use ICU parent locales as fallback locales
* 4.1:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
[PhpUnitBridge] keep compat with composer 1.0
Instantiate $offset and $maxlen at definition
[Cache] minor code update to leverage PHP 7.1
* 3.4:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
[PhpUnitBridge] keep compat with composer 1.0
Instantiate $offset and $maxlen at definition
* 2.8:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
Instantiate $offset and $maxlen at definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] a new component to serialize values to plain PHP code
| 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 proposes moving what is currently the `PhpMarshaller` class in the Cache component to a separate component.
This component would provide only one public static method:
`VarExporter::export($value, bool &$isStaticValue = null): string`.
This method returns `$value` serialized as plain PHP code. Running this code creates the same exact data structure that `$value` contained. This is exactly like `serialize()` and `unserialize()`, from which all semantics are preserved (`__sleep`, `__wakeup` and `Serializable`).
The reason to use this method *vs* `serialize()` or even igbinary is performance: thanks to OPcache, the resulting code is significantly faster and more memory efficient than using `unserialize()` or `igbinary_unserialize()`.
Unlike `var_export()`, this works on any serializable PHP value.
It also provides a few improvements over `var_export()`/`serialize()`:
- the output is PSR-2 compatible
- the output can be re-indented without messing up with any `\r` or `\n` in the data
- missing classes throw a `ReflectionException` instead of being unserialized to a `PHP_Incomplete_Class` object
- references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` instances are preserved
- `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes throw an exception when being serialized (their unserialized version is broken anyway, see https://bugs.php.net/76737.)
Commits
-------
7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Added new "auto" mode for `framework.session.cookie_secure` to turn it on when https is used
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I'm pretty sure we're many forgetting to make session cookies "secure".
Here is an "auto" mode that makes them secure automatically when the session is started on requests with the "https" scheme.
Commits
-------
4f7b41a83d [FrameworkBundle] Added new "auto" mode for `framework.session.cookie_secure` to turn it on when https is used
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Fix unprepared BinaryFileResponse sends empty file
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, with the exception of preexisting, unrelated failures
| Fixed tickets | #28237
| License | MIT
| Doc PR |
When you call `BinaryFileResponse#sendContent()` without first calling `prepare()` the response is sent but the contents are empty. `prepare()` properly initializes the `$maxlen` and `$offset` properties. However, `sendContent()` doesn't do any sanity checking, and so, uses the uninitialized properties. This causes `stream_copy_to_stream()` to copy empty contents and the file that is sent, to contain nothing.
This change initializes the properties at definition instead of in `prepare()`.
> Additionally:
> - Bug fixes must be submitted against the lowest branch where they apply
~I'm not sure how early this bug exists, or how far back to go. I'll check to see if 2.7 and 2.8 are affected and report back.~
Commits
-------
dba8687a5d Instantiate $offset and $maxlen at definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Update changelog about the new $encoderIgnoredNodeTypes arg in XmlEncoder contrustor
| 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/27926
| License | MIT
| Doc PR | /
Commits
-------
49f3bfc823 Update changelog
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Don't make EnvelopeItemInterface extend Serializable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes (on experimental API)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`Serializable` is a broken interface, see e.g. https://externals.io/message/98834
I don't think we should force ppl to implement it anywhere.
Actually, it isn't required to be able to serialize an object, and it doesn't enforce making a class serializable (as the `serialize()` method can throw).
What was the purpose of the removed logic? ping @sroze @ogizanagi
Commits
-------
2beda894f2 [Messenger] Don't make EnvelopeItemInterface extend Serializable
This PR was merged into the 4.2-dev branch.
Discussion
----------
Mock date() in ClockMock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (In case `date()` is mocked in some other way execution would fail because of redeclaration. Could be avoided with an extra `function_exists()` check. WDYT?)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As to the [PHP documentation](https://secure.php.net/manual/en/function.date.php) `date()` uses the value of `time()` as timestamp if none is given. `date()` has to be mocked in ClockMock as well for this still being true, otherwise `\time()` is used as default.
BTW: The msec part of `microtime()` has 8 fractional digits on my system, ClockMock returns only 6...
Commits
-------
e8ba79adb9 [Bridge/PhpUnit] Mock date() in ClockMock
* 4.1:
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
[travis] enable Redis cluster
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
fix data mapper return type in docblock
fix type error handling when writing values
* 3.4:
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
[travis] enable Redis cluster
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
fix data mapper return type in docblock
fix type error handling when writing values
This PR was squashed before being merged into the 4.2-dev branch (closes#28221).
Discussion
----------
[DomCrawler] Add a way to filter direct children
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28171
| License | MIT
| Doc PR | -
The Dom-Crawler component only has a `filter()` method (to filter the node and all its children) and a `children()` method to return direct children.
**There is currently no way to easily filter (thanks to a selector) the direct children of a node, like jQuery allows so (with a selector passed to the `.children([selector])` method).**
**This PR adds a way to optionally filter direct children thanks to a CSS selector**. Here is an example of the usage:
```php
$html = <<<'HTML'
<html>
<body>
<div id="foo">
<p class="lorem" id="p1"></p>
<p class="lorem" id="p2"></p>
<div id="nested">
<p class="lorem" id="p3"></p>
</div>
</div>
</body>
</html>
HTML;
$crawler = new Crawler($html);
$foo = $crawler->filter('#foo');
$foo->children() // will select `#p1`, `#p2` and `#nested`
$foo->children('p') // will select `#p1` and `p2`
$foo->children('.lorem') // will select `#p1` and `p2`
```
This PR adds only an optional parameter and adds no BC break.
Commits
-------
f634afdb6f [DomCrawler] Add a way to filter direct children
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Allow autowiring by type + parameter name
| 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/issues/10206
In #27165, we introduced the possibility to bind by type+name:
```yaml
bind:
Psr\Log\LoggerInterface $myLogger: @monolog.logger.my_logger
```
But we forgot about aliases. For consistency, they could and should allow doing the same. More importantly, this will open up interesting use cases where bundles could provide default values for typed+named arguments (using the new `ContainerBuilder::registerAliasForArgument()` method). E.g:
```yaml
services:
Psr\Cache\CacheItemPoolInterface $appCacheForecast: @app.cache.forecast
```
Works also for controller actions and service subscribers (using the real service id as the key).
Commits
-------
c0b8f53bcb [DI] Allow autowiring by type + parameter name
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28248
| License | MIT
| Doc PR | -
As described in https://github.com/php-memcached-dev/php-memcached/issues/24 and because we enable the binary protocol by default.
Commits
-------
8b59d177db [Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
This PR was squashed before being merged into the 3.4 branch (closes#28252).
Discussion
----------
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28245
| License | MIT
| Doc PR | -
This fixes https://github.com/symfony/symfony/issues/28245.
It brings back handling `__toString` as documented for invalid values.
Commits
-------
2ac883a99b [DoctrineBridge] support __toString as documented for UniqueEntityValidator
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] fix data mapper return type in docblock
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
5bdc755d73 fix data mapper return type in docblock
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] make PhpMarshaller handle hard references
| 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 makes the interface and behavior of `PhpMarshaller` cleaner and bullet-proof.
While a bug fix at this stage, I'd like to propose splitting it to a new `VarExporter` component all goes well.
Commits
-------
bc5d208584 [Cache] make PhpMarshaller handle hard references
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Fix the XML comments encoding
| 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 we decode a XML comment, we get `['#comment' => ' foo ']`. But when we encode this same content, the result is not the expected one.
```php
$encoder->encode(['#comment' => ' foo '], 'xml');
```
```
Expected:
<response>
<!-- foo -->
</response>
Actual:
<response>
<item key="#comment"> foo </item>
</response>
```
Commits
-------
d94a37f395 Allow to encode xml comments
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebProfilerBundle] Remove useless macro arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I was digging into the Stopwatch Component and the part of displaying timeline in WebProfilerBundle and found some useless arguments in macro. The code was changed but arguments were abandoned.
Where the problem appeared: bfcc5e7392 (diff-3651d31bd302da5c7c1ef927e8641c78L294)
Commits
-------
70498dbeae [WebProfilerBundle] remove useless macro arguments
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] `message_bus` alias public
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28215
| License | MIT
| Doc PR | ø
Because it is used in the `ControllerTrait` with `get('message_bus')`... same than for `security.csrf.token_manager` and cie, it should be public.
Commits
-------
51b6e9eb96 Make the `message_bus` alias public
* 4.1:
fix merge
[travis][appveyor] use symfony/flex to accelerate builds
Add missing stderr redirection
clean up unused code
Remove the HTML5 validation from the profiler URL search form
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
Add help texts for checkboxes in horizontal bootstrap 4 forms
[Security] Call AccessListener after LogoutListener
* 3.4:
[travis][appveyor] use symfony/flex to accelerate builds
Add missing stderr redirection
clean up unused code
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
[Security] Call AccessListener after LogoutListener
This PR was squashed before being merged into the 4.2-dev branch (closes#28069).
Discussion
----------
[Validator] New `DivisibleBy` constraint for testing divisibility
This introduces a new ~`MultipleOf`~ `DivisibleBy` constraint which checks whether one number is a multiple of (aka "divisible by") some other number. Useful for enforcing specific increments on a number.
| 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 | https://github.com/symfony/symfony-docs/pull/10121
See https://github.com/symfony/symfony-docs/pull/10121 for examples of this constraint in action.
Commits
-------
efcfb8b22d [Validator] New `DivisibleBy` constraint for testing divisibility
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Add missing stderr redirection
| 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 seems to have been overlooked in
6c0e6af47a, and results in the test suite
being polluted on machines where phpdbg is not installed.
I updated the code to mimic other occurences of exec in this file.
Commits
-------
d67b86b9e7 Add missing stderr redirection
This PR was merged into the 4.1 branch.
Discussion
----------
[Form] Add help texts for checkboxes in horizontal bootstrap 4 forms
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 | —
| License | MIT
| Doc PR | —
Bootstrap 4 horizontal forms override the `{% block checkbox_form %}` but didn't include the help text. Regular (vertical) Bootstrap 4 are not affected, as they use the default `form_row`, which includes the `form_help()` call.
### Before
![before](https://user-images.githubusercontent.com/1032411/43576420-9a1051ee-9649-11e8-8c1e-89502e5a79bd.png)
### After
![after](https://user-images.githubusercontent.com/1032411/43576423-9dfe5620-9649-11e8-8bce-74ec82d83729.png)
Commits
-------
1483c87aab Add help texts for checkboxes in horizontal bootstrap 4 forms
This PR was squashed before being merged into the 4.2-dev branch (closes#28176).
Discussion
----------
[DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Add the method call `setLogger` for every service implementing `Psr\Log\LoggerAwareInterface`
Commits
-------
afda3c8844 [DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] clean up unused code
| 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 |
The removed lines were added in #17159 to be able to detect comment lines without running into parse errors. Part of that was reverted in #25241 when the logic was overhauled leading to now useless initialisation of variables that are never evaluated.
Commits
-------
a7672bd187 clean up unused code
This seems to have been overlooked in
6c0e6af47a, and results in the test suite
being polluted on machines where phpdbg is not installed.
I updated the code to mimic other occurences of exec in this file.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] Add fallback to cultureless locale for internationalized routes
| 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/issues/27938
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10108
Please check the related issue for the context.
TODO :
- [x] Update CHANGELOG
- [x] Update documentation
Commits
-------
fd2e3c36fb [Routing] Add fallback to cultureless locale for internationalized routes
This PR was merged into the 2.8 branch.
Discussion
----------
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
Commits
-------
db1c21c8ae [Filesystem] Add test to prevent regression when using array|resource with dumpFile
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Config] show proposals when unsupported option is provided
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28075
| License | MIT
| Doc PR | none
In case of proposals match with the provided option, all proposals are displayed.
In case of no pertinent proposal is available, all options are displayed in alpha order.
Commits
-------
15f69a3e81 [Config] show proposals when unsupported option is provided
This PR was merged into the 4.1 branch.
Discussion
----------
[DI] Fix autowire inner service
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25631
| License | MIT
| Doc PR | -
This PR fix multiple levels of decoration. Unfortunately, this [good question](https://github.com/symfony/symfony/pull/25631#issuecomment-364610914) in origin PR has not been heard 🎧😄. @dunglas @chalasr
Commits
-------
b79d097c2a [DI] Fix autowire inner service
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Allow autoconfiguring bindings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've come up with a case where we will need to inject a different service based on which interfaces a consumer service implements: injecting a different token storage for monolog processor than for everything else. Required in #27801.
Commits
-------
7c29977037 [DI] Allow autoconfiguring bindings
* 4.1:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
* 3.4:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28010, #27865
| License | MIT
| Doc PR | -
When circular loops involve references in properties, method calls or configurators, it is possible to properly instantiate the related services.
The current logic is broken: `ContainerBuilder` considers some of these loops as self-referencing circular references, leading to a runtime exception, and in similar situations, `PhpDumper` generates code that turns to infinite loops at runtime 💥. These badly handled situations happen with inlined definitions.
This PR fixes both classes by making them track which references are really part of the constructors' chain, including inline definitions.
It also fixes dumping infinite loops when dumping circular loops involving lazy services while proxy-manager-bridge is not installed.
Commits
-------
e843bb86c8 [DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
This PR was merged into the 4.1 branch.
Discussion
----------
[Translation] fix perf of lint:xliff command
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27564
| License | MIT
| Doc PR | -
#27653 has been merged on master as an improvement, but the perf issue is a killer.
Our CI spends 1 minutes on just a few translation test cases.
Only 4.1 has this behavior. That's a bug.
Commits
-------
02c69b1658 [Translation] fix perf of lint:xliff command
This PR was merged into the 4.1 branch.
Discussion
----------
[Form] Remove extra .form-group wrapper around file widget in bootstrap 4
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 is a follow-up to https://github.com/symfony/symfony/pull/27958 and https://github.com/symfony/symfony/pull/27919 by @apfelbox .
It fixes an extra space between the help text of a FileType widget and the widget itself. The extra space was caused by a `.form-group` wrapper in the `file_widget` block.
Commits
-------
01e7fe4fb0 [Form] Remove extra .form-group wrapper around file widget in bootstrap 4
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] Fixed scheme redirecting for root path
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I and my friend found a bug with routing / matching and redirecting from http to https by forcing routes (https://symfony.com/doc/current/routing/scheme.html). It works good for all routes except the homepage (root path /). The problem is probably here (6912cfebc0/Matcher/Dumper/PhpMatcherDumper.php (L196-L199)). Symfony tries to display the welcome page instead of redirecting to https.
Commits
-------
2d7fdff021 [Routing] Fixed scheme redirecting for root path
This PR was merged into the 2.8 branch.
Discussion
----------
Update validators.nl.xlf
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The original translation does not match intended communication.
`Deze waarde is geen geldige UUID waarde.` reads as `This value is not a valid UUID value`.
Commits
-------
7f895abbdd Update validators.nl.xlf
* 4.1:
[travis] fix CI for sigchild+Process
fix merge
[travis] merge "same Symfony version" jobs in one
fix merge
🐛 Fix typo
Remove the Expires header when calling Response::expire()
Allow multidimensional collection in property info
Allow multidimensional collection in property info
* 3.4:
[travis] fix CI for sigchild+Process
fix merge
[travis] merge "same Symfony version" jobs in one
fix merge
Remove the Expires header when calling Response::expire()
Allow multidimensional collection in property info
Allow multidimensional collection in property info
This PR was squashed before being merged into the 4.2-dev branch (closes#21002).
Discussion
----------
[Form] Added options for separate date/time labels in DateTimeType.
If your render date and time separately you need options for each label.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Let's say you have the following form field:
```
$builder
->add('start', DateTimeType::class, [
'date_widget' => 'single_text',
...
])
...
```
Then you can render the date and time widgets/rows/etc. separately:
```
<div>{{ form_row(form.start.date) }}</div>
<div>{{ form_row(form.start.time) }}</div>
```
But you can't provide labels for each, so what is displayed is just the uppercased field name ("Date" and "Time").
This PR adds 'date_label' and 'time_label' options, so you can do:
```
$builder
->add('start', DateTimeType::class, [
'date_widget' => 'single_text',
'date_label' => 'The Start Date',
'time_label' => 'The Start Time',
...
])
...
```
Commits
-------
df191552b4 [Form] Added options for separate date/time labels in DateTimeType.
This PR was squashed before being merged into the 4.2-dev branch (closes#27763).
Discussion
----------
[WebProfilerBundle] Append new ajax request to the end of the list
Append new ajax request to the end of the list instead of adding it to the beginning
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes/no
| BC breaks? | no/yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Didn't find why this behavior was changed with web profiler design.
In current version it is hard to click to the latest ajax request.
Commits
-------
45d4559ab2 [WebProfilerBundle] Append new ajax request to the end of the list
This PR was squashed before being merged into the 4.2-dev branch (closes#28035).
Discussion
----------
[DomCrawler] Allow using non-absolute base URIs
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12318
| License | MIT
| Doc PR | -
@xabbuh @stof I implemented in this PR your comments from https://github.com/symfony/symfony/issues/12318
Commits
-------
130119ff6a [DomCrawler] Allow using non-absolute base URIs
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] Allow nested collections
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
When a multidimentional collection is defined (in a docblock) the extractor does not resolve the className deeply
```
#input
class Foo {
/**
* @var Baz[][]
*/
public $bar;
}
```
```
# current result
builtinType: array
collectionValueType:
builtinType: object
class: Baz[]
```
```
# FIX
builtinType: array
collectionValueType:
builtinType: array
collectionValueType:
builtinType: object
class: Baz
```
The 2.8 version has also that bug, but the methods have been moved to another class. Should I create an other PR for 2.8?
Commits
-------
ce49036790 Allow multidimensional collection in property info
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] Allow nested collections
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Duplicate of #28012 for the 2.8 branche (as both code and test have been refactored between 2.8 and 3.x
Commits
-------
6331687f65 Allow multidimensional collection in property info
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Yaml] save preg_match() calls when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | possibly #27960
| License | MIT
| Doc PR |
Commits
-------
e6bea97b6d save preg_match() calls when possible
This PR was merged into the 2.8 branch.
Discussion
----------
Remove the Expires header when calling Response::expire()
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | #13341 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | -
Commits
-------
ac0cd15402 Remove the Expires header when calling Response::expire()
* 3.4:
[DoctrineBridge] allow dev versions of Doctrine again
bumped Symfony version to 3.4.15
updated VERSION for 3.4.14
updated CHANGELOG for 3.4.14
bumped Symfony version to 2.8.45
updated VERSION for 2.8.44
update CONTRIBUTORS for 2.8.44
updated CHANGELOG for 2.8.44
This PR was merged into the 4.2-dev branch.
Discussion
----------
Remove direct dependencies on doctrine/common
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Resubmitting #27609 now that Doctrine should be deprecation free.
Commits
-------
cb91cdef91 Remove direct dependencies on doctrine/common
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Remove support for legacy and risky HTTP headers
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e447e8b921 [HttpFoundation] Remove support for legacy and risky HTTP headers
* 4.1:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
remove unnecessary instanceof in MongoDbSessionHandler
[HttpFoundation] fixed using _method parameter with invalid type
Renaming internal test class to help auto-completion
[Intl] Replace svn with git in the icu data update script
[Messenger] Fix error message on undefined message class for non-subscriber handler
[HttpFoundation] Fix Cookie::isCleared
* 4.0:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
[HttpFoundation] fixed using _method parameter with invalid type
[Intl] Replace svn with git in the icu data update script
[HttpFoundation] Fix Cookie::isCleared
* 3.4:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[FrameworkBundle] fixed guard event names for transitions
[DI] Improve class named servics error message
[HttpFoundation] fixed using _method parameter with invalid type
[Intl] Replace svn with git in the icu data update script
[HttpFoundation] Fix Cookie::isCleared
* 2.8:
[HttpKernel] Fixed invalid REMOTE_ADDR in inline subrequest when configuring trusted proxy with subnet
[HttpFoundation] fixed using _method parameter with invalid type
[Intl] Replace svn with git in the icu data update script
[HttpFoundation] Fix Cookie::isCleared
This PR was squashed before being merged into the 3.4 branch (closes#28057).
Discussion
----------
[DI] Improve class named servics error message
| 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 | #28006
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
61de0601a1 [DI] Improve class named servics error message
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Fix Cookie::isCleared
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | #27946
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- 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.
-->
Commits
-------
d3d7766874 [HttpFoundation] Fix Cookie::isCleared
This PR was merged into the 2.8 branch.
Discussion
----------
[Intl] Replace svn with git in the icu data update script
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Quoting http://site.icu-project.org/repository:
> Announcement 07/16/2018: The ICU source code repository has been migrated from Subversion to Git, and is now hosted on GitHub at the following location: https://github.com/unicode-org/icu.
The icu update script will from now on:
* use git
* fetch the latest release tag (no need to maintain the list anymore)
I rebuilt the data files, but since no new ICU releases has been made, none of files were actually updated.
Commits
-------
ebdf972e49 [Intl] Replace svn with git in the icu data update script
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Fix error message on undefined message class for non-subscriber handler
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 a wrong hint talking about `getHandledMessages()` while the handler does not implement `MessageSubscriberInterface`.
Commits
-------
e5ea3bc032 [Messenger] Fix error message on undefined message class for non-subscriber handler
This PR was merged into the 3.4 branch.
Discussion
----------
Use an empty string as default for assertEquals
Make sure it isn’t interpreted as a type NULL, making the test fail with PHPUnit 7.2.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This shouldn’t break the existing tests, but will also make them work with recent PHPUnit.
Commits
-------
31353147a3 Use an empty string as default for assertEquals
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Add missing Ukrainian translations
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- 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 -->
| License | MIT
Add missing Ukrainian translations.
<!--
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
-------
b7d55ede15 Add missing Ukrainian translations
* 4.1:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
* 4.0:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
* 3.4:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
* 2.8:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
* 4.1:
fix merge
bumped Symfony version to 4.1.3
[PhpUnitBridge] Describe weak_vendors properly
[HttpKernel] Fix merging bindings for controllers' locators
updated VERSION for 4.1.2
updated CHANGELOG for 4.1.2
bumped Symfony version to 4.0.14
updated VERSION for 4.0.13
updated CHANGELOG for 4.0.13
bumped Symfony version to 3.4.14
updated VERSION for 3.4.13
updated CHANGELOG for 3.4.13
bumped Symfony version to 2.8.44
Chaining senders with their aliases should work
* 4.0:
[HttpKernel] Fix merging bindings for controllers' locators
bumped Symfony version to 4.0.14
updated VERSION for 4.0.13
updated CHANGELOG for 4.0.13
bumped Symfony version to 3.4.14
updated VERSION for 3.4.13
updated CHANGELOG for 3.4.13
bumped Symfony version to 2.8.44
* 3.4:
[HttpKernel] Fix merging bindings for controllers' locators
bumped Symfony version to 3.4.14
updated VERSION for 3.4.13
updated CHANGELOG for 3.4.13
bumped Symfony version to 2.8.44
This PR was squashed before being merged into the 4.1 branch (closes#28046).
Discussion
----------
[PhpUnitBridge] Describe weak_vendors properly
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The `weak_vendors` mode now displays deprecations, this behavior has changed since https://github.com/symfony/symfony/pull/25997
Commits
-------
336008c5d3 [PhpUnitBridge] Describe weak_vendors properly
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Fix chaining senders with their aliases
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27908
| License | MIT
| Doc PR | ø
Turns out chaining senders when using their alias as the name is broken. This PR fixes it :)
Commits
-------
98bb64c32a Chaining senders with their aliases should work
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] fix truncating form views in data collector
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no (fixing a non released patch)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes#27923.
Commits
-------
5fa1f12f3c [Form] fix truncating form views in data collector
* 4.1:
updated VERSION for 2.8.43
update CONTRIBUTORS for 2.8.43
updated CHANGELOG for 2.8.43
backported translations
Fixed templateExists on parse error of the template name
* 4.0:
updated VERSION for 2.8.43
update CONTRIBUTORS for 2.8.43
updated CHANGELOG for 2.8.43
backported translations
Fixed templateExists on parse error of the template name
* 3.4:
updated VERSION for 2.8.43
update CONTRIBUTORS for 2.8.43
updated CHANGELOG for 2.8.43
backported translations
Fixed templateExists on parse error of the template name
* 2.8:
updated VERSION for 2.8.43
update CONTRIBUTORS for 2.8.43
updated CHANGELOG for 2.8.43
backported translations
Fixed templateExists on parse error of the template name
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpKernel] Fixed templateExists on parse error of the template name
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28001
| License | MIT
| Doc PR | -
9bfa971bc5/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php (L49-L51)
Commits
-------
53347c42fd Fixed templateExists on parse error of the template name
* 4.1:
fixed UUID error message id in translation files
Add missing typehint on chain sender
Add several missing translations of the UUID validation message.
Serbo-Croatian has Serbian plural rule
[Validator] Add missing UUID validator message translation (hu)
[Validator] Add missing UUID validator message translation (en)
add missing translation for uuid validator
Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
Fix PHPDoc return type
[MonologBridge] Improve FirePHPHandler
Fix SVGs not scaling in IE9, IE10, and IE11
Supports nested "abstract" object while serializing and de-serializing
* 4.0:
fixed UUID error message id in translation files
Add several missing translations of the UUID validation message.
Serbo-Croatian has Serbian plural rule
[Validator] Add missing UUID validator message translation (hu)
[Validator] Add missing UUID validator message translation (en)
add missing translation for uuid validator
Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
Fix PHPDoc return type
[MonologBridge] Improve FirePHPHandler
Fix SVGs not scaling in IE9, IE10, and IE11
* 3.4:
fixed UUID error message id in translation files
Add several missing translations of the UUID validation message.
Serbo-Croatian has Serbian plural rule
[Validator] Add missing UUID validator message translation (hu)
[Validator] Add missing UUID validator message translation (en)
add missing translation for uuid validator
Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
Fix PHPDoc return type
[MonologBridge] Improve FirePHPHandler
Fix SVGs not scaling in IE9, IE10, and IE11
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Add several missing translations of the UUID validation message.
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | (Comments in #27992) <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | —
All the remaining translations from #27992
Commits
-------
ee780f3c66 Add several missing translations of the UUID validation message.
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Add missing UUID validator message translation (hu)
| Q | A
| ------------- | ---
| Branch? |2.8
| 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 | -
| 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
-------
0b2134415c [Validator] Add missing UUID validator message translation (hu)
This PR was squashed before being merged into the 3.4 branch (closes#26193).
Discussion
----------
Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25518
| License | MIT
Symfony 3.4 emits deprecation warnings for `TranslationLoader` and `WriteCheckSessionHandler` as soon as these classes are loaded, yet at the same time these classes are part of the default services defined in Symfony 3.4, so if these classes are loaded during container compilation a deprecation warning is emitted, even if these classes are never actually used.
An example would be the following within a compiler pass:
foreach ($containerBuilder->getDefinitions() as $definition) {
if (is_subclass_of($definition->getClass(), SomeClass::class)) {
$definition->addMethodCall('setSomething', [new Reference('someservice')]);
}
}
This will load both `TranslationLoader` and `WriteCheckSessionHandler` in order to check their definition. No instance of the classes are ever used and the classes are not loaded after compilation ever, yet the deprecation notices are shown on every single page. More details are provided in issue #25518 .
By moving the deprecation notices to the class constructors false-positives are avoided while actual usage of the classes should still generate the deprecation warnings.
Commits
-------
1a427b181d Fix false-positive deprecation notices for TranslationLoader and WriteCheckSessionHandler
This PR was squashed before being merged into the 4.2-dev branch (closes#27943).
Discussion
----------
[Security] Deprecate returning stringish objects from Security::getUser
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| 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 -->
`$user` can also be an object implementing `__ toString`. Here we want only true user objects...
Commits
-------
8c410da7e7 [Security] Deprecate returning stringish objects from Security::getUser
This PR was squashed before being merged into the 4.2-dev branch (closes#27956).
Discussion
----------
Added types and tweaked PHPdoc of clickLink() and submitForm() methods
| 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 | - <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | -
I wanted to suggest these changes to #27807 but I failed to do that before it was merged.
Commits
-------
be9d578d4b Added types and tweaked PHPdoc of clickLink() and submitForm() methods
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Security] Remember me: allow to set the samesite cookie flag
| 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? | no
| Fixed tickets | no
| License | MIT
| Doc PR | symfony/symfony-docs#10077
This PR allows to set the [`samesite`](https://www.owasp.org/index.php/SameSite) cookie flag for remember me token cookies.
Commits
-------
337e8ef044 [Security] Remember me: allow to set the samesite cookie flag
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] fix compatibility with older Cache versions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
FrameworkBundle 4.2 will be compatible with older versions of the Cache
component. In those versions adapters don't implement `ResetInterface`.
For backwards compatibility they still need to be tagged.
Commits
-------
ec795cca78 fix compatibility with older Cache versions
* 4.1:
fixed typo
[FrameworkBundle] fixed brackets position in method calls
Add placeholder support in bootstrap 4 file fields
[Form] Improve rendering of `file` field in bootstrap 4
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
[DependencyInjection] add missing test for #27710
[EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
Fix serialization of abstract items with groups across multiple entities
* 4.0:
fixed typo
[FrameworkBundle] fixed brackets position in method calls
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
* 3.4:
[FrameworkBundle] fixed brackets position in method calls
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
[Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
[Console] correctly return parameter's default value on "--"
* 2.8:
[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
[Security] Update user phpdoc on tokens
[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
[HttpFoundation] Fixed phpdoc for get method of HeaderBag
fix typo in ContainerBuilder docblock
FrameworkBundle 4.2 will be compatible with older versions of the Cache
component. In those versions adapters don't implement `ResetInterface`.
For backwards compatibility they still need to be tagged.
This PR was squashed before being merged into the 4.2-dev branch (closes#27829).
Discussion
----------
[DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
As explained by @stof in https://github.com/symfony/symfony/pull/27735#discussion_r199797412, injecting the `ClassMetadataFactory` directly can lead to issues when resetting the EntityManager.
This PR deprecates this usage and encourages to inject the entity manager directly.
Commits
-------
3aab4a1270 [DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor
This PR was merged into the 4.2-dev branch.
Discussion
----------
Add symfony/contracts: a set of abstractions extracted out of the Symfony components
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | -
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A set of abstractions extracted out of the Symfony components.
This is a topic I've been thinking about for a long time. I feel like the time has come for Symfony to publish some abstractions so that people could build on them in a decoupled way.
I've identified interfaces in some components that would greatly benefit from being moved out from the components where they are for now. E.g. #26929 is something that has a broader scope than the Cache component itself.
By putting them in a new `symfony/abstractions` package, we would allow more innovation in the Symfony community, at the abstraction level.
In order to start small, I propose only one interface that gathers a concept that is shared amongst many components already: `ResetInterface`. It would provide a standard `reset()` method, whose purpose is to set an object back to its initial state, allowing it to be reused many times with no side effects/leaks related to its history. By this definition, it could also be autoconfigured (as done here, see update in FrameworkExtension). See wording in the docblock in the attached source code.
Ideally, I'd like this package to provide not only interfaces, by also generic traits, and reference test suites when possible. We could work on adding more abstractions during the 4.2 cycle. WDYT?
## Here is the attached README:
A set of abstractions extracted out of the Symfony components.
Can be used to build on semantics that the Symfony components proved useful - and
that already have battle tested implementations.
Design Principles
-----------------
* contracts are split by domain, each into their own sub-namespaces;
* contracts are small and consistent sets of PHP interfaces, traits, normative
docblocks and reference test suites when applicable, etc.;
* all contracts must have a proven implementation to enter this repository;
* they must be backward compatible with existing Symfony components.
FAQ
---
### How to use this package?
The abstractions in this package are useful to achieve loose coupling and
interoperability. By using the provided interfaces as type hints, you are able
to reuse any implementations that match their contracts. It could be a Symfony
component, or another one provided by the PHP community at large.
Depending on their semantics, some interfaces can be combined with autowiring to
seamlessly inject a service in your classes.
Others might be useful as labeling interfaces, to hint about a specific behavior
that could be enabled when using autoconfiguration or manual service tagging (or
any other means provided by your framework.)
### How is this different from PHP-FIG's PSRs?
When applicable, the provided contracts are built on top of PHP-FIG's PSR. We
encourage relying on them and won't duplicate the effort. Still, the FIG has
different goals and different processes. Here, we don't need to seek universal
standards. Instead, we're providing abstractions that are compatible with the
implementations provided by Symfony. This should actually also contribute
positively to the PHP-FIG (from which Symfony is a member), by hinting the group
at some abstractions the PHP world might like to take inspiration from.
### Why isn't this package split into several packages?
Putting all interfaces in one package eases discoverability and dependency
management. Instead of dealing with a myriad of small packages and the
corresponding matrix of versions, you just need to deal with one package and one
version. Also when using IDE autocompletion or just reading the source code, it
makes it easier to figure out which contracts are provided.
There are two downsides to this approach: you may have unused files in your
`vendor/` directory, and in the future, it will be impossible to use two
different sub-namespaces in different major versions of the package. For the
"unused files" downside, it has no practical consequences: their file sizes are
very small, and there is no performance overhead at all since they are never
loaded. For major versions, this package follows the Symfony BC + deprecation
policies, with an additional restriction to never remove deprecated interfaces.
Resources
---------
* [Documentation](https://symfony.com/doc/current/components/contracts.html)
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)
Commits
-------
898203649f Added symfony/contracts: a set of abstractions extracted out of the components
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27924
| License | MIT
| Doc PR | No
Commits
-------
51a49c7f78 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
This PR was squashed before being merged into the 4.2-dev branch (closes#27807).
Discussion
----------
Added new methods submitForm and clickLink to Client class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Added new methods to BrowserKit/Client to simplify work with links and forms.
Related to https://github.com/symfony/symfony/issues/27627
Commits
-------
e098eddc96 Added new methods submitForm and clickLink to Client class
This PR was merged into the 4.1 branch.
Discussion
----------
[EventDispatcher] Clear orphaned events on reset
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
When the Orphaned Events feature was added in #24392 it was forgotten to also clear them when the `reset` method on the `TraceableEventDispatcher` is called. This makes the Orphaned Events tab on the Event profiler an evergrowing list when using PHP-PM (or other event loop implementations).
Commits
-------
d3260dfdcd [EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
This PR was merged into the 3.4 branch.
Discussion
----------
[Form/Profiler] Massively reducing memory footprint of form profiling pages...
… by removing redundant 'form' variable from view variables.
| 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 |
## Problem
When trying to profile large forms in web profiler, the page can get so big that the memory footprint of the web browser excedes 1Gb making everything unusable and sometimes crashing the browser.
This is especially true for "deep" forms as every node of the form also contains its children in the debugging infos.
## Solution
When removing the "form" view variable that actually contains duplicated contents of everything already displayed in the page, the memory footprint massively decrease making the page usable again even form very complex and deep forms.
By using CutStub, we keep a necessary level of information by providing the information that the variable is indeed here but not directly accessible in the dump.
Commits
-------
5f5077f4fc [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] deprecate non string requirement names
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Basically, this will help catching wrong `@Route` annotation configurations like the following which can lead to hard to debug issues:
```php
@Route("/{foo}", requirements={"foo", "bar"})
```
Commits
-------
8bb5266553 deprecate non string requirement names
As to the PHP documentation date() uses the value of time() as timestamp
if none is given. date() has to be mocked in ClockMock as well for this
still being true, otherwise \time() is used as default.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #19895
| License | MIT
| Doc PR | -
With this PR, when igbinary is available, it is automatically used to serialize values.
This provides faster and smaller cache payloads.
The unserializing logic is autoadaptative:
- when an igbinary-serialized value is unserialized but the extension is missing, a cache miss is triggered
- when a natively-serialized value is unserialized and the extension is available, the native `unserialize()` is used
Ping @palex-fpt since you provided very useful comments on the topic and might be interested in reviewing here also.
Commits
-------
9c328c4894 [Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
* Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service
* added automatic table creation when using Doctrine DBAL with PDO-based backends
Commits
-------
1484117430 [FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] allow turning routes to utf8 mode by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows building optimized routers that match in a single regexp instead of an alternate of utf8/non-utf8 set of routes.
Commits
-------
8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Process][Console] deprecated defining commands as strings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #27796
| License | MIT
| Doc PR | -
* Added the `Process::fromShellCommandline()` static constructor to define shell command-lines
* Allowed passing commands as `array($process, 'ENV_VAR' => 'value')` to `ProcessHelper::run()`
* Deprecated passing commands as strings when creating a `Process` instance.
* Deprecated the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods.
* Deprecated passing a command as a string to `ProcessHelper::run()`, pass it the command as an array of arguments instead.
* Made the `ProcessHelper` class final
Commits
-------
8895bc1b5b [Process][Console] deprecated defining commands as strings
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Improve exception messages by hiding the hidden ids they contain
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27822
| License | MIT
| Doc PR | -
This PR improves error messages containing hidden ids, especially the ones mentioning service locators.
Right now, when a service subscriber is incomplete, we get:
> The service ".service_locator.G69Xsbl.App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
With this PR we get this instead:
> The service "routing.loader" in the container provided to "App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
When no locators are involved, the hidden service is swallowed:
> The service "App\Controller\MyRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface".
This PR also improves runtime exceptions thrown in service locators.
Before:
> Cannot autowire service ".service_locator.Z1jvVrN": it references interface "Symfony\Component\Config\Loader\LoaderInterface" but no such service exists. You should maybe alias this interface to one of these existing services: [...].
After:
> Cannot autowire service "routing.loader" required by "App\Controller\MyRouter": it references interface "Symfony\Component\Config\Loader\LoaderInterface" but no such service exists. You should maybe alias this interface to one of these existing services: [...].
TODO:
- [x] add tests.
Commits
-------
d2b4901a43 [DI] Improve exception messages by hiding the hidden ids they contain
This PR was merged into the 4.1 branch.
Discussion
----------
[Serializer] Fix serialization of items with groups across entities and discrimination map
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27816, #27641
| License | MIT
| Doc PR | ø
I believe this approach is better than the one taken in #27816. At least, it's an alternative :)
Commits
-------
c648b938b2 Fix serialization of abstract items with groups across multiple entities
* 4.1:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
improve deprecation messages
Replace .initialism with .text-uppercase.
* 4.0:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
improve deprecation messages
Replace .initialism with .text-uppercase.
* 3.4:
[Filesystem] fix lock file permissions
[Lock] fix lock file permissions
[Form] Removed .form-control-label class.
Removed .mb-0 in errors.
Fix the detection of the Process new argument
add @xabbuh as a code owner of the Yaml component
Replace .initialism with .text-uppercase.
This PR was squashed before being merged into the 3.4 branch (closes#27903).
Discussion
----------
[Lock] fix lock file permissions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | see discussion below
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See [this comment](https://github.com/symfony/symfony/pull/27668#issuecomment-403392924). Since we are using `r+` now to fix an issue on Solaris, we also need to change the file permissions when the lock file is created for the first time. Otherwise
```php
fopen($fileName, 'r+')
```
will fail due to the file permissions and while
```php
fopen($fileName, 'r')
```
will work, the subsequent locking will again fail on Solaris.
Changing the file permissions to `0666` fixes this issue. __However__ any lock file that was generated _prior_ to this change will still cause issues and would need to be manually deleted. Usually the default `sys_get_temp_dir()` location is used for the lock files and _usually_ these files are purged periodically, so it probably won't matter that much. But it still might cause some confusion since it will not be transparent, why the file lock failed on Solaris systems.
Commits
-------
23481a112e [Lock] fix lock file permissions
This PR was squashed before being merged into the 3.4 branch (closes#27886).
Discussion
----------
[Form] Removed .form-control-label class.
| 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 |
There is no such a class neither in [bootstrap 4.0](https://getbootstrap.com/docs/4.0/components/forms/#form-controls) nor in [bootstrap 4.1](https://getbootstrap.com/docs/4.1/components/forms/#form-controls).
Commits
-------
cb3e712698 [Form] Removed .form-control-label class.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Replace .initialism with .text-uppercase.
| 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 think that the `.initialism` [class](https://getbootstrap.com/docs/4.0/content/typography/#abbreviations) is for different purposes. While the `.text-uppercase` [class](https://getbootstrap.com/docs/4.0/utilities/text/#text-transform) is more neutral and does exactly what we want here.
Commits
-------
3c39dfdaa6 Replace .initialism with .text-uppercase.
This PR was merged into the 3.4 branch.
Discussion
----------
Fix the detection of the Process new argument
| 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 fixes the detection of the new method signature when triggering the deprecation warning. The new `$env` parameter is the second argument, not the first one.
Commits
-------
57e95f3f9a Fix the detection of the Process new argument
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Activation middleware decorator
| 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 | part of #26901 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | TODO
A small middleware decorator that can be wired using DI decoration to enable/disable a middleware on an arbitrary condition. This can be used to keep the same middleware stack across env but enable/disable some of them through this.
Commits
-------
6e43838c5d [Messenger] Activation middleware decorator
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] don't encode cookie name for BC
| 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 | -
As reported by @Seldaek in https://github.com/symfony/symfony/pull/25348#issuecomment-401696990
Commits
-------
d28949b846 [HttpFoundation] don't encode cookie name for BC
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel][FrameworkBundle] Turn HTTP exceptions to HTTP status codes by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25844
| License | MIT
| Doc PR | -
When an exception is thrown, *if it is not handled* then it will be reinjected as a 2nd exception event via `HttpKernel::terminateWithException()`. When this happens, this will generate a proper HTTP status code.
Commits
-------
80b0739fc2 [HttpKernel][FrameworkBundle] Turn HTTP exceptions to HTTP status codes by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Allow to access to the format and context in circular ref handler
| 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
Similar to #27017 but for circular reference handlers.
ping @meyerbaptiste
Commits
-------
99f829ec2b [Serializer] Allow to access to the format and context in circular ref handler
This PR was squashed before being merged into the 3.4 branch (closes#27435).
Discussion
----------
[OptionResolver] resolve arrays
| 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 |
Option resolver didn't work with nested arrays
Before:
$resolver->setDefaults([
'integer' => [
[
12,
23,
],
],
]);
$resolver->setAllowedTypes('integer', 'integer[][]');
Error
The option "host" with value array is expected to be of type "integer[][]", but is of type "integer[][]".
Option expetcted type `integer[][]` but get... `integer[][]`. So strange
Now that case work correct, and we get
array (size=1)
'integer' =>
array (size=1)
0 =>
array (size=2)
0 => int 12
1 => int 23
Commits
-------
6d4812e995 [OptionResolver] resolve arrays
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Add ServiceLocatorArgument to generate array-based locators optimized for OPcache shared memory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | -
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, to generate service locators, we use collections of closures described using `ServiceClosureArgument`. This works well, but it doesn't scale well when the number of services grows, because we have to load as many closures as there are services, even if we never call them.
This PR introduces `ServiceLocatorArgument`, which describes the same thing, but allows dumping optimized locators: instead of a collection of closures, this generates a static array that OPcache can put in shared memory (see fixtures for example.)
Once this PR is merged, we'll be able to update `ServiceLocatorPass::register()` to leverage it and generate these optimized locators everywhere. One particular I have in mind in the locator used by `ServiceArgumentResolver`, which can grow fast (it has as many entries as there are actions.)
Commits
-------
6c8e9576a3 [DI] Add ServiceLocatorArgument to generate array-based locators optimized for OPcache shared memory
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Workflow] Fix autofit label in rendering
Set default to autofit label in place/transition to render long labels properly.
| Q | A
| ------------- | ---
| Branch? | master (3.2 to 4.1)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, not sure how to add a proper test however
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When using long names for `places` or `transitions`, currently this will not be properly rendered it via the `GraphvizDumper`, see below.
![Default truncated](https://cdn.pbrd.co/images/HsAMVK9.png)
![Default autofit](https://cdn.pbrd.co/images/HsANdKx.png)
By setting the default to `fixedsize=false` it will autofit the label in the rendering.
This will also solve the warning when running the `dump` command:
`Warning: node 'place_08b79deda74a924c3babb9b1d0f3e4eed9320989', graph 'workflow' size too small for label`
Commits
-------
76465fc1f7 [Workflow] Set default to autofit label in place/transition to render long labels properly
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Security] Allow passing null as $filter in LdapUserProvider to get the default filter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
c6f87c6e3a [Security] Allow passing null as $filter in LdapUserProvider to get the default filter
This PR was squashed before being merged into the 4.2-dev branch (closes#27650).
Discussion
----------
[SecurityBundle] Add json login ldap
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add a simple from_login_ldap on firewall types to let authenticate with ldap with json API
Commits
-------
2b2dfd2 [SecurityBundle] Add json login ldap
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Console] changed warning verbosity; fixes typo
| 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
* Tests pass, but I do not have an installation of MacOS to run tests on. Tests should be unaffected (the test is simply [skipped on MacOS](https://github.com/symfony/console/blob/master/Tests/Command/CommandTest.php#L345)).
When a Console Command fails to change the process title on MacOS, a warning is issued to output. This warning is relevant to developers of Console applications, but to end users is largely meaningless and potentially confusing.
This PR changes the verbosity of the warning to "very verbose" so it does not interrupt normal usage.
I've also fixed a typo in the message ("get" vs. "set").
Commits
-------
86c771a changed warning verbosity; fixes typo
* 4.1:
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
[Security] LdapUserProvider uidKey could be null
[HttpFoundation] add tests for FlashBagInterface::setAll()
Check for Hyper terminal on all operating systems.
[DI] Don't show internal service id on binding errors
Fix a bug when having more than one named handler per message subscriber
Prevent toolbar links color override by css
add conflict for non-compatible TwigBridge version
* 4.0:
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
[Security] LdapUserProvider uidKey could be null
[HttpFoundation] add tests for FlashBagInterface::setAll()
Check for Hyper terminal on all operating systems.
[DI] Don't show internal service id on binding errors
Prevent toolbar links color override by css
* 3.4:
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
[HttpFoundation] add tests for FlashBagInterface::setAll()
Check for Hyper terminal on all operating systems.
[DI] Don't show internal service id on binding errors
Prevent toolbar links color override by css
* 2.8:
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
[HttpFoundation] add tests for FlashBagInterface::setAll()
Check for Hyper terminal on all operating systems.
Prevent toolbar links color override by css
This PR was merged into the 2.8 branch.
Discussion
----------
[DomCrawler] Fix ChoiceFormField::select() PHPDoc
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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
It's allowed by `setValue`, it works, and it makes sense for `<select multiple>` fields.
Commits
-------
154ce9c170 [DomCrawler] Fix ChoiceFormField::select() PHPDoc
This PR was merged into the 2.8 branch.
Discussion
----------
[WebProfilerBundle] Prevent toolbar links color override by css
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27658
| License | MIT
| Doc PR |
Fixes this issue: https://github.com/symfony/symfony/issues/27658#issuecomment-401008659
Links color in toolbar can be easily override by application css. As this could happens sometimes, this PR set links color with a stronger CSS precedence.
Commits
-------
e12e217f2b Prevent toolbar links color override by css
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Fix a bug when having more than one named handler per message subscriber
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
It turns out that when using multiple named handler on the same subscriber class, it wasn't working properly at all. It fixes it and obviously add a test for it :)
Commits
-------
47d715e97b Fix a bug when having more than one named handler per message subscriber
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] add conflict for non-compatible TwigBridge version
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27713
| License | MIT
| Doc PR |
The argument was dropped in #27454.
Commits
-------
251e684fe6 add conflict for non-compatible TwigBridge version
This PR was squashed before being merged into the 2.8 branch (closes#27836).
Discussion
----------
[HttpFoundation] add tests for FlashBagInterface::setAll()
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Adding documentation for the `FlashBagInterface::setAll()` function
Commits
-------
af96475e2a [HttpFoundation] add tests for FlashBagInterface::setAll()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Security] Use AuthenticationTrustResolver in SimplePreAuthenticationListener
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (minor)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Minor, but would be consistent with how `ContextListener` checks for anonymous tokens.
Commits
-------
27b89cb [Security] Use AuthenticationTrustResolver in SimplePreAuthenticationListener
This PR was squashed before being merged into the 4.2-dev branch (closes#27830).
Discussion
----------
[Dependency-Injection] Fix issue where non-defined services were attempted to be removed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| 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 | #27802 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
The RemoveUnusedServicesPass generates a graph of services that are connected, then removes services that are not part of the graph. To build this graph it creates a list of services then examines their definitions for more services.
The current scenario was causing an error, thrown by getDefinition (triggered in Behat):
* Service was referenced by another service definition
* Service was _not_ defined
* Service was subsequently set() on the container
Commits
-------
53155c9800 [Dependency-Injection] Fix issue where non-defined services were attempted to be removed
* 4.1:
Add color support for Hyper terminal .
[HttpFoundation] Fix tests: new message for status 425
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
[Workflow] Update phpdoc to fit a used className
[PropertyInfo] added handling of nullable types in PhpDoc
[HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler
[Cache] provider does not respect option maxIdLength with versioning enabled
[Form] Fix fixtures for forward compat
[Lock] Fix SemaphoreStoreTest on OS X
Ensure the class discriminator mechanism works with serialization groups as well
fix handling of empty DI extension configs
* 4.0:
Add color support for Hyper terminal .
[HttpFoundation] Fix tests: new message for status 425
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
[PropertyInfo] added handling of nullable types in PhpDoc
[HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler
[Cache] provider does not respect option maxIdLength with versioning enabled
* 3.4:
Add color support for Hyper terminal .
[HttpFoundation] Fix tests: new message for status 425
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
[PropertyInfo] added handling of nullable types in PhpDoc
[HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler
[Cache] provider does not respect option maxIdLength with versioning enabled
* 2.8:
Add color support for Hyper terminal .
[HttpFoundation] Fix tests: new message for status 425
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
This PR was merged into the 2.8 branch.
Discussion
----------
[Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27811
| License | MIT
This change prevents error when invalid subscriber is being used.
Expected result:
```
The Doctrine connection "root" referenced in service "stof_doctrine_extensions.listener.sluggable" does not exist. Available connections names: default
```
Actual error:
```
Notice: Array to string conversion
```
Commits
-------
cf1bc66464 [Doctrine Bridge] Fixed usage of wrong variable when tagged subscriber is invalid
This PR was merged into the 4.2-dev branch.
Discussion
----------
[MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors
| 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/9996
Using this, enabling e.g. TokenProcessor or WebProcessor just needs one line in `services.yaml`:
```yaml
services:
Symfony\Bridge\Monolog\Processor\TokenProcessor: ~
Symfony\Bridge\Monolog\Processor\WebProcessor: ~
```
Commits
-------
28a4912f21 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] added handling of nullable types in PhpDoc
While not specified in PSR-5, PhpDocumentor does support parsing nullable types in the PHP 7.1 syntax (i.e. `?string`), and returns those in a `Nullable` wrapper type. We currently don't handle this and neither throw an error, which results in all kind of weird breakage when this syntax is used (e.g. "class string|int not found").
Correctly parse this syntax into a nullable type.
| 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
Commits
-------
38b369be3f [PropertyInfo] added handling of nullable types in PhpDoc
While not specified in PSR-5, PhpDocumentor does support parsing
nullable types in the PHP 7.1 syntax (i.e. ?string), and returns those
in a Nullable wrapper. We currently don't handle this and neither throw
an error, which results in all kind of weird breakage when this syntax
is used (e.g. "class string|int not found").
Correctly parse this syntax into a nullable type.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] make control characters non-selectable in HTML
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23921
| License | MIT
| Doc PR | -
### Overview
This fixes long term annoyance with control characters in dumps. It makes dumps unusable to use with e.g. SQLs, since copying them will leave `\n` (and others).
### Changes
This PR does three things:
1. Adds special class of characters abbreviated as `ctrl` (cosmetic, already exists in fact but it's not exposed in HTML)
2. Makes control characters non-selectable
3. Changes color of control character from default orange to grey (used by Symfony.com dark theme) which improves UX by showing *"hey, this is something special"*
### Preview
**Inline dump**
<img width="243" alt="screenshot 2018-05-19 17 26 18" src="https://user-images.githubusercontent.com/1227834/40273711-7d963450-5b8b-11e8-843a-dda1e2719b59.png">
**Web Profiler**
<img width="418" alt="screenshot 2018-05-19 17 38 36" src="https://user-images.githubusercontent.com/1227834/40273714-86b9cfec-5b8b-11e8-898b-b7cb5f150a72.png">
<img width="533" alt="screenshot 2018-05-19 17 20 42" src="https://user-images.githubusercontent.com/1227834/40273720-a2370852-5b8b-11e8-88c7-aed9281cc056.png">
**Dump Server**
<img width="194" alt="screenshot 2018-05-19 17 30 12" src="https://user-images.githubusercontent.com/1227834/40273722-aa444686-5b8b-11e8-9ae9-ea2eebb3368d.png">
Commits
-------
b0d4c99bf4 [VarDumper] make control characters non-selectable in HTML
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Allow to pass a single value for the groups opt
| 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
| License | MIT
| Doc PR | todo
Shortcut syntax similar to #20509 but for the context: allows to pass a string instead of an array of string in the serialization context when only one group if used.
Before:
```php
$serializer->serialize($foo, 'json', ['groups' => ['myGroup']];
/** @ApiResource(normalizationContext={"groups"={"myGroup"}}) */
```
After:
```php
$serializer->serialize($foo, 'json', ['groups' => 'myGroup'];
/** @ApiResource(normalizationContext={"groups"="myGroup") */
```
Commits
-------
5b392030f9 [Serializer] Allow to pass a single value for the groups opt
This PR was squashed before being merged into the 3.4 branch (closes#27659).
Discussion
----------
[HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler
| 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 |
#26157 started to send a new cookie in `AbstractTestSessionListener`, but is incompatible with `CookieClearingLogoutHandler` as it overrides its `Set-Cookie` by setting a new cookie (breaking my test that checked to see that the cookie was removed after a log out).
Commits
-------
f54d96926a [HttpKernel] Make AbstractTestSessionListener compatible with CookieClearingLogoutHandler
This PR was squashed before being merged into the 3.4 branch (closes#27752).
Discussion
----------
[Cache] provider does not respect option maxIdLength with versioning enabled
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27746
| License | MIT
| Doc PR |
Component symfony/cache generates cache item ID longer then maxIdLength when versioning is enabled
Commits
-------
ba8b63b195 [Cache] provider does not respect option maxIdLength with versioning enabled
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Deprecate CsvEncoder as_collection false default value
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
As already expressed in https://github.com/symfony/symfony/pull/25369 and related issues, this behavior is quite counter-intuitive. It may be fine for write-API with a single document in the body but I think such CSV APIs are way less common than file-based ones, expecting collections. So I think this behavior should be opt-in explicitly in required cases, always dealing with collections by default.
This is still an arbitrary decision, but trying to make it based on use-cases and user's experience with CSV.
Note: perhaps we could find a better name for this as the semantic of setting `as_collection` to `false` to get the single row directly would not be really obvious.
Also, it could throw an exception when getting multiple rows where only one was expected.
Commits
-------
bce59c8427 [Serializer] Deprecate CsvEncoder as_collection false default value
This PR was merged into the 4.1 branch.
Discussion
----------
[Serializer] Class discriminator and serialization groups
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27641
| License | MIT
| Doc PR | ø
It turns out the discriminator mapping does not work well with the serialization groups. This is fixing it (+ a little bit of cleaning in the tests).
Commits
-------
c91b7afe35 Ensure the class discriminator mechanism works with serialization groups as well
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] show proxified class on hover
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
![capture d ecran de 2018-06-29 08-18-59](https://user-images.githubusercontent.com/243674/42076362-2ab0dd1c-7b75-11e8-9243-5e2f78afe870.png)
Commits
-------
955494c37d [VarDumper] show proxified class on hover
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Fix SemaphoreStoreTest on OS X
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| 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 | https://github.com/symfony/symfony/pull/27755#pullrequestreview-132772372 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
As spotted in https://github.com/symfony/symfony/pull/27755#pullrequestreview-132772372, for OS X.
If other OS X users could give it a try (`/phpunit src/Symfony/Component/Lock/ --filter=SemaphoreStoreTest`), that would be awesome.
Commits
-------
9055611dc3 [Lock] Fix SemaphoreStoreTest on OS X
* 4.1:
[HttpFoundation] update phpdoc of FlashBagInterface::add()
[ProxyManagerBridge] Fix support of private services (bis)
bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas)
[Form] relax fixtures for forward compat
[Validator] Fix the namespace of RegexTest
[Lock] fix locale dependent test case
* 4.0:
[HttpFoundation] update phpdoc of FlashBagInterface::add()
[ProxyManagerBridge] Fix support of private services (bis)
bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas)
[Form] relax fixtures for forward compat
[Validator] Fix the namespace of RegexTest
[Lock] fix locale dependent test case
* 3.4:
[HttpFoundation] update phpdoc of FlashBagInterface::add()
[ProxyManagerBridge] Fix support of private services (bis)
bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas)
[Form] relax fixtures for forward compat
[Validator] Fix the namespace of RegexTest
[Lock] fix locale dependent test case
* 2.8:
[HttpFoundation] update phpdoc of FlashBagInterface::add()
bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas)
[Validator] Fix the namespace of RegexTest
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] fix locale dependent test case
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, I get a failure with `Exception: Failed to extract list of opend semaphores. Expect a Semaphore status, got ------ États des sémaphores --------` :)
Commits
-------
e665da0c9a [Lock] fix locale dependent test case
This PR was squashed before being merged into the 2.8 branch (closes#27765).
Discussion
----------
[HttpFoundation] update phpdoc of FlashBagInterface::add()
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
**Reason why I propose to change the docblock like this: **
The `FlashBagInterface::add()` function does not work only with the `string` type in second parameter
Commits
-------
9135e18ded [HttpFoundation] update phpdoc of FlashBagInterface::add()
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Dont throw if "security.http_utils" is not found
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27445
| License | MIT
| Doc PR | -
The comment + test were misleading, the actual important thing is wiring `AddSessionDomainConstraintPass` before removing passes, which is already the case already.
Commits
-------
db88330448 [SecurityBundle] Dont throw if "security.http_utils" is not found
This PR was squashed before being merged into the 4.2-dev branch (closes#27675).
Discussion
----------
[DoctrineBridge] always load event listeners lazy via ServiceLocator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes/no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/27661
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9973
As described in https://github.com/symfony/symfony/issues/27661 this PR suggests to always load doctrine event listeners lazily from a service locator instead of the full service container.
If we agree to move forward I could tackle the remaining todos:
- [x] update UPGRADE.md
- [x] documentation PR
- [x] tested on real app
Commits
-------
130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator
* 4.1:
[Routing] Disallow object usage inside Route
[HttpFoundation] missing namespace for RedisProxy
[Routing] fix too much greediness in host-matching regex
[HttpFoundation] fix registration of session proxies
failing test to reproduce session problem
[HttpFoundation] fix session tracking counter
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] fix session tracking counter
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
As just discussed with @nicolas-grekas I found this issue today while upgrading my app to 3.4.12. Somehow its not possible anymore to set caching headers correctly since this commit: 146e01cb44 (diff-5350dc763df30ada9d00563c115f6652)
Commits
-------
89ed756462 failing test to reproduce session problem
26fc4e683f [HttpFoundation] fix session tracking counter
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] fix too much greediness in host-matching regex
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27721
| License | MIT
| Doc PR | -
Commits
-------
e16b3023c0 [Routing] fix too much greediness in host-matching regex
* 4.1:
Bump ext-mongodb to 1.5 on Travis
Redesign the Debug error page in prod
[DI] fix dumping deprecated service in yaml
[Serializer] CsvEncoder::AS_COLLECTION_KEY constant
bumped Symfony version to 4.1.2
updated VERSION for 4.1.1
updated CHANGELOG for 4.1.1
bumped Symfony version to 4.0.13
updated VERSION for 4.0.12
updated CHANGELOG for 4.0.12
bumped Symfony version to 3.4.13
updated VERSION for 3.4.12
updated CHANGELOG for 3.4.12
bumped Symfony version to 2.8.43
updated VERSION for 2.8.42
update CONTRIBUTORS for 2.8.42
updated CHANGELOG for 2.8.42
* 4.0:
Bump ext-mongodb to 1.5 on Travis
Redesign the Debug error page in prod
[DI] fix dumping deprecated service in yaml
bumped Symfony version to 4.0.13
updated VERSION for 4.0.12
updated CHANGELOG for 4.0.12
bumped Symfony version to 3.4.13
updated VERSION for 3.4.12
updated CHANGELOG for 3.4.12
bumped Symfony version to 2.8.43
updated VERSION for 2.8.42
update CONTRIBUTORS for 2.8.42
updated CHANGELOG for 2.8.42
* 3.4:
Bump ext-mongodb to 1.5 on Travis
Redesign the Debug error page in prod
[DI] fix dumping deprecated service in yaml
bumped Symfony version to 3.4.13
updated VERSION for 3.4.12
updated CHANGELOG for 3.4.12
bumped Symfony version to 2.8.43
updated VERSION for 2.8.42
update CONTRIBUTORS for 2.8.42
updated CHANGELOG for 2.8.42
This PR was squashed before being merged into the 4.2-dev branch (closes#27499).
Discussion
----------
Improved an error message related to controllers
| 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 proposal is irrelevant for experienced users but it may be useful for newcomers. After having delivered several introductory Symfony training, I can say that when someone adds `return "some string...";` in their controller, the error message is confusing:
![before](https://user-images.githubusercontent.com/73419/40959468-0faf790a-689d-11e8-9ce1-f6e0caf4b113.png)
Maybe we can reword it a bit? (I'm open for suggestions to improve the error message)
![after](https://user-images.githubusercontent.com/73419/40959505-29747070-689d-11e8-834e-92bf18760469.png)
Commits
-------
7510c3a335 Improved an error message related to controllers
This PR was squashed before being merged into the 4.2-dev branch (closes#26300).
Discussion
----------
[PropertyInfo] Implement "Collection" types in PhpDocExtractor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26299
| License | MIT
| Doc PR | todo
Here's a proposition of implementation of my feature request #26299 :
I added few tests covering the requested feature, and I had to change a few things in the ```Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper``` class (createType no longer gets a string, but a ```phpDocumentor\Reflection\Type``` instance) to be able to detect properly Collections and their subtypes.
Of course a simpler implementation is possible, without changing the PhpDocTypeHelper internal behaviour, by matching the input string against ```/^([^>]+)</``` and extracting the classname alone.
Commits
-------
12bafe46d0 [PropertyInfo] Implement \"Collection\" types in PhpDocExtractor
* 2.8:
[DI] fix dumping deprecated service in yaml
bumped Symfony version to 2.8.43
updated VERSION for 2.8.42
update CONTRIBUTORS for 2.8.42
updated CHANGELOG for 2.8.42
This PR was squashed before being merged into the 4.2-dev branch (closes#26946).
Discussion
----------
[WebProfilerBundle] Display uploaded files in the profiler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26926
| License | MIT
| Doc PR | -
![profiler_files](https://user-images.githubusercontent.com/73419/38807087-ac1e9bac-417b-11e8-99e0-317b437c986e.png)
Note: I wanted to use the VarDumper to display the table information (as we do in the rest of tables) but I had lots of problems and I just wanted to create a proof of concept for the feature to see if we like it.
Commits
-------
3f6f75bc12 [WebProfilerBundle] Display uploaded files in the profiler
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Config] deprecate tree builders without root nodes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While reviewing #27472 I wondered if we really need support config trees without a root node. If we did not support it, users wouldn't create pseudo configuration classes when they were actually not needed.
Commits
-------
c2ce15301c deprecate tree builders without root nodes
This PR was merged into the 4.2-dev branch.
Discussion
----------
[PropertyAccess] Add Property Path to Exception Message
| 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 | None
When an exception is thrown writing a property it is not currently obvious which path is at fault (eg. `Expected argument of type "%s", "%s" given` - but where?). This patch appends the current property path to the exception so it is clear which path caused the error (eg. `Expected argument of type "%s", "%s" given at property path "foo.bar"`)
Commits
-------
473a025643 add property path to exception message when error writing property