* 2.7:
[HttpKernel] fixed internal subrequests having an if-modified-since-header
[Validator] Added additional MasterCard range to the CardSchemeValidator
Make the exception message more clear.
[Form] fixed bug - name in ButtonBuilder
[ClassLoader] Fix declared classes being computed when not needed
This PR was merged into the 2.7 branch.
Discussion
----------
[ClassLoader] Fix declared classes being computed when not needed
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d513eae [ClassLoader] Fix declared classes being computed when not needed
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Added additional MasterCard range to the CardSchemeValidator
From October 2016 MasterCard will introduce a new card range, 222100 through 272099.
See: https://www.mctestcards.com/ (click the help in top right)
This implements the additional regex for validation to succeed, and some additional unit tests for this new range.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
4d68f56 [Validator] Added additional MasterCard range to the CardSchemeValidator
This PR was squashed before being merged into the 2.7 branch (closes#19290).
Discussion
----------
[HttpKernel] fixed internal subrequests having an if-modified-since-header
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As the InlineFragmentRenderer has no access to a cached copy of a subrequest's target and hence couldn't handle a response with a HTTP status code of 304 (not modified), it makes no sense to send an if-not-modified-since header.
Commits
-------
e90038c [HttpKernel] fixed internal subrequests having an if-modified-since-header
From October 2016 MasterCard will introduce a new card range,
222100 through 272099.
See: https://www.mctestcards.com/ (click the help in top right)
Implements unit tests and validation for this new card range.
* 2.7:
removed @since
Remove and change unrelevant comments in Validator and Security components.
[Validator] UuidValidator must accept a Uuid constraint.
[Validator] make UuidValidator class formatting consistent.
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] [Security] Remove unrelevant comments in Security and Validator components
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
2cec4a6 Remove and change unrelevant comments in Validator and Security components.
* 2.7:
[travis] Fix deps=low/high builds
fixed CS
Fix for #19183 to add support for new PHP MongoDB extension in sessions.
bumped Symfony version to 2.7.16
updated VERSION for 2.7.15
update CONTRIBUTORS for 2.7.15
updated CHANGELOG for 2.7.15
Fixed typos in the expectedException annotations
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix block() padding formatting after #19189
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19189#issuecomment-229735157
| License | MIT
| Doc PR | reference to the documentation PR, if any
This fixes the unformatted padding of `block()` output after #19189.
Commits
-------
dc130be [Console] Fix for block() padding formatting after #19189
This PR was squashed before being merged into the 2.8 branch (closes#19218).
Discussion
----------
[Security][Guard] check if session exist before using it
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18958
| License | MIT
| Doc PR | -
As stated by @Shekhovtsovy when the Guard component is used without the Symfony full stack (for instance in Laravel), $request->getSession() may be null.
An additionnal PR will be needed for 3.1 but it may be better to check this one before.
Commits
-------
a3f7510 [Security][Guard] check if session exist before using it
This PR was squashed before being merged into the 2.7 branch (closes#19243).
Discussion
----------
Fixed typos in the expectedException annotations
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
PHPUnit ignores any imports when resolving these. You must always reference the FQCN.
Commits
-------
b36de36 Fixed typos in the expectedException annotations
* 2.7:
[HttpKernel] Add listener that checks when request has both Forwarded and X-Forwarded-For
[HttpKernel] Move conflicting origin IPs handling to catch block
[travis] Fix deps=low/high patching
This PR was squashed before being merged into the 2.7 branch (closes#18688).
Discussion
----------
[HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#6526
Emit a warning when a request has both a trusted Forwarded header and a trusted X-Forwarded-For header, as this is most likely a misconfiguration which causes security issues.
Commits
-------
ee8842f [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
This PR was squashed before being merged into the 2.7 branch (closes#19173).
Discussion
----------
[Console] Decouple SymfonyStyle from TableCell
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Alternative approach, ie BC, for #19136 (i prefer that one though, as it also _fixes_ #19123 )
Commits
-------
51f59d6 [Console] Decouple SymfonyStyle from TableCell
This PR was merged into the 2.8 branch.
Discussion
----------
fixed form tests
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
d0130d9 fixed form tests
This PR was merged into the 2.7 branch.
Discussion
----------
removed dots at the end of @param and @return
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For phpdocs, we only add dots for sentences like description, but not for @param and @return for instance. This PR fixes this issue.
This should probably be added to PHP-CS-Fixer as well (/cc @phansys @keradus).
Commits
-------
554303e removed dots at the end of @param and @return
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix formatting of SymfonyStyle::comment()
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19172
| License | MIT
| Doc PR | n/a
This:
```php
$io->comment('Lorem ipsum dolor sit amet, consectetur adipisicing elit, <comment>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat </comment>cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
```
Before outputs:
![](http://image.prntscr.com/image/1d2ea9de42024b53a77120c482be51d4.png)
After:
![](http://image.prntscr.com/image/36de23ec14b64804b0cbae7a431185be.png)
This moves the lines-cutting logic from `block()` into a specific `createBlock`, used from both `comment()` and `block()`, sort as `comment()` can take messages containing nested tags and outputs a correctly formatted block without escaping tags.
Commits
-------
0a53e1d [Console] Fix formatting of SymfonyStyle::comment()
Remove decoration from frameworkbundle test (avoid testing the Console behaviour)
Set background to default
Test output
Adapt test for FrameworkBundle
Use Helper::strlenWithoutDecoration rather than Helper::strlen(strip_tags(..))
Improve logic for align all lines to the first in block()
Tests more block() possible outputs
Avoid calling Helper::strlenWithoutDecoration in loop for prefix, assign it instead
* 2.7:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[Form] Consider a violation even if the form is not submitted
This PR was merged into the 2.7 branch.
Discussion
----------
[WIP] [2.7] [Form] fix `empty_data` option in expanded `ChoiceType`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17791
| License | MIT
| Doc PR | -
It might happen because in `Form::submit()` the handling of `empty_data` [line 597](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L597) comes after each child of a compound field has been submitted [line 549](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L549).
So when `ChoiceType` is `expanded`, `compound` option is defaulted to `true` and it passes its empty submitted data to its children before handling its own `empty_data` option.
This PR uses the listener already added in `ChoiceType` only when `expanded` is true to handle `empty_data` at `PRE_SUBMIT` [line 539](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L539).
- [ ] Fix FQCN in tests for 2.8
- [ ] Remove `choices_as_values` in tests for 3.0
Commits
-------
d479adf [Form] fix `empty_data` option in expanded `ChoiceType`
This PR was merged into the 2.7 branch.
Discussion
----------
Distinguish between first and subsequent progress bar displays
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19133
| License | MIT
| Doc PR | reference to the documentation PR, if any
Fixes https://github.com/symfony/symfony/issues/19133
When a progress bar is first displayed, if it is multi-line, previously output lines are erased, depending upon the number of lines in the progress bar.
This patch fixes that be distinguishing between the first display (no erasing of previous output) and subsequent displays of the progress bar.
Commits
-------
3871e1a Differentiate between the first time a progress bar is displayed and subsequent times
This PR was merged into the 2.7 branch.
Discussion
----------
[DomCrawler] No more exception on field name with strange format
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18569, #18570
| License | MIT
| Doc PR | n/a
Commits
-------
e204913 finished previous commit
953a383 No more exception for malformed input name
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Consider a violation even if the form is not submitted
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (only for the behavior)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11493
| License | MIT
| Doc PR |
Hey!
I'm currently implementing an API using the form component in order to validate the payload sent (in conjonction with the FOSRestBundle). Unfortunatelly, we dig into an issue about the PATCH request which don't map some of our validation rules to the form. Basically, the violations are lost in the middle of the process.
### Use case
We have an entity with the following fields "type", "image" & "video". The field "type"can be either "default", "image" or "video" and then accordingly we use the appropriate field (none for the "default" type, video for the "video" type and image for the "image" type. Then, in our form, we change the validation groups according to our entity type in order to make the "image" field mandatory if the type is "image" and the same for the video field if the type is "video".
### Current behavior
The current behavior (since 2.5) seems to not propages a violation to a form if this form is not submitted but in our use case, changing the field "type" via a PATCH request triggers some new validation which should be reported to end user (inform that a field (video or image) is missing in the PATCH request).
### Expected behavior
The current behavior was introduced in #10567 but IMO, this update is a bug as suggested by @webmozart in https://github.com/symfony/symfony/issues/11493#issuecomment-59549054 Instead, the form component should still map validation errors to the form even if the field was not submitted. If the initial data is not valid, then your initial data was buggy from the beginning but the form should not accept it and instead of silently ignoring the errors, end users should be informed and fix it.
WDYT?
Commits
-------
c483a0f [Form] Consider a violation even if the form is not submitted
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix pipes cleaning on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19089
| License | MIT
| Doc PR | -
Commits
-------
d54cd02 [Process] Fix pipes cleaning on Windows
* 2.7:
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
Fixed typo in PHPDoc
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Dont close the reponse stream in debug
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19078
| License | MIT
| Doc PR | -
Because it's `terminate`'s job to clean the state, not the `Response`'s,
and because the current behavior prevents getting any output on trailing errors on FPM especially.
Commits
-------
2fbc200 [HttpKernel] Dont close the output stream in debug
This PR was merged into the 2.7 branch.
Discussion
----------
[Session] fix PDO transaction aborted under PostgreSQL
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14641
| License | MIT
| Doc PR |
Fixes the transactional concurrency error handling for PostgreSQL which does not allow to execute further queries in a transaction with an error.
Because of the loop, look at the diff with whitespace ignored to see the difference: https://github.com/symfony/symfony/pull/19101/files?w=1
Commits
-------
f8eefa0 [Session] fix PDO transaction aborted under PostgreSQL
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] changed MERGE queries
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17284
| License | MIT
| Doc PR | N/A
Changed the MERGE queries for Oracle and SQL Server to use question mark parameter markers so they work with emulation disabled or enabled - fixes#17284
Commits
-------
ebf3a2f Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Use InputInterface inherited doc as possible
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
In classes implementing `InputInterface`, the methods doc blocks are duplicated from the interface.
Sometimes descriptions are different from the interface's ones and, sometimes, the class doc is clearer. So I tried to keep always the most adapted one.
Commits
-------
b604be7 [Console] Use InputInterface inherited doc as possible
This PR was merged into the 2.7 branch.
Discussion
----------
FormBuilderInterface: fix getForm() return type.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
FormBuilderInterface->getForm() should depend on abstractions and
not implementations as a return type.
Commits
-------
3fa081c FormBuilderInterface: fix getForm() return type.
This PR was merged into the 2.7 branch.
Discussion
----------
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix | no
| New feature | no
| BC breaks | no
| Deprecations | no
| Tests pass | yes
| License | MIT
In additional to #16965 PhpStorm supports `IteratorAggregate::getIterator` now. see https://blog.jetbrains.com/phpstorm/2016/06/phpstorm-2016-2-eap-162-844/
example
```
$collection = new \Symfony\Component\Routing\RouteCollection();
foreach ($collection as $route) {
$route->getHost();
}
```
Commits
-------
ede3556 add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8] update tests to use the new error assertion helper
| 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
-------
e5cf4d4 update tests to use the new error assertion helper
* 2.7:
[HttpFoundation] Fix UPSERT for PgSql >= 9.5
[Form] fixed DateTime transformers
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
This PR was squashed before being merged into the 2.7 branch (closes#18732).
Discussion
----------
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18694
| License | MIT
| Doc PR |
When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.
Commits
-------
c46519b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
* 2.7:
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
[Console] fixed PHPDoc
[travis] HHVM 3.12 LTS
Fix feature detection for IE
[Form] Fixed collapsed choice attributes
[Console] added explanation of messages usage in a progress bar
force enabling the external XML entity loaders
[Yaml] properly count skipped comment lines
Conflicts:
src/Symfony/Component/Translation/Loader/XliffFileLoader.php
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9569c74 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] added explanation of messages usage in a progress bar
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19031
| License | MIT
| Doc PR | symfony/symfony-docs#6544
The intent of progress bar messages is currently wrongly documented. This PR updates the phpdoc to hopefully better describe the usage of such messages.
So, basically, messages are a way to add dynamic information in the progress bar; information that cannot be computed by the progress bar (like for all other placeholders).
Commits
-------
d92f3ea [Console] added explanation of messages usage in a progress bar
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] force enabling the external XML entity loaders
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18876, #18908
| License | MIT
| Doc PR |
Commits
-------
12b5509 force enabling the external XML entity loaders
* 2.7:
Added progressive jpeg to mime types guesser
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
Fixed singular of committee
Do not inject web debug toolbar on attachments
bumped Symfony version to 2.7.15
updated VERSION for 2.7.14
update CONTRIBUTORS for 2.7.14
updated CHANGELOG for 2.7.14
[Console] [SymfonyStyle] Replace long word wrapping test to directly test output
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] [SymfonyStyle] Replace long word wrapping test to directly test output
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/18879#discussion_r64783524
| License | MIT
| Doc PR | -
This [line](https://github.com/symfony/symfony/pull/18879/files#diff-d3625f2548a3b329058ca5a0f5aa57feR60) should not have been changed in order to the test to pass. I assume the test was flawed at first, so I suggest to simply test the output as we did for other ones.
Ping @chalasr
Commits
-------
b78fff4 [Console] [SymfonyStyle] Replace long word wrapping test to directly test output
* 2.7:
[BrowserKit] Bump dom-crawler minimum version requirement
Make one call to "OutputInterface::write" method per table row
[HttpKernel] Fix context dependent test
[Debug] Fix context dependent test
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix context dependent test
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Class `Foo` exists when the ClassLoader component is tested alongside with HttpKernel
Commits
-------
065dee8 [HttpKernel] Fix context dependent test
* 2.7:
`@throws` annotations should go after `@return`
Fix merge
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
src/Symfony/Component/Finder/Finder.php
src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php
src/Symfony/Component/Security/Acl/Model/AclInterface.php
src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php
src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php
src/Symfony/Component/Translation/Loader/XliffFileLoader.php
src/Symfony/Component/Yaml/Tests/InlineTest.php
* 2.3:
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
* 2.7:
[travis] Don't use parallel on HHVM
[appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
Skip some tests on HHVM due to a PHPunit bug
Use the Trusty Travis infrastructure for HHVM builds
Add 3.1 to PR template branch row, remove 2.3
Improve memory efficiency
This PR was merged into the 2.7 branch.
Discussion
----------
Improve memory efficiency
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This avoids concatenating `$message` and `PHP_EOL` (if necessary) as a new value, greatly improving memory efficiency for large `$message`s.
Commits
-------
c1df9f2 Improve memory efficiency
This PR was merged into the 2.7 branch.
Discussion
----------
Run an uptodate version of HHVM on Travis
| Q | A
| ------------- | ---
| Branch? |2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
Using the Trusty infrastructure allows running an uptodate version of HHVM rather than running the latest version supporting Precise, which is very old.
It relies on an undocumented feature of the Travis config file, namely the fact that ``matrix.include`` actually allows to overwrite everything from the config file (it is merged with the main config), even though the Travis linter complains about it. I think it is fine to use this and to replace it with an official approach once there is one.
Refs #18922
Commits
-------
e6956c9 Skip some tests on HHVM due to a PHPunit bug
e041da0 Use the Trusty Travis infrastructure for HHVM builds
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] force enabling the external XML entity loaders
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18876
| License | MIT
| Doc PR |
Commits
-------
142b1a4 force enabling the external XML entity loaders
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Skip deep reference check for 'service_container'
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The "hasReference" check when dumping the container fails in the case where a service has a method call which includes a reference to a private/inlined service when either that service, or a dependency of it, references the service_container. This because service_container isn't defined while it still tries to check the references of it. So the service_container must be skipped in this case, this shouldn't break anything as the service_container doesn't reference any services, and thus can't reference the service which it is checking for.
Commits
-------
6f36733 [DependencyInjection] Skip deep reference check for 'service_container'
Deep checks on whether a service references another service need to
exclude the 'service_container' service as it doesn't exist. Without this
dumping the container will fail if a service definition references an
inlined service which has a direct or indirect dependency to the
service_container.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Removed UTC specification with timestamp
| Q | A
| ------------- | ---
| Branch? | 2.3
| 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 function `date_parse()` indicates a warning if a timezone is used with the timestamp: `Double timezone specification`. I removed the UTC specification and this time it's more faster!
Commits
-------
0d14aac Removed UTC specification with timestamp
This PR was squashed before being merged into the 2.3 branch (closes#18861).
Discussion
----------
Fix for #18843
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18843
| License | MIT
| Doc PR | -
Commits
-------
7d78196 Fix for #18843
* 2.7:
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 2.3:
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18633
| License | MIT
| Doc PR | -
Code copy/pasted from ClassMapGenerator.php
Commits
-------
8d4f35d [Routing] Finish annotation loader taking a class constant as a beginning of a class name
43c7f9b [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 2.7:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
Catch \Throwable
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
* 2.3:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
chomp newlines only at the end of YAML documents
This PR was merged into the 2.8 branch.
Discussion
----------
Catch \Throwable
| Q | A
| ------------- | ---
| Branch? | 2.8, 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Mostly!
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The first commit is based on symfony/symfony#15949
Depends on symfony/symfony#18813, symfony/symfony#18812
----
I'm new to symfony, so I'm not sure where are all the places where it makes sense to actually catch the throwable and where not. I added most places that seemed logical and when I wasn't sure, I added it anyway. I'm hoping you guys (and girls?) can point out the places where the catch should not be added, I'll fix it and then I can create several PR's for the older branches. A lot of this IMHO should go also to 3.0.
Commits
-------
de671f4 Catch \Throwable
* 2.7:
Fix computation of PR diffs for component matrix lines
[BUG] Delete class 'control-group' in bootstrap 3
[2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
* 2.7:
added missing constant in Response
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
added StaticVerionStrategyTest
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
[console][table] adjust width of colspanned cell.
* 2.3:
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
This PR was squashed before being merged into the 2.3 branch (closes#18761).
Discussion
----------
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For https://github.com/symfony/symfony/pull/18747
Commits
-------
7101cab [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
This PR was merged into the 2.3 branch.
Discussion
----------
Updated the link to the list of currency codes
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18758
| License | MIT
| Doc PR | -
Commits
-------
09b70a1 Updated the link to the list of currency codes
* 2.7:
Drop hirak/prestissimo
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
Fixed issue with blank password with Ldap
| Q | A
| ------------- | ---
| Branch? | 1.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
c7d9c62 Fixed issue with blank password with Ldap
The bind operation of LDAP, as described in RFC 4513, provides a method
which allows for authentication of users. For the Simple Authentication
Method a user may use the anonymous authentication mechanism, the
unauthenticated authentication mechanism, or the name/password
authentication mechanism. The unauthenticated authentication mechanism
is used when a client who desires to establish an anonymous
authorization state passes a non-zero length distinguished name and a
zero length password. Most LDAP servers either can be configured to
allow this mechanism or allow it by default.
_Web-based applications which perform the simple bind operation with the
client's credentials are at risk when an anonymous authorization state is
established. This can occur when the web-based application passes a
distinguished name and a zero length password to the LDAP server._
Thus, misconfiguring a server with simple bind can trick Symfony into
thinking the username/password tuple as valid, potentially leading to
unauthorized access.
* 2.7:
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
prevent calling get() for service_container service
call get() after the container was compiled
Fixed readme of OptionsResolver
[DependencyInjection] Suggest ExpressionLanguage in composer.json
* 2.3:
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
call get() after the container was compiled
Fixed readme of OptionsResolver
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Suggest ExpressionLanguage in composer.json
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As the DependencyInjection component has lots of classes containing uses of the ExpressionLanguage component, I propose to add it to the composer.json suggests.
Commits
-------
d6c9073 [DependencyInjection] Suggest ExpressionLanguage in composer.json
This PR was squashed before being merged into the 2.3 branch (closes#18727).
Discussion
----------
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes, phpdoc one
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Updated phpdoc of AnonymousToken $user param from string to string|object since an object is allowed to in the parent AbstractToken: https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php#L91
Commits
-------
b1c60b4 [2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
This PR was merged into the 2.8 branch.
Discussion
----------
[EventDispatcher] check for method to exist
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/16301#issuecomment-193150055
| License | MIT
| Doc PR |
This change must be reverted after being merged into the `3.0` branch (the `getListenerPriority()` method was added to the interface in Symfony 3.0).
Commits
-------
78ae2ad [EventDispatcher] check for method to exist
This PR was merged into the 2.8 branch.
Discussion
----------
[DX][DI] Make failed autowiring error messages more explicit
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no (better DX integration)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18658
| License | MIT
| Doc PR | N/A
This is the PR improving the auto wiring error messages.
Two errors messages have augmented:
If a type-hint does not match any existing type and a service for this type cannot be automatically created, the error message now says so, instead of simply saying the type cannot be autowired.
If a type-hint matches multiple services and none of them provides an autowiringType for it, the error message now says so and list the candidate services, instead of simply saying the type cannot be autowired.
Commits
-------
2ac81f9 Make failed autowiring error messages more explicit
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Use the priority of service decoration on service with parent
| 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
-------
d1ad43c [DependencyInjection] Fixed the priority of service decoration on service with parent
* 2.7:
add @Event annotation for AuthenticationEvents
add @Event annotation for KernelEvents
bumped Symfony version to 2.7.13
updated VERSION for 2.7.12
update CONTRIBUTORS for 2.7.12
updated CHANGELOG for 2.7.12
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
Revert "minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)"
Revert "fixed CS"
[FrameworkBundle] Remove misleading comment
bug #17460 [DI] fix ambiguous services schema
* 2.3:
add @Event annotation for AuthenticationEvents
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
bug #17460 [DI] fix ambiguous services schema
This PR was merged into the 2.8 branch.
Discussion
----------
[Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
| 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 |
There are some inconsistencies in the Symfony 2.8 `symfony/security-acl` dependency versions that would help downstream if we could just package `symfony/security-acl` 3.0.0 instead of having to package both versions 2.8.0 (for Symfony 2.8) and 3.0.0 (for Symfony 3.0).
```
$ git clone https://github.com/symfony/symfony.git
Cloning into 'symfony'...
cd remote: Counting objects: 319438, done.
nyReceiving objects: 4% (12778/319438), 2.06 MiB | 4.12 MiB/s
4Receiving objects: 41% (130970/319438), 40.80 MiB | 7.86 MiB/s
remote: Total 319438 (delta 0), reused 0 (delta 0), pack-reused 319437
Receiving objects: 100% (319438/319438), 68.46 MiB | 8.21 MiB/s, done.
Resolving deltas: 100% (204691/204691), done.
Checking connectivity... done.
$ cd symfony
$ git checkout v2.8.4
Previous HEAD position was 4e17cb2... Merge branch '2.8' into 3.0
HEAD is now at 9e14f9f... Merge branch '2.7' into 2.8
$ find . -name 'composer.json' | xargs grep 'symfony/security-acl'
./src/Symfony/Bundle/SecurityBundle/composer.json: "symfony/security-acl": "~2.7|~3.0.0",
./src/Symfony/Bridge/Twig/composer.json: "symfony/security-acl": "~2.6|~3.0.0",
./src/Symfony/Component/Security/composer.json: "symfony/security-acl": "~2.7",
./composer.json: "symfony/security-acl": "~2.7",
```
Commits
-------
e249bc3 [Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fixed BC break with pre selection of choices with `ChoiceType` and its children
| Q | A
| ------------- | ---
| Branch | 2.7+
| Bugfix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18173, #14712, #17789
| License | MIT
| Doc PR | -
- f7eea72 reverts BC break introduced in #17760
- 58e8ed0 fixes pre selection of choice with model values such as `false`, `null` or empty string without BC break.
`ChoiceType` now always use `ChoiceToValueTransformer` or `ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don't handle the transformation anymore.
Commits
-------
ea5375c [Form] refactor CheckboxListMapper and RadioListMapper
71841c7 Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix wrong exceptions being thrown
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
28fca7c [Console] Fix wrong exceptions being thrown
* 2.7:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
This PR was merged into the 2.8 branch.
Discussion
----------
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18188
| License | MIT
| Doc PR | -
Commits
-------
202cc77 [DI] Fix AutowirePass fatal error with classes that have non-existing parents
1735b85 [DependencyInjection] Tests for AutowirePass with missing parent class
* 2.7:
[PropertyAccess] ->getValue() should be read-only
[VarDumper] Fix dumping type hints for non-existing parent classes
[Config] Fix XmlUtilsTest namespace
[Console] [TableHelper] make it work with SymfonyStyle.
Remove dead code
[Routing] add query param if value is different from default
Conflicts:
src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
* 2.3:
[PropertyAccess] ->getValue() should be read-only
[Config] Fix XmlUtilsTest namespace
[Routing] add query param if value is different from default
Conflicts:
src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] [TableHelper] make it work with SymfonyStyle.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #18573
| License | MIT
| Doc PR | ~
Commits
-------
43cc93c [Console] [TableHelper] make it work with SymfonyStyle.
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] add query param if value is different from default
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | most likely not
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #10940, #18111, #18035
| License | MIT
| Doc PR | -
Commits
-------
1ef2edf [Routing] add query param if value is different from default
This PR was merged into the 2.8 branch.
Discussion
----------
Replace iconv_*() uses by mb_*(), add mbstring polyfill when required
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18539
| License | MIT
| Doc PR | -
Looks like `iconv_*()` functions can be really slow (see #18539).
Commits
-------
27f5f81 Replace iconv_*() uses by mb_*(), add mbstring polyfill when required
* 2.7:
[Console] use ANSI escape sequences in ProgressBar overwrite method
[HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
[DependencyInjection] Remove YAML check in CrossCheckTest
[Process] Consistently use getProcess() in tests
[DependencyInjection] fix phpDoc
This PR was squashed before being merged into the 2.7 branch (closes#18496).
Discussion
----------
[Console] use ANSI escape sequences in ProgressBar overwrite method
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16957
| License | MIT
| Doc PR |
Rewritten `overwrite` method in ProgressBar class to use ANSI escape sequences to erase lines.
This removes the need to store the last message length as it is not needed to fill the buffer with spaces anymore. As a plus it correctly resets the cursor position while clearing the output
If the output is not decorated the behavior has not been changed.
Could possibly cause a BC break if testing against the decorated emitted output as binary string
Commits
-------
b6cca4c [Console] use ANSI escape sequences in ProgressBar overwrite method
This PR was merged into the 2.8 branch.
Discussion
----------
[LDAP] Free the search result after a search to free memory
| 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
-------
7da4453 [LDAP] Free the search result after a search to free memory
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Consistently use getProcess() in tests
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
ce13fe7 [Process] Consistently use getProcess() in tests
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Add coverage for invalid Expression in exportParameters
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
1931b14 [DependencyInjection] Add coverage for invalid Expression in exportParameters
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Add coverage for all invalid arguments in exportParameters
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
87c4f23 [DependencyInjection] Add coverage for all invalid arguments in exportParameters
fixes#14712 and #17789.
`ChoiceType` now always use `ChoiceToValueTransformer` or
`ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don’t handle
the transformation anymore.
Fixes pre selection of choice with model values such as `null`,
`false` or empty string.
This PR was squashed before being merged into the 2.7 branch (closes#18429).
Discussion
----------
[Console] Correct time formatting.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18420
| License | MIT
| Doc PR |
The previous behavior caused dramatic jumps in the reported time instead of smoothly transitioning between time ranges.
Added tests around the new behavior and the transitions between seconds, minutes, and days.
Commits
-------
b264b66 [Console] Correct time formatting.
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fix select option with empty value
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no?
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
While using the Laravel's testing suite which makes use of the Symfony DOM Crawler (v3.0.2). I have been populating a form with a select which has a value which can be an empty value.
For example, with this select you can choose your gender or leave it empty if you don't want to specify:
```html
<select name="gender">
<option selected></option>
<option>Female</option>
<option>Male</option>
</select>
```
When the `DomCrawler\Field::getValue()` is called I was expect to get the value `''` however I was actually getting `'on'`. This is caused by the [DomCrawler\Field::buildOptionValue()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php#L262-L271) sets the default value to 'on' when there is no value which makes sense for ratios and checkboxes but not for select.
I have tracked this bug back to v2.3 but it is still present in v3, however, the default value was changed from '1' to 'on' in v2.5 which means that this patch will conflict when merging up the maintained versions.
Commits
-------
58276a2 Fix Dom Crawler select option with empty value
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Remove unnecessary option assignment
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.
Related pull requests: #16959, #18317
Commits
-------
da8a197 Remove unnecessary option assignment
* reference form type by its FQCN instead of its string name
* use the `entry_type` and `entry_options` options instead of the
deprecated `type` and `options` options
* 2.7:
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
Windows 10 version check in just one line
Detect CLI color support for Windows 10 build 10586
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
[EventDispatcher] Try first if the event is Stopped
[FrameworkBundle] fixes grammar in container:debug command manual.
[Form] fix "prototype" not required when parent form is not required
* 2.3:
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
[Form] fix "prototype" not required when parent form is not required
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If you configure a firewall with switch user with `role: IS_AUTHENTICATED_ANONYMOUSLY` it's impossible to exit the
impersonation because the next line `$this->provider->refreshUser($original->getUser())` will fail. It fails because `RefreshUser`
expects an instance of `UserInterface` and here it's a string.
Therefore, it does not make sense to refresh an Anonymous Token, right ?
Commits
-------
59fea72 [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fix "prototype" not required when parent form is not required
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18311
| License | MIT
| Doc PR | ~
Commits
-------
7df9ca2 [Form] fix "prototype" not required when parent form is not required
Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).
The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.
* 2.3:
Detect CLI color support for Windows 10 build 10586
[EventDispatcher] Try first if the event is Stopped
[FrameworkBundle] fixes grammar in container:debug command manual.
Conflicts:
src/Symfony/Component/EventDispatcher/EventDispatcher.php
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
If you configure a firewall with switch user with `role: IS_AUTHENTICATED_ANONYMOUSLY` it's impossible to exit the
impersonation because the next line `$this->provider->refreshUser($original->getUser())` will fail. It fails because `RefreshUser`
expects an instance of `UserInterface` and here it's a string.
Therefore, it does not make sense to refresh an Anonymous Token, right ?
* 2.7:
[travis] Disable hirak/prestissimo for deps=low/high tests
[HttpFoundation] fix phpdoc of UploadedFile
Lower complexity of Form:isValid()
skipped dns-sensitive tests when DnsMock is not found
[FrameworkBundle] Return the invokable service if its name is the class name
[ci] Skip dns-sensitive tests when DnsMock is not found
Exclude Bridge\PhpUnit from composer.json by default
fixed CS
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
[Routing] Don't needlessly execute strtr's as they are fairly expensive
* 2.3:
[travis] Disable hirak/prestissimo for deps=low/high tests
[HttpFoundation] fix phpdoc of UploadedFile
[ci] Skip dns-sensitive tests when DnsMock is not found
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
Conflicts:
.travis.yml
src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/ProcessBuilder.php
This PR was merged into the 2.7 branch.
Discussion
----------
skipped dns-sensitive tests when DnsMock is not found (2.7)
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18319
| License | MIT
| Doc PR | -
Commits
-------
efc1de7 skipped dns-sensitive tests when DnsMock is not found
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Don't needlessly execute strtr's as they are fairly expensive
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | refactor
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see discussion in #18230
| License | MIT
| Doc PR | see #18230
As requested in #18230 this is a new version of the prevention of using strtr's. I've posted some performance-numbers in that PR as well.
Commits
-------
b3da6a1 [Routing] Don't needlessly execute strtr's as they are fairly expensive
This PR was merged into the 2.3 branch.
Discussion
----------
Optimize ReplaceAliasByActualDefinitionPass
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes (performance)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Previous implementation passed over every definition for every alias (n*m runtime).
New implementation passes once over all aliases and once over all definitions (n+m).
Also removing needless "restart" logic.
Commits
-------
ab8dc0c Optimize ReplaceAliasByActualDefinitionPass
Previous implementation passed over every alias and every definition, for every
alias (n*(n+m) runtime). New implementation passes once over all aliases and
once over all definitions (n+m).
Also removing needless "restart" logic --- it has no real effect in either case.
* 2.7:
[Process] Fix stream_select priority when writing to stdin
[Form] NumberToLocalizedStringTransformer should return floats when possible
[Form] remove useless code in ChoiceType
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
* 2.3:
[Form] NumberToLocalizedStringTransformer should return floats when possible
[DependencyInjection] Enabled alias for service_container
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] NumberToLocalizedStringTransformer should return floats when possible
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18346
| License | MIT
| Doc PR | -
Commits
-------
f5ed09c [Form] NumberToLocalizedStringTransformer should return floats when possible
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Enable alias for service_container
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
6161438 [DependencyInjection] Enabled alias for service_container
* 2.7:
[ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes
[Debug] Fix case sensitivity checks
[Debug] Fix handling of php7 throwables
fix high deps tests
[Process] remove dead code
[WebProfilerBundle] Add missing use statement.
[ClassLoader] Fix storing not-found classes in APC cache
[Form] cs fixes in date types
[phpunit] disable prophecy
* 2.3:
[ci] Get ICU/intl from github instead of nebm.ist.utl.pt/~glopes
[Debug] Fix handling of php7 throwables
[Process] remove dead code
[ClassLoader] Fix storing not-found classes in APC cache
[Form] cs fixes in date types
This PR was merged into the 2.3 branch.
Discussion
----------
[Debug] Fix handling of php7 throwables
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18269
| License | MIT
| Doc PR | -
Should not be merged into 2.7 because 2.7 already has the required logic.
Commits
-------
b032096 [Debug] Fix handling of php7 throwables
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] cs fixes in date types
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| License | MIT
| Doc PR | ~
Commits
-------
bc21828 [Form] cs fixes in date types
* 2.7:
bumped Symfony version to 2.7.12
updated VERSION for 2.7.11
updated CHANGELOG for 2.7.11
[Request] Fix support of custom mime types with parameters
fix mocks
fix mocks
[Validator] do not treat payload as callback
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] do not treat payload as callback
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
see http://stackoverflow.com/a/36140305/2289865
Commits
-------
2066fc0 [Validator] do not treat payload as callback
`ChoiceListFactoryInterface` expected `$group_by` to be a callable or
null not an array.
The factory defaults `group_by` to
`ChoiceListInterface::getStructuredValues`.
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Fix support of custom mime types with parameters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1399
| License | MIT
When using mime types with parameters, ``getFormat`` won't return the expected format as illustrated:
```php
$request = new Request();
$request->setFormat('custom', 'app/foo;param=bar');
$request->getFormat('app/foo;param=bar');
// will return null as the parameters are removed
```
So my proposal is to search the format corresponding to a mime type with its raw value or with the its parameters removed.
Commits
-------
f7ad285 [Request] Fix support of custom mime types with parameters
* check for existance of `setMetadataFactory()` method (this is needed
for tests run with deps=high as the method was removed in Symfony
3.0)
* fix mock testing the `EngineInterface` as the `stream()` method cannot
be mocked when it is does not exist in the mocked interface
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Fix `Forms` docblock to use FQCN
| Q | A
| ------------- | ---
| Branch? | 2.8+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | -
Commits
-------
df61aab [Form] Fix `Forms` docblock to use FQCN
* 2.7:
Fix backport
[travis] Upgrade phpunit wrapper & hirak/prestissimo
[Bridge\PhpUnit] Workaround old phpunit bug, no colors in weak mode, add tests
[PropertyAccess] Fix isPropertyWritable not using the reflection cache
[PropertyAccess] Backport fixes from 2.7
[Validator] use correct term for a property in docblock (not "option")
[Routing] small refactoring for scheme requirement
[PropertyAccess] Remove most ref mismatches to improve perf
[Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols
[NumberFormatter] Fix invalid numeric literal on PHP 7
[Process] fix docblock syntax
Use XML_ELEMENT_NODE in nodeType check
[PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
[PropertyAccess] Throw an UnexpectedTypeException when the type do not match
[FrameworkBundle] Add tests for the Controller class
[FrameworkBundle] Add tests for the Controller class
[Process] getIncrementalOutput should work without calling getOutput
Conflicts:
src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
src/Symfony/Bridge/PhpUnit/TextUI/Command.php
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php
* 2.3:
[Validator] use correct term for a property in docblock (not "option")
[PropertyAccess] Remove most ref mismatches to improve perf
[Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols
[NumberFormatter] Fix invalid numeric literal on PHP 7
Use XML_ELEMENT_NODE in nodeType check
[PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
[PropertyAccess] Throw an UnexpectedTypeException when the type do not match
[FrameworkBundle] Add tests for the Controller class
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php
src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
src/Symfony/Component/PropertyAccess/PropertyPath.php
src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
src/Symfony/Component/Validator/Constraints/EmailValidator.php
This PR was merged into the 2.3 branch.
Discussion
----------
[PropertyAccess] Remove most ref mismatches to improve perf
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR is for PHP5 where ref mismatches is a perf pain: it removes all ref mismatches along the "getValue" path, and keeps only the required ones on the "setValue" path.
Commits
-------
72940d7 [PropertyAccess] Remove most ref mismatches to improve perf
This PR was merged into the 2.3 branch.
Discussion
----------
[PropertyAccess] Throw an UnexpectedTypeException when the type do not match
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17738, #18032
| License | MIT
| Doc PR | -
Made in coordination with @dunglas,
Diff best viewed [ignoring whitspaces](https://github.com/symfony/symfony/pull/18210/files?w=1).
Quoting #18032:
> it appears that the current implementation is error prone because it throws a `\TypeError` that is an `Error` in PHP 7 but a regular `Exception` in PHP 5 because it uses the Symfony polyfill.
Programs wrote in PHP 5 and catching all exceptions will catch this "custom" `\TypeError ` but not those wrote in PHP 7. It can be very hard to debug.
> In this alternative implementation:
> * catching type mismatch is considered a bug fix and applied to Symfony 2.3
> * for every PHP versions, a domain exception is thrown
Commits
-------
5fe2b06 [PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
10c8d5e [PropertyAccess] Throw an UnexpectedTypeException when the type do not match
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Use XML_ELEMENT_NODE in nodeType check
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Making use of the predefined dom constant `XML_ELEMENT_NODE` (which value is `1`) makes more sense while interpreting `parents()` it's functionality. See http://php.net/manual/en/dom.constants.php
Commits
-------
cffea91 Use XML_ELEMENT_NODE in nodeType check
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] getIncrementalOutput should work without calling getOutput
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17937
| License | MIT
Commits
-------
37d8695 [Process] getIncrementalOutput should work without calling getOutput
* 2.7:
[Validator] Test DNS Url constraints using checkdnsrr() mock
Improved the PHPdoc of FileSystem::copy()
[Validator] Test DNS Email constraints using checkdnsrr() mock
[travis] Run real php subprocesses on hhvm for Process component tests
bug #18161 [Translation] Add support for fuzzy tags in PoFileLoader
[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
[Form] Fix INT64 cast to float in IntegerType.
[SecurityBundle][PHPDoc] Added method doumentation for SecurityFactoryInterface
FrameworkBundle: Client: getContainer(): fixed phpdoc
[Validator] Updating inaccurate docblock comment
* 2.3:
Improved the PHPdoc of FileSystem::copy()
[Validator] Test DNS Email constraints using checkdnsrr() mock
[travis] Run real php subprocesses on hhvm for Process component tests
bug #18161 [Translation] Add support for fuzzy tags in PoFileLoader
[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
[Form] Fix INT64 cast to float in IntegerType.
[SecurityBundle][PHPDoc] Added method doumentation for SecurityFactoryInterface
FrameworkBundle: Client: getContainer(): fixed phpdoc
[Validator] Updating inaccurate docblock comment
Conflicts:
.travis.yml
src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
This PR was squashed before being merged into the 2.3 branch (closes#18195).
Discussion
----------
Improved the PHPdoc of FileSystem::copy()
| Q | A
| ------------- | ---
| Branch | 2.3+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12937
| License | MIT
| Doc PR | -
Commits
-------
9ad67ca Improved the PHPdoc of FileSystem::copy()
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Test DNS Email constraints using checkdnsrr() mock
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
165755a [Validator] Test DNS Email constraints using checkdnsrr() mock
* 2.7:
[PhpUnitBridge] Revert 7f62133939
bumped Symfony version to 2.3.40
set s-maxage only if all responses are cacheable
updated VERSION for 2.3.39
update CONTRIBUTORS for 2.3.39
updated CHANGELOG for 2.3.39
Improved the "branch" row of the PR table
[Debug] Replaced logic for detecting filesystem case sensitivity
[Process] Wait a bit less on Windows
Use debug member variable
Fix typos #18090 1. PHPs session design to PHP's session design 2. Symfony HttpKernel offers to Symfony's HttpKernel offers 3. in which case it it should to in which case it should
Fix for Isssue #18091
replace perfom by perform
minor #18088 Fix typo for profiler
[ci] remove token for composer now that rate limiting is off
Conflicts:
src/Symfony/Bridge/PhpUnit/composer.json
The traditional gettext tools usually try to find similar strings when
updating translations. This results in some strings having a translation
but being marked as "fuzzy", even if the translation is not correct.
The expected result when a string is marked as fuzzy is that it should
not be used by the translation system. Using symfony, though, the
translations were used, which could result in "funny" messages being
displayed in the interface despite being often completely out of
context.
This commit discards messages in .po files that have a '#, fuzzy' flag.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 18161
| License | MIT
| Doc PR | -
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18077, #18067
| License | MIT
| Doc PR | -
Commits
-------
03c008c [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
6b6073f [Form] Fix INT64 cast to float in IntegerType.
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Updating inaccurate docblock comment
| Q | A
| ------------- | ---
| Branch | 2.3
| 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 formatValue() docblock refers to a $prettyDateTime argument, which does not exist. Instead, it should refer to the $format argument.
I'm also adding parentheses around the `$format & self::OBJECT_TO_STRING` expression on line 102 so it is formatted similarly to the `($format & self::PRETTY_DATE)` expression a few lines above it.
Commits
-------
a784743 [Validator] Updating inaccurate docblock comment
* 2.3:
bumped Symfony version to 2.3.40
set s-maxage only if all responses are cacheable
updated VERSION for 2.3.39
update CONTRIBUTORS for 2.3.39
updated CHANGELOG for 2.3.39
Improved the "branch" row of the PR table
Fix typos #18090 1. PHPs session design to PHP's session design 2. Symfony HttpKernel offers to Symfony's HttpKernel offers 3. in which case it it should to in which case it should
Fix for Isssue #18091
replace perfom by perform
minor #18088 Fix typo for profiler
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] set s-maxage only if all responses are cacheable
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18160
| License | MIT
| Doc PR |
Commits
-------
b7d9338 set s-maxage only if all responses are cacheable
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Wait a bit less on Windows
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
By using `stream_select` instead of `usleep` when the input is at wait, and by not blocking when the process has halted, we can enhance a bit the performance on Windows.
Commits
-------
380a54f [Process] Wait a bit less on Windows
This PR was merged into the 2.3 branch.
Discussion
----------
[Hack Day] Issue for newcomers (2). Replace perfom by perform
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #18089
| License | MIT
| Doc PR | reference to the documentation PR, if any
Commits
-------
f33f192 replace perfom by perform
This PR was merged into the 2.3 branch.
Discussion
----------
Fix typos #18090
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18090
| License | MIT
| Doc PR |
1. PHPs session design to PHP's session design
2. Symfony HttpKernel offers to Symfony's HttpKernel offers
3. in which case it it should to in which case it should
Commits
-------
6276452 Fix typos #18090 1. PHPs session design to PHP's session design 2. Symfony HttpKernel offers to Symfony's HttpKernel offers 3. in which case it it should to in which case it should
1. PHPs session design to PHP's session design
2. Symfony HttpKernel offers to Symfony's HttpKernel offers
3. in which case it it should to in which case it should
As of Symfony 2.8, constraint errors are now string UUIDs rather than integers. The corresponding docblock typehint in getErrorName() should reflect this change.
* 2.7:
[ci] use hirak/prestissimo
[Filesystem] Fix transient tests
[HttpFoundation] Avoid warnings when checking malicious IPs
[HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied
Conflicts:
src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
* 2.3:
[ci] use hirak/prestissimo
[Filesystem] Fix transient tests
[HttpFoundation] Avoid warnings when checking malicious IPs
[HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied
Conflicts:
appveyor.yml
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is a followup to https://github.com/symfony/symfony/pull/17150#issuecomment-174509954
[RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) specifies the Content-Range header SHOULD be included with a *416 Requested Range Not Satisfiable* response:
> When this status code is returned for a byte-range request, the response SHOULD include a Content-Range entity-header field specifying the current length of the selected resource (see section 14.16). This response MUST NOT use the multipart/byteranges content- type.
[RFC 7233](https://tools.ietf.org/html/rfc7233#section-4.2) specifies what should be the header's value. It's in the "Request for comments" state, but it's the best definition I could find. This value is valid according to rfc2616 as well.
Commits
-------
54329d8 [HttpFoundation] Set the Content-Range header if the requested Range is unsatisfied
* 2.7:
[Finder] Partially revert #17134 to fix a regression
[HttpKernel] Fix mem usage when stripping the prod container
exception when registering bags for started sessions
Conflicts:
src/Symfony/Component/Validator/composer.json
* 2.3:
[Finder] Partially revert #17134 to fix a regression
[HttpKernel] Fix mem usage when stripping the prod container
exception when registering bags for started sessions
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Fix mem usage when stripping the prod container
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18007
| License | MIT
| Doc PR | -
I propose to just replace doc comments by regular comments, so that the parser removes them and opcache doesn't have to keep them in memory, which is the target.
Commits
-------
4fa5844 [HttpKernel] Fix mem usage when stripping the prod container
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] exception when registering bags for started sessions
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10707, #16136
| License | MIT
| Doc PR |
Commits
-------
c4a5b67 exception when registering bags for started sessions
* 2.7:
[Filesystem] Fix false positive in ->remove()
[Filesystem] Cleanup/sync with 2.3
[Validator] Fix the locale validator so it treats a locale alias as a valid locale
reference form type by name on Symfony 2.7
* 2.3:
[Filesystem] Fix false positive in ->remove()
[Validator] Fix the locale validator so it treats a locale alias as a valid locale
Conflicts:
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/Validator/Constraints/LocaleValidator.php
src/Symfony/Component/Validator/composer.json
* 2.7:
[HttpFoundation] Fix transient test
[HttpFoundation] Add a dependency on the mbstring polyfill
[2.7] update readme files for new components
add readme files where missing
fix lowest TwigBridge deps versions
[EventDispatcher] fix syntax error
Don't use reflections when possible
Don't use reflections when possible
[Form] Update form tests after the ICU data update
[Intl] Update tests and the number formatter to match behaviour of the intl extension
[Intl] Update the ICU data to version 55
[Intl] Fix the update-data.php script in preparation for ICU 5.5
[Process] Fix memory issue when using large input streams
Use constant instead of function call.
fixed test name
automatically generate safe fallback filename
[Console] default to stderr in the console helpers
Conflicts:
composer.json
src/Symfony/Bridge/PhpUnit/README.md
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Component/Console/Helper/DialogHelper.php
src/Symfony/Component/Debug/DebugClassLoader.php
src/Symfony/Component/HttpFoundation/composer.json
src/Symfony/Component/Security/Acl/README.md
src/Symfony/Component/Security/Core/README.md
src/Symfony/Component/Security/Csrf/README.md
src/Symfony/Component/Security/Http/README.md
* 2.3:
[HttpFoundation] Fix transient test
[HttpFoundation] Add a dependency on the mbstring polyfill
add readme files where missing
Don't use reflections when possible
[Form] Update form tests after the ICU data update
[Intl] Update tests and the number formatter to match behaviour of the intl extension
[Intl] Update the ICU data to version 55
[Intl] Fix the update-data.php script in preparation for ICU 5.5
Use constant instead of function call.
fixed test name
automatically generate safe fallback filename
Conflicts:
src/Symfony/Component/Debug/Debug.php
src/Symfony/Component/HttpFoundation/composer.json
src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] Update ICU to version 55
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14260
| License | MIT
| Doc PR | -
The update script needed to be fixed to work with latest data files from ICU as well.
The only change I needed to do in stubs and tests is related to the way negative numbers are formatted for currencies (a change from `(£100)` to `-£100`).
Form tests needed an update as well, as some date formats have changed.
Commits
-------
fac3de6 [Form] Update form tests after the ICU data update
6822147 [Intl] Update tests and the number formatter to match behaviour of the intl extension
37a9d8c [Intl] Update the ICU data to version 55
894ce3c [Intl] Fix the update-data.php script in preparation for ICU 5.5
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] Don't use reflection when possible
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
See https://github.com/symfony/symfony/pull/18021
Commits
-------
35be501 Don't use reflections when possible
This PR was merged into the 2.3 branch.
Discussion
----------
Don't use reflections when possible
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Use php functions instead of reflection when possible (to improve a bit the performance).
Commits
-------
a46270a Don't use reflections when possible
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Process] Fix memory issue when using large input streams
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17667
| License | MIT
This removes buffering of a stream input. Tests shows that this implementation is much faster and fixes some issues when streams are based on very large inputs
Commits
-------
fb8da9f [Process] Fix memory issue when using large input streams
This PR was squashed before being merged into the 2.3 branch (closes#15794).
Discussion
----------
[Console] default to stderr in the console helpers
Interactive input/output and informational output such as progress should go to `stderr` if available.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
See #13730 also for previous discussion.
If someone explicitly wants to use `stdout`, they can simply pass `$output->getStream()` instead of `$output` in most use-cases.
Commits
-------
3d4e95e [Console] default to stderr in the console helpers
* 2.7:
Updated all the README files
[TwigBundle] Fix failing test on appveyor
Improved the error message when using "@" in a decorated service
Improve error reporting in router panel of web profiler
[DoctrineBridge][Form] Fix performance regression in EntityType
[FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
Allow to normalize \Traversable
minor [Form] fix tests added by #16886
Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
Simplified everything
Added a test
Fixed the problem in an easier way
Fixed a syntax issue
Improved the error message when a template is not found
[CodingStandards] Conformed to coding standards
[TwigBundle] fixed Include file locations in "Template could not be found" exception
* 2.3:
Updated all the README files
[TwigBundle] Fix failing test on appveyor
[FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
Allow to normalize \Traversable
Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
Simplified everything
Added a test
Fixed the problem in an easier way
Fixed a syntax issue
Improved the error message when a template is not found
[CodingStandards] Conformed to coding standards
[TwigBundle] fixed Include file locations in "Template could not be found" exception
This PR was merged into the 2.3 branch.
Discussion
----------
Allow to normalize \Traversable when serializing xml
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
It's impossible to normalize an object implementing ``\Traversable`` when using the ``XMLEncoder``. For example we can't customize the serializer output when serializing a ``FormInterface`` instance.
So my proposition is to fix this by using the default XML encoder output only when the serializer can't normalize the data.
Commits
-------
97c5d27 Allow to normalize \Traversable
This PR was squashed before being merged into the 2.3 branch (closes#17997).
Discussion
----------
Updated all the README files
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Related to #17995.
Commits
-------
2e81248 Updated all the README files
This PR was squashed before being merged into the 2.7 branch (closes#17687).
Discussion
----------
Improved the error message when using "@" in a decorated service
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17666
| License | MIT
| Doc PR | -
Commits
-------
e7690ba Improved the error message when using "@" in a decorated service
This PR was squashed before being merged into the 2.7 branch (closes#17744).
Discussion
----------
Improve error reporting in router panel of web profiler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17342
| License | MIT
| Doc PR | -
### Problem
If you define a route condition like this:
```yaml
app:
resource: '@AppBundle/Controller/'
type: annotation
condition: "request.server.get('HTTP_HOST') matches '/.*\.dev/'"
```
When browsing the Routing panel in the web profiler, you see an exception:
![problem](https://cloud.githubusercontent.com/assets/73419/12930027/553eeb08-cf76-11e5-90b1-ab0de6175d4e.png)
#### Why?
Because the route condition uses the `request` object, but the special `TraceableUrlMatcher` class doesn't get access to the real `request` object but to the special object obtained via:
```php
$request = $profile->getCollector('request');
```
These are the contents of this pseudo-request:
![cause](https://cloud.githubusercontent.com/assets/73419/12930052/804ea248-cf76-11e5-9c38-2e43e1654065.png)
`request.server.get(...)` condition fails because `request.server` is `null`. The full exception message shows this:
![exception](https://cloud.githubusercontent.com/assets/73419/12930079/9c7d6058-cf76-11e5-8eeb-45f5059c824c.png)
### Solution
I propose to catch all exceptions in `TraceableUrlMatcher` and display an error message with some details of the exception:
![error_message](https://cloud.githubusercontent.com/assets/73419/12930106/b29e31d2-cf76-11e5-868c-98d8b0cc4e5b.png)
Commits
-------
1001554 Improve error reporting in router panel of web profiler
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Remove _path from query parameters when fragment is a subrequest
| Q | A
| ------------- | ---
| Bug fix? | Yes
| New feature? | No
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes
| Fixed tickets |
| License | MIT
| Doc PR |
Prior to 2.3.29, all requests to the ESI fragment path ("/_fragment" by default) would have the "_path" query parameter removed. This held true whether an external proxy (such as Varnish) handled the request as true ESI, or whether the Symfony kernel was mocking ESI behavior and inlining the subrequest.
Once the "_controller" check was added in 2.3.29, the "_path" query parameter was only removed on master requests (such as those coming from an external proxy) and not subrequests, leading to differing behavior in production and development settings.
Commits
-------
c374420 Remove _path from query parameters when fragment is a subrequest and request attributes are already set Added tests for _path removal in FragmentListener
* 2.7:
fixed CS
[DomCrawler] Dont use LIBXML_PARSEHUGE by default
[Filesystem] Reduce complexity of ->remove()
added tests for non-trusted proxies
add 'guid' to list of exception to filter out
Ensure backend slashes for symlinks on Windows systems
[Filesystem] Try to delete broken symlinks
fixed tests
[FrameworkBundle] Test that ObjectNormalizer is registered
* 2.3:
[DomCrawler] Dont use LIBXML_PARSEHUGE by default
[Filesystem] Reduce complexity of ->remove()
added tests for non-trusted proxies
add 'guid' to list of exception to filter out
Ensure backend slashes for symlinks on Windows systems
[Filesystem] Try to delete broken symlinks
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Dont use LIBXML_PARSEHUGE by default
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #16873, #17956
| License | MIT
| Doc PR | -
Because of http://symfony.com/blog/security-release-symfony-2-0-17-released
Commits
-------
fda32f8 [DomCrawler] Dont use LIBXML_PARSEHUGE by default
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem] Reduce complexity of ->remove()
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
065acb7 [Filesystem] Reduce complexity of ->remove()
If you delete the target of a symlink (at least on Windows systems) you
don't get the kind of the target anymore (obviously). Therefore it might
happen that a broken symlink to a directory should be removed with
unlink() which fails. This patch adds another check for a broken symlink
and tries to remove with rmdir() before throwing an exception. It helps
to clean up test folders on Windows systems (so already proofed by the
existing tests).
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] ensure dump indentation to be greather than zero
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17943#issuecomment-190881815, #17977
| License | MIT
| Doc PR |
Commits
-------
3464282 ensure dump indentation to be greather than zero
This PR was squashed before being merged into the 2.7 branch (closes#16886).
Discussion
----------
[Form] [ChoiceType] Prefer placeholder to empty_value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16885
| License | MIT
| Doc PR | -
Prefer an explicitly set `placeholder` option (i.e. `false` or a non-empty
string) to an `empty_value` option when both are set.
The fix is to change the behaviour in the placeholder normalizer in
ChoiceType::configureOptions so that the value of the `empty_value` option is
used for placeholder only when the value of `placeholder` is null or an empty
string.
Commits
-------
a4d4c8a [Form] [ChoiceType] Prefer placeholder to empty_value
This PR was merged into the 2.7 branch.
Discussion
----------
[From] minor fix tests added by #17798 for bootstrap theme
| Q | A
| ------------- | ---
| Branch | 2.7+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | -
Commits
-------
ee5b119 [From] minor fix tests added by #17798 for bootstrap theme
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Fixing autowiring bug when some args are set
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17724, #17878
| License | MIT
| Doc PR | todo
This fixes#17724 & #17878.
**#17724**
I've set this against the 2.8 branch because imo it's a bug fix. The [test](https://github.com/symfony/symfony/compare/2.8...weaverryan:auto-wiring-individuals?expand=1#diff-d124c3d39cd5f7c732fb3d3be7a8cb42R298) illustrates the bug - having *some* arguments set beforehand caused auto-wired arguments to be set on the wrong index.
**#17878**
I've also included this fix just to get all the weird ordering problems taken care of at once. I don't think this is a behavior change - autowiring with scalars only worked previously if the argument was optional (still works now) or if you specified that argument explicitly (still works). Otherwise, your argument ordering would have gotten messed up.
Commits
-------
260731b minor changes
865f202 [#17878] Fixing a bug where scalar values caused invalid ordering
cf692a6 [#17724] Fixing autowiring bug where if some args are set, new ones are put in the wrong spot
This PR was squashed before being merged into the 2.7 branch (closes#17568).
Discussion
----------
Improved Bootstrap form theme for hidden fields
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16925
| License | MIT
| Doc PR | -
Commits
-------
ba5d7f9 Improved Bootstrap form theme for hidden fields
* 2.7:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
* 2.3:
#17676 - making the proxy instantiation compatible with ProxyManager 2.x by detecting proxy features
Fix bug when using an private aliased factory service
ChoiceFormField of type "select" could be "disabled"
Update contributing docs
[Console] Fix escaping of trailing backslashes
Fix constraint validator alias being required
[ci] clone with depth=1 to kill push-forced PRs
Add check on If-Range header
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Simplified code in AutowirePass
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ce0357e [DependencyInjection] Simplified code in AutowirePass
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] [Form] fix choice value "false" in ChoiceType
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17292, #14712, #17789
| License | MIT
| Doc PR | -
- [x] Add tests for choices with `boolean` and `null` values, and with a placeholder
- [x] Fix FQCN in 2.8 tests, see #17759
- [x] Remove `choices_as_values` in 3.0 tests, see #17886
Commits
-------
8f918e5 [Form] refactor `RadioListMapper::mapDataToForm()`
3eac469 [Form] fix choice value "false" in ChoiceType
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8] [Form] minor fix some regression in tests with placeholder in AbstractLayout
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | -
Commits
-------
6977583 [2.8] [Form] minor fix some tests with placeholder in AbstractLayout
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] replace alias in factories
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17864
| License | MIT
| Doc PR |
Commits
-------
b43b79b [DependencyInjection] replace alias in factories
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] replace alias in factory services
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17864
| License | MIT
| Doc PR |
Commits
-------
56f8798 replace alias in factory services
This PR was squashed before being merged into the 2.3 branch (closes#17903).
Discussion
----------
Validate XLIFF translation files
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In #17902 @stof proposed to add a simple test to validate `.xlf` files (to avoid issues like #17893).
This is a proposal for that test. My questions:
**1)** Do you agree displaying detailed error messages when the XML is not valid. Example output for the #17893 error:
![error_log](https://cloud.githubusercontent.com/assets/73419/13250664/932d2f14-da2b-11e5-8ea0-ecb43f58feea.png)
Or is it enough displaying just the PHPUnit error message and let the user figure out the details?
![simple_error](https://cloud.githubusercontent.com/assets/73419/13250671/a3b4bfd2-da2b-11e5-9277-454d0dd160b2.png)
**2)** How do I validate the translation files of the Security and Form components? Do I just copy+paste this test in those components?
Commits
-------
db03055 Validate XLIFF translation files
* 2.7:
Update twig.html.twig
[2.7] [FrameworkBundle] minor fix tests added by #17569
fixed CS
fixed CS
documented the $url parameter better
[Form] add test for ArrayChoiceList handling null
[Form] fix edge cases with choice placeholder
register commands from kernel when accessing list
Update FileSystem
This PR was merged into the 2.3 branch.
Discussion
----------
[FrameworkBundle] read commands from bundles when accessing list
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This allows access to the list of commands registered by the kernel (bundle and later service ids) programmatically when you do not `run` the application.
Commits
-------
0fe3088 register commands from kernel when accessing list
This PR was merged into the 2.3 branch.
Discussion
----------
[FileSystem] Windows fix
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/16783
| License | MIT
| Doc PR |
* Fixes edge case on windows where PHP does not generate a PHP Warning but instead returns a wrong result https://bugs.php.net/bug.php?id=71103
* Improved error reporting on `unlink` used in `remove()`
Commits
-------
0d5f7e2 Update FileSystem
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fix choice placeholder edge cases
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixing several problems with choice placeholder that enhances #9030 for more edge cases:
- A choice with an empty value manually added in the choices array should only be considered a placeholder when it is the first element in the final choice select.
This is part of the HTML spec and how browsers also behave. If you select a choice with an empty value that is not the first option, it will still pass the "required" check
and thus submit the empty value. So it's not a placeholder.
If in the example below you move the empty option to the first place, the browsers will error on submit that you
must select a value. So only then it is a placeholder to show as initial value.
```html
<select id="form_timezone" name="form[timezone]" required="required">
<option value="Africa/Abidjan">Abidjan</option>
<option value="">Empty</option>
</select>
```
Also the validator https://validator.w3.org/nu/ will mark the above code as error:
> The first child option element of a select element with a required attribute, and without a multiple attribute, and without a size attribute whose value is greater than 1, must have either an empty value attribute, or must have no text content. Consider either adding a placeholder option label, or adding a size attribute with a value equal to the number of option elements.
This is fixed by replacing`0 !== count($choiceList->getChoicesForValues(array('')))` with `$view->vars['placeholder_in_choices'] = $choiceListView->hasPlaceholder()`.
Which means, the required attribute is removed automatically because the select form element is required implicitly anyway due to the nature of the choice UI.
- As the above quote mentions, the `size` attribute also has impact. Namely for a select with size > 1 it can be possible to have a required attribute even without placeholder.
This is because when the size > 1, there is no default choice selected (similar to select with "multiple").
- A placeholder for required radio buttons or a select with size > 1 does not make sense as it would just be fake data that can be submitted (similar to the ignored placeholder for multi-select and checkboxes).
Commits
-------
0efbc30 [Form] fix edge cases with choice placeholder
* 2.7:
Create PULL_REQUEST_TEMPLATE.md
Remove duplicate validation in RedirectResponse
[Yaml] fix default timezone to be UTC
[DependencyInjection] fix dumped YAML string
[Config] Add suggest to composer.json for symfony/yaml
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Add suggest to composer.json for symfony/yaml
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17826
| License | MIT
Fixes#17826
Commits
-------
2200b0c [Config] Add suggest to composer.json for symfony/yaml
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] fix default timezone to be UTC
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
e9ee877 [Yaml] fix default timezone to be UTC
* 2.7:
The exception should be thrown if an object doesn't implement Traversable AND doesn't implement Countable, not when it doesn't implement Traversable but DOES implement Countable
[Form] fix violation mapper tests
[HttpKernel] Prevent a fatal error when DebugHandlersListener is used with a kernel with no terminateWithException() method
don't rely on deprecated YAML parser feature
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fix violation mapper tests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17099
| License | MIT
| Doc PR |
This takes into account the changes to the `getErrors()` in Symfony 2.5
(the method rturns a `FormErrorIterator` instead of an array) as well as
the fact that non-submitted forms do not accept errors since #10567
anymore.
Commits
-------
f87558d [Form] fix violation mapper tests
This takes into account the changes to the `getErrors()` in Symfony 2.5
(the method rturns a `FormErrorIterator` instead of an array) as well as
the fact that non-submitted forms do not accept errors since #10567
anymore.
This PR was merged into the 2.8 branch.
Discussion
----------
[Yaml] always restore the error handler in tests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17809#discussion_r52928131
| License | MIT
| Doc PR |
The error handler must be restored even when assertions failed.
Commits
-------
7631202 [Yaml] always restore the error handler in tests
* 2.7:
[DependencyInjection] fix dumped YAML snytax
Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
[TwigBridge] Symfony 3.1 forward compatibility
* 2.3:
[DependencyInjection] fix dumped YAML snytax
Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
[TwigBridge] Symfony 3.1 forward compatibility
In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
This PR was squashed before being merged into the 2.3 branch (closes#17099).
Discussion
----------
[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5656
| License | MIT
| Doc PR |
Commits
-------
f005c80 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
This PR was merged into the 2.8 branch.
Discussion
----------
[Config] Fix EnumNodeDefinition to allow building enum nodes with one element
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15433, #17774
| License | MIT
| Doc PR | -
Commits
-------
e9111e4 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element
* 2.7:
Fix locale and written standard inconsistencies for Norwegian translations
[Form] [Validator] Fix locale inconsistencies in Norwegian translations
fixed CS
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
[Form] remove useless code in ResizeFormListener
This PR was squashed before being merged into the 2.3 branch (closes#17719).
Discussion
----------
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The ContainerBuilder class wasn't implementing the ContainerInterface interface as it should according to the Liskov substitution principle.
It caused dependency on implementation instead than on the interface when using an instance of the ContainerBuilder class.
For example this code:
```php
<?php
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ContainerInterface;
/* @var $container ContainerInterface */
try {
$container->get("wrong_service_key");
} catch (ServiceNotFoundException $e) {
//action on a wrong key
}
```
works for correct implementations of the ContainerInterface interface, but the ContainerBuilder class was breaking that by throwing more abstract exceptions.
As the ServiceNotFoundException exceptions inherits from the InvalidArgumentException exception, this change shouldn't break code which catches the InvalidArgumentException exception while fetching values from a ContainerInterface interface implementation.
Commits
-------
aecb0fa [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
* 2.7:
[VarDumper] Fix tests on PHP 7
[DomCrawler] Clarify the value returned by getPhpFiles()
[DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
remove unnecessary retrieval and setting of data
avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
sendContent return as parent.
[FrameworkBundle] Fix a typo
Added more exceptions to singularify method
* 2.3:
[DomCrawler] Clarify the value returned by getPhpFiles()
[DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
Added more exceptions to singularify method
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
This PR was merged into the 2.3 branch.
Discussion
----------
Added more exceptions to singularify method
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16532
| License | MIT
| Doc PR | -
Added exceptions for `series`, `news` and `services`.
Commits
-------
f5daa0d Added more exceptions to singularify method
* 2.3:
remove unnecessary retrieval and setting of data
avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
sendContent return as parent.
[FrameworkBundle] Fix a typo
Overriding the SplObjectStorage::getHash() is affected by a PHP bug (https://bugs.php.net/bug.php?id=67582),
which makes the Crawler unusable in Symfony 2.8 for anyone who relied on SplObjectStorage methods.
Removing the getHash() method means we will no longer trigger the deprecation error. Given this method
is unlikely to be used directly and other SplObjectStorage methods will trigger the error, it is the simplest
thing we can do to maintain BC.
This PR was merged into the 2.3 branch.
Discussion
----------
[appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15617
| License | MIT
| Doc PR | -
E.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.5754#L1525
Commits
-------
1d4ea39 [appveyor] Ignore failures due to STATUS_ACCESS_VIOLATION errors
This PR was merged into the 2.8 branch.
Discussion
----------
[Routing] add files used in FileResource objects
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17598#discussion_r51756307
| License | MIT
| Doc PR |
Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
Commits
-------
73afd0f add files used in FileResource objects
* 2.7:
[Routing] added a suggestion to add the HttpFoundation component.
[travis] Add some comments
changed operator from and to &&
Fixed the Bootstrap form theme for inlined checkbox/radio
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
* 2.7:
[Console] Add missing `@require` annotation in test
Fix merge
[appveyor] Fix failure reporting
[#17634] move DebugBundle license file
backport GlobTest from 2.7 branch
Move licenses according to new best practices
[FrameworkBundle] Remove unused code in test
[2.3] Fixed an undefined variable in Glob::toRegex
simplified a test
fix container cache key generation
[Form] fix option name in changelog
[Translation] Add resources from fallback locale
[DependencyInjection] enforce tags to have a name
[YAML] Refine the return value of Yaml::parse()
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
* 2.3:
fix container cache key generation
[Translation] Add resources from fallback locale
[DependencyInjection] enforce tags to have a name
[YAML] Refine the return value of Yaml::parse()
This PR was merged into the 2.3 branch.
Discussion
----------
[Translation] Add resources from fallback locale to parent catalogue
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The resources representing a locale includes those of the fallback locale. However, `getCatalogue()->getResources()` only returns the resources belonging specifically to the selected locale.
Example: The locale `en_GB` falls back to `en`. I use the locale `en_GB`. During development, when I modify the `en_GB` translation file, the changes appear instantly when reloading the page. If I modify the `en` translation file, I need to manually clear the cache in order for the new translation to appear.
I believe this is a regression that was introduced in #15527.
This patch is for the 2.3 branch. For 2.6 and later, the test can be updated to use the getCatalogue() method instead of using ReflectionProperty.
Commits
-------
f7f82fa [Translation] Add resources from fallback locale
* 2.7:
[2.7] Fix tests
pass triggerDeprecationError arg to parent class
remove default null value for asset version
remove duplicated value
[DependencyInjection] simplify the BC layer
Change couple of occurences of a public setUp() method to protected
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] simplify the BC layer
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The change to the `setFactoryService()` method is consistent with what
we did with the `getFactoryService()` before (and how we handle the
deprecation of strict references in Symfony 2.8).
Commits
-------
6cd5ee3 [DependencyInjection] simplify the BC layer
The change to the `setFactoryService()` method is consistent with what
we did with the `getFactoryService()` before (and how we handle the
deprecation of strict references in Symfony 2.8).
* 2.7:
fixed CS
[BrowserKit] Corrected HTTP_HOST logic #15398
resolve aliases in factories
resolve aliases in factory services
Remove invalid CSS white-space value
Fix FileSystem tests on Windows
[Form] ArrayChoiceList can now deal with a null in choices
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] ArrayChoiceList can now deal with a null in choices
re-create for mistaken #17502
---
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Documentation says, since 2.7, choice value is treated as corresponding item value (if `choices_as_values` option is true). Null as well.
```php
$builder->add('attending', 'choice', array(
'choices' => array(
'yes' => true,
'no' => false,
'maybe' => null,
),
'choices_as_values' => true,
));
```
But actually null doesn't work as expected since `ArrayChoiceList::getChoicesForValues()` uses `isset` to check whether given value exists in its choices.
It should use `array_key_exists` instead to do so here.
Commits
-------
68292bb [Form] ArrayChoiceList can now deal with a null in choices
This PR was merged into the 2.3 branch.
Discussion
----------
Fix Filesystem tests on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16985
| License | MIT
| Doc PR | -
PHP's symlink function doesn't support relative symlinks on Windows. Running the filesystem tests in Windows resulted in 2 erroring tests because of this. After this PR, these tests are skipped on Windows.
The error wasn't catched by appveyor, as appveyor doesn't support symlinks at all.
Commits
-------
c376cf3 Fix FileSystem tests on Windows
* 2.7:
Increase the inlining YAML level for config:debug
[Serializer] Minor: fix CS and PHPDoc
[Form] fix tests
[Serializer] Ensure that groups are strings
[Debug] Tell that the extension is for PHP 5 only
Static code analysis
Update AnnotationDirectoryLoader.php
added a test
Escape the delimiter in Glob::toRegex
[FrameworkBundle] Fix template location for PHP templates
[FrameworkBundle] Add path verification to the template parsing test cases
This PR was merged into the 2.3 branch.
Discussion
----------
Static code analysis
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Things that done:
* fix case in method calls
* removed unused imports
* use shorter concat where it possible
* optimize some css
* removed duplicated array keys
* removed redurant return statements
* removed one-time variables
* do not pass arguments that not used in functions
Commits
-------
8db691a Static code analysis
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Tell that the extension is for PHP 5 only
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
1285a0d [Debug] Tell that the extension is for PHP 5 only
This PR was squashed before being merged into the 2.7 branch (closes#17430).
Discussion
----------
[Serializer] Ensure that groups are strings
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
0a3b877 [Serializer] Ensure that groups are strings
* 2.7:
fixed undefined variable
Fixed the phpDoc of UserInterface
fixed APCu dep version
make apc class loader testable against apcu without apc bc layer
Added support for the `0.0.0.0/0` trusted proxy
[DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
added missing constant
Added 451 status code
Remove unnecessary code
Allow absolute URLs to be displayed in the debug toolbar
[ClassLoader] Use symfony/polyfill-apcu
[HttpKernel] Lookup the response even if the lock was released after 2 seconds
* 2.3:
fixed undefined variable
Fixed the phpDoc of UserInterface
fixed APCu dep version
Added support for the `0.0.0.0/0` trusted proxy
[DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
[HttpKernel] Lookup the response even if the lock was released after 2 seconds
This PR was merged into the 2.7 branch.
Discussion
----------
make apc class loader testable against apcu without apc bc layer
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
24160b3 make apc class loader testable against apcu without apc bc layer
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Lookup the response even if the lock was released after two second wait
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While looking into #15813 I noticed that we [wait for the lock to be released for five seconds, but then only do a lookup if the lock was released in two seconds](fa604d3c6f/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L540-L562)), no more.
I think it's worth to make both values the same (so either two or five seconds). I see no reason why we should wait for the lock for five seconds, but then only do a lookup if we waited for two. One way the wait either takes too long, the other way we loose the opportunity to actually return a response.
Commits
-------
9963170 [HttpKernel] Lookup the response even if the lock was released after 2 seconds
This PR was merged into the 2.3 branch.
Discussion
----------
[ClassLoader] Use symfony/polyfill-apcu
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
#17358 updated ApcClassLoader to use polyfill-apcu, but not ApcUniversalClassLoader
2.7 / 2.8 tests are in LegacyApcUniversalClassLoaderTest
Commits
-------
a0dc399 [ClassLoader] Use symfony/polyfill-apcu
* 2.7:
fixed test
[Request] Ignore invalid IP addresses sent by proxies
Throw for missing container extensions
[TwigBridge] add missing unit tests (AppVariable)
Able to load big xml files with DomCrawler
fixed typo
[Form] Fix constraints could be null if not set
[Finder] Check PHP version before applying a workaround for a PHP bug
fixed CS
add defaultNull to version
sort bundles in config:dump-reference command
Fixer findings.
[Translation][Writer] avoid calling setBackup if the dumper is not an instance of FileDumper.
[FrameworkBundle] Compute the kernel root hash only one time
* 2.3:
[Request] Ignore invalid IP addresses sent by proxies
Able to load big xml files with DomCrawler
fixed typo
[Form] Fix constraints could be null if not set
[Finder] Check PHP version before applying a workaround for a PHP bug
fixed CS
sort bundles in config:dump-reference command
Fixer findings.
This PR was squashed before being merged into the 2.3 branch (closes#16897).
Discussion
----------
[Form] Fix constraints could be null if not set
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If the form options has no key for constraints the default should be an empty array to be ignored by the loop in the FormValidator. The default without this fix is ```null``` and foreach will throw an error.
The "Bug" also still exists in master-Branch.
Commits
-------
f80e0eb [Form] Fix constraints could be null if not set
This PR was merged into the 2.7 branch.
Discussion
----------
[Translation][Writer] avoid calling setBackup if the dumper is not FileDumper
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | n/a
Commits
-------
369b2d4 [Translation][Writer] avoid calling setBackup if the dumper is not an instance of FileDumper.
This PR was squashed before being merged into the 2.3 branch (closes#17134).
Discussion
----------
[Finder] Check PHP version before applying a workaround for a PHP bug
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | --
Commits
-------
cba206a [Finder] Check PHP version before applying a workaround for a PHP bug
* 2.7:
Ability to set empty version strategy in packages
CLI: use request context to generate absolute URLs
[SecurityBundle] Optimize dependency injection tests
Sort bundles in config commands
[HttpFoundation] Do not overwrite the Authorization header if it is already set
tag for dumped PHP objects must be a local one
* 2.3:
[SecurityBundle] Optimize dependency injection tests
[HttpFoundation] Do not overwrite the Authorization header if it is already set
tag for dumped PHP objects must be a local one
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] tag for dumped PHP objects must be a local one
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16877
| License | MIT
| Doc PR |
Commits
-------
9d03478 tag for dumped PHP objects must be a local one
* 2.7: (28 commits)
[Process] Use stream based storage to avoid memory issues
Fix upgrade guides concerning erroneous removal of assets helper
[Process] Remove a misleading comment
Fix markdown typo
ChooseBaseUrl should return an index
[Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
[FrameworkBundle] Don't log twice with the error handler
Remove useless is_object condition
[Process] Fix typo, no arguments needed anymore
[Serializer] Introduce constants for context keys
Fixed the documentation of VoterInterface::supportsAttribute
Fixed Bootstrap form theme form "reset" buttons
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
synchronize 2.7 and 3.0 upgrade files
fix merge 2.3 into 2.7 for SecureRandom dependency
Use is_subclass_of instead of reflection
Use is_subclass_of instead of Reflection when possible
...
* 2.3:
[Process] Remove a misleading comment
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
Fixed the documentation of VoterInterface::supportsAttribute
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
Use is_subclass_of instead of Reflection when possible
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Use stream based storage to avoid memory issues
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17390
| License | MIT
Commits
-------
da73125 [Process] Use stream based storage to avoid memory issues
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed the documentation of VoterInterface::supportsAttribute
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14655
| License | MIT
| Doc PR | -
Commits
-------
d662c2a Fixed the documentation of VoterInterface::supportsAttribute
This PR was merged into the 2.7 branch.
Discussion
----------
[Asset] ChooseBaseUrl should return an offset
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Enforce chooseBaseUrl to return an integer offset to the baseUrls member.
Commits
-------
0d041c3 ChooseBaseUrl should return an index
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Introduce constants for context keys
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Introduces constants for keys. Follow up @xabbuh's https://github.com/symfony/symfony/pull/17113/files#r48598904
Commits
-------
c56c7bf [Serializer] Introduce constants for context keys
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Remove useless is_object condition
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
[This condition](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Serializer/Serializer.php#L185) is useless, because ```$class``` is not used in ```getNormalizer()```.
Commits
-------
f6fd5e4 Remove useless is_object condition
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Refactor serializer normalize method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The serializer normalize method contains some dead or duplicate code. This PR refactor the method to make it simpler.
I tried to keep the same Exceptions in the same situations but they could probably be simplified too. (The last case only append if you pass a ressource to the serializer.)
Commits
-------
2bb5f45 Refactor serializer normalize method
* 2.3:
Fixed correct class name in thrown exception
Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
Removed a duplicated test in CardSchemeValidatorTest
Fix perf and mem issue when using token_get_all
[SecurityBundle] fix SecureRandom service constructor args
Normalize params only when used.
This PR was merged into the 2.3 branch.
Discussion
----------
Fix performance (PHP5) and memory (PHP7) issues when using token_get_all
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16868
| License | MIT
| Doc PR | -
Although it's not the case anymore on PHP 7, on PHP 5, `is_array` checks are much slower than `isset` checks.
Also from @peteward in #17384:
> New PHP7 memory manager will not release small buckets to OS automatically in cases exposed by `token_get_all()`. This function call addition specifically for PHP7 will reclaim this memory to keep the footprint down of long processe
> See above ticket and suggested actions by PHP internals team for long-running tasks (https://bugs.php.net/70098) - I think `cache:clear/warmup` on a heavy app justifies this.
> We're running on cloud-based hosting platforms under memory limitations (Platform.sh). When memory is exceeded we're into swap and the cache clearing process goes from seconds to minutes for the initial deployment, which really slows our development workflow and also causes holding page delays.
Commits
-------
e555aad Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
d1f72d8 Fix perf and mem issue when using token_get_all
* 2.7:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.7.10
updated VERSION for 2.7.9
updated CHANGELOG for 2.7.9
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
Conflicts:
composer.json
src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
Conflicts:
.travis.yml
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.3 branch.
Discussion
----------
[ClassLoader] Use symfony/polyfill-apcu
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes APC usage on PHP 7 or when APCu bc-layer is disabled
Commits
-------
623595f [ClassLoader] Use symfony/polyfill-apcu
This PR was squashed before being merged into the 2.8 branch (closes#17253).
Discussion
----------
[Console] HHVM read input stream bug
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| License | MIT
HHVM readline() function requires a parameter see:
https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/readline/ext_readline.php
But the php readline does not require one.
```
In Symfony\Component\Console\Helper\QuestionHelper
…
readFromInput($stream)
…
```
we use readline() without a parameter.
HHVM Version:
```
HipHop VM 3.10.1 (rel)
Compiler: tags/HHVM-3.10.1-0-g689b4969a141620ee5a282ce0dbf72278c84d44b
Repo schema: 6c99ee1f98340f6f3ef397a332583f0e843a627d
```
Docker Container:
```
docker run --rm -it -v `pwd`:`pwd` -w `pwd` brunoric/hhvm:deb hhvm test.php ls
```
Test.php
```
<?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Helper\QuestionHelper;
require_once "vendor/autoload.php";
$console = new Application();
$console
->register('ls')
->setDescription('Try input')
->setCode(function (InputInterface $input, OutputInterface $output) {
$question = new Question('Your email address: ');
$question->setValidator(
function ($answer) {
return $answer;
}
);
$question->setMaxAttempts(5);
$helper = new QuestionHelper();
$email = $helper->ask($input, $output, $question);
$output->writeln(sprintf('Email Adress: <info>%s</info>', $email));
})
;
$console->run();
```
composer.json
```
{
"require": {
"symfony/console": "^3.0"
}
}
```
Result:
No input is possible and you got a warning
```
Your email address:
Warning: readline() expects exactly 1 parameter, 0 given in /clitest/vendor/symfony/console/Helper/QuestionHelper.php on line 436
Email Adress:
```
Fix:
Add a empty string parameter to readline() or use fgets() for hhvm.
Commits
-------
e7f17a7 [Console] HHVM read input stream bug
* 2.7:
Fix max width for multibyte keys in choice question
[Console] Display console application name even when no version set
Remove empty statements.
This PR was squashed before being merged into the 2.3 branch (closes#17326).
Discussion
----------
[Console] Display console application name even when no version set
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When displaying help of an Application with a name but no version, it show "Console Tool" instead of the application name.
Commits
-------
61e810e [Console] Display console application name even when no version set
* 2.7:
[Yaml] Fix tests on PHP 7.0.2
[2.7] Workaround https://bugs.php.net/63206
[2.3] Workaround https://bugs.php.net/63206
Add closing parenthesis
[Serializer] Unset object_to_populate after using it
[Serializer] Allow to use proxies in object_to_populate
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Allow to use proxies in object_to_populate
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15627, dunglas/DunglasApiBundle#381
| License | MIT
| Doc PR | n/a
Allows to populate a proxy (or any class having the given type).
Commits
-------
b16b5b9 [Serializer] Allow to use proxies in object_to_populate
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] Fix tests on PHP 7.0.2
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #1234
| License | MIT
| Doc PR | -
Related to https://bugs.php.net/66179 that has been fixed in 7.0.2
Commits
-------
902f6dd [Yaml] Fix tests on PHP 7.0.2
* 2.7:
Typo fix
[2.3] Static Code Analysis for Components
Added support \IteratorAggregate for UniqueEntityValidator
Update AbstractChoiceListTest.php
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Use proper class to fetch $versionStrategy property
Added sort order SORT_STRING for params in UriSigner
Remove normalizer cache in Serializer class
* 2.3:
Typo fix
[2.3] Static Code Analysis for Components
Added support \IteratorAggregate for UniqueEntityValidator
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Added sort order SORT_STRING for params in UriSigner
Remove normalizer cache in Serializer class
This PR was merged into the 2.8 branch.
Discussion
----------
[Serializer] Allow context to contain not serializable data
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Allow the context to contain not serializable data even for the `ObjectNormalizer` (BC break fix).
Commits
-------
996f69d Merge pull request #2 from nicolas-grekas/ser-cache
8560c13 [Serializer] Use $context['cache_key'] to enhance caching
c1740fc [Serializer] ObjectNormalizer: context can contain not serializable data
This PR was merged into the 2.3 branch.
Discussion
----------
[Serializer] Remove normalizer cache in Serializer class
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The serializer cache the normalizer/denormalizer to use based only on the class and format. But the supportsNormalization and supportDenormalization methods can decide based on the data passed leading to hard to find bugs when the serializer used a cached normalizer it shouldn't use.
Commits
-------
8566dc1 Remove normalizer cache in Serializer class
* 2.7:
Add missing apostrophe in setSaveHandler phpdoc
[VarDumper] Fix typo
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
* 2.7:
[Process] Fix potential race condition
[PhpUnitBridge] Re-enable the garbage collector
typo
[FrameworkBundle] Set the kernel.name properly after a cache warmup
Removed spaces before semicolon
This PR was merged into the 2.8 branch.
Discussion
----------
[Yaml] cast arrays to objects after parsing has finished
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17190
| License | MIT
| Doc PR |
Casting arrays to objects must happen after the complete YAML string has
been parsed to avoid errors when parsing subsequent lines.
Commits
-------
8251d67 cast arrays to objects after parsing has finished
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] recognize when a block scalar is left
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17116
| License | MIT
| Doc PR |
The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.
Commits
-------
3a22165 [Yaml] recognize when a block scalar is left
The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.