* 2.3:
[Translator] Use quote to surround invalid locale
Optimize assertLocale regexp
[Validator] Backported #11410 to 2.3: Object initializers are called only once per object
[Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator
[Process] Reduce I/O load on Windows platform
[Form] Check if IntlDateFormatter constructor returned a valid object before using it
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Reduce I/O load on Windows platform
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
When using file handles, no `stream_select` call is done.
On linux platforms, `stream_select` introduce a sleep as it has 0.2s timeout, there is no such pause on Windows, producing lot's of disk I/Os when reading file handles
Commits
-------
ff0bb01 [Process] Reduce I/O load on Windows platform
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Check if IntlDateFormatter constructor returned a valid object before using it
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
`IntlDateFormatter` constructor [may return false](http://www.php.net/manual/en/intldateformatter.create.php#refsect1-intldateformatter.create-returnvalues). This patches avoids fatal errors in these cases
This PR replaces #11334
Commits
-------
ebf967d [Form] Check if IntlDateFormatter constructor returned a valid object before using it
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Console] Fix test on windows
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
8be4c92 [Console] Fix test on windows
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Backported #11410 to 2.3: Object initializers are called only once per object
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Before, object initializers were called multiple times if an object was validated in different groups in the same validation run. The initializers, however, are not aware of the current validation group, so calling them more than once does not make sense.
Now, object initializers are called exactly once per validated object.
See #11410
Commits
-------
291cbf9 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object
So we can compare the specificity without using the value, so it doesn't matter if the base isn't high enough (for example, 1,0,0 should be higher then 0,11,0. Currently with using values, this wouldn't be possible (100 vs 110).
* 2.5:
[Process] Adjust PR #11264, make it Windows compatible and fix CS
[Process] Fix unit tests on Windows platform
bumped Symfony version to 2.5.3
bumped Symfony version to 2.4.9
bumped Symfony version to 2.3.19
updated VERSION for 2.5.2
updated CHANGELOG for 2.5.2
updated VERSION for 2.4.8
updated CHANGELOG for 2.4.8
[2.5][Form] solved dependency to ValidatorInterface, fix#11036
updated VERSION for 2.3.18
update CONTRIBUTORS for 2.3.18
updated CHANGELOG for 2.3.18
[Process] Use correct test for empty string in UnixPipes
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/ProcessPipes.php
* 2.4:
[Process] Adjust PR #11264, make it Windows compatible and fix CS
[Process] Fix unit tests on Windows platform
bumped Symfony version to 2.4.9
bumped Symfony version to 2.3.19
updated VERSION for 2.4.8
updated CHANGELOG for 2.4.8
updated VERSION for 2.3.18
update CONTRIBUTORS for 2.3.18
updated CHANGELOG for 2.3.18
[Process] Use correct test for empty string in UnixPipes
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[Process] Adjust PR #11264, make it Windows compatible and fix CS
[Process] Fix unit tests on Windows platform
bumped Symfony version to 2.3.19
updated VERSION for 2.3.18
update CONTRIBUTORS for 2.3.18
updated CHANGELOG for 2.3.18
[Process] Use correct test for empty string in UnixPipes
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] [Process] Use correct test for empty string in UnixPipes
| 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
This PR supersedes #11264 : 2.3 compatibility + Windows compatibility + CS fix
Commits
-------
cec0a45 [Process] Adjust PR #11264, make it Windows compatible and fix CS
9e1ea4a [Process] Use correct test for empty string in UnixPipes
This PR was squashed before being merged into the 2.6-dev branch (closes#11350).
Discussion
----------
[2.5][Form] solved dependency to ValidatorInterface, fix#11036
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | #11036, #11345
| License | MIT
| Doc PR |
Since Symfony 2.5
The problem was that the form component has a hardcoded depencency to the deprecated validator component (api Version 2.4)
The pull request fixes the dependency to the validator component and supports now both implementations, apiVersion 2.5 and apiVersion 2.4 of the validator component.
@Symfony Core Members
please review the changes 0a1e9c208f/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php
I'm not sure if it was the right solution
Commits
-------
ab765c9 [2.5][Form] solved dependency to ValidatorInterface, fix#11036
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671)
| 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
| CVE Ticket | [CVE-2014-4671](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4671)
| See Also | [Rosetta Flash](http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/)
\* Unless you are parsing the response string manually, which you really shouldn't do anyway
**THIS IS A SECURITY FIX AND SHOULD BE MERGED SHORTLY**
This fix prevents attacks vectors where third-party browser plugins depends on ASCII magic bytes in order to execute a plugin. This is currently exploited with Flash using a carefully crafted JSONP response, allowing the execution of random SWF data from a domain with a vulnerable JSONP endpoint.
This security issue is mitigated by adding an empty comment right before the callback parameter. This does not affect the execution of the JSONP callback.
Commits
-------
6af3d05 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671)
This PR was squashed before being merged into the 2.5 branch (closes#11284).
Discussion
----------
[Console] Remove estimated field from debug_nomax
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11281
| License | MIT
| Doc PR |
Commits
-------
2ac1bb4 [Console] Remove estimated field from debug_nomax
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] [Validator] Fix UserPassword validator translation
| Q | A
| ------------- | ---
| Fixed tickets | None
| License | MIT
Fixes the UserPassword translation message only for 2.3 as discussed in symfony/symfony#11383.
Commits
-------
73d50ed Fix UserPassword validator translation
This PR was merged into the 2.6-dev branch.
Discussion
----------
Allow xdebug.file_link_format from php ini to work when xdebug extension is not loaded
Q | A
----------------- | ---------------
Bug fix? | yes
New feature? | no
BC breaks? | no
Deprecations? | no
Tests pass? | yes
Fixed tickets | #11081
License | MIT
Doc PR | N/A
Complete the PR https://github.com/symfony/symfony/pull/11081
Commits
-------
8b2397c Applyied code review
97e07d5 Check for xdebug link format via both ini_get and get_cfg_var
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][HttpFoundation] Fix wrong assertion in Response test
| Q | A
| ------------- | ---
| Bug fix? | kinda
| New feature? | no
| BC breaks? | no
| Tests pass? | yes
| License | MIT
Commits
-------
3d63f80 [HttpFoundation] Fix wrong assertion in Response test
This PR was squashed before being merged into the 2.6-dev branch (closes#10960).
Discussion
----------
[Filesystem] Throw Exception on copying from an unreadable file or to an unwritable file
| Q | A |
| ------------- | ------------- |
| Bug fix? | No |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | |
| License | MIT |
In certain circumstances (overwrite set to true, target file not writable), Filesystem->copy() would return success even though the file was not successfully copied. Unit tests included.
Commits
-------
cd5da9b [Filesystem] Throw Exception on copying from an unreadable file or to an unwritable file
This PR was merged into the 2.4 branch.
Discussion
----------
Added verbosity methods to NullOutput
These 4 methods were not added to the OutputInterface because of BC, but they should still be implemented in all classes which implement that interface. Otherwise we have to do nasty tricks...
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
0459249 Added verbosity methods
This PR was merged into the 2.6-dev branch.
Discussion
----------
[HttpFoundation] Added a switch to delete file after the response is send
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#3975
I have not done any Unit Tests for this code as I suspect there may already be a way to solve my problem of deleting a file after the request was sent. Is it possible to use `sendContent` and delete the file after that? My attempts were unsuccessful.
If this code is desirable, please assist me in how I would write an unit test for this. Thanks.
TODO:
- [x] Add unit tests
- [x] Update documentation
- [x] Mention that using `X-Sendfile` will overwrite deleteFileAfterSend
Commits
-------
1fff158 [HttpFoundation] Added a switch to delete file after the response is send
* 2.5:
added missing test
fixed CS
[HttpFoundation] Remove content-related headers if content is empty
bumped Symfony version to 2.5.2
bumped Symfony version to 2.4.8
updated VERSION for 2.5.1
updated CHANGELOG for 2.5.1
removed defaults from PHPUnit configuration
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.4:
added missing test
fixed CS
[HttpFoundation] Remove content-related headers if content is empty
bumped Symfony version to 2.4.8
removed defaults from PHPUnit configuration
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.6-dev branch.
Discussion
----------
[FrameworkBundle] Use ProcessHelper for server:run command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
Let's use our new process helper :)
Commits
-------
6ca1c90 [FrameworkBundle] Use ProcessHelper for server:run command
a5f36a8 [Console] Add threshold for ProcessHelper verbosity
This PR was merged into the 2.3 branch.
Discussion
----------
remove defaults from PHPUnit configuration
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | --
Follow-up to #11329.
Commits
-------
afc4930 removed defaults from PHPUnit configuration
* 2.5:
updated VERSION for 2.4.7
updated CHANGELOG for 2.4.7
bumped Symfony version to 2.3.18
updated VERSION for 2.3.17
update CONTRIBUTORS for 2.3.17
updated CHANGELOG for 2.3.17
added XSD to PHPUnit configuration
fix the return types
add missing docblock for ProcessBuilder::addEnvironmentVariables()
bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest
[Translation] Added unescaping of ids in PoFileLoader
updated italian translation for validation messages
[DomCrawler] Fix docblocks and formatting.
[DomCrawler] Remove the query string and the anchor of the uri of a link
Simplified the Travis test command
Remove Expression Language services when the component is unavailable
Added SK translations
[Console] Make sure formatter is the same
* 2.4:
updated VERSION for 2.4.7
updated CHANGELOG for 2.4.7
bumped Symfony version to 2.3.18
updated VERSION for 2.3.17
update CONTRIBUTORS for 2.3.17
updated CHANGELOG for 2.3.17
added XSD to PHPUnit configuration
add missing docblock for ProcessBuilder::addEnvironmentVariables()
bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest
[Translation] Added unescaping of ids in PoFileLoader
updated italian translation for validation messages
[DomCrawler] Fix docblocks and formatting.
[DomCrawler] Remove the query string and the anchor of the uri of a link
Simplified the Travis test command
Remove Expression Language services when the component is unavailable
[Console] Make sure formatter is the same
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
bumped Symfony version to 2.3.18
updated VERSION for 2.3.17
update CONTRIBUTORS for 2.3.17
updated CHANGELOG for 2.3.17
added XSD to PHPUnit configuration
bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest
[Translation] Added unescaping of ids in PoFileLoader
updated italian translation for validation messages
[DomCrawler] Fix docblocks and formatting.
[DomCrawler] Remove the query string and the anchor of the uri of a link
Simplified the Travis test command
[Console] Make sure formatter is the same
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.6-dev branch.
Discussion
----------
Make @inheritdoc consistent (lowercase)
See symfony/symfony#10713
| Q | A
| ------------- | ---
| License | MIT
Commits
-------
aae45ad Make @inheritdoc consistent (lowercase)
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Serializer] Added a test for decoding xml with whitespaces
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The PR 466a3d70b7 introduced a BC break because white spaces were previously decoded as text nodes.
So this PR reverts it and adds a context option to configure it.
Commits
-------
f5bf45e [Serializer] Added a test for decoding xml with whitespaces
This PR was squashed before being merged into the 2.3 branch (closes#11194).
Discussion
----------
[DomCrawler] Remove the query string and the anchor of the uri of a link
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
fe5d2d1 [DomCrawler] Remove the query string and the anchor of the uri of a link
The parent constructor will create a new formatter if the $formatter parameter is null
This fix avoids that the formatter becomes 2 different instances in $this and $this->stderr
* 2.5:
Fixed failed config schema loads due to libxml_disable_entity_loader usage.
enabled PHP 5.6 for tests
[Process] Fix ExecutableFinder with open basedir
Refactored the CssSelector to remove the circular object graph
Fix mocks to support >=5.5.14 and >=5.4.30
[ClassLoader] fixed PHP warning on PHP 5.3
[Validator] added Lithuanian translation for empty file
Added missing dutch translations
[Components][Serializer] optional constructor arguments can be omitted during the denormalization process
[DomCrawler] properly handle buttons with single and double quotes inside the name attribute
Added missing pt and pt_BR translations
Conflicts:
src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf
* 2.4:
Fixed failed config schema loads due to libxml_disable_entity_loader usage.
enabled PHP 5.6 for tests
[Process] Fix ExecutableFinder with open basedir
Refactored the CssSelector to remove the circular object graph
Fix mocks to support >=5.5.14 and >=5.4.30
[ClassLoader] fixed PHP warning on PHP 5.3
[Validator] added Lithuanian translation for empty file
Added missing dutch translations
[Components][Serializer] optional constructor arguments can be omitted during the denormalization process
[DomCrawler] properly handle buttons with single and double quotes inside the name attribute
Added missing pt and pt_BR translations
* 2.3:
Fixed failed config schema loads due to libxml_disable_entity_loader usage.
enabled PHP 5.6 for tests
[Process] Fix ExecutableFinder with open basedir
Refactored the CssSelector to remove the circular object graph
Fix mocks to support >=5.5.14 and >=5.4.30
[ClassLoader] fixed PHP warning on PHP 5.3
[Components][Serializer] optional constructor arguments can be omitted during the denormalization process
[DomCrawler] properly handle buttons with single and double quotes inside the name attribute
Conflicts:
src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
This PR was squashed before being merged into the 2.3 branch (closes#11179).
Discussion
----------
[Process] Fix ExecutableFinder with open basedir
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This fixes the `ExecutableFinder` object to properly fetch the `open_basedir` setting, also added a bunch of tests for the `find()` method.
Commits
-------
b8f8c0e [Process] Fix ExecutableFinder with open basedir
This PR was merged into the 2.3 branch.
Discussion
----------
[CssSelector] Refactored the CssSelector to remove the circular object graph
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10879, replaces #11221
| License | MIT
| Doc PR | n/a
This allows the translator and its extensions to be garbage collected based on the refcount rather than requiring the garbage collector run, making it much more likely to happen at the end of the ``CssSelector::toXPath`` call.
Node translators now receive the Translator as second argument, instead of requiring to inject it in the extension to keep a reference to it. This way, the Translator is referenced nowhere inside it, only by the caller, and so will be destructed at the end of the usage (and extensions will then be destructed after it when not used anymore).
Commits
-------
994f81f Refactored the CssSelector to remove the circular object graph
This allows the translator and its extensions to be garbage collected
based on the refcount rather than requiring the garbage collector run,
making it much more likely to happen at the end of the
CssSelector::toXPath call.
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] properly handle buttons with single and double quotes insid...
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11151
| License | MIT
| Doc PR |
Commits
-------
cbbdbe4 [DomCrawler] properly handle buttons with single and double quotes inside the name attribute
This PR was merged into the 2.3-dev branch.
Discussion
----------
[Validator] added Japanese translation for empty file (id: 78)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
ff13184 [Validator] added Japanese translation for empty file (id: 78)
This PR was squashed before being merged into the 2.4 branch (closes#11203).
Discussion
----------
Added missing dutch translations
Commits
-------
bd9283e Added missing dutch translations
* 2.5:
[Validator] Add missing ru translations
don't disable constructor calls to mockups of classes that extend internal PHP classes
special handling for the JsonDescriptor to work around changes in PHP's JSON pretty printer
* 2.4:
[Validator] Add missing ru translations
don't disable constructor calls to mockups of classes that extend internal PHP classes
special handling for the JsonDescriptor to work around changes in PHP's JSON pretty printer
Conflicts:
src/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php
* 2.5:
fixed previous merge
Added missing `break` statement
don't disable constructor calls to mockups of classes that extend internal PHP classes
Small comment update according to PSR-2
[Yaml] fix overwriting of keys after merged map
[Yaml] fix priority of sequence merges according to spec
[Console] Fixed notice in QuestionHelper
[Console] Fixed notice in DialogHelper
[Yaml] refactoring of merges for performance
[Console] remove weird use statement
[HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
[Filesystem] Fix test suite on OSX
[FrameworkBundle] Redirect server output to /dev/null in case no verbosity is needed
Add framework-bundle
Conflicts:
src/Symfony/Component/Yaml/Parser.php
* 2.4:
fixed previous merge
Added missing `break` statement
don't disable constructor calls to mockups of classes that extend internal PHP classes
Small comment update according to PSR-2
[Console] Fixed notice in DialogHelper
[HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
[Filesystem] Fix test suite on OSX
Add framework-bundle
Conflicts:
src/Symfony/Bundle/TwigBundle/composer.json
* 2.3:
Added missing `break` statement
don't disable constructor calls to mockups of classes that extend internal PHP classes
Small comment update according to PSR-2
[Console] Fixed notice in DialogHelper
[HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
[Filesystem] Fix test suite on OSX
Add framework-bundle
Conflicts:
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Tests] don't disable constructor calls to mockups of classes that extend intern...
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fixes the tests for the 2.3 branch as reported by @stof in #11176.
Commits
-------
2c726b8 don't disable constructor calls to mockups of classes that extend internal PHP classes
See [PSR-2](http://www.php-fig.org/psr/psr-2/) paragraph 5.2
> There MUST be a comment such as `// no break` when fall-through is intentional in a non-empty case body.
Related to #11181
This PR was merged into the 2.5 branch.
Discussion
----------
[YAML] fix merge node (<<)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes but according to spec
| Deprecations? | no
| Tests pass? | yes
| Needs merge to | 2.5
| Fixed tickets | #11142 and #11154
| License | MIT
| Doc PR | —
First commit small refactoring.
Second fixes#11154 (causing a BC break for a less common feature)
Third fixes#11142
Commits
-------
dee1562 [Yaml] fix overwriting of keys after merged map
8c621ab [Yaml] fix priority of sequence merges according to spec
02614e0 [Yaml] refactoring of merges for performance
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
2a0e8e3 [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem] Fix test suite on OSX
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
Reviewing PR's, I realized the filesystem test suite fails on my setup (OSX, PHP 5.5.13 with posix ext). `posix_getgrgid` returns false, so some tests are failing.
This solves this issue.
Be aware that the patched method has been moved in FilesystemTestCase in recent branches
Commits
-------
e26f08e [Filesystem] Fix test suite on OSX
This PR was squashed before being merged into the 2.6-dev branch (closes#10934).
Discussion
----------
[Process] Add support for streams as input
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8161
| License | MIT
`Process::setStdin` now accepts a stream as input.
I've also split windows and unix pipes management.
Commits
-------
b57024e [Process] Add support for streams as input
This PR was squashed before being merged into the 2.6-dev branch (closes#10939).
Discussion
----------
[Translation] [Xliff] Support for <note>
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10550
| License | MIT
| Doc PR | n/a
The purpose of this PR, is to avoid that the automated translation update (`app/console translation:update`) remove the `note` tags from XLIFF files.
Not sure if using the metadata bag is a good thing or if I should have add a "note" property in MessageCatalogue. What do you think ?
Commits
-------
d18e758 [Translation] [Xliff] Support for <note>
This PR was squashed before being merged into the 2.6-dev branch (closes#11027).
Discussion
----------
[Validator] Support "maxSize" given in KiB
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10962
| License | MIT
| Doc PR | symfony/symfony-docs#3895
To display the constraint validation message with an expected suffix, this PR add a new option in File constraint.
Commits
-------
48ed754 [Validator] Support "maxSize" given in KiB
This PR was merged into the 2.6-dev branch.
Discussion
----------
[HttpKernel] added value of DateTime object to ValueExporter
| 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
This will output the actual value of a DateTime object in the form panel of the web debug toolbar.
- [x] gather feedback for my change (thank you stof, its my first contribution to oss)
- [x] finish the code
Commits
-------
a1762fb [HttpKernel] added value of DateTime object and objects implementing DateTimeInterface to ValueExporter
* 2.5:
PHP Fatal error when getContainer method of ContainerAwareCommand has be...
[HttpFoundation] Fixed isSecure() check to be compliant with the docs
Update MimeTypeExtensionGuesser.php
fix test src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
[Process] Do not redirect output to file handles when output is disabled
[Validator] Fix array notation in the PropertyPath::append()
Fixed undefined ImageValidator:: property when uploading an image during functional tests
[HttpKernel] Fix event dispatcher dependency
Fixed the Travis build on PHP 5.3.3
* 2.4:
PHP Fatal error when getContainer method of ContainerAwareCommand has be...
[HttpFoundation] Fixed isSecure() check to be compliant with the docs
Update MimeTypeExtensionGuesser.php
fix test src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
Fixed the Travis build on PHP 5.3.3
* 2.3:
PHP Fatal error when getContainer method of ContainerAwareCommand has be...
[HttpFoundation] Fixed isSecure() check to be compliant with the docs
Update MimeTypeExtensionGuesser.php
fix test src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
Fixed the Travis build on PHP 5.3.3
This PR was merged into the 2.3-dev branch.
Discussion
----------
[HttpFoundation] Added ParameterBag::getBoolean
| 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
At the moment to pull a boolean value from a request the user has to use `ParameterBag::filter` or use `filter_var` directly
```php
// GET /products?hide_archived=true
$request->query->filter('hide_archived', false, false, FILTER_VALIDATE_BOOLEAN);
// or
filter_var($request->query->get('hide_archived'), FILTER_VALIDATE_BOOLEAN);
```
This is a pure convenience addition, adding a nice way of pulling a boolean value from a query string or request body (especially if http form/url encoded).
Example usage:
```php
// GET /products?hide_archived=true
$request->query->getBoolean('hide_archived'); // (boolean) true
$request->query->get('hide_archived'); // (string) "true"
// GET /products?hide_archived=1
$request->query->getBoolean('hide_archived'); // (boolean) true
// GET /products?hide_archived=false
$request->query->getBoolean('hide_archived'); // (boolean) false
// GET /products?hide_archived=banana
$request->query->getBoolean('hide_archived'); // (boolean) false
```
Commits
-------
36c58f8 [HttpFoundation] Added ParameterBag::getBoolean
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] Add allow_extra_fields option on forms
This is specially useful when creating different *nameless* GET forms on the same page (ex: pagination and search).
Commits
-------
c6f3dd6 add allow_extra_fields option
* 2.5:
Minor doc fix.
Simplified the way to update PHPUnit to the latest version
[Debug] work-around https://bugs.php.net/61272
[Debug] simplify code path to remove potential blank pages
[Process] Minor README update
[HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
Fixed a html error "Element ul is not closed" in logger.html.twig
[HttpFoundation] Officialize the 308 redirect RFC
Officialize the 308 redirect RFC
issue #10808 crawler test
Empty select with attribute name="foo[]" bug fix
Fixed contextually wrong translation
* 2.4:
Minor doc fix.
Simplified the way to update PHPUnit to the latest version
[Process] Minor README update
[HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
Fixed a html error "Element ul is not closed" in logger.html.twig
[HttpFoundation] Officialize the 308 redirect RFC
Officialize the 308 redirect RFC
issue #10808 crawler test
Empty select with attribute name="foo[]" bug fix
Fixed contextually wrong translation
* 2.3:
Minor doc fix.
Simplified the way to update PHPUnit to the latest version
[Process] Minor README update
[HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
Fixed a html error "Element ul is not closed" in logger.html.twig
[HttpFoundation] Officialize the 308 redirect RFC
issue #10808 crawler test
Empty select with attribute name="foo[]" bug fix
Fixed contextually wrong translation
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Fix basic authentication in url with PHP-FPM
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | dispute
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
`getUser()` and `getPassword()` from `Request` are broken when using PHP-FPM because of the lack of `$_SERVER['PHP_AUTH_USER']` and `$_SERVER['PHP_AUTH_PW']`. This PR fixes the issue.
However, now an empty password will return an empty string (which is the expected behavior of `ServerBag`) instead of `NULL`. The test is updated accordingly, but should we consider this as a breakage?
This issue was spotted by using basic auth via the Illuminate component of Laravel and is present from v2.1.0 to master.
Commits
-------
7a75adf [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
Request#getUser() and Request#getPassword() introduced in
aecfd0a891 do not handle the lack of
PHP_AUTH_USER and PHP_AUTH_PW in $this->server when using PHP-FPM. Use
$this->headers instead.
Furthermore, the test of empty password now expects an empty string
instead of NULL according to a450d002f2.
* 2.5: (25 commits)
[Bridge][Twig] Replace deprecated features
Yaml component change in 2.5
[HttpFoundation] fix switch statement
[serializer] fixed whitespace issue when decoding xml
[Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
#10862 loadClassMetadata vs loadValidatorMetadata: revert default config
fixed previous merge
Added phpdoc for Cache-Control directives methods
[Console] OutputFormatter Unset Bold has wrong id
[Debug] fix debug handlers config
[Serializer] fixed bc-break with cdata-section nodes
Remove undefined variable $e
[Debug] fix wrong case mismatch exception
bumped Symfony version to 2.5.1
bumped Symfony version to 2.4.7
bumped Symfony version to 2.3.17
Fix a parameter name in a test
updated VERSION for 2.5.0
updated CHANGELOG for 2.5.0
updated VERSION for 2.4.6
...
Conflicts:
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
src/Symfony/Component/HttpKernel/Kernel.php
If you have a select with attribute name="foo[]", and you submit your form, http_build_query returns empty string as a result. In this case you get a form extra field validation error, because your field "foo" converts to
'' => bool(false)
* 2.4:
[Bridge][Twig] Replace deprecated features
[HttpFoundation] fix switch statement
[Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
fixed previous merge
Added phpdoc for Cache-Control directives methods
Remove undefined variable $e
bumped Symfony version to 2.4.7
bumped Symfony version to 2.3.17
Fix a parameter name in a test
updated VERSION for 2.4.6
updated CHANGELOG for 2.4.6
updated VERSION for 2.3.16
update CONTRIBUTORS for 2.3.16
updated CHANGELOG for 2.3.16
[HttpFoundation] use different approach for duplicate keys in postgres, fix merge for sqlsrv and oracle
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[Bridge][Twig] Replace deprecated features
[HttpFoundation] fix switch statement
[Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
fixed previous merge
Added phpdoc for Cache-Control directives methods
Remove undefined variable $e
bumped Symfony version to 2.3.17
Fix a parameter name in a test
updated VERSION for 2.3.16
update CONTRIBUTORS for 2.3.16
updated CHANGELOG for 2.3.16
[HttpFoundation] use different approach for duplicate keys in postgres, fix merge for sqlsrv and oracle
Conflicts:
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was squashed before being merged into the 2.6-dev branch (closes#10427).
Discussion
----------
Username in UsernameNotFoundException message data
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Added username in UsernameNotFoundException message data
Commits
-------
3dfaa19 Username in UsernameNotFoundException message data
This PR was squashed before being merged into the 2.3-dev branch (closes#10851).
Discussion
----------
Added retrieval of sections
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10145
| License | MIT
Commits
-------
7928767 Added retrieval of sections
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] smaller fixes for PdoSessionHandler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10652
| License | MIT
For both the PdoSessionHandler and DbalSessionHandler
- https://github.com/symfony/symfony/pull/10652#issuecomment-42370425: Transactional DELETE + INSERT does not work as expected
- https://github.com/symfony/symfony/pull/10652#issuecomment-44359784: sqlsrv 2005 does not support the MERGE SQL, and if used it requires an HOLDLOCK
- missing time update for sqlsrv and oracle
Commits
-------
a0e1d4d [Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
00d707f [HttpFoundation] use different approach for duplicate keys in postgres, fix merge for sqlsrv and oracle
Previously, the parser treated maps ( {} ) the same as sets ( [] ).
Both were returned as PHP associative arrays. Since
these are distinct entities, this can cause considerably problems for
the users, especially when YAML is being serialized into another
format such as JSON.
This commit allows the user to enable object-map support via a third
parameter on the Parse method. It defaults to `false`, which means
that this commit does not break backwards compatibility.
If the user enables object-map support, maps are represented
by stdClass() objects. Sets remain as arrays.
This PR was squashed before being merged into the 2.6-dev branch (closes#10667).
Discussion
----------
[HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10556
| License | MIT
| Doc PR | no
Commits
-------
787ae07 [HttpFoundation] Add a way to match a specific scheme in RequestMatcher #10556
This PR was squashed before being merged into the 2.6-dev branch (closes#10699).
Discussion
----------
[DomCrawler] Added support for slicing nodes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
There are no easy way to slice nodes in specific range. I created a method using \LimitIterator. Works fine for me.
An example using is:
```php
$crawler->filter('h1')->slice(5, 10)->each(function ($node, $i) {
return $node->text();
});
Commits
-------
1181bdc [DomCrawler] Added support for slicing nodes
This PR was merged into the 2.6-dev branch.
Discussion
----------
[Security] Allow overloading ContextListener::refreshUser()
Allow overloading refreshUser() for the use case of doing something special with user providers.
| 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
-------
b67ed43 Allow overloading ContextListener::refreshUser()
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fix a parameter name in a test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not required
Commits
-------
069e925 Fix a parameter name in a test
* 2.5:
[Validator] Remove property and method targets from the optional and required constraints.
fixed CHANGELOG for 2.5
bumped Symfony version to 2.5.0
updated VERSION for 2.5.0-RC1
updated CHANGELOG for 2.5.0-RC1
[DomCrawler] Fixed charset detection in html5 meta charset tag
* 2.4:
[Validator] Remove property and method targets from the optional and required constraints.
[DomCrawler] Fixed charset detection in html5 meta charset tag
* 2.3:
[Validator] Remove property and method targets from the optional and required constraints.
[DomCrawler] Fixed charset detection in html5 meta charset tag
At the moment both constraints can only be defined on other annotations (specifically, the Collection annotation). Defining the required or optional annotation directly on a field or method throws a ClassNotFoundException, since the constraint validator factory tries to load the validator (which does not exist).
This PR was squashed before being merged into the 2.3 branch (closes#10983).
Discussion
----------
[DomCrawler] Fixed charset detection in html5 meta charset tag
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
It may be minor to folks with ascii-charactered language, but is critical for us Japanese.
Many Japanese websites with SJIS encoding have "Shift_JIS" as their encoding declaration.
Commits
-------
172e752 [DomCrawler] Fixed charset detection in html5 meta charset tag
* 2.5:
Revert "bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)"
Revert "bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)"
Revert "fixed CS"
Revert "bug #10979 Make rootPath part of regex greedy (artursvonda)"
Revert "[HttpKernel] simplified some tests"
[HttpKernel] simplified some tests
Make rootPath part of regex greedy
* 2.4:
Revert "bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)"
Revert "bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)"
Revert "fixed CS"
Revert "bug #10979 Make rootPath part of regex greedy (artursvonda)"
Revert "[HttpKernel] simplified some tests"
[HttpKernel] simplified some tests
Make rootPath part of regex greedy
* 2.3:
Revert "bug #10894 [HttpKernel] removed absolute paths from the generated container (fabpot)"
Revert "bug #10937 [HttpKernel] Fix "absolute path" when we look to the cache directory (BenoitLeveque)"
Revert "fixed CS"
Revert "bug #10979 Make rootPath part of regex greedy (artursvonda)"
Revert "[HttpKernel] simplified some tests"
[HttpKernel] simplified some tests
Make rootPath part of regex greedy
Conflicts:
src/Symfony/Component/HttpKernel/Tests/KernelTest.php
* 2.5:
[TwigBridge][Trans]set %count% only on transChoice
[Debug] throw even in stacking mode to preserve code paths
[Debug] preserve modified error level
[DomCrawler] Fixed a forgotten case of complex XPath queries
bumped Symfony version to 2.4.6
updated VERSION for 2.4.5
updated CHANGELOG for 2.4.5
bumped Symfony version to 2.3.16
updated VERSION for 2.3.15
updated CHANGELOG for 2.3.15
* 2.4:
[TwigBridge][Trans]set %count% only on transChoice
[DomCrawler] Fixed a forgotten case of complex XPath queries
bumped Symfony version to 2.4.6
updated VERSION for 2.4.5
updated CHANGELOG for 2.4.5
bumped Symfony version to 2.3.16
updated VERSION for 2.3.15
updated CHANGELOG for 2.3.15
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[TwigBridge][Trans]set %count% only on transChoice
[DomCrawler] Fixed a forgotten case of complex XPath queries
bumped Symfony version to 2.3.16
updated VERSION for 2.3.15
updated CHANGELOG for 2.3.15
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.4:
Revert "bug #10908 [HttpFoundation] implement session locking for PDO (Tobion)"
bumped Symfony version to 2.3.15
updated VERSION for 2.3.14
update CONTRIBUTORS for 2.3.14
updated CHANGELOG for 2.3.14
* 2.3:
Revert "bug #10908 [HttpFoundation] implement session locking for PDO (Tobion)"
bumped Symfony version to 2.3.15
updated VERSION for 2.3.14
update CONTRIBUTORS for 2.3.14
updated CHANGELOG for 2.3.14
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.4:
[WIP][Finder] Fix wrong implementation on sortable callback comparator
ommited space
[Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
Include file path in exception
[Process] Add validation on Process input
Conflicts:
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/ProcessBuilder.php
src/Symfony/Component/Process/Tests/ProcessBuilderTest.php
* 2.3:
[WIP][Finder] Fix wrong implementation on sortable callback comparator
ommited space
[Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
Include file path in exception
[Process] Add validation on Process input
This PR was merged into the 2.3-dev branch.
Discussion
----------
[Process] Deprecate Process::setStdin in favor of Process::setInput
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
From the `Process` point of view, what we pass is an *input*, as well as we retrieve *output* and *error output*.
As we use `getOutput` and `getErrorOutput` we should use `setInput` and let the underlying `ProcessPipes` deal with the actual `STDIN`.
By the way, `ProcessBuilder` already has `setInput` method and no `setStdin` method
Commits
-------
53b9d73 [Process] Deprecate Process::setStdin in favor of Process::setInput
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Add validation on Process input
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
This adds validation on Process input. For the moment, passing a stream would result in a PHP error.
I propose to deprecate values that are not strictly string in 2.6 (see upcoming PR)
Commits
-------
583092b [Process] Add validation on Process input
This PR was merged into the 2.5-dev branch.
Discussion
----------
Made use of "kB" vs. "KiB" consistent
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Continuation of #10661.
This PR makes the usage of "kB" and "KiB" consistent across the project. The notations equal the internationally recognized ones:
Short form | Long form | Value in Bytes
--- | --- | ---
B | bytes | 1
kB | kilobytes | 1000
KiB | kibibytes | 1024
MB | megabytes | 1000000
MiB | mebibytes | 1048576
GB | gigabytes | 1000000000
GiB | gibibytes | 1073741824
The reason for differentiating between the two is that several users got confused with the current mix (see #10648, #10917, #10661).
FileValidator, UploadedFile and the ProgressBar helper were changed accordingly.
Follow-up feature request: #10962
Commits
-------
e4c6da5 [Validator] Improved to-string conversion of the file size/size limit
bbe1045 [Validator][Console][HttpFoundation] Use "KiB" everywhere (instead of "kB")
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed StaticMethodLoaderTest on systems that don't have E_STRICT enabled by default
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a470ae2 [Validator] Fixed StaticMethodLoader on systems that don't have E_STRICT enabled by default
* 2.4:
Fixed the XPath filtering to have the same behavior than Symfony 2.4
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Added more tests for the XPath filtering
[PropertyAccess] Fixed inverted logic
[HttpKernel] fixed file uploads in functional tests when no file was selected
[PropertyAccess] fixed CS
Fixed test cases failing when the Intl extension is not installed
Fixed the Travis build to avoid exiting too early
[PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations
[PropertyAccess] Refactored PropertyAccessorCollectionTest
[PropertyAccess] Refactored PropertyAccessorTest
This PR was merged into the 2.5-dev branch.
Discussion
----------
[2.5][PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Previously, when the following code was executed:
```php
$object = new ImplOfArrayAccess();
$propertyAccessor->setValue($object, '[index]', 'Value');
```
and that index did not exist, a fatal error would be generated because `array_keys()` was executed on `$object`. This error is fixed now.
Commits
-------
fef698e [PropertyAccess] Fixed getValue() when accessing non-existing indices of ArrayAccess implementations
* 2.3:
Fixed the XPath filtering to have the same behavior than Symfony 2.4
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Added more tests for the XPath filtering
[HttpKernel] fixed file uploads in functional tests when no file was selected
Fixed test cases failing when the Intl extension is not installed
Fixed the Travis build to avoid exiting too early
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
Changed the default value of checkbox and radio to match the HTML spec
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
When the checkbox or radio input does not have a value attribute, the [HTML spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#checkbox-state-%28type=checkbox%29) defines that the value [should be ``on``](http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on), not ``1``.
This change is a small BC break as a testsuite with an assertion on the ``1`` value would fail after the change. However, this means that such testsuite would assert a different behavior than the real usage of the application.
Note that people using the DomCrawler component on pages using the Symfony Form component are not affected by the change as the Form component always set an explicit value on checkboxes and radio buttons
Commits
-------
186b65e Changed the default value of checkbox and radio to match the HTML spec
* 2.4:
[HttpFoundation] implement session locking for PDO
[DomCrawler] Fixed the coding standards to use strict comparisons
[HttpKernel] removed absolute paths from the generated container
[DomCrawler] Fixed the initial state for options without value attribute
Fixed the handling of boolean attributes in ChoiceFormField
Fixed FormDataExtractorTest_SimpleValueExporter::exportValue not implementing the interface correctly
Updated form dev dependencies
* 2.3:
[HttpFoundation] implement session locking for PDO
[DomCrawler] Fixed the coding standards to use strict comparisons
[HttpKernel] removed absolute paths from the generated container
[DomCrawler] Fixed the initial state for options without value attribute
Fixed the handling of boolean attributes in ChoiceFormField
Conflicts:
src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php
src/Symfony/Component/HttpKernel/Tests/KernelTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed the coding standards to use strict comparisons
| 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
Many places in DomCrawler are using loose comparison instead of strict comparison. I saw them while checking the whole component for DOMNode vs DOMElement usage whe working on #10927. However, I submitted this change to 2.3 instead, to ease merging between branches (applying the change only in master would likely create conflicts regularly when merging changes in DomCrawler between branches later)
Commits
-------
77b446c [DomCrawler] Fixed the coding standards to use strict comparisons
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] implement session locking for PDO
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #4976 for PDO
| License | MIT
This is probably the first Session Handler for databases that actually works with locking. I've seen many implementations of session handlers (mostly only for one database vendor) while researching and none used locking. Not even the [PHPs SQLite session handler](https://github.com/php/php-src/blob/PHP-5.3/ext/sqlite/sess_sqlite.c) or [PECL Postgres Handler](http://svn.php.net/viewvc/pecl/session_pgsql/trunk/session_pgsql.c?revision=326806&view=markup) implemented locking correctly which is probably the reason why they have been discontinued. [Zend Session](https://github.com/zendframework/zf2/blob/master/library/Zend/Session/SaveHandler/DbTableGateway.php) seems not to use locking either. But it saves the lifetime together with the session which seems like a good idea because you could have different lifetimes for different sessions.
- Implements session locking for MySQL, Postgres, Oracle, SQL Server and SQLite.
Only tested it for MySQL. So would be good if someone can confirm it works as intended on the other databases as well.
- Also removed the custom RuntimeException which is not useful and a PDOException extends RuntimeException anyway, so no BC break.
- I added a default for the table name to be in line with the DoctrineSessionHandler.
- Check session.gc_maxlifetime in read(). Imagine we have only ever one user on an app. If maxlifetime is not checked in read, his session would never expire! What I don't get is why PHP calls gc() after read() instead of calling it before... Strange decision. For this reason I also had to do the following to improve performance.
- I delay gc() to close() so that it is executed outside the transactional and blocking read-write process. This way, pruning expired sessions does not block them from being started while the current session is used.
- Fixed time update for Oracle and SQL Server.
Commits
-------
50ec828 [HttpFoundation] implement session locking for PDO
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] removed absolute paths from the generated container
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | first step to resolve#6484, #3079, and #9238
| License | MIT
| Doc PR | n/a
This PR converts absolute paths to relative ones in the dumped container. The code is a bit "ugly", but it gets the job done and I'm not sure that there is a more elegant way without breaking everything.
Commits
-------
c1450b4 [HttpKernel] removed absolute paths from the generated container
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed the initial state for options without value attribute
| 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
-------
78cff96 [DomCrawler] Fixed the initial state for options without value attribute
An option is marked as selected by the presence of the selected attribute,
not by the presence of a non-empty selected attribute. The same is true
for checked radio buttons or checkboxes.
This PR was merged into the 2.5-dev branch.
Discussion
----------
Update MessageSelector.php to show which value was passed
When the translator can't find a correct match using transChoice() a string is logged today with the following text:
<em>Unable to choose a translation for "[string]" with locale "[locale]". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</em>
This change introduces the value that was passed to transChoice() so the developer will have more information as to what value did not match any of the translation options:
<em>Unable to choose a translation for "[string]" with locale "[locale]" for value "[value]". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</em>
Commits
-------
af99997 Update MessageSelector.php to show which value was passed
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Yaml] Fixed YAML Parser does not ignore duplicate keys, violating YAML spec.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | **mayhaps**
| Deprecations? | no
| Tests pass? | yes
| Needs merge to | 2.4
| Fixed tickets | —
| License | MIT
| Doc PR | —
The current [YAML 1.2] specification clearly states:
> JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be.
The outdated [YAML 1.1] spec contained a crystal clear note on how the error of duplicate keys is to be handled by parsers, which is (sadly) no longer contained in the latest 1.2 spec (only leaving the requirement):
> It is an error for two equal keys to appear in the same mapping node. In such a case the YAML processor may continue, ignoring the second `key: value` pair and issuing an appropriate warning. This strategy preserves a consistent information model for one-pass and random access applications.
[YAML 1.2]: http://yaml.org/spec/1.2/spec.html#id2759572
[YAML 1.1]: http://yaml.org/spec/1.1/#id932806
Commits
-------
951acca Fixed YAML Parser does not ignore duplicate keys, violating YAML spec.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Validator] Updated outdated dependencies.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes tests for the ```Validator``` component when using it as a standalone library (when running ```phpunit``` from the ```src/Symfony/Component/Form``` directory.
Commits
-------
1984a36 [Validator] Updated outdated dependencies.
The current [YAML 1.2] specification clearly states:
> JSON's RFC4627 requires that mappings keys merely “SHOULD” be unique, while YAML insists they “MUST” be.
The outdated [YAML 1.1] spec contained a crystal clear note on how the error of duplicate keys is to be handled by parsers, which is (sadly) no longer contained in the latest 1.2 spec (only leaving the requirement):
> It is an error for two equal keys to appear in the same mapping node. In such a case the YAML processor may continue, ignoring the second `key: value` pair and issuing an appropriate warning. This strategy preserves a consistent information model for one-pass and random access applications.
[YAML 1.2]: http://yaml.org/spec/1.2/spec.html#id2759572
[YAML 1.1]: http://yaml.org/spec/1.1/#id932806
This PR was merged into the 2.4 branch.
Discussion
----------
[Form] Composer dependencies
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, launching tests from the Form component's directory doesn't work, due to missing dev dependencies. This should be merged back into master afterwards.
Also fixed a problem related to a bad method signature in ```Symfony\Component\Form\Tests\Extension\DataCollector\FormDataExtractorTest_SimpleValueExporter```
Commits
-------
7b5857c Fixed FormDataExtractorTest_SimpleValueExporter::exportValue not implementing the interface correctly
e4fa5d8 Updated form dev dependencies
* 2.4:
[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
Fixed incorrect regular plural for -ves words
[HttpKernel] Replace sha1 with sha256 in recently added tests.
This PR was squashed before being merged into the 2.3 branch (closes#10777).
Discussion
----------
[Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9976, #10203
| License | MIT
| Doc PR | none
Same issue as #9976 and #10203: when you add a `time` field to a form with options `single_text` (so HTML5) and `with_seconds`, the generated input does not contain the `step` attribute, therefore the browser does not show them, leading to an error at the submit because of an invalid format.
Compared to #9976/#10203:
* Unit testable
* Available directly in the component
* Available in other templating format than twig
* Still able to customise the step attribute by hand
Commits
-------
a379298 [Form] Automatically add step attribute to HTML5 time widgets to display seconds if needed
When the translator can't find a correct match using transChoice() a string is logged today with the following text:
<code>Unable to choose a translation for "<string>" with locale "<locale>". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</code>
This change introduces the value that was passed to transChoice() to the developer will have more information as to what value did not match any of the translation options:
<code>Unable to choose a translation for "<string>" with locale "<locale>" for value "<value>". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").</code>
* 2.4:
Disable 5.6 until it is stable again.
Update the fixtures.
fixed CS
[HttpKernel] fixed default TTL not applied under certain conditions
Added test when TTL has expired
[DomCrawler] Fixed image input case sensitive
* 2.3:
Disable 5.6 until it is stable again.
Update the fixtures.
[HttpKernel] fixed default TTL not applied under certain conditions
Added test when TTL has expired
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] Fix a console test
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
re #10714
Every wide character in the fixture file is actually 3 ansi-characters long.
Commits
-------
61108b9 Disable 5.6 until it is stable again.
8cadb49 Update the fixtures.
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Fixed cache behavior when TTL has expired and a default "global" TTL is defined
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #8232, #10822, #9919
| License | MIT
From #9919:
"When the cache is stale the `validate` method `forward` the request to the backend. A new response will be created with or without TTL configuration. If the TTL was not set then the default one should be set like in the `fetch` method."
This PR fixes this issue, the tests provided in #9919 pass, and I've tweaked them to avoid the costly sleep calls.
Commits
-------
e3983e8 [HttpKernel] fixed default TTL not applied under certain conditions
bc42dae Added test when TTL has expired
* 2.4:
Lower mbstring dependency
[Console]Improve formatter for double-width character
Lower mbstring dep, remove it for Yaml and CssSelector components
[Security] Add check for supported attributes in AclVoter
[Form] Fixed TrimListenerTest as of PHP 5.5
Added more IDE links
[DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
[Security] fixed wrong PHPDoc of the TokenGeneratorInterface
[Finder] fixed typehint of the Finder::addAdapter() method
[TwigBridge][Transchoice] set %count% from the current context.
[DependencyInjection] Fix travis unit tests
Update PHPUnit before run
[Validator] fixed wrong test
[WebProfilerBundle] added test case for #10773
[WebProfilerBundle] fixed profiler homepage, fixed#10806
[WebProfilerBundle] Added test case for #10806
changed travis to run on the nightly builds of HHVM until everything gets stable
Fixed issue #5427
Allow URLs that don't contain a path
Conflicts:
.travis.yml
src/Symfony/Component/Console/Application.php
* 2.3:
[Console]Improve formatter for double-width character
Lower mbstring dep, remove it for Yaml and CssSelector components
[Security] Add check for supported attributes in AclVoter
[Form] Fixed TrimListenerTest as of PHP 5.5
Added more IDE links
[DependencyInjection] Fix parameter description in ConfigurationExtensionInterface
[Finder] fixed typehint of the Finder::addAdapter() method
[TwigBridge][Transchoice] set %count% from the current context.
[DependencyInjection] Fix travis unit tests
Update PHPUnit before run
[Validator] fixed wrong test
[WebProfilerBundle] added test case for #10773
[WebProfilerBundle] fixed profiler homepage, fixed#10806
[WebProfilerBundle] Added test case for #10806
changed travis to run on the nightly builds of HHVM until everything gets stable
Fixed issue #5427
Allow URLs that don't contain a path
Conflicts:
.travis.yml
This PR was merged into the 2.3 branch.
Discussion
----------
Lower mbstring dep, remove it for Yaml and CssSelector components
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Commits
-------
a4b805d Lower mbstring dep, remove it for Yaml and CssSelector components
This PR was squashed before being merged into the 2.3 branch (closes#10714).
Discussion
----------
[Console]Improve formatter for double-width character
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes for one that expecting current broken output
| Deprecations? | no
| Fixed tickets |
| Tests pass? | yes
| License | MIT
| Doc PR |
EDIT: fixed the table above not to remove irrelevant line
As mb_strlen just returns "how many chars in the string",
formatting with double-width character is bit broken.
The test I add is skipped when mbstring extension is not loaded.
I'm afraid if some of you cannot properly display japanese string.
(表示するテキスト just means "Some text to display")
Commits
-------
a52f41d [Console]Improve formatter for double-width character
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed TrimListenerTest as of PHP 5.5
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
b0bc83d [Form] Fixed TrimListenerTest as of PHP 5.5
This PR was merged into the 2.5-dev branch.
Discussion
----------
[DependencyInjection] GraphvizDumper now displays unresolved parameters
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Previously, the graphviz dumper would throw an exception if given a container with an unresolved parameter. This change allows it to render the parameter name instead of the class name if the class can not be resolved. This is also closer to the other DI dumpers which do not error out in these circumstances but simply carry the parameter name over.
For a practical use case, see: https://github.com/rosstuck/TuckConverterBundle/issues/1
Commits
-------
f800e15 GraphizDumper now displays unresolved parameters
This PR was merged into the 2.3 branch.
Discussion
----------
[BrowserKit] Allow URLs that don't contain a path when creating a cookie from a string
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The Cookie class doesn't require a path, but the `fromString()` static method does, so when URL given is something like http://www.example.com (ie no trailing slash) it currently throws an exception. This PR removes the requirement.
Commits
-------
fc1223f Allow URLs that don't contain a path
Previously it would crash when given a container with an unresolved
parameter. This change will instead show the parameter name on the
final diagram, instead of the class name.
| Q | A
| ------------- | ---
| Fixed tickets | #10845
| License | MIT
This fixes the description of parameter `array $config` in file ConfigurationExtensionInterface.php by removing the extra `$config`.
This PR was merged into the 2.3 branch.
Discussion
----------
Fix a test that was ambiguous
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see #9634 for a discussion of this and #9383 for the report
| License | MIT
| Doc PR | n/a
This PR fixes a test that was always passing as the exception catch was catching the PHP notice but also the exception sent by `fail`, so it was useless. That said, I'm not even convinced that this test is useful at all.
Commits
-------
a94b4e0 [Validator] fixed wrong test
This PR was merged into the 2.5-dev branch.
Discussion
----------
Fixed composer to include config component for mocks in phpunit
Commits
-------
939e92d Fixed composer to include config component for mocks in phpunit
* 2.4:
[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix#10292
Allow File instance to be passed to BinaryFileResponse
Add upgrade instructions for the LoggerInterface
fixed CS
Removed strict check when found variables inside a translation
[ExpressionLanguage] Test for the non-strict in_array check in parsePrimaryExpression in Parser.php
Strict in_array check in Parser.php
Updated Serbian latin validation translation
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
* 2.3:
[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix#10292
Allow File instance to be passed to BinaryFileResponse
Add upgrade instructions for the LoggerInterface
fixed CS
Removed strict check when found variables inside a translation
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] Fix#10795: Allow instancing Console Application when STDIN is not declared
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10795
| License | MIT
Commits
-------
3a5a525 [Console] Fix#10795: Allow instancing Console Application when STDIN is not declared
* 2.4:
bumped Symfony version to 2.4.5
updated VERSION for 2.4.4
updated CHANGELOG for 2.4.4
bumped Symfony version to 2.3.14
updated VERSION for 2.3.13
update CONTRIBUTORS for 2.3.13
updated CHANGELOG for 2.3.13
Updated Serbian validation translation
[Console] Fixed the rendering of exceptions on HHVM with a terminal width
[WebProfilerBundle ] Fixed an edge case on WDT loading
[Security] removed $csrfTokenManager type hint from SimpleFormAuthenticationListener constructor argument
fixed typo
[Process] Disable TTY mode on Windows platform
[Validator] added missing ANNOTATION config to @Target annotation
[Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
bumped Symfony version to 2.3.14
updated VERSION for 2.3.13
update CONTRIBUTORS for 2.3.13
updated CHANGELOG for 2.3.13
[Console] Fixed the rendering of exceptions on HHVM with a terminal width
[WebProfilerBundle ] Fixed an edge case on WDT loading
fixed typo
[Process] Disable TTY mode on Windows platform
[Validator] added missing ANNOTATION config to @Target annotation
[Finder] Fix ignoring of unreadable dirs in the RecursiveDirectoryIterator.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Validator/Constraints/Callback.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Disable TTY mode on Windows platform
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
7942c2a [Process] Disable TTY mode on Windows platform
* 2.4:
fix docblock
Fixed incompatibility of x509 auth with nginx
[Process] Setting STDIN while running should not be possible
[Validator] slovenian translation updated
[FrameworkBundle] improve English in RouterMatchCommand
[Validator] Updated Hungarian translations
[Doctrine Bridge] simplify session handler by using main connection
[Validator] Fixed typos in German translation
[Validator] Completed French translations
[Validator] Completed German translations
[Validator] Completed Luxembourgish translations
* 2.3:
fix docblock
Fixed incompatibility of x509 auth with nginx
[Process] Setting STDIN while running should not be possible
[FrameworkBundle] improve English in RouterMatchCommand
[Doctrine Bridge] simplify session handler by using main connection
Conflicts:
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Setting STDIN while running should not be possible
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
Commits
-------
3e3517a [Process] Setting STDIN while running should not be possible
This PR was merged into the 2.4 branch.
Discussion
----------
[Validator] Completed German translations
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
47e5a4b [Validator] Completed German translations
* 2.4:
Little correction for case 'ar'
No need to use mb functions here
Fix doc-blocks
Fix doc blocks
[HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
[Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
[Finder] Marked test skipped when ftp stream wrapper is not available
Conflicts:
src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php
* 2.3:
Little correction for case 'ar'
No need to use mb functions here
[HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
[Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
[Finder] Marked test skipped when ftp stream wrapper is not available
This PR was merged into the 2.3 branch.
Discussion
----------
[Finder] Marked test skipped when ftp stream wrapper is not available
| Q | A
| ---------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This should prevent test from failing on hhvm as ftp stream wrapper is not currently implemented.
See https://github.com/facebook/hhvm/issues/2108 for more details.
Commits
-------
f35fc81 [Finder] Marked test skipped when ftp stream wrapper is not available
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Fix DbalSessionHandler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
This is basically the same as #10652 for the DbalSessionHandler.
- First commit fixes fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite).
- Second commit updates phpdoc of SessionHandlerInterface and unifies parameters of all handlers according to interface (so inheritdoc actually makes sense).
Commits
-------
524bf84 [HttpFoundation] update phpdoc of SessionHandlerInterface and unify parameters of all handlers according to interface
ccdfbe6 [Doctrine Bridge] fix DbalSessionHandler for high concurrency, interface compliance, compatibility with all drivers (oci8, mysqli, pdo with mysql, sqlsrv, sqlite)
This PR was merged into the 2.4 branch.
Discussion
----------
[2.4] Fix doc blocks
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
this follows #10737
Commits
-------
c01915d Fix doc blocks
* 2.4:
unified return null usages
[Validator] added Japanese translation
Textarea value should default to empty string instead of null.
Fix doc blocks
[Process] Fix#10681, process are failing on Windows Server 2003
updated doc
[Security] fix DBAL connection typehint
[HttpFoundation] status 201 is allowed to have a body
unified return null usages
Conflicts:
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
* 2.3:
Textarea value should default to empty string instead of null.
Fix doc blocks
[Process] Fix#10681, process are failing on Windows Server 2003
[Security] fix DBAL connection typehint
[HttpFoundation] status 201 is allowed to have a body
unified return null usages
Conflicts:
src/Symfony/Component/Console/Helper/DescriptorHelper.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php
This PR was merged into the 2.3 branch.
Discussion
----------
unified return null usages
| Q | A
| ------------- | ---
| License | MIT
This PR unifies the way we return `null` from a function or method:
* always use `return;` instead of `return null;` (the current code base uses both);
* never use `return;` at the end of a function/method.
Commits
-------
d1d569b unified return null usages
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpFoundation] factorize out the way output buffers should be closed
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Closing output buffers was done in three different files, but not exactly the same way, with subtle differences.
This PR factorizes out the best way to do this in a new public static function of the Response class.
Commits
-------
469943c [HttpFoundation] factorize out the way output buffers should be closed
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] status 201 is allowed to have a body
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | only if someone relied on wrong behavior
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10673
| License | MIT
Status 201 is allowed to have a response body.
Commits
-------
1761f64 [HttpFoundation] status 201 is allowed to have a body
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Fix#10681, process are failing on Windows Server 2003
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10681
| License | MIT
Commits
-------
46fdfbb [Process] Fix#10681, process are failing on Windows Server 2003
* 2.4:
made types consistent with those defined in Hack
made {@inheritdoc} annotations consistent across the board
made {@inheritdoc} annotations consistent across the board
fixed types in phpdocs
[Debug] Fixed ClassNotFoundFatalErrorHandler on windows.
made phpdoc types consistent with those defined in Hack
Add support Thai translations
[Validator] Add missing czech translations
made types consistent with those defined in Hack
removed extra/unsupported arguments
[HttpKernel] fixed an error message
[TwigBundle] removed undefined argument
[Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.
Conflicts:
src/Symfony/Component/Console/Helper/TableHelper.php
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/Form/FormError.php
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
src/Symfony/Component/Process/ProcessPipes.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
src/Symfony/Component/Translation/Dumper/FileDumper.php
src/Symfony/Component/Validator/ConstraintViolation.php
src/Symfony/Component/Validator/Constraints/EmailValidator.php
src/Symfony/Component/Validator/ExecutionContextInterface.php
src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php
* 2.3:
made {@inheritdoc} annotations consistent across the board
fixed types in phpdocs
made phpdoc types consistent with those defined in Hack
Add support Thai translations
made types consistent with those defined in Hack
removed extra/unsupported arguments
[HttpKernel] fixed an error message
[TwigBundle] removed undefined argument
[Translation] Make IcuDatFileLoader/IcuResFileLoader::load invalid resource compatible with HHVM.
Conflicts:
src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
src/Symfony/Component/Config/Definition/ReferenceDumper.php
src/Symfony/Component/Console/Helper/DescriptorHelper.php
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
src/Symfony/Component/Form/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformer.php
src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php
src/Symfony/Component/HttpFoundation/Response.php
src/Symfony/Component/HttpFoundation/StreamedResponse.php
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php
src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php
src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php
src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
src/Symfony/Component/Stopwatch/StopwatchPeriod.php
src/Symfony/Component/Translation/TranslatorInterface.php
src/Symfony/Component/Validator/ConstraintValidatorFactory.php
This PR was merged into the 2.3 branch.
Discussion
----------
made {@inheritdoc} annotations consistent across the board
| Q | A
| ------------- | ---
| License | MIT
Commits
-------
810b9ed made {@inheritdoc} annotations consistent across the board
Because $path is realpath'ed. So we have to use DIRECTORY_SEPARATOR
instead of / because the default directory separator on windows is
\. And so the str_replace can not work and can lead to a fatal error
because class could already be loaded. For example, the Response class
in symfony full stack is in the bootstrap.php.cache.
This PR was merged into the 2.3 branch.
Discussion
----------
Made types used by Symfony compatible with the ones of Hack
| 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
PHP supports several ways to express types: like Boolean/bool or integer/int. Hack only supports one of them, so this PR proposes to use the Hack type to make Symfony a bit more "compatible" with Hack (gradual upgrade ;)).
Commits
-------
3c9c10f made phpdoc types consistent with those defined in Hack
0555b7f made types consistent with those defined in Hack
This PR was squashed before being merged into the 2.3 branch (closes#10708).
Discussion
----------
Add support Thai translations
Add [Thai](http://www.thai-language.com/) translations to:
+ Symfony/Component/Validator/Resources/translations/
+ Symfony/Component/Security/Resources/translations/
Commits
-------
4bc2951 Add support Thai translations
* 2.4:
[Validator] Fix hack for nested Collection/All losing context
[Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
[Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
[HttpKernel] Added the resource ID when printing a resource in the DataCollector
[HttpFoundation] use insert or replace for sqlite session handler
[HttpFoundation] use MERGE SQL for MS SQL Server session storage
[HttpFoundation] fix PDO session handler under high concurrency
Conflicts:
src/Symfony/Component/Validator/Tests/ExecutionContextTest.php
* 2.3:
[Config] Fix NodeBuilderTest::testNumericNodeCreation to use BaseNodeBuilder alias.
[Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
[HttpKernel] Added the resource ID when printing a resource in the DataCollector
[HttpFoundation] use insert or replace for sqlite session handler
[HttpFoundation] use MERGE SQL for MS SQL Server session storage
[HttpFoundation] fix PDO session handler under high concurrency
Conflicts:
src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] fix PDO session handler under high concurrency
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8448 and http://trac.symfony-project.org/ticket/4777 (which was never really fixed as you can see here)
| License | MIT
- The first commit fixes PDO session handler under high concurrency.
- The second commit uses MERGE SQL for MS SQL Server. Tested with http://sqlfiddle.com/#!6/66b6d/14
- The third commit uses INSERT OR REPLACE for sqlite session handler http://sqlfiddle.com/#!7/e6707/3
What I find rather bad with the class design is that it depends on the table definition, but it's not part of the class. Also it doesn't make use of open() and close() which could be used to make the database connection lazy instead of having is open all the time when not needed. Doctrine also only lazy connects, but we use PDO directly here.
Furthermore, the session handlers should not throw exceptions, from what I read, but return false when an error occurs. This is not followed in this class. Maybe @drak knows how php session management behaves when the session handlers return false?
Commits
-------
5c08e29 [HttpFoundation] use insert or replace for sqlite session handler
05ea19a [HttpFoundation] use MERGE SQL for MS SQL Server session storage
e58d7cf [HttpFoundation] fix PDO session handler under high concurrency
This PR was merged into the 2.3 branch.
Discussion
----------
[Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
eea9d24 [Profiler] Prevent throwing fatal errors when searching timestamps or invalid dates
* 2.4:
Update MimeTypeExtensionGuesser.php
[Validator] Add missing polish translations
[Validator] Added missing strings from Image validator
[Templating] PhpEngine should propagate charset to its helpers
Fix ticket #10663 - Added setCharset method call to PHP templating engine.
Changed the typehint of the EsiFragmentRenderer to the interface
[Form] Improved test coverage of UrlType
[BrowserKit] Fix#10641 : BrowserKit is broken when using ip as host
* 2.3:
Update MimeTypeExtensionGuesser.php
[Templating] PhpEngine should propagate charset to its helpers
Fix ticket #10663 - Added setCharset method call to PHP templating engine.
Changed the typehint of the EsiFragmentRenderer to the interface
[Form] Improved test coverage of UrlType
[BrowserKit] Fix#10641 : BrowserKit is broken when using ip as host
Conflicts:
src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
src/Symfony/Component/Templating/PhpEngine.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Templating] PhpEngine should propagate charset to its helpers
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10666
| License | MIT
Commits
-------
ed9e48b [Templating] PhpEngine should propagate charset to its helpers
This PR was merged into the 2.3 branch.
Discussion
----------
[BrowserKit] Fix#10641 : BrowserKit is broken when using ip as host
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10641
| License | MIT
As documented in http://php.net/manual/en/function.preg-replace.php, we have to use the `$` notation for replacing the backreference
>When working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a matched pattern), you cannot use the familiar \\1 notation for your backreference. \\11, for example, would confuse preg_replace() since it does not know whether you want the \\1 backreference followed by a literal 1, or the \\11 backreference followed by nothing. In this case the solution is to use \${1}1. This creates an isolated $1 backreference, leaving the 1 as a literal.
Commits
-------
e946da3 [BrowserKit] Fix#10641 : BrowserKit is broken when using ip as host
* 2.4:
Revert PHPUnit version, revert APC configuration
removed APC on the CLI for Travis as it does not work well with PHPUnit and Composer anyway
[Security] Replace exception mocks with actual exception instances.
Remove an unused argument.
Use `Filesystem::chmod` instead of `chmod` when dumping file
[Form] Added test for disabling buttons
[Form] Added check for parent disabled status in Button form elements
Fixes URL validator to accept single part urls
tweaked Travis configuration to get more tests running
fixed float comparison in unit tests for HHVM
upgraded PHPUnit to version 4 for better HHVM support
[Process] fixed HHVM usage on the CLI
Fix class names in ApcUniversalClassLoader tests.
fixed the profiler when an uncalled listener throws an exception when instantiated
fixed CS
Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
Fixed bug in ChoiceType triggering a warning when not using utf-8
fixed CS
Avoid levenshtein comparison when using ContainerBuilder.
* 2.3:
Revert PHPUnit version, revert APC configuration
removed APC on the CLI for Travis as it does not work well with PHPUnit and Composer anyway
[Security] Replace exception mocks with actual exception instances.
Remove an unused argument.
Use `Filesystem::chmod` instead of `chmod` when dumping file
[Form] Added test for disabling buttons
[Form] Added check for parent disabled status in Button form elements
Fixes URL validator to accept single part urls
tweaked Travis configuration to get more tests running
fixed float comparison in unit tests for HHVM
upgraded PHPUnit to version 4 for better HHVM support
[Process] fixed HHVM usage on the CLI
Fix class names in ApcUniversalClassLoader tests.
fixed the profiler when an uncalled listener throws an exception when instantiated
fixed CS
Added test case for 4c6a2d15095c13b2a35751b2b2712b183be489c4
Fixed bug in ChoiceType triggering a warning when not using utf-8
fixed CS
Avoid levenshtein comparison when using ContainerBuilder.
Conflicts:
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
[DependencyInjection] Use DOM instead of SimpleXML for namespace support
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9345
| License | MIT
This PR replaces #9350
Commits
-------
a3c60c8 [DependencyInjection] Deprecate SimpleXMLElement
33c91f9 [DependencyInjection] Use DOM instead of SimpleXML for namespace support
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] added a better way to ask questions to the user
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | not yet
This PR replaces #9811
- [x] add missing phpdocs
- [x] add unit tests
- [ ] submit doc PR
Commits
-------
336bba2 [Console] Add docblocks and unit tests to QuestionHelper
c413f89 [Console] added a better way to ask questions to the user
This PR was merged into the 2.5-dev branch.
Discussion
----------
[PropertyAccessor] Wrong number of parameters
| 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
Since [6d2af217aafd03e3f1600ce0ebc9c30cf0a7fc70#diff-3e45cf556c0330623c0167841d303dff](6d2af217aa (diff-3e45cf556c0330623c0167841d303dff)) the PropertyAccessor is failing on setters with default values because [ReflectionFunctionAbstract::getNumberOfRequiredParameters](http://www.php.net/manual/es/reflectionfunctionabstract.getnumberofparameters.php) only count the parameters without default values.
Commits
-------
6157be0 Wrong number of parameters
It is done for two reasons:
* consistency - we use real exception objects in most of the code
* latest phpunit does not like the way we were creating mocks for exceptions (it could be also fixed by letting phpunit to call the original constructor)
This PR was merged into the 2.3 branch.
Discussion
----------
Fixes URL validator to accept single part urls
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #3207#6817
| License | MIT
| Doc PR | N/A
This PR replaces #6817 and has been rebased for 2.3, making a change to the regex to be simpler for single dot matches. (changing `([\pL\pN\pS-\.])+([\.]{0,1}[\pL]+[\.]{0,1})` to `([\pL\pN\pS-\.])+(\.?[\pL]+\.?)`)
Commits
-------
91e226e Fixes URL validator to accept single part urls
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Use `Filesystem::chmod` instead of `chmod` when dumping file
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This adds consistency as discussed in ca5eea5c19 (commitcomment-5804089)
Commits
-------
c2ffefd Use `Filesystem::chmod` instead of `chmod` when dumping file
This PR was merged into the 2.5-dev branch.
Discussion
----------
[WIP][Validator] New NodeTraverser implementation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | TODO
| License | MIT
| Doc PR | TODO
This PR is ready for review.
#### Todo
- [x] Test extensively to avoid regressions
- [x] Test more extensively
- [x] Finish inline documentation
- [x] Provide a layer to choose the desired API through ValidatorBuilder
- [x] Provide a layer to choose the desired API through FrameworkBundle
- [x] Update UPGRADE file
- [x] Update CHANGELOG
- [ ] Update user documentation
#### Goal
The goal of this PR is to be able to fix the following tickets:
- [x] #6138 Simplify adding of constraint violations
- [x] #7146 Support group sequences in Validator API
- [x] #7432 Poorly implemented Visitor Pattern
- [x] #8617 Control traversal on class level
- [x] #9888 Improve support for collection validation (PR: #9988)
The following tickets are probably fixed, but require testing first:
- [ ] #8376 Using validation_group causes error message to display multiple times
- [ ] #9939 GroupSequences still execute next group if first fail
Of course, full backwards compatibility **must** be guaranteed.
Other tickets I want to fix in follow-up PRs:
* #3622 Constraints\Valid does not respect "groups" option
* #4453 walk constraints by groups
* #7700 Propagate implicit group names in constraints
* #9051 Always ask value event if field isn't in the validating group
* #10163 poor collection validation test coverage
* #10221 TypeValidator does not enforce desired type when value is NULL
* #10495 Class Valid Constraint can't be used on a Form Type
#### In a nutshell
The implementation removes the Visitor pattern, which was implemented badly. I tried fixing it via a NodeTraverser/NodeVisitor implementation, but performance degraded too much so I decided to remove the pattern altogether.
A couple of new features and bug fixes are possible thanks to the new implementation. See below for details.
#### PHP Versions
PHP 5.3.8 and older does not allow to implement two different interfaces which both contain a method with the same name. This is used in the compatibility layer that supports both the old and the new API.
For this reason, the compatibility layer is disabled on PHP < 5.3.9. Older PHP versions need to decide on the old API or the new API (without compatibility layer).
#### Choosing the API Version
The API version can be specified by one of `Validation::API_VERSION_2_4`, `Validation::API_VERSION_2_5` and `Validation::API_VERSION_2_5_BC` to `setApiVersion()` when building the validator:
```php
// Old implementation
$validator = Validation::createValidatorBuilder()
->setApiVersion(Validation::API_VERSION_2_4)
->getValidator();
// New implementation with BC API
// Does not work on PHP < 5.3.9
$validator = Validation::createValidatorBuilder()
->setApiVersion(Validation::API_VERSION_2_5)
->getValidator();
// New implementation without BC API
$validator = Validation::createValidatorBuilder()
->setApiVersion(Validation::API_VERSION_2_5_BC)
->getValidator();
```
#### Features
##### Constraint validation as first-class citizen
The new API merges `validateValue()` and `validate()`. The idea is that the validation of values against constraints should be as simple as possible. Object validation is a special case where an object is tested against the `Valid` constraint. A backwards compatibility layer is provided to use both `validate()` and `validateValue()` with the old signature.
```php
// Validate against explicit constraints
$violations = $validator->validate($firstName, array(
new NotNull(),
new Length(array('min' => 3)),
));
// Validate against metadata
$violations = $validator->validate($object);
// Same, more expressive notation
$violations = $validator->validate($object, new Valid());
// Validate each entry against its metadata
$violations = $validator->validate($array);
```
##### Aggregate violations
It is now possible to call the methods of the validator multiple times and aggregate the violations to a common violation list. To do so, call `startContext()`, execute the calls and call `getViolations()` in the end to retrieve the violations:
```php
$violations = $validator->startContext()
->validate($title, new NotNull())
->validate($text, new NotNull())
->validate($author->getName(), new NotNull())
->getViolations()
```
Most of the time, you will want to specify a property path for each validation. Use the method `atPath()` for that:
```php
$violations = $validator->startContext()
->atPath('title')->validate($title, new NotNull())
->atPath('text')->validate($text, new NotNull())
->atPath('author.name')->validate($author->getName(), new NotNull())
->getViolations()
```
##### Control the context of nested validations
In Symfony <= 2.4, you can validate objects or constraints from within a constraint validator like this:
```php
$this->context->validate($object);
$this->context->validateValue($value, new Length(array('min' => 3)));
```
The validations will run and all violations will be added to the current context.
This way, it is impossible though to validate something, inspect the result and then decide what kind of violations to add to the context. This is needed, for example, for the `Some` constraint (proposed in #9888), which should succeed if any of the validated values did *not* generate violations.
For this reason, the new context API features a method `getValidator()`. This method returns the validator instance, you can use it to validate anything in a new context (as the validator always does):
```php
$validator = $this->context->getValidator();
$violations = $validator->validate($object);
if (count($violations) > 0) {
$this->context->addViolation('The validation did not pass');
}
```
You can also explicitly start a new context:
```php
$validator = $this->context->getValidator();
$violations = $validator->startContext()
->atPath('title')->validate($title, new NotNull())
->atPath('text')->validate($text, new NotNull())
->getViolations()
```
If you want to execute the validation in the current context, use the `inContext()` method of the validator instead:
```php
// violations are added to $this->context
$validator->inContext($this->context)
->atPath('title')->validate($title, new NotNull())
->atPath('text')->validate($text, new NotNull())
;
```
With this feature, #9888 (especially the PR for it: #9988) can be finished.
##### Custom group sequences (#7146)
It is now possible to pass `GroupSequence` instances whenever you can pass a group to the validator. For example:
```php
$violations = $validator->validate($object, new Valid(), new GroupSequence('Basic', 'Strict'));
```
Or in the context of the Form component:
```php
$form = $this->createForm(new BlogType(), new Blog(), array(
'validation_groups' => new GroupSequence('Basic', 'Strict'),
));
```
##### Constraint violation builders (#6138)
The API for adding constraint violations was simplified:
```php
$this->context->addViolation('message', array('param' => 'value'));
// or
$this->context->buildViolation('message')
->atPath('property')
->setParameter('param', 'value')
->setTranslationDomain('validation_strict')
->addViolation();
```
##### Control traversal at class level (#8617)
Currently, it is possible whether to traverse a `Traversable` object or not in the `Valid` constraint:
```php
/**
* @Assert\Valid(traverse=true)
*/
private $tags = new TagList();
```
(actually, `true` is the default)
In this way, the validator will iterate the `TagList` instance and validate each of the contained objects. You can also set "traverse" to `false` to disable iteration.
What if you want to specify, that `TagList` instances should always (or never) be traversed? That's currently not possible.
With this PR, you can do the following:
```php
/**
* @Assert\Traverse(false)
*/
class TagList implements \IteratorAggregate
{
// ...
}
```
#### Follow-up features
Features of the follow-up PRs will be described directly there.
#### Backwards compatibility
I implemented a new `AbstractValidatorTest` which tests both the old and the new implementation for compatibility. I still want to extend this test to make sure we don't introduce any regressions.
Almost none of the existing classes were modified (or only slightly). If users depend on the current (now "legacy") implementation, they will have the choice to continue using it until 3.0 (of course, without the new features).
#### Your task
Congrats, you made it till here :) If you have time, please skim over the code and give me feedback on the overall implementation and the class/method names. Again, no feedback on details yet, there are quite a few areas in the code that are still work in progress.
Thanks,
Bernhard
[1] That means that only the nodes from the root of the graph until the currently validated node are held in memory.
Commits
-------
ca6a722 [Validator] Converted `@deprecate` doc comment into regular doc comment
68d8018 [Validator] Documented changes in the UPGRADE files
b1badea [Validator] Fixed failing CsrfFormLoginTest
0bfde4a [Validator] Fixed misnamed method calls in FrameworkExtension
3dc2b4d [Validator] Made "symfony/property-access" an optional dependency
c5629bb [Validator] Added getObject() to ExecutionContextInterface
9b204c9 [FrameworkBundle] Implemented configuration to select the desired Validator API
0946dbe [Validator] Adapted CHANGELOG
1b111d0 [Validator] Fixed typos pointed out by @cordoval
7bc952d [Validator] Improved inline documentation of RecursiveContextualValidator
166d71a [Validator] Removed unused property
90c27bb [Validator] Removed traverser implementation
3183aed [Validator] Improved performance of cache key generation
029a716 [Validator] Moved logic of replaceDefaultGroup() to validateNode()
2f23d97 [Validator] Reduced number of method calls on the execution context
73c9cc5 [Validator] Optimized performance by calling spl_object_hash() only once per object
94ef21e [Validator] Optimized use statements
1622eb3 [Validator] Fixed reference to removed class in ValidatorBuilder
be508e0 [Validator] Merged DefaultGroupReplacingVisitor and ContextUpdateVisitor into NodeValidationVisitor
50bb84d [Validator] Optimized RecursiveContextualValidator
eed29d8 [Validator] Improved performance of *ContextualValidator::validate()
5c479d8 [Validator] Simplified validateNodeForGroup
eeed509 [Validator] Improved phpdoc of RecursiveValidator
274d4e6 [Validator] Changed ValidatorBuilder to always use LegacyExecutionContext
38e26fb [Validator] Decoupled RecursiveContextualValidator from Node
23534ca [Validator] Added a recursive clone of the new implementation for speed comparison
f61d31e [Validator] Fixed grammar
886e05e [Validator] Removed unused use statement
93fdff7 [Validator] The supported API versions can now be passed to the ValidatorBuilder
987313d [Validator] Improved inline documentation of the violation builder
79387a7 [Validator] Improved inline documentation of the metadata classes
01ceeda [Validator] Improved test coverage of the Traverse constraint
9ca61df [Validator] Improved inline documentation of CascadingStrategy and TraversalStrategy
524a953 [Validator] Improved inline documentation of the validators
9986f03 [Validator] Added inline documentation for the PropertyPath utility class
be7f055 [Validator] Visitors may now abort the traversal by returning false from beforeTraversal()
299c2dc [Validator] Improved test coverage and prevented duplicate validation of constraints
186c115 [Validator] Improved test coverage of NonRecursiveNodeTraverser
822fe47 [Validator] Completed inline documentation of the Node classes and the NodeTraverser
dbce5a2 [Validator] Updated outdated doc blocks
8558377 [Validator] Added deprecation notes
e8fa15b [Validator] Fixed the new validator API under PHP < 5.3.9
2936d10 [Validator] Removed unused use statement
6fc6ecd [Validator] Fixed tests under PHP<5.3.9
778ec24 [Validator] Removed helper class Traversal
76d8c9a [Validator] Fixed typos
4161371 [Validator] Removed unused use statements
aeb6822 [Validator] Improved visitor names
08172bf [Validator] Merged validate(), validateObject() and validateObjects() to simplify usage
51197f6 [Validator] Made traversal of Traversables consistent
117b1b9 [Validator] Wrapped collections into CollectionNode instances
94583a9 [Validator] Changed NodeTraverser to traverse nodes iteratively, not recursively
cf1281f [Validator] Added "Visitor" suffix to all node visitors
230f2a7 [Validator] Fixed exception message
e057b19 [Validator] Decoupled ContextRefresher from ExecutionContext
e440690 [Validator] Renamed validateCollection() to validateObjects()
df41974 [Validator] Changed context manager to context factory
26eafa4 [Validator] Removed unused use statements
bc29591 [Validator] Clearly separated classes supporting the API <2.5/2.5+
a3555fb [Validator] Fixed: Objects are not traversed unless they are instances of Traversable
2c65a28 [Validator] Completed test coverage and documentation of the Node classes
9c9e715 [Validator] Completed documentation of GroupManagerInterface
1e81f3b [Validator] Finished test coverage and documentation of ExecutionContextManager
feb3d6f [Validator] Tested the validation in a separate context
718601c [Validator] Changed validateValue() to validate() in the new API
ee1adad [Validator] Implemented handling of arrays and Traversables in LegacyExecutionContext::validate()
09f744b [Validator] Implemented BC traversal of traversables through validate()
297ba4f [Validator] Added a note why scalars are passed to cascadeObject() in NodeTraverser
9b07b0c [Validator] Implemented BC validation of arrays through validate()
405a03b [Validator] Updated deprecation notes in GroupSequence
499b2bb [Validator] Completed test coverage of ExecutionContext
adc1437 [Validator] Fixed failing tests
4ea3ff6 [Validator] Finished inline documentation of ExecutionContext[Interface]
f6b7288 [Validator] Removed unused use statement
8318286 [Validator] Completed GroupSequence implementation
5fbf848 [Validator] Added note about Callback constraint to CHANGELOG
c1b1e03 [Validator] Added TODO reminder
8ae68c9 [Validator] Made tests green (yay!)
680f1ee [Validator] Renamed $params to $parameters
321d5bb [Validator] Throw exception if ObjectInitializer is constructed without visitors
1156bde [Validator] Extracted code for group sequence resolving into GroupSequenceResolver
b1a9477 [Validator] Added ObjectInitializer visitor
7e3a41d [Validator] Moved visitors to NodeVisitor namespace
a40189c [Validator] Decoupled the new classes a bit
a6ed4ca [Validator] Prototype of the traverser implementation
25cdc68 [Validator] Refactored ValidatorTest and ValidationVisitorTest into an abstract validator test class
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] Accept interfaces to be passed to "data_class"
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8669
| License | MIT
| Doc PR | -
Commits
-------
b44e07b [Form] Added test case for 4759e062ed004749dbdc2ba31aef0f8ac2601895
7bc7a8a [Form] Accept interfaces to be passed to "data_class"
This PR was merged into the 2.5-dev branch.
Discussion
----------
[PropertyAccess] Added isReadable() and isWritable()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8659
| License | MIT
| Doc PR | symfony/symfony-docs#3729
This PR introduces BC breaks that are described in detail in the UPGRADE file. The BC breaks conform to our policy. They shouldn't affect many people, so I think we can safely do them.
Commits
-------
f7fb855 [PropertyAccess] Added missing exceptions to phpdoc
9aee2ad [PropertyAccess] Removed the argument $value from isWritable()
4262707 [PropertyAccess] Fixed CS and added missing documentation
6d2af21 [PropertyAccess] Added isReadable() and isWritable()
20e6bf8 [PropertyAccess] Refactored PropertyAccessorCollectionTest
0488389 [PropertyAccess] Refactored PropertyAccessorTest
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] ObjectChoiceList now compares choices by their value, if a value path is given
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8825
| License | MIT
| Doc PR | -
Commits
-------
ce0efb1 [Form] ObjectChoiceList now compares choices by their value, if a value path is given
The traverser is too slow compared to the current, recursive approach.
Testing showed a performance decrease of about 70% without a lot of
optimization potential.
This is necessary because, until Symfony 3.0, constraint validators will continue
to rely on the old context methods in order to be backwards compatible.
In this way, the deep method call chains are avoided. Also, it is possible to
avoid the many calls to leaveNode(), which are currently not really needed.
The current context is not stored anymore. Instead, it is passed around the traverser
and the visitors. For this reason, validation can occur in multiple contexts at the
same time.
The validation of values against constraints should be a first-class citizen
in the API. For this reason, validate() now takes a value and a constraint or
a list of constraints. This method should be used for the most basic use
cases.
If users want to annotate objects with constraints (this is optional,
advanced functionality), they can use the more expressive validateObject()
method now. For traversing arrays or Traversables, a new method
validateCollection() is now available in the API.
* 2.4:
added missing unit test
fixed too greedy replacements
fixed protocol-relative URLs
added override power to server parameters provided on request method
made parsing controllers more robust
Fixed YamlFileLoader imports path
* 2.3:
added missing unit test
fixed too greedy replacements
fixed protocol-relative URLs
added override power to server parameters provided on request method
made parsing controllers more robust
Fixed YamlFileLoader imports path
Conflicts:
src/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php
YamlFileLoader used the resource name as the current directory during import, which can cause a failed import when using a relative path. Using the $path variable output from the locator is consistent with other loaders and fixes the bug.
* 2.4:
Check headers sent before sending PHP response
Fix issue symfony/symfony#10345 '[FrameworkBundle][Console] container:debug --parameter="" not working anymore'
Fixed ACE domain checks on UrlValidator (#10031)
handle array root element
If the response contents has been sent before an error occurs, PHP
triggers the warning "Cannot modify header information - headers already sent"
This change ensure that the error message is echoed, while it's impossible
to change the HTTP status code and headers.
* 2.4: (52 commits)
Fix#8205 : Deprecate file mode update when calling dumpFile
Fix#10437: Catch exceptions when reloading a no-cache request
Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
removed ini check to make uploadedfile work on gae
Update OptionsResolver.php
fixed comment in forms.xml file
Clean KernelInterface docblocks
Cast the group name as a string
Fixed doc of InitAclCommand
[Form] Fix "Array was modified outside object" in ResizeFormListener.
Fix IBAN validator
[Process] Remove unreachable code + avoid skipping tests in sigchild environment
Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute
Added travis_retry to .travis.yml
[Process] fix some typos and refactor some code
[Process] Fix unit tests in sigchild disabled environment
[Process] Trow exceptions in case a Process method is supposed to be called after termination
fixed typo
[Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
[Process] Fix escaping on Windows
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/ProcessPipes.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
* 2.3: (34 commits)
Fix#8205 : Deprecate file mode update when calling dumpFile
Fix#10437: Catch exceptions when reloading a no-cache request
Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
removed ini check to make uploadedfile work on gae
Update OptionsResolver.php
fixed comment in forms.xml file
Clean KernelInterface docblocks
Cast the group name as a string
Fixed doc of InitAclCommand
[Form] Fix "Array was modified outside object" in ResizeFormListener.
Fix IBAN validator
[Process] Remove unreachable code + avoid skipping tests in sigchild environment
Fixed bug that incorrectly causes the "required" attribute to be omitted from select even though it contains the "multiple" attribute
Added travis_retry to .travis.yml
[Process] fix some typos and refactor some code
[Process] Fix unit tests in sigchild disabled environment
[Process] Trow exceptions in case a Process method is supposed to be called after termination
fixed typo
[Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
[Process] Fix escaping on Windows
...
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/Filesystem/Filesystem.php
src/Symfony/Component/Process/Process.php
With the recent addition of the ability to disable the output, it was
not taken into account within the `ProcessFailedException`.
So, if the output was indeed disabled, and the process returns an
error (i.e via a `mustRun`) we could have another LogicException which
is not expected.
This PR was squashed before being merged into the 2.3 branch (closes#10410).
Discussion
----------
[Form] Fix "Array was modified outside object" in ResizeFormListener.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10405
| License | MIT
| Doc PR |
This is the second pull request for this issue. The history of this is as follows:
Original Fix was added Feb 11th under Pull Request #10232.
Users began complaining of Doctrine ArrayCollection not being updated in forms.
Revert was added Feb 15th under Pull Request #10269.
Issue #10405 was opened on 7th Mar for the original bug.
Pull Request #10269 has a failing test that illustrates users concerns.
I have added failing tests to this pull request to illustrate the problems described in #10405.
All tests now pass, and all forms of $data are now supported, including arrays, DoctrineCollection, ArrayObject, and other IteratorAggregates.
__Details as follows:__
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate that is iterating over $data by reference, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the value that the Iterators internal pointer is pointing to to change.
The Iterator provided by IteratorAggregate may or may not have the ability to modify it's underlying data. So it is not possible to rely on the Iterator to modify the data. Instead, it is simpler to avoid modifying $data at all while we are iterating over it. So instead, we simply iterate over $data once to determine the keys we need to delete, and store them. Then we iterate over the keys and delete them from $data.
Commits
-------
aa63fae [Form] Fix "Array was modified outside object" in ResizeFormListener.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Validator] Minor fix in IBAN validator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10481, #10489
| License | MIT
Added more values to unit tests of IBAN validator to make clear it doesn't accept lower case letters.
> Permitted IBAN characters are the digits 0 to 9 and the 26 upper-case Latin alphabetic characters A to Z.
http://en.wikipedia.org/wiki/International_Bank_Account_Number
Also made little adjustment to code which meant to validate lowercase letters but actually was useless.
Commits
-------
3eeb306 Fix IBAN validator
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Remove unreachable code + avoid skipping tests in sigchild environment
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
As mentioned by @Tobion in https://github.com/symfony/symfony/pull/10480#issuecomment-38002910, I removed the dead code. I also fixed/updated the test suite on PHP compiled with `--enable-sigchild`.
Commits
-------
d52dd32 [Process] Remove unreachable code + avoid skipping tests in sigchild environment
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] Added standalone PSR-3 compliant logger
This PR adds a standalone, PSR-3 compliant, logger to the Console component. It logs all messages on the console output. Messages of `DEBUG`, `INFO` and `NOTICE` levels are displayed using the `info` format (default to green). Higher levels are displayed using the `error` formatter (default to red).
This logger is similar to the [Monolog's Console Handler](http://symfony.com/doc/current/cookbook/logging/monolog_console.html) but does not have any external dependency (except `php-fig/log`). This is useful for console applications and commands needing a lightweight PSR-3 compliant logger (e.g. required by a dependency or to display basic informations to the user).
An usage example is available here: https://github.com/dunglas/php-schema.org-model/blob/master/src/SchemaOrgModel/Command/GenerateEntitiesCommand.php#L71
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#3696
Commits
-------
e40b34d [Console] Added standalone PSR-3 compliant logger
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] fix some typos and refactor some code
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
Commits
-------
b422613 [Process] fix some typos and refactor some code
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] Fixed unsetting of setted attributes on OutputFormatterStyle
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes
Conflicts:
src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
src/Symfony/Component/Console/Tests/Output/OutputTest.php
Commits
-------
ce0c4b4 [Console] Fixed unsetting of setted attributes on OutputFormatterStyle
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Fix escaping on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Windows escaping is broken since the last merges.
After digging more on Windows escaping, I realised some things:
- We forbid environment variable expansion by escaping `%APPDATA%` to `^%"APPDATA"^%`
- We explicitly ask for variable expansion at runtime (running the command line with the [`/V:ON`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Process/Process.php#L235) flag). Running a command containing `!APPDATA!` will be escaped and expanded (our previous rule is easily overriden)
- On platform that are not windows, we use strong escaping that prevents any variable expansion (`$PATH` will be escaped to `'$PATH'` that is not interpreted as the current PATH)
We have three possibilities:
- Keep this behavior as this.
- Prefer a consistent API and use a strong escaping strategy everywhere, but it would result in a BC break (see #8975).
- Allow environment variable expansion and escape `%APPDATA%` to `"%APPDATA%"`
Any thoughts about this ?
Commits
-------
0f65f90 [Process] Fix escaping on Windows
Unset only previous setted styles in place of all styles, before this fix,
OutputFormatterStyle reset all attributes with '\e[0m' sequence.
Now, if a foreground is setted, reset only the foreground so you can use innested attributes
Conflicts:
src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php
src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
src/Symfony/Component/Console/Tests/Output/OutputTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fixed fatal errors in getOutput and getErrorOutput when process was not started
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10022
| License | MIT
This PR replaces #9452 and address the latest changes.
Side note : I've not updated `getExitCode`, `getExitCodeText` and `isSuccessful` as they were explicitly tested to return null in case the process is not started or terminated. I think it would be a BC break to do that.
Commits
-------
449fe01 [Process] Trow exceptions in case a Process method is supposed to be called after termination
0ae6858 [Process] fixed fatal errors in getOutput and getErrorOutput when process was not started
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Debug] add a screaming mode to ErrorHandler
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Collect and display silenced PHP errors in the debug toolbar.
Commits
-------
5cc817d [Debug] add a screaming mode to ErrorHandler
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Fix quoted arguments escaping
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR replaces #8972
Commits
-------
de681cb [Process] Add tests on ProcessUtils::escapeArgument
85fb495 [Process] Fix: Arguments including space and quote are not correctly escaped (win)
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles()
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6908
| License | MIT
This PR replaces #10193
Commits
-------
89c599e [DomCrawler] Add tests for recursive cases of getPhpValues() and getPhpFiles()
e961f57 [DomCrawler] Fixed incorrect value name conversion in getPhpValues() and getPhpFiles()
* 2.3:
[Config] made a condition more explicit
convertDomElementToArray should handle zero values
prefixed http:// to url output on server:run command in order to make it clickable
Fixed data in pipe being truncated if not read before process termination
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Security] Add constants for access decision strategies
I suggest adding constants for the three access decision strategies (affirmative, consensus, unanimous).
They are difficult to spell, and without constants they are difficult to identify when reading the code.
| 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
-------
5d6ef00 Add class constants for access decision strategies.
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fixed data in pipe being truncated if not read before process termination
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9409
| License | MIT
| Doc PR | N/A
This is a repeat of the botched pull request #9630.
Commits
-------
7e51913 Fixed data in pipe being truncated if not read before process termination
This PR was merged into the 2.4 branch.
Discussion
----------
[2.4][Process] Fix some unit tests that create the process object instead of delegate it to the implementation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This follows #10421 in branch 2.4
Commits
-------
741a8c1 [Process] Fix some unit tests that create the process object instead of delegate it to the implementation
* 2.3:
[Process] Fix#9160 : escaping an argument with a trailing backslash on windows fails
[Process] Fix some unit tests that create the process object instead of delegate it to the implementation
[Process] Make process tests more accurate on exception messages
[Process] Fix process status in TTY mode
[Process] Use assertSame instead of assertEquals to avoid comparison against `null`
[HttpFoundation] added some unit tests
10158 get vary multiple
made Cookie stringification more robust
[Yaml] fix for a HHVM bug
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Validator] Checked the constraint class in constraint validators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
df56c23 [Validator] Checked the constraint class in constraint validators
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #7205
| License | MIT
| Doc PR | -
See the changes in the UPGRADE files for more information.
Commits
-------
6b3fbb5 [Form] Changed the default value of $flatten in Form::getErrors() to true
a9268c4 [Form] Changed Form::getErrors() to return an iterator and added two optional parameters $deep and $flatten
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix process status in TTY mode
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When running a process with TTY mode, status in automatically set to `terminated`
once it's started.
It's wrong for two reasons :
- The status of the process is not yet terminated.
- The exitcode value is never caught
Commits
-------
51c70f8 [Process] Fix process status in TTY mode
When running a process with TTY mode, status in automatically set to `terminated`
once it's started.
It's wrong for two reasons :
- The status of the process is not yet terminated.
- The exitcode value is never caught
* 2.4:
Revert "[HttpFoundation] removed test file not related to 2.3"
[HttpFoundation] removed test file not related to 2.3
[HttpKernel] fixed CS
Add tests for RequestStack class
This PR was squashed before being merged into the 2.5-dev branch (closes#10100).
Discussion
----------
[ClassLoader] A PSR-4 compatible class loader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This is a PSR-4 compatible class loader that I'd like to contribute to the ClassLoader component. Since PSR-4 is the most recent FIG standard for an autoloader, I thought a compatible loader should be part of a feature-complete ClassLoader component.
See: http://www.php-fig.org/psr/psr-4/
PSR-4 does neither replace PSR-0, nor are those standards 100% compatible. This is why I implemented the standard as a new class.
If you decide that my PR is worth merging, I would also provide a PR for symfony-docs with a documentation.
Commits
-------
6837df3 [ClassLoader] A PSR-4 compatible class loader
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpKernel] fixed serialization of the request data collector
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10361
| License | MIT
| Doc PR | n/a
This fixes a regression introduced in #10352.
Commits
-------
6102f99 [HttpKernel] fixed serialization of the request data collector
This PR was squashed before being merged into the 2.5-dev branch (closes#10314).
Discussion
----------
[Serializer] added support for is.* methods in GetSetMethodNormalizer
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10297
| License | MIT
| Doc PR | N/A
Using ``is`` prefix for boolean variables is considered a standard, not only in PHP but also in Java (from which Symfony2 derives lot standards).
I was not sure if this is BCB but answered "no". Was not sure if I should update ``CHANGELOG`` file and did so, but if you find it irrelevant, go ahead and merge without it. I don't know if I should create a PR for docs because it does not explicitly say that the normalizer supports only ``get.*`` methods as getters.
_Note: Objects that contain behaviour also can use other prefixes like ``can``, ``has``, ``should``, but their presence in ``GetSetMethodNormalizer`` is relevant as they do not provide state (``has`` is debatable)._
Commits
-------
480219f [Serializer] added support for is.* methods in GetSetMethodNormalizer
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] deprecated TableHelper in favor of Table
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9788, #9680, #9325
| License | MIT
| Doc PR | symfony/symfony-docs#3627
This PR makes the Table helper stateless. It also adds a way to define global styles and to change/tweak existing styles easily.
The second commit adds the possibility to add a separator anywhere in the table output.
Commits
-------
21784ce [Console] make it possible to pass a style directly to Table::setStyle()
14caaec [Console] added the possibility to insert a table separator anywhere in a table output
39c495f [Console] deprecated TableHelper in favor of Table
* 2.4:
[Form][2.3] Fixes empty file-inputs getting treated as extra field.
changed some PHPUnit assertions to more specific ones
fixed Kernel::stripComments() normalizing new-lines
added a BC comment
Update FileLoader to fix issue #10339
bumped Symfony version to 2.3.12
updated VERSION for 2.3.11
update CONTRIBUTORS for 2.3.11
updated CHANGELOG for 2.3.11
Throw exception when unable to normalize embedded object
Fixed evaluation of short circuit operators
Follow-up to #10312: Fixed minor performance related issues in Yaml\Inline.
[2.4][HttpKernel] Fix issue #10209 When the profiler has `only_exception` option activated and a subrequest throw an exception, the parent profile cannot be found.
This PR was squashed before being merged into the 2.3 branch (closes#10251).
Discussion
----------
[Form][2.3] Fixes empty file-inputs getting treated as extra field.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8575 (https://github.com/symfony/symfony/pull/8575#issuecomment-34867485)
| License | MIT
Re-applies 968fe23 (PR #8575).
The test for this already exists, it was just this line that got overwritten by eb9f76d5ba (diff-ca5e25b47f3ecc94cd557946aeb486c6L542)
To clarify, this is a PR into 2.3 branch - this already exists in 2.4 (and later from this PR: https://github.com/symfony/symfony/pull/9146)
Commits
-------
8d99d75 [Form][2.3] Fixes empty file-inputs getting treated as extra field.
* 2.3:
changed some PHPUnit assertions to more specific ones
fixed Kernel::stripComments() normalizing new-lines
added a BC comment
Update FileLoader to fix issue #10339
This PR was merged into the 2.5-dev branch.
Discussion
----------
[DataCollector] Improves the readability of the collected arrays in the profiler
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR is based on #10155.
Original description:
It simply improves the readability of the collected arrays in the profiler:
__before__:
```
Array(date => Array(year => , month => , day => ), time => Array(hour => ))
```
__after__:
```
[
date => [
year => ,
month => ,
day =>
],
time => [
hour =>
]
]
```
Commits
-------
dce66c9 removed double-stringification of values in the profiler
1cda2d4 [HttpKernel] tweaked value exporter
3f297ea Improves the readability of the collected arrays in the profiler.
This PR was merged into the 2.4 branch.
Discussion
----------
[2.4][HttpKernel] Fix issue #10209
When the profiler has `only_exception` option activated and a subrequest which
throw an exception, the parent profile cannot be found.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Fix issue #10209
Commits
-------
b949c49 [2.4][HttpKernel] Fix issue #10209 When the profiler has `only_exception` option activated and a subrequest throw an exception, the parent profile cannot be found.
This PR was merged into the 2.3 branch.
Discussion
----------
Update FileLoader to fix issue #10339
This fixes an issue in Symfony\Component\Config\Loader\FileLoader
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10339
| License | MIT
| Doc PR | none
Commits
-------
3988728 Update FileLoader to fix issue #10339
FileLoader now uses resolved FileLoader's (the one that explicitly
supports that resource) FileLocatorInterface instance before falling
back to its own when trying to load resources in import() method.
* 2.3:
bumped Symfony version to 2.3.12
updated VERSION for 2.3.11
update CONTRIBUTORS for 2.3.11
updated CHANGELOG for 2.3.11
Follow-up to #10312: Fixed minor performance related issues in Yaml\Inline.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.4:
[Process] minor fixes
Improve performance of getNextEmbedBlock by removing unnecessary preg_match and function calls.
Avoid unnecessary line indentation calculation.
Optimise Inline::evaluateScalar() for parsing strings.
fixed CS
fixed parsing Mongo DSN and added Test for it
() is also a valid delimiter
Adding PHP 5.6 to travis-ci tests
Update BCryptPasswordEncoder.php
[Validator] Removed PHP <5.3.3 specific code which is not officially supported.
Fixed wrong redirect url if path contains some query parameters
* 2.3:
[Process] minor fixes
Improve performance of getNextEmbedBlock by removing unnecessary preg_match and function calls.
Avoid unnecessary line indentation calculation.
Optimise Inline::evaluateScalar() for parsing strings.
fixed CS
fixed parsing Mongo DSN and added Test for it
() is also a valid delimiter
Adding PHP 5.6 to travis-ci tests
Update BCryptPasswordEncoder.php
[Validator] Removed PHP <5.3.3 specific code which is not officially supported.
Fixed wrong redirect url if path contains some query parameters
This PR was squashed before being merged into the 2.3 branch (closes#10305).
Discussion
----------
[Process] minor fixes
| Q | A
| ------------- | ---
| Fixed tickets | [n/a]
| License | MIT
The "same" PR as #10220, but on "2.3" branch
Commits
-------
f03e5dc [Process] minor fixes
This PR was squashed before being merged into the 2.5-dev branch (closes#9862).
Discussion
----------
[FrameworkBundle] Added configuration for additionnal request formats
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/8934
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3402
Reopening of https://github.com/symfony/symfony/pull/8944
# TODO
- [x] Fix wrong xml configuration definition (Thanks @WouterJ)
- [x] Change configuration key `additional_formats` to a more meaningful one
- [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)
Commits
-------
f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Debug] error stacking + fatal screaming + case testing
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Ported from https://github.com/nicolas-grekas/Patchwork/
Three enhancements for Symfony debug mode:
- detect case mismatches between loaded class name, its declared name and its source file name
- dismiss hard to debug blank pages related to non-catchable-@-silenced fatal errors (```@(new Toto) + parse error in Toto.php``` => enjoy debugging)
- work around https://bugs.php.net/42098 / https://bugs.php.net/54054 / https://bugs.php.net/60149 / https://bugs.php.net/65322 (fixed in 5.5.5)
An other thing I didn't port is scope isolation: the current `require` in autoloaders is done in their scope, so local $vars / $this (with access to private props/methods) is easily accessible from required files. Shouldn't proper separation prevent that?
Commits
-------
6de362b [Debug] error stacking+fatal screaming+case testing
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Removed PHP <5.3.3 specific code which is not officially supported
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There is some code in the validator component which handles a PHP bug for versions strictly inferiors to 5.3.3. Since these versions are not supported (the requirements say 5.3.3 minimum) I thought we could remove it.
Regards.
Commits
-------
f10c974 [Validator] Removed PHP <5.3.3 specific code which is not officially supported.
* 2.3:
Revert "bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)"
Bypass sigchild detection if phpinfo is not available
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
* 2.4:
Revert "Fix "Array was modified outside object" in ResizeFormListener."
Added failing test
bumped Symfony version to 2.4.3
updated VERSION for 2.4.2
updated CHANGELOG for 2.4.2
bumped Symfony version to 2.3.11
updated VERSION for 2.3.10
update CONTRIBUTORS for 2.3.10
updated CHANGELOG for 2.3.10
[Console] removed problematic regex
fixed various inconsistencies
[DomCrawler] Added support for <area> tags to be treated as links
Fix "Array was modified outside object" in ResizeFormListener.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
Revert "Fix "Array was modified outside object" in ResizeFormListener."
Added failing test
bumped Symfony version to 2.3.11
updated VERSION for 2.3.10
update CONTRIBUTORS for 2.3.10
updated CHANGELOG for 2.3.10
[Console] removed problematic regex
[DomCrawler] Added support for <area> tags to be treated as links
Fix "Array was modified outside object" in ResizeFormListener.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
When the profiler has `only_exception` option activated and a subrequest
throw an exception, the parent profile cannot be found.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] removed problematic regex
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9462
| License | MIT
| Doc PR | n/a
This PR is a quick implementation of a replacement fora problematic regex.
Commits
-------
80bc41e [Console] removed problematic regex
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Added support for <area> tags to be treated as links
The [HTML area tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area) behaves exactly like the `a` tag in that they're both clickable, and if it has a `href` follows a link. The Link class works the same with both tags.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
23acd26 [DomCrawler] Added support for <area> tags to be treated as links
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the Iterator and data to be out of sync. When the data is an instance of IteratorAggregate, the loop should use the iterator directly and not rely on foreach.
The onSubmit method has been updated accordingly.
* 2.4:
fixed various inconsistencies
reduced recursion when building DumperPrefixCollection
renamed variables - making next change more readable
removing dead code.
[ExpressionLanguage] added some tests for the built-in constant() function
[ExpressionLanguage] added some documentation about functions
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Fixed incorrect handling of image inputs
* 2.3:
fixed various inconsistencies
reduced recursion when building DumperPrefixCollection
renamed variables - making next change more readable
removing dead code.
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Fixed incorrect handling of image inputs
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php
src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php
src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
This PR was merged into the 2.4 branch.
Discussion
----------
[ExpressionLanguage] added some documentation about functions
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10216
| License | MIT
| Doc PR | n/a
This adds documentation about how to define a function in the expression language.
Commits
-------
600d481 [ExpressionLanguage] added some documentation about functions
This PR was merged into the 2.5-dev branch.
Discussion
----------
[EventDispatcher] simplified code for TraceableEventDispatcher
| 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
Commits
-------
42e4c7b [EventDispatcher] simplified code for TraceableEventDispatcher
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Stopwatch] Allow getting duration of events without calling stop()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | [#10175](https://github.com/symfony/symfony/issues/10175)
| License | MIT
| Doc PR | [#3539](https://github.com/symfony/symfony-docs/pull/3539)
Commits
-------
2efe461 Allow retrieving unstopped stopwatch events
d3d097d Include running periods in duration
This PR was merged into the 2.5-dev branch.
Discussion
----------
Made some HHVM-related fixes
| 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
Commits
-------
1240758 [Routing] fixed CS
e223395 [Debug] fixed case differences between PHP and HHVM (classes are case-insensitive anyway in PHP)
23acc24 [Debug] made order of suggestions predictable in error messages
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] fixed wrong reference in TraceableEventDispatcher
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9748, #9727
| License | MIT
| Doc PR | n/a
This PR fixes#9748 and #9727 by removing the `id` state. Only private method signatures have been changed, so that qualifies for a fix in 2.3.
The `getNotCalledListeners()` is a bit special as it tries to get non-called listeners. It passes `null` as the event id as if a listener has been called more than once, getting the first call is enough.
Commits
-------
acd3317 [HttpKernel] fixed wrong reference in TraceableEventDispatcher
* 2.4:
$default can be string
Fix wording for Process class documentation
Option can be bool too (eg. --force)
[Form] Update DateTime objects only if the actual value has changed
Revert "bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco)"
[HttpFoundation] fixed typo
Added delta for Request comparison
add zh_TW validator translations
Added Bulgarian translation for security component
* 2.3:
$default can be string
Fix wording for Process class documentation
Option can be bool too (eg. --force)
[Form] Update DateTime objects only if the actual value has changed
Revert "bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco)"
[HttpFoundation] fixed typo
Added delta for Request comparison
add zh_TW validator translations
Added Bulgarian translation for security component
This PR was merged into the 2.5-dev branch.
Discussion
----------
Adds PTY mode & convenience method mustRun()
This makes two additions. I've split them into separate commits so that you can pull them separately if required.
1. Adds PTY mode.
In contrast to the existing TTY mode, the proc_open call becomes the master not the process currently executing.
2. Adds a ``mustRun`` method
This is merely for convenience:
```php
# Before
$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}
$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}
# After
(new Process($cmd))->mustRun();
(new Process($cmd))->mustRun();
Commits
-------
dbd264a adds cache for isPtySupported()
6c11207 attempts to fix tests on Travis
2ff1870 adds convenience method mustRun
53441aa adds support for PTY mode
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
INI_SCANNER_RAW change the default scanner mode of parse_ini_files to parse all values without evaluate. This allow values with single quotes, "no" and "false" and raise an error if you use the deprecated "#" as comment character.
This change is specially good for shared translations, because a translator haven't to know that he can't use a few restricted terms.
And has a residual improvement: it's twice fast that use the default value (INI_SCANNER_NORMAL) in my tests
This PR was squashed before being merged into the 2.3 branch (closes#10151).
Discussion
----------
[Form] Update DateTime objects only if the actual value has changed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now the Form component replaces DateTime fields with new Objects, therefore the hash is changing.
This leads to unnecessary database updated when working with doctrine. With this patch the DateTime object
of the actual entity is only replaced if the value has been changed.
Commits
-------
1f22d3a [Form] Update DateTime objects only if the actual value has changed
Sometimes, tests are failing because REQUEST_TIME
changes between the creation of the various sub-requests.
By using delta, we allow maximum of second of difference.
Example: https://travis-ci.org/symfony/symfony/jobs/17668158#L511
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator][Translation] add zh_TW validator translations
add Traditional Chinese validator translations.
Commits
-------
c755e85 add zh_TW validator translations
* 2.4:
fixed CS
allow the TextAreaFormField to be used with valid/invalid HTML
Create security.id.xlf
[DependencyInjection] Remove unneeded file
[Twig] removed obsolete conditions on Twig versions
added lines to exceptions for the trans and transchoice tags
[FrameworkBundle] Merged multiple line input into one line to fix the tests.
[Form] Make FormInterface::add docblock more explicit
[Security] Add zh_CN translations
Routing condition bugfix
[Validator][Translation]update zh_CN translations
[Validator] Minor fix in XmlLoader
* 2.3:
fixed CS
allow the TextAreaFormField to be used with valid/invalid HTML
Create security.id.xlf
[DependencyInjection] Remove unneeded file
[Twig] removed obsolete conditions on Twig versions
added lines to exceptions for the trans and transchoice tags
[Form] Make FormInterface::add docblock more explicit
[Security] Add zh_CN translations
[Validator][Translation]update zh_CN translations
[Validator] Minor fix in XmlLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Remove unneeded file
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I think the file was moved here by mistake from the fixtures.
Commits
-------
caf1809 [DependencyInjection] Remove unneeded file
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Routing] Add createRoute method for AnnotationClassLoader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
This allows to use a custom route class. So if you want to support
annotations for Routing in Silex it can now be done while keeping the
custom routing options Silex supports.
Commits
-------
97404b3 Add createRoute method for AnnotationClassLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
Commits
-------
23216aa [Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
This allows to use a custom route class. So if you want to support
annotations for Routing in Silex it can now be done while keeping the
custom routing options Silex supports.
This PR was squashed before being merged into the 2.5-dev branch (closes#10005).
Discussion
----------
[Security] Added named encoders to EncoderFactory
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9743
| License | MIT
| Doc PR | -
This PR is basically merging FOSAdvancedEncoder. I think it's better than having a separate bundle that most of it's code is a copy of the core.
A use case is: having a different encoders or bcrypt cost based on the user's roles.
Commits
-------
c69e2ca [Security] Added named encoders to EncoderFactory
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Routing] Added an extension point for globals in AnnotationClassLoader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We need to add a new extension point for global to be able to support
`@Method` on class:
``` php
/**
* @Route("/api")
* @Method("GET")
*/
class FooBarController
{
/**
* @Route("/")
*/
public function listAction()
{
}
/**
* @Route("/new")
* @Method("POST")
*/
public function newAction()
{
}
}
```
Commits
-------
8f7524e [Routing] Added an extension point for globals in AnnotationClassLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Component/Security] Fixed some phpdocs in Security/Core
| Q | A
| ------------- | ---
| Bug fix? | kinda*
| New feature? | no
| License | MIT
\* - those missing phpdocs lead to problems when debugging with IDE, as well as some were wrong (i.e. `SecurityContextInterface::isGranted()`) as parameters differ in interface & class implementing it
Commits
-------
80fae1d [Component/Security] Fixed some phpdocs in Security/Core
This PR was squashed before being merged into the 2.5-dev branch (closes#9980).
Discussion
----------
[Routing][FrameworkBundle] Deprecated the apache dumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9652
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3446
Commits
-------
6258cfa [Routing][FrameworkBundle] Deprecated the apache dumper
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] Errors now reference the field they were added to and the violation/exception that caused them
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9472, #9582
| License | MIT
| Doc PR | -
Commits
-------
c8a0ee6 [Form] Errors now reference the field they were added to and the violation/exception that caused them
This PR was squashed before being merged into the 2.5-dev branch (closes#9776).
Discussion
----------
[Console] Added the possibility to set a different default command
I am not quite sure if this is the best approach to solve the issue but the solution I provide works. Let me know your suggestions to improve it.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8058
| License | MIT
| Doc PR | symfony/symfony-docs#3426
Commits
-------
418de05 [Console] Added the possibility to set a different default command
* 2.4:
udpated LICENSE year
update year on licenses
rundown and typo fix
[Process] Fix#9861 : Revert TTY mode
[Form] Update minimal requirement in composer.json
Fix Empty translations with Qt files
[Console] Fixed command name guessing if an alternative is an alias.
Update UPGRADE-2.3.md to account for #9388
[WebProfilerBundle] Fixed profiler toolbar icons for XHTML.
[BrowserKit] Throw exception on invalid cookie expiration timestamp
[Propel1Bridge][ModelChoiceList] add exception message for invalid classes
This PR was merged into the 2.3 branch.
Discussion
----------
[All] update license year to 2014
| Q | A |
| --- | --- |
| Bug fix? | n |
| New feature? | n |
| BC breaks? | n |
| Deprecations? | n |
| Tests pass? | y |
| Fixed tickets | na |
| License | MIT |
| Doc PR | na |
Sent using [Gush](https://github.com/cordoval/gush)
sorry about the previous PR now closed, forgot Gush had branched off of master and not 2.3
Commits
-------
8ace5f9 update year on licenses
This PR was merged into the 2.5-dev branch.
Discussion
----------
[OptionsResolver] Allow giving a callback as an allowedValue to OptionsResolver
I recently had to use an option which was an array and could contain some one or multiple values from a list. As it could contain all possible combinations, it was not possible to validate it with a list of allowed values.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3437
Commits
-------
07d1d30 Allow giving a callback as an allowedValue to OptionsResolver
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix#9861 : Revert TTY mode
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9861
| License | MIT
This revert the TTY mode support for the process component
Commits
-------
160b1cf [Process] Fix#9861 : Revert TTY mode
Instead correctly use the array of schemes from the Route.
Also adjusted the dumpers to dump the correct data.
I extended the tests to not only test the deprecated behavior, but also
the new schemes-requirement.
* 2.4:
Revert "bug #9601 [Routing] Remove usage of deprecated _scheme requirement (Danez)"
bumped Symfony version to 2.4.2
updated VERSION for 2.4.1
updated CHANGELOG for 2.4.1
bumped Symfony version to 2.3.10
updated VERSION for 2.3.9
update CONTRIBUTORS for 2.3.9
updated CHANGELOG for 2.3.9
Add support SAPI cli-server
Fix hardcoded listenerTag name in error message
[HttpFoundation] Documented public properties.
[Routing] add missing unit tests for Route and RouteCollection classes
Conflicts:
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
bumped Symfony version to 2.3.10
updated VERSION for 2.3.9
update CONTRIBUTORS for 2.3.9
updated CHANGELOG for 2.3.9
Add support SAPI cli-server
Fix hardcoded listenerTag name in error message
[HttpFoundation] Documented public properties.
[Routing] add missing unit tests for Route and RouteCollection classes
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Tests/RouteCollectionTest.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
test for class route annotation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I mention that AnnotationClassLoaderTest don't test class route annotation functional.
This patch add test for class route annotation
Commits
-------
ac94ddb test for class route annotation
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Documented public properties
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9670
| License | MIT
| Doc PR | -
`$request` and `$query` parameter bags could be hard to get for a newcommer, who's used to `$_POST` and `$_GET` variables. Some people claim naming makes no sense (see #9671).
For consistency I documented all public properties.
Commits
-------
1b79831 [HttpFoundation] Documented public properties.
These annotations are artificially bumping the code coverage. Unreached
code should be reported in the coverage report, even if we cannot reach
100% coverage for some safeguards.
Thus, some places using them were actually testable (and tested) code.
* 2.4:
removed unneeded use statements
[DoctrineBridge] Fixed an issue with DoctrineParserCache
removed unneeded use statements
Prepend Child Bundle paths before the parent
[Routing] add unit tests for Symfony\Component\Routing\RequestContext class
* 2.3:
removed unneeded use statements
Prepend Child Bundle paths before the parent
[Routing] add unit tests for Symfony\Component\Routing\RequestContext class
Conflicts:
src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php
src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php
src/Symfony/Component/Validator/ConstraintValidatorFactory.php
This PR was merged into the 2.3 branch.
Discussion
----------
removed unneeded use statements
| Q | A
| ------------- | ---
| License | MIT
Commits
-------
7f9a366 removed unneeded use statements
* 2.4:
[Security] fixed pre/post authentication checks
fixed missing use statements
Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term.
Fixed CSS
[Intl] Added round support for ROUND_CEILING, ROUND_FLOOR, ROUND_DOWN, ROUND_UP
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
addressed == -> === suggestion
Fixed#9020 - Added support for collections in service#parameters
fixes PSR-0 issues in tests
adjusted behavior to always copy override on url files
Skips test that need full lib-intl.
* 2.3:
[Security] fixed pre/post authentication checks
Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term.
Fixed CSS
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
addressed == -> === suggestion
Fixed#9020 - Added support for collections in service#parameters
fixes PSR-0 issues in tests
adjusted behavior to always copy override on url files
Skips test that need full lib-intl.
Conflicts:
src/Symfony/Component/Security/Acl/Tests/Permission/MaskBuilderTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememerMeTokenTest.php
src/Symfony/Component/Security/Core/Tests/User/AccountCheckerTest.php
src/Symfony/Component/Security/Core/Tests/User/InMemoryProviderTest.php
src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememberMeTokenTest.php
src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememerMeTokenTest.php
src/Symfony/Component/Security/Tests/Core/User/AccountCheckerTest.php
src/Symfony/Component/Security/Tests/Core/User/InMemoryProviderTest.php
src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php
src/Symfony/Component/Security/Tests/Core/User/UserCheckerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
| Q | A
| ------------- | ---
| Bug fix? | yes
| BC breaks? | no*
| Tests pass? | yes
| Fixed tickets | #9903
| License | MIT
\* as described in mentioned issue, before this PR there was thrown exception `UnexpectedValueException`, which was not correct, but I guess some people trying to hide the bug could use `try {} catch` on it.
Commits
-------
38287e7 [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] fixed pre/post authentication checks
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8510, #9622
| License | MIT
| Doc PR | N/A
After further investigation of #8510, I found that all checks in the `checkPreAuth` actually belongs to `checkPostAuth` and the same goes for checks in `CheckPostAuth` (I checked the original source from Spring and indeed, that's how it is implemented there: see https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/dao/AbstractUserDetailsAuthenticationProvider.java#L305
).
So, this PR fixes that issue. I think that we can do this change safely in 2.3 as the error message is the same for all causes by default (`$hideUserNotFoundExceptions` is `true` by default in `UserAuthenticationProvider`).
The only "real" change is whether the authentication is checked or not.
Commits
-------
ada82a2 [Security] fixed pre/post authentication checks
This PR was merged into the 2.3 branch.
Discussion
----------
fixed some PSR-0 class names
| 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
Commits
-------
a38e2c0 fixes PSR-0 issues in tests
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem | WCM] 9339 fix stat on url for filesystem copy
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9339
| License | MIT
| Doc PR | na
supersedes https://github.com/symfony/symfony/pull/9863
Commits
-------
4fba412 adjusted behavior to always copy override on url files
When overriding the Symfony RoleHierarchy it would be great to be able to get access to the buildRoleMap-method and map-variable for more advanced usage.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Validator] Added Doctrine cache
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/9887
| License | MIT
| Doc PR |
I propose to keep the `CacheInterface` and deprecate only the `ApcCache`.
It will leave the classes depending on a `CacheInterface` unchanged and will allow to adapt new cache providers in the future.
Commits
-------
3c4de45 [Validator] Added Doctrine cache
* 2.4:
fix some cs
use restore_error_handler instead of set_error_handler($previous)
fix#9321 Crawler::addHtmlContent add gbk encoding support
[Console] fixed column width when using the Table helper with some decoration in cells
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
Fix for cache-key conflict when having a \Traversable as choices
[Security] removed obsolete comment
* 2.3:
fix some cs
use restore_error_handler instead of set_error_handler($previous)
fix#9321 Crawler::addHtmlContent add gbk encoding support
[Console] fixed column width when using the Table helper with some decoration in cells
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
Fix for cache-key conflict when having a \Traversable as choices
[Security] removed obsolete comment
Conflicts:
src/Symfony/Component/Console/Helper/TableHelper.php
src/Symfony/Component/Security/Tests/Http/Firewall/ExceptionListenerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] fixed column width when using the Table helper with some decoration in cells
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8152, #9366
| License | MIT
| Doc PR | n/a
This PR fixes the same issue as #9366 but works in all situations (all kind of styles, when the string is shorter than any other one or larger than any other ones, ...).
I'm not very satisfied with the fix and especially the `computeLengthWithoutDecoration` method, but the whole helper should be rethought to make it stateless (out of the scope of this PR).
Commits
-------
5b4d057 [Console] fixed column width when using the Table helper with some decoration in cells
This PR was squashed before being merged into the 2.3 branch (closes#8997).
Discussion
----------
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
<table>
<tr>
<td><b>Q</b></td>
<td><b>A</b></td>
</tr>
<tr>
<td>Bug fix?</td>
<td>yes</td>
</tr>
<tr>
<td>New feature</td>
<td>no</td>
</tr>
<tr>
<td>BC breaks?</td>
<td>no</td>
</tr>
<tr>
<td>Deprecations?</td>
<td>no</td>
</tr>
<tr>
<td>Tests pass?</td>
<td>yes</td>
</tr>
<tr>
<td>Fixed tickets</td>
<td>#3085, #8974</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
<tr>
<td>Doc PR</td>
<td>n/a</td>
</tr>
</table>
Problem occurs while user is impersonated. Authentication process generates new token and doeas not preserve role ```ROLE_PREVIOUS_ADMIN```. Ex. when parameter ```security.always_authenticate_before_granting``` is enabled.
Commits
-------
a7baa3b [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
* 2.4:
[Security] simplified some unit tests
[Security] made code easier to understand, added some missing unit tests
[DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
[DomCrawler] Fixed creating form objects from form nodes.
disabled php.ini changes when using HHVM in .travis.yml
[Process] fixed HHVM support
Add support for HHVM in the getting of the PHP executable
[Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
* 2.3:
[Security] made code easier to understand, added some missing unit tests
[DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
[DomCrawler] Fixed creating form objects from form nodes.
disabled php.ini changes when using HHVM in .travis.yml
[Process] fixed HHVM support
Add support for HHVM in the getting of the PHP executable
[Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fix ExceptionListener to catch correctly AccessDeniedException if is not first exception
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9544, #8467?, #9823
| License | MIT
| Doc PR |
Same as #9823 but with some refactoring of the code and with some unit tests.
When merging to 2.4, the unit tests can be simplified a bit.
Commits
-------
172fd63 [Security] made code easier to understand, added some missing unit tests
616b6c5 [Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
This PR was merged into the 2.3 branch.
Discussion
----------
[Dependencyinjection] Fixed handling of inlined references in the AnalyzeServiceReferencesPass
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8299, #9829
| License | MIT
| Doc PR | n/a
Hopefully a better fix for #9829 (ping @jakzal). Unit tests coming soon.
In some cases `InlineServiceDefinitionsPass` replaces a Reference with a service Definition. In such scenarios `AnalyzeServiceReferencesPass` was falling into an infinite loop.
Commits
-------
d650295 [DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed IBAN validator with 0750447346 value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
cf88ba5 [Validator] Fixed IBAN validator with 0750447346 value
This PR was squashed before being merged into the 2.3 branch (closes#9875).
Discussion
----------
Fixed typo
| 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
Commits
-------
660ab38 Fixed typo
* 2.4:
fixed CS
fixed a typo
fixed CS for lambdas
[Yaml] fixed some license headers
Fixes message value for objects
Check for hour, minute & second validity
avoid tables to have apparently long blank line breaks and be too far appart for long nested array params
fixed various typos
[Filesystem] Fixed mirror for symlinks
[Validator] Removed duplicated test for IBAN in data provider
* 2.3:
fixed a typo
fixed CS for lambdas
[Yaml] fixed some license headers
Fixes message value for objects
Check for hour, minute & second validity
fixed various typos
[Filesystem] Fixed mirror for symlinks
[Validator] Removed duplicated test for IBAN in data provider
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
src/Symfony/Component/Console/Application.php
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Finder] Fix finder date constraints and tests
Description:
When you search some files with date constraints, all folders are given, even if they are not in the date scope.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9303
| License | MIT
Commits
-------
4ccafa6 Fix finder date constraints and tests
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] added getter to transformer chain
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9503
| License | MIT
| Doc PR | na
Commits
-------
3565d96 added getter to transformer chain
This PR was merged into the 2.5-dev branch.
Discussion
----------
Added MutableAclProvider::deleteSecurityIdentity
This provides a very simple function to enable the deletion of a SecurityIdentity.
Developers can add a listener on the delete of a user and remove all the related ACLs.
Foreign keys already ensure that the ACEs are properly deleted.
Among the problems of not deleting the SecurityIdentity:
* Inconsistent database, referring to a non-existent user.
* If a user is deleted and another is created with the same name, it will inherit all the old user’s ACEs
Not addressed by this PR: Changing a user’s username breaks the related ACLs. See #5787
See also: https://groups.google.com/forum/#!topic/symfony2/mGTXlTWiMs8/discussion
Commits
-------
bdbbe58 [Security][Acl] Issue #5787 : Added MutableAclProvider::deleteSecurityIdentity
This PR was squashed before being merged into the 2.5-dev branch (closes#8423).
Discussion
----------
Update LocaleTest.php
de_CH locales does not fallback to de
see https://github.com/symfony/symfony/issues/5314
Commits
-------
572126b Update LocaleTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
fixed various typos
| 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
Commits
-------
2f15ac7 fixed various typos
* 2.4: (44 commits)
[FrameworkBundle] Add missing license headers
Fix parent serialization of user object
[DependencyInjection] fixed typo
added condition to avoid skipping tests on JSON_PRETTY support
add memcache, memcached, and mongodb extensions to run skipped tests
[DependencyInjection] Fixed support for backslashes in service ids.
fix#9356 [Security] Logger should manipulate the user reloaded from provider
[FrameworkBundle] Added extra details in XMLDescriptor to improve container description
fixed CS
Crawler default namespace fix
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
[HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
fix 5528 let ArrayNode::normalizeValue respect order of value array provided
fix#7243 allow 0 as arraynode name
Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes#9403).
BinaryFileResponse should also return 416 or 200 on some range-requets
fix deprecated usage and clarify constructor defaults for number formatter
Bumping dependency to ProxyManager to allow testing against the new 0.5.x branch changes
Do normalization on tag options
bumped Symfony version to 2.3.9
...
* 2.3: (31 commits)
Fix parent serialization of user object
[DependencyInjection] fixed typo
add memcache, memcached, and mongodb extensions to run skipped tests
[DependencyInjection] Fixed support for backslashes in service ids.
fix#9356 [Security] Logger should manipulate the user reloaded from provider
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
[HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
fix 5528 let ArrayNode::normalizeValue respect order of value array provided
fix#7243 allow 0 as arraynode name
Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes#9403).
BinaryFileResponse should also return 416 or 200 on some range-requets
Do normalization on tag options
bumped Symfony version to 2.3.9
updated VERSION for 2.3.8
update CONTRIBUTORS for 2.3.8
updated CHANGELOG for 2.3.8
[Filesystem] Changed the mode for a target file in copy() to be write only.
[Console] fixed CS
fixed TableHelper when cell value has new line
Improved and fixed grammar mistakes. Added pluralized messages
...
Conflicts:
src/Symfony/Component/BrowserKit/Cookie.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Matcher/UrlMatcher.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] hide output of ProgressHelper when isDecorated is false
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9511
| License | MIT
| Doc PR | n/a
Commits
-------
006cb81 [Console] show no output in ProgressHelper when isDecorated is false (fixes#9511)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Security][Acl] Add MutableAclProvider::updateUserSecurityIdentity
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5787
| License | MIT
| Doc PR | symfony/symfony-docs#3319
This provides a very simple function to enable the update of a User's username while keeping its associated ACEs (by updating its corresponding UserSecurityIdentity)
Developers can add a listener on the preUpdate of a user and remove all the related ACLs:
```php
if ($args->hasChangedField('username')) {
$aclProvider = $this->container->get('security.acl.provider');
$oldUsername = $args->getOldValue ('username');
$user = $args->getEntity();
$aclProvider->updateUserSecurityIdentity(UserSecurityIdentity::fromAccount($user) , $oldUsername);
}
```
Among the problems of not updating the UserSecurityIdentity:
- Inconsistent database, referring to a non-existent user.
- The user loses all its associated permissions
- If another user is created with the old username, it will inherit all the first user’s ACEs
This PR intends to fix Issue #5787 and is similar to and inspired from PR #8305.
This will also be heavily impacted by the outcome of #8848
Commits
-------
da53d92 [Security][Acl] Fix#5787 : Add MutableAclProvider::updateUserSecurityIdentity
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Fixed support for backslashes in service ids.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9801
| License | MIT
| Doc PR |
This change is needed for consistency with `camelize()` which is used in [`ProxyDumper`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L69) and [`PhpDumper`](https://github.com/symfony/DependencyInjection/blob/2.3/Dumper/PhpDumper.php#L1275).
Either this PR needs to be merged for consistency or #9610 rolled back (if we don't want to support backslashes in service ids).
Anyone could tell me why we're not using the `camelize()` method internally in the `Container`?
Commits
-------
c6f210b [DependencyInjection] Fixed support for backslashes in service ids.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've been recently in the position to use the DependencyInjection Component and the EventDispatcher together but not HttpKernel. To make it easier to use these two together I propose moving RegisterListenersPass to the EventDispatcher component where the ContainerAwareEventDispatcher already resides.
Commits
-------
89b8e0a [EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.
This PR was squashed before being merged into the 2.5-dev branch (closes#9668).
Discussion
----------
[DepdencyInjection] forgot to add definition of dumped container member variable parameters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5408
| License | MIT
| Doc PR | n/a
this fixes the allowing of access to parameters property of the dumped container
Commits
-------
5b02d3f [DepdencyInjection] forgot to add definition of dumped container member variable parameters
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpKernel] Remove FrameworkBundle dependency in BundleTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
`HttpKernel` tests fatal due to missing dependency `AddConsoleCommandPass`.
Also removed unused import.
Commits
-------
20a064f [HttpKernel] Remove FrameworkBundle dependency in BundleTest
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] Added a way to set the process title
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
* I did not write test, because I want to RFC the idea before
* Do we want the process update its name when a sub command is executed by a master command ?
Commits
-------
204a25e [Console] Added a way to set the process title
This PR was squashed before being merged into the 2.4 branch (closes#9771).
Discussion
----------
Crawler default namespace fix
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9732, #6650
| License | MIT
| Doc PR | symfony/symfony-docs/pull/2979
Fix backwards compatibility of xml namespaces for having only one default namespace.
Commits
-------
cfff054 Crawler default namespace fix
This PR was squashed before being merged into the 2.5-dev branch (closes#9773).
Discussion
----------
[Form] Added delete_empty option to allow proper emptyData handling of collections
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes/no?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9375
| License | MIT
| Doc PR | symfony/symfony-docs#3338
This PR adresses the issue that if you have a form collection with the option required => false and you submit an empty collection so you will get a ArrayCollection that contains en element with the value null.
This behaviour was introduced with the following changes from symfony/symfony#3257
In addition to the above mentioned ticket there is also a description about the same issue here: http://stackoverflow.com/questions/19474872/symfony2-form-collection-allow-add-and-allow-delete-null-error-silex
With the changes of this PR the new option empty_data is introduced. With this option you will be able to ignore/delete such empty collections, so they will neither be validated nor appear as empty field in the result.
The option will remove/ignore such empty collections if you add them newly and if allow_add is enabled and
removes such empty collections only if allow_delete is enabled.
With setting required and empty_data accordingly it will be now flexible to customize to the outcome you want to achieve.
Thanks to @bschussek for the great work together - We have to discuss how to name this option so if delete
or ignore is the appropriate name.
Commits
-------
8bdb7a0 [Form] Added delete_empty option to allow proper emptyData handling of collections
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Security] [Acl] [MaskBuilder] Refactor common code and reduce nesting
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Refactored some common code and moved a comparison to an earlier statement.
Commits
-------
7d85809 Refactor common code and reduce nesting
This PR was squashed before being merged into the 2.3 branch (closes#9769).
Discussion
----------
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8311
| License | MIT
| Doc PR |
Commits
-------
3132b04 [BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Remove usage of deprecated _scheme requirement
**This is exact the same commit as it was in #9585, which was not merged due to my fault. Sorry for the noise.**
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8898, #8176
| License | MIT
| Doc PR |
I removed all usages of the deprecated _scheme requirement inside the Routing Component.
Most parts were pretty easy and after multiple refactorings I came up with the solution to have a Route::hasScheme() method and check against this method.
I also checked for performance and after trying in_array, arra_flip+isset and foreach, the last one was clearly the winner.
https://gist.github.com/Danez/7609898#file-test_performance-php
I also adjusted all tests that test '_scheme' to also check the new schemes-requirement.
Commits
-------
557dfaa Remove usage of deprecated _scheme in Routing Component
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem] Changed the mode for a target file in copy() to be write only
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9789
| License | MIT
| Doc PR | -
Stream wrappers like S3 [do not support w+](http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.StreamWrapper.html) and we don't read here anyway (as pointed out in #9789).
Commits
-------
10e43b7 [Filesystem] Changed the mode for a target file in copy() to be write only.
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fix router matching pattern against multiple hosts
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8811, #6744
| License | MIT
| Doc PR |
When you had a pattern that matched on multiple host then only the first one was displayed as "almost matching". Fixed router matching against the same pattern on multiple hosts so now it shows every "almost match" on different hosts.
Commits
-------
f727b22 [Routing] Fix router matching pattern against multiple hosts
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Removed unnecessary condition (looks like it's been copy/pasted from
line 84).
Instead correctly use the array of schemes from the Route.
Also adjusted the dumpers to dump the correct data.
I extended the tests to not only test the deprecated behavior, but also
the new schemes-requirement.
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator]Fixed getting wrong msg when value is an object in Exception
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
cdb5ae0 [Validator]Fixed getting wrong msg when value is an object in UnexpectedTypeException
This PR was merged into the 2.3 branch.
Discussion
----------
allow TraceableEventDispatcher to reuse event instance in nested events
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9710, #9727
| License | MIT
Commits
-------
454ce16 allow TraceableEventDispatcher to reuse event instance in nested events
* 2.4:
[Debug] fixed tests
ErrorHandlerTest: restore_error_handler() on assertion failure
Fixed typo
[validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
Reset the box model to content-box in the web debug toolbar
[FrameworkBundle] Allowed "0" as a checkbox value in the php template.
raising delta on stopwatch as travis really breaks with less than 35
Switched to correct gender of "Token"
bumped Symfony version to 2.4.1
updated VERSION for 2.4.0
updated CHANGELOG for 2.4.0
fixed typos in several translations
[HttpKernel] use static late binding when dumping out container
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
Fixed typo
[validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
Reset the box model to content-box in the web debug toolbar
[FrameworkBundle] Allowed "0" as a checkbox value in the php template.
raising delta on stopwatch as travis really breaks with less than 35
Switched to correct gender of "Token"
fixed typos in several translations
[HttpKernel] use static late binding when dumping out container
This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes#9678).
Discussion
----------
[HttpKernel] use static late binding when dumping out container
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9649
| License | MIT
| Doc PR |
This PR gives the ability to override the stripComments method in descendants (and to disable the memory-eater container whitespace stripping)
Commits
-------
2e241cc [HttpKernel] use static late binding when dumping out container
The neutral gender "das Token" is used in science to describe an array of bits or chars, where as the masculin "der Token" is commenly used for keys in communications and authentication in the network.
I guess the a CSRF-Token is more a key for authentication then a bit array.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] fix typos in several translations
| Q | A
| ------------- | ---
| Fixed tickets | --
| License | MIT
Similar to #9681, but for 2.3, with one additional change.
Commits
-------
8209a7f fixed typos in several translations
* 2.4:
updated Composer suggested packages
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
Fixed typo in phpdoc
Default form.csrf_protection.enabled to csrf_protection.enabled
Handled the scenario when no entity manager is passed with closure query builder.
Enabled csrf_protection by default if form.csrf_protection is enabled
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
[Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
* 2.3:
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
Fixed typo in phpdoc
Handled the scenario when no entity manager is passed with closure query builder.
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
[Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
* 2.2:
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
Conflicts:
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig
src/Symfony/Component/HttpKernel/Kernel.php
Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.
Since this count will never change during the method execution, this change make the code a bit more efficient.
* 2.4:
[Debug] fixed unit tests
Avoid notice from being *eaten* by fatal error.
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
fixed lexing expression ending with spaces
Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
[Validator] Replaced inexistent interface.
[HttpKernel] Fix profiler event-listener usage outside request stack context
When getting the session's id, check if the session is not closed
Fix undefined offset when formatting namespace suggestions
Adjusting CacheClear Warmup method to namespaced kernels
* 2.3:
[Debug] fixed unit tests
Avoid notice from being *eaten* by fatal error.
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
[Validator] Replaced inexistent interface.
When getting the session's id, check if the session is not closed
Adjusting CacheClear Warmup method to namespaced kernels
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
* 2.2:
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
When getting the session's id, check if the session is not closed
This introduced a regression from #9246, with an incomplete fix ;
As the `started` flag on the NativeSessionStorage was not `true`
anymore when saving the session, the session id was always empty
when saving it, and thus when sending the `PHPSESSID` cookie
* 2.4:
[HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object.
Fixed mistake in upgrade docu
bumped Symfony version to 2.4.0
updated VERSION for 2.4.0-RC1
updated CHANGELOG for 2.4.0-RC1
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it.
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
* 2.3:
Fixed mistake in upgrade docu
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
* 2.3: (24 commits)
Add german translation for several validators (Greater/Equal/Less)
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Removed useless check if self::$trustProxies is set
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
[Intl] fixed datetime test as described in #9455
bumped Symfony version to 2.3.8
updated VERSION for 2.3.7
updated CHANGELOG for 2.3.7
re-factor Propel1 ModelChoiceList
[Form] Added method Form::getClickedButton() to remove memory leak in FormValidator
[Locale] fixed the failing test described in #9455
...
Conflicts:
src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php
src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php
src/Symfony/Bridge/Propel1/Tests/Propel1TestCase.php
src/Symfony/Component/Form/Tests/CompoundFormTest.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/Process.php
* 2.2:
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
re-factor Propel1 ModelChoiceList
[Locale] fixed the failing test described in #9455
[Process] fix phpdoc and timeout of 0
bug #9445 [BrowserKit] fixed protocol-relative url redirection
Conflicts:
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php
This PR was merged into the master branch.
Discussion
----------
[Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9104
| License | MIT
| Doc PR | -
It might happen that `require_once` will include a file second time (for example with links or case-changed paths). Therefore we need to check if a class exists before requiring the file.
I also removed an unused argument from two methods (`$loader`).
Commits
-------
0baae4c [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error.
It might happen that require_once will include a file second time (for
example with links or case-changed paths). Therefore we need to check
if a class exists before requiring the file.
This PR was merged into the 2.2 branch.
Discussion
----------
[BrowserKit] fixed protocol-relative url redirection
Fixed redirects to protocol relative URLs, e.g. //www.example.org. Previously the code would treat this as a relative URL.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9445
| License | MIT
| Doc PR |
Commits
-------
e8b5c84 bug #9445 [BrowserKit] fixed protocol-relative url redirection
This PR was merged into the master branch.
Discussion
----------
unify constructor initialization style throughout symfony
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
In almost all classes symfony uses property initialization when the value is static. Constructor initialization is only used for things that actually have logic, like passed parameters or dynamic values. IMHO it makes the code much more readable because property definition, phpdoc and default value is in one place. Also one can easily see what the constructor implements for logic like overridden default value of a parent class. Otherwise the real deal is just hidden behind 10 property initializations. One more advantage is that it requires less code. As you can see, the code was almost cut in half (210 additions and 395 deletions).
I unified it accordingly across symfony. Sometimes it was [not even consistent within one class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Definition/BaseNode.php#L32). At the same time I recognized some errors like missing parent constructor call, or undefined properties or private properties that are not even used.
I then realized that a few Kernel tests were not passing because they were deeply implementation specific like modifying booted flag with a custom `KernelForTest->setIsBooted();`. I improved and refactored the kernel tests in the __second commit__.
__Third commit__ unifies short ternary operator, e.g. `$foo ?: new Foo()`. __Forth commit__ unifies missing parentheses, e.g. `new Foo()`.
Commits
-------
077a089 unify missing parentheses
2888594 unify short ternary operator
2a9daff [HttpKernel] better written kernel tests
111ac18 unify constructor initialization style throughout symfony
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] fixed the issue described in #9480
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9480
| License | MIT
| Doc PR | -
Commits
-------
7d35ce3 [HttpFoundation] fixed the issue described in #9480
This PR was squashed before being merged into the 2.2 branch (closes#9485).
Discussion
----------
[Acl] Fix for issue #9433
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9433
| License | MIT
| Doc PR |
Two new test for issue #9433 :
`testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()`
`testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()`
The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database.
All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database.
Commits
-------
a38fab9 [Acl] Fix for issue #9433
This PR was merged into the 2.2 branch.
Discussion
----------
[Process] fix phpdoc and timeout of 0
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
getTimeout says it returns null when it's disabled. But passing 0 or 0.0 also disabled timeouts. So it should be treated as null as well. also it says it returns integer whereas it returns float.
Commits
-------
1758010 [Process] fix phpdoc and timeout of 0
This PR was merged into the 2.2 branch.
Discussion
----------
[AclProvider] Fix incorrect behavior when partial results returned from cache
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9515
| License | MIT
| Doc PR | none
[AclProvider] Fix incorrect behavior when partial results returned from cache
findAcls wasn't throwing the NotAllAclsFoundException with the partial result when some acls were retrieved from the cache. This will fix that behavior. Ideally we would update it to cache items that were not found so it wouldn't have to query the db every time for non existent items, but I'm not sure if that is possible.
I'm not sure if the ACL cache is being used very much, I didn't find any docs about it but it seems to work except for this issue. It might be more appropriate to merge the fix in master if no one is relying on it to work in 2.2.
Commits
-------
edae59c [AclProvider] Fix incorrect behaviour when partial results returned from cache
This PR was merged into the 2.2 branch.
Discussion
----------
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
7730d8d [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
This PR was merged into the master branch.
Discussion
----------
unify and fix callable phpdoc throughout symfony
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
I unified the phpdoc to use "callable" as type. It wasn't done consistently. It varied between mixed, callback, callable.
I think callable is best because php 5.4 even has a typehint callable.
Commits
-------
6d5ddce unify and fix callable phpdoc throughout symfony
This PR was merged into the master branch.
Discussion
----------
[Console] Revert BC-break for verbose option value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9285
| License | MIT
| Doc PR | ~
Closes#9285
----
PR #8835 "fixed" the input value for verbosity option with `VALUE_OPTIONAL`. And syntax like
```
cli.php -v command
cli.php --verbose command
```
Is broken now, because `ArgvInput` tries to use argument as verbose value (#9285).
For now i added a test for this case and revert this changes.
Commits
-------
432bbe1 [Console] Revert a28eb8 because of BC break
5e03e9a [Console] Add test for --verbose before argument
This PR was merged into the master branch.
Discussion
----------
[Translation] make IdentityTranslater consistent with normal translator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
The MessageSelector should not be required in the constructor of the IdentityTranslator because it's also optional for the [Translator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Translator.php#L64).
I also fixed the TranslatorInterface phpdoc and the IdentityTranslator params similar to 90a20d7835
Commits
-------
7cdb260 [Translation] make IdentityTranslater consistent with normal translator
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] make currency bundle merge fallback locales when accessing data, ...
...allowing use of country-specific locales
Fixes#9262.
Commits
-------
edc287b [Intl] make currency bundle merge fallback locales when accessing data, allowing use of country-specific locales
In Request::getClientIps() on line 772 there is a check if self::$trustedProxies is not set. If this condition evaluates to true the method will return.
Because of this the second identical check on line 783 will never evaluate to true, as when reaching this position self::$trustedProxies must be set.
This PR was merged into the 2.2 branch.
Discussion
----------
[Locale] fixed the failing test described in #9455
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9455
| License | MIT
| Doc PR | -
Commits
-------
3f91039 [Locale] fixed the failing test described in #9455
* 2.3: (25 commits)
bumped Symfony version to 2.2.11
updated VERSION for 2.2.10
update CONTRIBUTORS for 2.2.10
updated CHANGELOG for 2.2.10
fixed version
Request::overrideGlobals() may call invalid ini value
Force Luhn Validator to only work with strings
Fixed bug with lazy services
[Translation] fixed the error in the dumper test as described in #9475
deleted mixing string concatenation inside a sprintf
"__call()" should be displayed only if $this->magicCall is true
[Console] fix phpdoc and constructor default value
Add media-query for printing: Do not print the toolbar.
Fix ProgressHelper redraw when redrawFreq is greater than 1
Update toolbar.css.twig
slovenian translations fixed
slovenian translations fixed
[DependencyInjection] fixed YamlDumper did not make services private.
[FrameworkBundle] fix routing container parameter exception message
[Form] fix and unify phpdoc
...
Conflicts:
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
bumped Symfony version to 2.2.11
updated VERSION for 2.2.10
update CONTRIBUTORS for 2.2.10
updated CHANGELOG for 2.2.10
fixed version
Request::overrideGlobals() may call invalid ini value
Force Luhn Validator to only work with strings
[Translation] fixed the error in the dumper test as described in #9475
[Console] fix phpdoc and constructor default value
Conflicts:
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/HttpKernel/Kernel.php
According to http://php.net/manual/ja/ini.core.php ,
there's not variable_order, but variables_order (with trailing "s").
Perhaps it breaks BC for some developer who unsets
'request_order' ini value and sets 'variable_order' manually?
This PR was merged into the 2.3 branch.
Discussion
----------
[Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When using a ProgressHelper object with redrawFreq > 1, there are situation where redraw may never occur.
E.g.
redrawFreq = 2
setContent = 1
advance(2) ... the redraw event is detected by 0 == current % redrawFreq.
I've tested the patch against phpunit and my local environment.
Maybe, a new test can be implemented to avoid the previous example, but I'm not familiar with mock object... :)
Commits
-------
5eca1fb Fix ProgressHelper redraw when redrawFreq is greater than 1
The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting).
This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.
This PR was merged into the master branch.
Discussion
----------
adjust doctrine dependencies
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9384, #9385
| License | MIT
| Doc PR | -
I went through all components/bundles/bridges in symfony and searched for doctrine dependencies. Then looked if it only requires a subset (annotations instead of common for example).
Commits
-------
7366901 adjust doctrine dependencies
This PR was merged into the master branch.
Discussion
----------
[Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I renamed `flushOutput()` and `flushErrorOutput()` to `clearOutput()` and `clearErrorOutput()` since I find the current naming unintuitive. When reading [the blog post about this feature](http://symfony.com/blog/new-in-symfony-2-4-flushing-stdout-and-stderr-on-a-process) I initially thought that the output would be flushed to the console (as in `ob_flush()`).
Using "clear" on the other hand conforms well with [our conventions](http://symfony.com/doc/current/contributing/code/conventions.html).
Commits
-------
1811367 [Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
This PR was merged into the master branch.
Discussion
----------
set mergeFallback to true,
If your default locale is de_CH for example, then you get an incomplete list of locales. This issue has been resolved in the LanguageBundle and RegionBundle but not in for the LocaleBundle. Would be also a good idea for the CurrencyBundle
Commits
-------
4587d4e set mergeFallback to true, otherwise an uncomplete list is shown with default locale is for example de_CH
This PR was merged into the master branch.
Discussion
----------
Fix bug with variable named context to securityContext
Commits
-------
38433d7 Fix bug with variable named context to securityContext in SimplePreAuthenticationListener->handle function
This PR was merged into the 2.3 branch.
Discussion
----------
Slovenian translations fixed for Symfony 2.3
Commits
-------
1ec42ec slovenian translations fixed
* 2.2:
slovenian translations fixed
[DependencyInjection] fixed YamlDumper did not make services private.
[FrameworkBundle] fix routing container parameter exception message
update CONTRIBUTORS
added content length header to BinaryFileResponse
[Routing] added working test case for issue #5135
This PR was merged into the master branch.
Discussion
----------
[Config] Quoting reserved characters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a5c0123 Use Inline class to quote reserved characters
This PR was merged into the master branch.
Discussion
----------
[Console] make parent constructor test more reliable
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixes | #9186 , f2b60e9
| Tests pass? | yes
| license? | MIT
It also fixes the test since f2b60e9 and improves phpdoc
The second commit improves regex performance to validate name (using possesive quantifier).
I did some basic performance tests http://3v4l.org/PuvuL
The new regex only takes 1/3 of the time compared to the old one!
Commits
-------
5798029 [Console] improve regex performance to validate name
22b09ce [Console] make parent constructor test more reliable
This PR was merged into the 2.3 branch.
Discussion
----------
fixed issue with clone now the children of the original form are preserved and the clone form is given new children
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 9414
| License | MIT
| Doc PR |
this commit fixes#9414
Commits
-------
b952bcb fixed issue with clone now the children of the original form are preserved and the clone form is given new children
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fix and unify phpdoc
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| license? | MIT
- Fixes FormTypeGuesserInterface that must return ValueGuess for guessRequired etc. instead of abstract Guess because its excepted for example by FormFactory.
- Unify array typehints that was not done consistently.
Commits
-------
7a754c3 [Form] fix and unify phpdoc
* 2.3:
fixed CS
fixed CS
[HttpKernel] fixed memory limit display in MemoryDataCollector
Fixed the error handling when decoding invalid XML to avoid a Warning
[Form] Fixed: The "data" option is taken into account even if it is NULL
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
* 2.2:
fixed CS
Fixed the error handling when decoding invalid XML to avoid a Warning
[Form] Fixed: The "data" option is taken into account even if it is NULL
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
Conflicts:
src/Symfony/Component/Form/Extension/Core/Type/FormType.php
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6686, #7673
| License | MIT
| Doc PR | n/a
The removal of the Profiler dependency on the TraceableEventDispatcher (#9170) allows to remerge the patch from #9068 that fixes#6686.
This PR also cleans up how profiles are stored. A Profile is now always stored only once.
The fix will only be available on 2.4+ as the changes are too deep to be backported to 2.2 and 2.3.
Commits
-------
1e1835e [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
This PR was merged into the 2.2 branch.
Discussion
----------
[Form] Fixed: The "data" option is taken into account even if it is NULL
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
c1a3eb3 [Form] Fixed: The "data" option is taken into account even if it is NULL
This PR was merged into the master branch.
Discussion
----------
prevent PHP from magically setting a 302 header
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (for people relying on getting a magic 302 when setting a Location header)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
this needs a test case .. but first let me know if you are ok with this change.
see http://www.php.net/manual/en/function.header.php
Commits
-------
c140d4f prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php
This PR was merged into the 2.2 branch.
Discussion
----------
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
According to [section 3.7 of RFC 2616][], media-type attribute names in the `Content-Type` header are case-insensitive.
Therefore, identification of the `text` type and the `charset` parameter in the `Content-Type` header should be case-insensitive.
[section 3.7 of RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
Commits
-------
17a2d66 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
* 2.3:
Fixed English usage for existing users.
Clean up of WebProfiler Controller classes:
[Process] Fix#9343 : revert file handle usage on Windows platform
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Process] Fix#9343 : revert file handle usage on Windows platform
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9343
| License | MIT
Hello,
I propose to revert the use of file handles only for `STDOUT` on Windows platform (see implementation in 2.2.6 [here](4059720232/src/Symfony/Component/Process/Process.php (L231-L242))).
When I decoupled pipes management from `Process` in #8924, I used file handles for both `STDOUT` and `STDERR`. This was an error as it introduced random failure in reading the handles (reported as [PHP#65650](https://bugs.php.net/bug.php?id=65650)).
Reverting to the previous implementation solves the issue. My apologies for the issues it introduced.
Versions that have been affected by the bug are 2.2.7, 2.2.8, 2.2.9, 2.3.4, 2.3.5 and 2.3.6.
Side note : I thought about testing the file handles implementation on *nix, but it fails most of the time where as Windows is okay. Unit testing on windows is okay (AbstractProcessTest::testProcessPipes tests it), but I don't provide a travis compatible test.
Commits
-------
e9dd408 [Process] Fix#9343 : revert file handle usage on Windows platform
* 2.3:
[DoctrineBridge] Added type check to prevent calling clear() on arrays
[Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
Fix docblock typo
* 2.2:
[DoctrineBridge] Added type check to prevent calling clear() on arrays
[Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
Fix docblock typo
Conflicts:
src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
* 2.3:
Improve documentation of X-Forwarded-For header handling
[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
Removed unused use statements.
Make usleep longer and simplify assertions
Added japanese translation resource for security component.
Replaced the @inheritdoc with an actual list of params since the original method has a different signature.
fix typo : StdClass should be stdClass with little "s"
Remove unnecessary continue from Request
[Yaml] Fixed the escaping of strings starting with a dash when dumping
Fix in ChainLoader.php
fixed wrong started states
* 2.2:
[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
Removed unused use statements.
Make usleep longer and simplify assertions
Added japanese translation resource for security component.
[Yaml] Fixed the escaping of strings starting with a dash when dumping
Fix in ChainLoader.php
fixed wrong started states
This PR was merged into the master branch.
Discussion
----------
[Console] make InputArgument::setDefault() chainable
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
To allow chaining of methods, setDefault should return the InputArgument. I'm not quite sure if you would tread this as a BC break?
best regards
Philipp
Commits
-------
7b7a4c1 [Console] make InputArgument::setDefault() chainable
This PR was merged into the master branch.
Discussion
----------
[Form] Add missing use in form renderer
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9296
| License | MIT
| Doc PR | -
Commits
-------
7686867 [Form] Add missing use in form renderer
This PR was merged into the master branch.
Discussion
----------
Removed dead code (unused use statements).
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
eced94b Removed dead code (unused use statements).
* 2.3:
bumped Symfony version to 2.3.7
updated VERSION for 2.3.6
updated CHANGELOG for 2.3.6
bumped Symfony version to 2.2.10
updated VERSION for 2.2.9
update CONTRIBUTORS for 2.2.9
updated CHANGELOG for 2.2.9
[Security] limited the password length passed to encoders
[HttpKernel] Fixed a test (compiler pass class name has been changed).
assets:install command should mirror .dotfiles (.htaccess)
PoFileDumper - PO headers
removed whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php
src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php
src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php
src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php
* 2.2:
bumped Symfony version to 2.2.10
updated VERSION for 2.2.9
update CONTRIBUTORS for 2.2.9
updated CHANGELOG for 2.2.9
[Security] limited the password length passed to encoders
assets:install command should mirror .dotfiles (.htaccess)
PoFileDumper - PO headers
removed whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
This PR was merged into the master branch.
Discussion
----------
[Debug] Fixed `ClassNotFoundFatalErrorHandler`
After running the test suite, this produced a Fatal Error. Having continue in a child method is not allowed.
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | None
| License | MIT
| Doc PR | None
Commits
-------
ecee5c2 [Debug] Fixed `ClassNotFoundFatalErrorHandler`
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] Fixed a test (compiler pass class name has been changed)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, if #9259 also gets merged
| Fixed tickets | -
| License | MIT
| Doc PR | -
**I've sent it against wrong branch. It should be merged in 2.3. Sorry.**
Commits
-------
fae01c1 [HttpKernel] Fixed a test (compiler pass class name has been changed).
* 2.3:
[Process] Fix#9182 : random failure on pipes tests
Fixed propel guessed relations
[FramworkBundle][HttpKernel] Check event listener services are not abstract
fixed CS
Check for lock existence before unlinking
remove MinCount and MaxCount contraints. It has been replaced by Count constraints.
[FrameworkBundle] fixed path replacement on Windows
Conflicts:
src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php
* 2.2:
[Process] Fix#9182 : random failure on pipes tests
Fixed propel guessed relations
[FramworkBundle][HttpKernel] Check event listener services are not abstract
fixed CS
Check for lock existence before unlinking
[FrameworkBundle] fixed path replacement on Windows
Conflicts:
src/Symfony/Component/Process/Process.php
This PR was merged into the master branch.
Discussion
----------
[Form] fix missing use statement for exception UnexpectedTypeException
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets |
| License | MIT
| Doc PR |
fix missing use statement for exception `Symfony\Component\Form\Exception\UnexpectedTypeException`
cc @bschussek
Commits
-------
ea91533 [form] fix missing use statement for exception UnexpectedTypeException
This PR was merged into the master branch.
Discussion
----------
[Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9210
| License | MIT
| Doc PR | -
This is a follow-up PR of #6554 that splits the CsrfTokenGenerator into two separate classes for generating and managing CSRF tokens. As a consequence, it is now possible to explicitly remove or refresh CSRF tokens if they should be used only once. See #9210 for more information.
Commits
-------
d4bb5f4 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
My logs are filled with a bazillion errors stating "Warning: unlink(/var/www/mysite/app/cache/prod/http_cache/md/cf/47/c693da5dab3eccb65fa36a9b4b07ad0f7cc4.lck): No such file or directory in /var/www/mysite/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 53"
* 2.3:
Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
[Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
Revert "merged branch Tobion/flattenexception (PR #9111)"
[Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
This PR was squashed before being merged into the master branch (closes#8835).
Discussion
----------
[Console] Fixed verbose option when passing verbosity level as option value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Currently passing a verbosity level to verbose option on console doesn't work unless using the shotcuts _-v_, _-vv_, _-vvv_.
This also fix _accept_value_ in the xml generated by __console help --xml__ for people using the xml output ;)
Commits
-------
a28eb8b [Console] Fixed verbose option when passing verbosity level as option value
* 2.2:
[Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
[Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
This PR was squashed before being merged into the master branch (closes#8927).
Discussion
----------
[Templating] fix logic regarding template references and many phpdocs
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects
related to fabpot/Twig#1183 but does not depend on it
Commits
-------
f6c12bd [Templating] fix logic regarding template references and many phpdocs
This PR was merged into the master branch.
Discussion
----------
[RC][Form] Let null values clear fields in PATCH requests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
I've changed the way form checks wherever or not to submit childs by checking submitted data with array_key_exists and not with just isset.
This way in PATCH requests values are not processed when they are not in array and not also when the value is null. Currently there is no way to null a value with a PATCH request, even passing it null.
This can lead to some BC breaks depending on how users used form in their code.
Commits
-------
f5812c5 [Form] Let null values to unset fields in PATCH requests
This PR was squashed before being merged into the master branch (closes#8637).
Discussion
----------
[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7672
| License | MIT
| Doc PR | Not yet
Hi,
Here is a quite basic attempt to be able to disable the internal validation of the ChoiceFormField. It's pretty basic.
Feel free to tell me what you think guys. Maybe I should check the `validationDisabled` property at the beginning of the `containsOption()` method ?
I'll make the documentation PR as soon as the implementation will be validated.
Regards.
Commits
-------
739bf71 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] added a way to override the Request class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7461, #7453
| License | MIT
| Doc PR | symfony/symfony-docs#3021
This is an alternative implementation for #7461.
I've also reverted #7381 and #7390 as these changes are not needed anymore.
Todo:
- [ ] add some tests
Commits
-------
464439d [HttpFoundation] added a way to override the Request class
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] Add a way to avoid the session be written at each request
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (maybe the DI config ?)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3017
Commits
-------
191418d [HttpFoundation] Add a way to avoid the session be written at each request
This PR was merged into the master branch.
Discussion
----------
Decoupled TraceableEventDispatcher from the Profiler
| 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
This PR removes the Profiler dependency on the TraceableEventDispatcher. That makes things more decoupled and cleaner. This PR also cleans up how profiles are stored; a Profile is now always stored only once.
I've created a `LateDataCollectorInterface` that is implemented for data collector that needs to get information from data that are available very late in the request process (when the request and the response are not even available anymore). The `lateCollect()` method is called just before the profile is stored.
We have 3 data collectors that implement that interface:
* Time: As the traceable event dipsatcher gets inject timing information via the stopwatch about all events (including the `terminate` one), we need to get events from the stopwatch as late as possible.
* Event: The traceable event dispatcher gathers all called listeners to determine non-called ones. To be able to accurately do that for all events (including the `terminate` one), we need to get the data as late as possible.
* Memory: We want to get the memory as late as possible to get the most accurate number as possible
I'm not very happy with the name and as always, better suggestions would be much appreciated.
This is an extract from #9168
Commits
-------
5cedea2 [HttpKernel] added LateDataCollectorInterface
9c4bc9a [HttpKernel] decoupled TraceableEventDispatcher and Profiler
This PR was merged into the master branch.
Discussion
----------
[Security] Added Security\Csrf sub-component with better token generation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TODO
**Update September 27, 2013**
This PR simplifies the CSRF mechanism to generate completely random tokens. A random token is generated once per ~~intention~~ token ID and then stored in the session. Tokens are valid until the session expires.
Since the CSRF token generator depends on `StringUtils` and `SecureRandom` from Security\Core, and since Security\Http currently depends on the Form component for token generation, I decided to add a new Security\Csrf sub-component that contains the improved CSRF token generator. Consequences:
* Security\Http now depends on Security\Csrf instead of Form
* Form now optionally depends on Security\Csrf
* The configuration for the "security.secure_random" service and the "security.csrf.*" services was moved to FrameworkBundle to guarantee BC
In the new Security\Csrf sub-component, I tried to improve the naming where I could do so without breaking BC:
* CSRF "providers" are now called "token generators"
* CSRF "intentions" are now called "token IDs", because that's really what they are
##### TODO
- [ ] The documentation needs to be checked for references to the configuration of the application secret. Remarks that the secret is used for CSRF protection need to be removed.
- [ ] Add aliases "csrf_token_generator" and "csrf_token_id" for "csrf_provider" and "intention" in the SecurityBundle configuration
- [x] Make sure `SecureRandom` never blocks for `CsrfTokenGenerator`
Commits
-------
7f02304 [Security] Added missing PHPDoc tag
2e04e32 Updated Composer dependencies to require the Security\Csrf component where necessary
bf85e83 [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component
2048cf6 [Form] Deprecated the CSRF implementation and added an optional dependency to the Security CSRF sub-component instead
85d4959 [Security] Changed Security HTTP sub-component to depend on CSRF sub-component instead of Form
1bf1640 [Security] Added CSRF sub-component
This PR was merged into the master branch.
Discussion
----------
[Form] Rewrite boolean attributes to match HTML spec
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Same as #7856
> 'The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.' - http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attribute
This commit modifies widget_container_attributes and widget_attributes so that:
* `true` values render as the attribute name with the attribute name repeated as the value
* `false` values are not rendered
The comparison is strict using sames() in twig.
Previously `false` values would have been rendered as `some-attribute=""` which according to the spec would actually make them a boolean attribute and therefore equal to true.
Commits
-------
b85577b [Form] Improved test coverage of widget_attributes and widget_container_attributes blocks
8e4c2a7 [Form] Rewrite boolean attributes to match HTML spec
This PR was merged into the 2.2 branch.
Discussion
----------
[Form] enforce correct timezone
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | not sure if this is a BC break...
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I'm using the Form component to handle JSON requests which come from AJAX requests. The JSON is formed by the Angular toJson method
A typical request would be:
```
{
name: "Some name"
start: "2013-08-21T05:00:00.000Z"
end: "2013-08-21T15:00:00.000Z"
}
```
Note that in this case, what I entered in my input boxes are 7:00 for start and 17:00 for end times. As you can see, Angular (or Chrome, I'm not sure), converts this to the "Z" timezone. Since I cannot enforce the correct timezone client side, the timezone will differ from the one configured in the DateTimeType, however, instead of resulting in either an error or a conversion to the correct timezone, I get a datetime object in the wrong timezone, eventually resulting in wrong values in the database.
By checking the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied, this problem is solved.
Commits
-------
b0349a1 [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
* 2.3:
fixed Client when using the terminable event
Fix problem with Windows file links (backslash in JavaScript string)
[Security] fixed wrong phpdoc
[DependencyInjection] Prevented inlining of lazy loaded private service definitions.
[Routing] removed extra argument
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
Added doc comments
Conflicts:
src/Symfony/Component/Routing/Router.php
src/Symfony/Component/Security/Http/Firewall.php
* 2.2:
fixed Client when using the terminable event
Fix problem with Windows file links (backslash in JavaScript string)
[Security] fixed wrong phpdoc
[Routing] removed extra argument
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
Added doc comments
Conflicts:
src/Symfony/Component/HttpFoundation/Request.php
This PR was merged into the master branch.
Discussion
----------
[Filesystem] introduced new Exception base classes
The Filesystem class now throws a ```FileNotFoundException``` if a file could not be found, rather than an basic ```IOException```. The new exception is still a child of the ```IOException```, this way it doesn' t breack BC.
The ```IOException``` now also takes as the first argument an path to the file of interest, which can be used via the ```getPath()``` method.
The switch to the FilesystemInterface will allow you to have an implementation accessing S3 or Dropbox, etc. and still inject it into a classes, which are requiring the Filesystem.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| Doc PR | symfony/symfony-docs#2947
Commits
-------
c2e43d0 [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages
785080a [Filesystem] introduced new Exception base classes
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] made the cache key generation configurable for the default HttpCache store
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9088
| License | MIT
| Doc PR | n/a
Commits
-------
780b77a [HttpKernel] made the cache key generation configurable for the default HttpCache store
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values
Header `HTTP_X_FORWARDED_PROTO` can contain various values. Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Tests pass? | yes
| Fixed tickets | #9101
| License | MIT
Commits
-------
d997443 [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
* 2.3:
bumped Symfony version to 2.3.6
updated VERSION for 2.3.5
updated CHANGELOG for 2.3.5
Set cost type to integer
bumped Symfony version to 2.2.9
updated VERSION for 2.2.8
updated CHANGELOG for 2.2.8
bumped the version
fixed typo
updated VERSION for 2.2.7
update CONTRIBUTORS for 2.2.7
updated CHANGELOG for 2.2.7
bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
fixed HTML5 form attribute handling XPath query
Removed old way of building icu data.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Discussion
----------
Make the getNode function public (DomCrawler)
The getNode function should be public so that DomElement objects can be accessed directly if need be without having to loop manually.
Use case: Want to get to the tagname of a specific domelement.
Commits
-------
9868415 Make getNode function public
This PR was squashed before being merged into the master branch (closes#8288).
Discussion
----------
[Process] Added support for stdout and stderr flush (Issue #7884)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7884
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/2728
**To-do**
- [x] Submit changes to the documentation.
- [x] Fix a test broken on travis.
- [x] Fix mistakes on the documentation.
- [x] Removed flush + get methods.
- [x] Changed tests assert calls.
This PR introduces flushing methods for both stdout and stderr on Process class. The new methods are:
- flushOutput(): clears the output buffer.
- flushErrorOutput(): clears the error output buffer.
Tests for new methods are included on the PR.
Commits
-------
90daef7 [Process] Added support for stdout and stderr flush (Issue #7884)
This PR was merged into the master branch.
Discussion
----------
[Translation] Added support for JSON format (both loader and dumper).
Based on `IniFileLoader\Dumper`.
Q | A
--- | ---
Bug fix? |no
New feature? | yes
BC breaks?| no
Deprecations? |no
Tests pass? | yes
Fixed tickets | -
License | MIT
Doc | this component don't have docs
Commits
-------
fcef021 [Translation] Added support for JSON format (both loader and dumper).
This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).
This PR was merged into the master branch.
Discussion
----------
Update FormTypeCsrfExtension.php
There is no need to store the FormFactory in an Attribute.
The FormFactory can be retrieved directly.
Commits
-------
90d59ea Update FormTypeCsrfExtension.php
This PR was merged into the master branch.
Discussion
----------
[Validator] Simplified usage of the Callback constraint
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | fixes#2480, replaces #3939
| License | MIT
| Doc PR | symfony/symfony-docs#3012
Commits
-------
cccb1db [Validator] Simplified usage of the Callback constraint
* 2.2:
bumped Symfony version to 2.2.9
updated VERSION for 2.2.8
updated CHANGELOG for 2.2.8
bumped the version
fixed typo
updated VERSION for 2.2.7
update CONTRIBUTORS for 2.2.7
updated CHANGELOG for 2.2.7
bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
The regexp matching prefixes is naive and matches most of strings followed by a colon. It is also incomplete as it does not match all the supported characters (like the unicode ones). It is simple though and sufficient in most situations.
This PR was merged into the master branch.
Discussion
----------
[DomCrawler] Added auto-discovery and explicit registration of namespaces in filter() and filterByXPath()
| Q | A
| --- | ---
|Bug fix: | no
|Feature addition: |yes
|Backwards compatibility break: | yes, default namespace is no longer removed in the `addContent` method
|Symfony2 tests pass: | yes|
|Fixes the following tickets: | #4845
|Todo: | -
|License of the code:| MIT
|Documentation PR: | symfony/symfony-docs#2979
* added support for automatic discovery and explicit registration of document namespaces for `Crawler::filterXPath()` and `Crawler::filter()`
* improved content type guessing in `Crawler::addContent()`
* [BC BREAK] `Crawler::addXmlContent()` no longer removes the default document namespace
I mentioned in #4845 it would probably be possible to use [DOMNode::lookupNamespaceURI()](http://www.php.net/manual/en/domnode.lookupnamespaceuri.php) to find a namespace URI by given prefix. Unfortunately we cannot use it here since we'd have to call it on a node in the namespace we're looking for.
Current implementation makes the following query to find a namespace:
```php
$domxpath->query('(//namespace::*[name()="media"])[last()]')
```
Commits
-------
77e2fa5 [DomCrawler] Removed checks if CssSelector is present.
9110468 [DomCrawler] Enabled manual namespace registration.
be1e4e6 [DomCrawler] Enabled default namespace prefix overloading.
943d446 [DomCrawler] Updated the CHANGELOG with namespace auto-registration details.
c6fbb13 [DomCrawler] Added support for an automatic default namespace registration.
587e2dd [DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
c905bba [DomCrawler] Added more tests for namespaced filtering.
6e717a3 [DomCrawler] Made sure only the default namespace is removed when loading an XML content.
e5b8abb [DomCrawler] Added auto-discovery of namespaces in Crawler::filter() and Crawler::filterByXPath().
* 2.3:
Run all tests in parallel.
Fixed an entity class name.
[HttpKernel] fix usage of deprecated FlattenException
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
* 2.2:
Run all tests in parallel.
Fixed an entity class name.
Conflicts:
.travis.yml
src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
This PR was squashed before being merged into the master branch (closes#9095).
Discussion
----------
[ExpressionLanguage] Introduce a ParserCacheInterface with array/doctrine implementations
| 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
-------
c8e6799 [ExpressionLanguage] Introduce a ParserCacheInterface with array/doctrine implementations
Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows
value chaining (`https, http`, where `https` is always first when request is encrypted).
* 2.3:
[Locale] added support for the position argument to NumberFormatter::parse()
[Locale] added some more stubs for the number formatter
[Yaml] fixed typo
[Yaml] fixed a test on PHP < 5.4
[DomCrawler]Crawler guess charset from html
fixed PHP 5.3 compatibility
[Yaml] reverted previous merge partially (refs #8897)
[Security] remove unused logger
[Security] fix typo
[Yaml] Fixed filename in the ParseException message
* 2.2:
[Locale] added support for the position argument to NumberFormatter::parse()
[Locale] added some more stubs for the number formatter
[Yaml] fixed typo
[Yaml] fixed a test on PHP < 5.4
[DomCrawler]Crawler guess charset from html
fixed PHP 5.3 compatibility
[Yaml] reverted previous merge partially (refs #8897)
[Security] remove unused logger
[Security] fix typo
[Yaml] Fixed filename in the ParseException message
Conflicts:
src/Symfony/Component/Console/Input/InputDefinition.php
src/Symfony/Component/Locale/Stub/StubNumberFormatter.php
src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
This PR was squashed before being merged into the 2.2 branch (closes#9074).
Discussion
----------
[DomCrawler]Crawler guess charset from html
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9061
| License | MIT
| Doc PR | n/a
Commits
-------
e5282e8 [DomCrawler]Crawler guess charset from html
This PR was merged into the 2.2 branch.
Discussion
----------
[Yaml] Fixed filename in the ParseException message
| Q | A
| ------------- | ---
| Bug fix? | sort of
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | —
| License | MIT
| Doc PR | —
Yaml component throws an exception with corrupt filename because of `json_encode`:
```
[Symfony\Component\Yaml\Exception\ParseException]
A YAML file cannot contain tabs as indentation in "\/var\/www\/app\/config.yml" at line 42 (near " foo: bar").
```
Commits
-------
da44651 [Yaml] Fixed filename in the ParseException message
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] [Fragment] Fixed CS
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Only two simple CS fixes.
Commits
-------
7d53314 [HttpKernel] Fragment Fixed CS
This PR was merged into the master branch.
Discussion
----------
New Component: Expression Language
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8850, #7352
| License | MIT
| Doc PR | not yet
TODO:
- [ ] write documentation
- [x] add tests for the new component
- [x] implement expression support for access rules in the security component
- [x] find a better character/convention for expressions in the YAML format
- [x] check the performance of the evaluation mode
- [x] better error messages in the evaluation mode
- [x] add support in the Routing
- [x] add support in the Validator
The ExpressionLanguage component provides an engine that can compile and
evaluate expressions.
An expression is a one-liner that returns a value (mostly, but not limited to, Booleans).
It is a strip-down version of Twig (only the expression part of it is
implemented.) Like Twig, the expression is lexed, parsed, and
compiled/evaluated. So, it is immune to external injections by design.
If we compare it to Twig, here are the main big differences:
* only support for Twig expressions
* no ambiguity for calls (foo.bar is only valid for properties, foo['bar'] is only valid for array calls, and foo.bar() is required for method calls)
* no support for naming conventions in method calls (if the method is named getFoo(), you must use getFoo() and not foo())
* no notion of a line for errors, but a cursor (we are mostly talking about one-liners here)
* removed everything specific to the templating engine (like output escaping or filters)
* no support for named arguments in method calls
* only one extension point with functions (no possibility to define new operators, ...)
* and probably even more I don't remember right now
* there is no need for a runtime environment, the compiled PHP string is self-sufficient
An open question is whether we keep the difference betweens arrays and hashes.
The other big difference with Twig is that it can work in two modes (possible
because of the restrictions described above):
* compilation: the expression is compiled to PHP and is self-sufficient
* evaluation: the expression is evaluated without being compiled to PHP (the node tree produced by the parser can be serialized and evaluated afterwards -- so it can be saved on disk or in a database to speed up things when needed)
Let's see a simple example:
```php
$language = new ExpressionLanguage();
echo $language->evaluate('1 + 1');
// will echo 2
echo $language->compile('1 + 2');
// will echo "(1 + 2)"
```
The language supports:
* all basic math operators (with precedence rules):
* unary: not, !, -, +
* binary: or, ||, and, &&, b-or, b-xor, b-and, ==, ===, !=, !==, <, >, >=, <=, not in, in, .., +, -, ~, *, /, %, **
* all literals supported by Twig: strings, numbers, arrays (`[1, 2]`), hashes
(`{a: "b"}`), Booleans, and null.
* simple variables (`foo`), array accesses (`foo[1]`), property accesses
(`foo.bar`), and method calls (`foo.bar(1, 2)`).
* the ternary operator: `true ? true : false` (and all the shortcuts
implemented in Twig).
* function calls (`constant('FOO')` -- `constant` is the only built-in
functions).
* and of course, any combination of the above.
The compilation is better for performances as the end result is just a plain PHP string without any runtime. For the evaluation, we need to tokenize, parse, and evaluate the nodes on the fly. This can be optimized by using a `ParsedExpression` or a `SerializedParsedExpression` instead:
```php
$nodes = $language->parse($expr, $names);
$expression = new SerializedParsedExpression($expr, serialize($nodes));
// You can now store the expression in a DB for later reuse
// a SerializedParsedExpression can be evaluated like any other expressions,
// but under the hood, the lexer and the parser won't be used at all, so it''s much faster.
$language->evaluate($expression);
```
That's all folks!
I can see many use cases for this new component, and we have two use cases in
Symfony that we can implement right away.
## Using Expressions in the Service Container
The first one is expression support in the service container (it would replace
#8850) -- anywhere you can pass an argument in the service container, you can
use an expression:
```php
$c->register('foo', 'Foo')->addArgument(new Expression('bar.getvalue()'));
```
You have access to the service container via `this`:
container.get("bar").getvalue(container.getParameter("value"))
The implementation comes with two functions that simplifies expressions
(`service()` to get a service, and `parameter` to get a parameter value). The
previous example can be simplified to:
service("bar").getvalue(parameter("value"))
Here is how to use it in XML:
```xml
<parameters>
<parameter key="value">foobar</parameter>
</parameters>
<services>
<service id="foo" class="Foo">
<argument type="expression">service('bar').getvalue(parameter('value'))</argument>
</service>
<service id="bar" class="Bar" />
</services>
```
and in YAML (I chose the syntax randomly ;)):
```yaml
parameters:
value: foobar
services:
bar:
class: Bar
foo:
class: Foo
arguments: [@=service("bar").getvalue(parameter("value"))]
```
When using the container builder, Symfony uses the evaluator, but with the PHP
dumper, the compiler is used, and there is no overhead as the expression
engine is not needed at runtime. The expression above would be compiled to:
```php
$this->get("bar")->getvalue($this->getParameter("value"))
```
## Using Expression for Security Access Control Rules
The second use case in Symfony is for access rules.
As we all know, the way to configure the security access control rules is confusing, which might lead to insecure applications (see http://symfony.com/blog/security-access-control-documentation-issue for more information).
Here is how the new `allow_if` works:
```yaml
access_control:
- { path: ^/_internal/secure, allow_if: "'127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" }
```
This one restricts the URLs starting with `/_internal/secure` to people browsing from the localhost. Here, `request` is the current Request instance. In the expression, there is access to the following variables:
* `request`
* `token`
* `user`
And to the following functions:
* `is_anonymous`
* `is_authenticated`
* `is_fully_authenticated`
* `is_rememberme`
* `has_role`
You can also use expressions in Twig, which works well with the `is_granted` function:
```jinja
{% if is_granted(expression('has_role("FOO")')) %}
...
{% endif %}
```
## Using Expressions in the Routing
Out of the box, Symfony can only match an incoming request based on some pre-determined variables (like the path info, the method, the scheme, ...). But some people want to be able to match on more complex logic, based on other information of the Request object. That's why we introduced `RequestMatcherInterface` recently (but we no default implementation in Symfony itself).
The first change I've made (not related to expression support) is implement this interface for the default `UrlMatcher`. It was simple enough.
Then, I've added a new `condition` configuration for Route objects, which allow you to add any valid expression. An expression has access to the `request` and to the routing `context`.
Here is how one would configure it in a YAML file:
```yaml
hello:
path: /hello/{name}
condition: "context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'"
```
Why do I keep the context as all the data are also available in the request? Because you can also use the condition without using the RequestMatcherInterface, in which case, you don't have access to the request. So, the previous example is equivalent to:
```yaml
hello:
path: /hello/{name}
condition: "request.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'"
```
When using the PHP dumper, there is no overhead as the condition is compiled. Here is how it looks like:
```php
// hello
if (0 === strpos($pathinfo, '/hello') && preg_match('#^/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches) && (in_array($context->getMethod(), array(0 => "GET", 1 => "HEAD")) && preg_match("/firefox/i", $request->headers->get("User-Agent")))) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'hello')), array ());
}
```
Be warned that conditions are not taken into account when generating a URL.
## Using Expressions in the Validator
There is a new Expression constraint that you can put on a class. The expression is then evaluated for validation:
```php
use Symfony\Component\Validator\Constraints as Assert;
/**
* @Assert\Condition(condition="this.getFoo() == 'fo'", message="Not good!")
*/
class Obj
{
public function getFoo()
{
return 'foo';
}
}
```
In the expression, you get access to the current object via the `this` variable.
## Dynamic annotations
The expression language component is also very useful in annotations. the SensoLabs FrameworkExtraBundle leverages this possibility to implement HTTP validation caching in the `@Cache` annotation and to add a new `@Security` annotation (see sensiolabs/SensioFrameworkExtraBundle#238.)
Commits
-------
d4ebbfd [Validator] Renamed Condition to Expression and added possibility to set it onto properties
a3b3a78 [Validator] added a constraint that runs an expression
1bcfb40 added optimized versions of expressions
984bd38 mades things more consistent for the end user
d477f15 [Routing] added support for expression conditions in routes
86ac8d7 [ExpressionLanguage] improved performance
e369d14 added a Twig extension to create Expression instances
38b7fde added support for expression in control access rules
2777ac7 [HttpFoundation] added ExpressionRequestMatcher
c25abd9 [DependencyInjection] added support for expressions in the service container
3a41781 [ExpressionLanguage] added support for regexes
9d98fa2 [ExpressionLanguage] added the component
This PR was merged into the 2.3 branch.
Discussion
----------
Fix `use` statements in HttpKernel\Client
Commits
-------
5d5ea9a Fix `use` statements in HttpKernel\Client
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] fix typo and remove unused logger
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
a33cc51 [Security] remove unused logger
62de9c1 [Security] fix typo
This PR was merged into the master branch.
Discussion
----------
[Security] Remove unused use statement
Commits
-------
6981669 Remove unused use statement
* 2.3:
fixed phpdoc
Fix some annotates
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
[HttpKernel] remove unneeded strtoupper
updated the composer install command to reflect changes in Composer
Conflicts:
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
* 2.2:
Fix some annotates
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
[HttpKernel] remove unneeded strtoupper
updated the composer install command to reflect changes in Composer
Conflicts:
src/Symfony/Component/Console/Application.php
src/Symfony/Component/Console/Command/Command.php
src/Symfony/Component/Console/Input/InputDefinition.php
src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php
src/Symfony/Component/Locale/Locale.php
src/Symfony/Component/Locale/README.md
src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php
This PR was squashed before being merged into the 2.2 branch (closes#9067).
Discussion
----------
Fix some annotates
| 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
send those fixes in branch 2.2
This pr includes #9065
Commits
-------
de39bd5 Fix some annotates
This PR was merged into the master branch.
Discussion
----------
[Security] Split the component into 3 sub-components Core, ACL, HTTP
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9047, #8848
| License | MIT
| Doc PR | -
The rationale behind this PR is to be able to use any of the sub components without requiring all the dependencies of the other sub components. Specifically, I'd like to use the core utils for an improved CSRF protection mechanism (#6554).
Commits
-------
14e9f46 [Security] removed unneeded hard dependencies in Core
5dbec8a [Security] fixed README files
62bda79 [Security] copied the Resources/ directory to Core/Resources/
7826781 [Security] Split the component into 3 sub-components Core, ACL, HTTP
This PR was squashed before being merged into the master branch (closes#8635).
Discussion
----------
[Config] Create XML Reference Dumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Only Yaml was supported. This PR adds support for XML. This makes it easier to test XML schema's (see symfony-cmf/MenuBundle#114 ), helps us at the docs with our configuration reference and helps others using XML with symfony.
## Todo
- [x] Prototyped arrays don't work properly
- [x] Add comments (see Yaml dumper)
- [x] Add namespaces support
## Side effects
I've moved the reference dumpers to their own namespace and renamed the original reference dumper to `YamlReferenceDumper`. The old one is kept for BC, but deprecated.
/cc @dantleech
Commits
-------
05e9ca7 [Config] Create XML Reference Dumper
* 2.3:
fixes RequestDataCollector bug, visible when used on Drupal8
[Console] fixed exception rendering when nested styles
[Console] added some more information about OutputFormatter::replaceStyle()
[Console] fixed the formatter for single-char tags
[Console] Escape exception message during the rendering of an exception
[DomCrawler] fixed HTML5 form attribute handling
Making tests pass on mac os x without this change tests would fail under mac os x at least in 10.8.2
[BrowserKit] Fixed the handling of parameters when redirecting
[Process] Properly close pipes after a Process::stop call
fixed bytes conversion when used on 32-bits systems
Typo fix
HttpFoundation RequestTest - Fixed indentation and removed comments
HttpFoundation Request test for #8619
LICENSE files moved to meta folders
added missing method in the UPGRADE file for 2.2 (closes#8941)
[Form] Fixed: "required" attribute is not added to <select> tag if no empty value
[Translation] Removed an unneeded return annotation.
[DomCrawler] Added missing docblocks and removed unneeded return annotation.
Conflicts:
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
* 2.2:
fixes RequestDataCollector bug, visible when used on Drupal8
[Console] fixed exception rendering when nested styles
[Console] added some more information about OutputFormatter::replaceStyle()
[Console] fixed the formatter for single-char tags
[Console] Escape exception message during the rendering of an exception
[BrowserKit] Fixed the handling of parameters when redirecting
Typo fix
HttpFoundation RequestTest - Fixed indentation and removed comments
HttpFoundation Request test for #8619
LICENSE files moved to meta folders
added missing method in the UPGRADE file for 2.2 (closes#8941)
[Translation] Removed an unneeded return annotation.
[DomCrawler] Added missing docblocks and removed unneeded return annotation.
Conflicts:
src/Symfony/Component/BrowserKit/Client.php
src/Symfony/Component/DomCrawler/Crawler.php
In Drupal8 ```$request->attributes->all()``` returns an array with a 0 key whose value is the ```Drupal\user\Entity\User```
```php
array(
0 => Drupal\user\Entity\User,
...
)
```
```('_route' == $key && is_object($value))``` is therefore true which provokes an exception:
```php
FatalErrorException: Error: Call to undefined method Drupal\user\Entity\User::getPath() in [...]/RequestDataCollector.php line 54
```
This patch corrects this with a simple replacement of == by ===
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Fixed exception rendering
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9045
| License | MIT
| Doc PR | n/a
When an exception message contains styles, the output is not the expected one. This PR addresses this issue.
Commits
-------
c8d0342 [Console] fixed exception rendering when nested styles
1f88a28 [Console] added some more information about OutputFormatter::replaceStyle()
a47d663 [Console] fixed the formatter for single-char tags
c6c35b3 [Console] Escape exception message during the rendering of an exception
This PR was squashed before being merged into the 2.3 branch (closes#8197).
Discussion
----------
[DomCrawler] fixed HTML5 form attribute handling
Fixed HTML5 form attribute handling and improved a test case to test more thoroughly
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6239
| License | MIT
| Doc PR | no
Commits
-------
04e730e [DomCrawler] fixed HTML5 form attribute handling
This PR was merged into the 2.3 branch.
Discussion
----------
[Process][2.3] Properly close pipes after a Process::stop call
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When calling `Process::stop`, if the process does not stop before the end of the method, pipes are not close, `proc_close` is not called.
I added a test that randomly fails without the patch :
```
phpunit --filter=testStartAfterATimeout --repeat 100 Tests/SimpleProcessTest.php
PHPUnit 3.8-g55a6dd0 by Sebastian Bergmann.
Configuration read from /Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/phpunit.xml.dist
....E.E......E.....E..........EE..............EEE..EE.......E.. 63 / 100 ( 63%)
E.E................E....EE.......E...
Time: 29.55 seconds, Memory: 6.75Mb
There were 18 errors:
1) Symfony\Component\Process\Tests\SimpleProcessTest::testStartAfterATimeout
fclose(): 89 is not a valid stream resource
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:95
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:80
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:62
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:938
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:229
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Tests/AbstractProcessTest.php:490
```
And of course, I solved the issue, tests are now OK.
Commits
-------
d84df4c [Process] Properly close pipes after a Process::stop call
This PR was merged into the 2.3 branch.
Discussion
----------
fixed bytes conversion when used on 32-bits systems
| Q | A
| ------------- | ---
| Bug fix? | yes (on 32-bits systems)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8977
| License | MIT
| Doc PR | n/a
This PR reverts #7413 and #742, which does not work well when a number is big (3Go for instance) and the machine is 32bits.
Commits
-------
b3ae29d fixed bytes conversion when used on 32-bits systems
This PR was squashed before being merged into the master branch (closes#7852).
Discussion
----------
[2.3][EventDispatcher] Make events lighter
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | symfony/symfony-docs#2476
I've taken the previous discussions and taking into consideration @fabpot does not want to break BC. This PR now provides the `EventDispatcher` as an argument to listeners. I've made a second separate commit which also passes the event name.
This PR is alternative to #7582
Commits
-------
e2bff32 [2.3][EventDispatcher] Make events lighter
This PR was merged into the 2.2 branch.
Discussion
----------
[DomCrawler] Added missing docblocks and removed redundant type in a return annotation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d414213 [DomCrawler] Added missing docblocks and removed unneeded return annotation.
This PR was merged into the 2.2 branch.
Discussion
----------
[Translation] Removed a @return annotation
This is the only `@return null` left...
Commits
-------
d6f4def [Translation] Removed an unneeded return annotation.
* 2.3:
[FrameworkBundle][Security] Replaced void return type with null for consistency
fixed CS
NativeSessionStorage regenerate
removed unneeded comment
Use setTimeZone if this method exists.
Fix FileResource test
fixed wrong usage of unset()
[HttpFoundation] Fixed the way path to directory is trimmed.
[Console] Fixed argument parsing when a single dash is passed.
* 2.2:
[FrameworkBundle][Security] Replaced void return type with null for consistency
fixed CS
NativeSessionStorage regenerate
removed unneeded comment
Use setTimeZone if this method exists.
Fix FileResource test
fixed wrong usage of unset()
[HttpFoundation] Fixed the way path to directory is trimmed.
[Console] Fixed argument parsing when a single dash is passed.
Conflicts:
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
This PR was squashed before being merged into the 2.2 branch (closes#9026).
Discussion
----------
[FrameworkBundle][Security] Replaced void return type with null for consistency
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We're using `null` everywhere else.
Commits
-------
e4100ac [FrameworkBundle][Security] Replaced void return type with null for consistency
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Fixed argument parsing when a single dash is passed.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8986
| License | MIT
| Doc PR |
Commits
-------
42019f6 [Console] Fixed argument parsing when a single dash is passed.
I had the following test failing on OS X before:
There was 1 failure:
1) Symfony\Component\Config\Tests\Resource\FileResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Fixed the way path to directory is trimmed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | re #8388
| License | MIT
| Doc PR | -
Commits
-------
773e716 [HttpFoundation] Fixed the way path to directory is trimmed.
* 2.3:
[WebProfilerBundle] fixed toolbar for IE8 (refs #8380)
[HttpFoundation] removed double-slashes (closes#8388)
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
* 2.2:
[HttpFoundation] removed double-slashes (closes#8388)
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8507
| License | MIT
| Doc PR | n/a
Commits
-------
4f5b8f0 [HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
* 2.3:
[HttpKernel] added a check for private event listeners/subscribers
[FrameworkBundle] fixed registration of the register listener pass
[Form] Fixed regression causing invalid "WHERE id IN ()" statements
[DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes#8425)
[Form] Fixed regression in BooleanToStringTransformer from ed83752
[FrameworkBundle] removed obsolete code
[Process] Close unix pipes before calling `proc_close` to avoid a deadlock
[Process] Fix process merge in 2.3
[Intl] made RegionBundle and LanguageBundle merge fallback data when using a country-specific locale
* 2.2:
[HttpKernel] added a check for private event listeners/subscribers
[FrameworkBundle] fixed registration of the register listener pass
[Form] Fixed regression causing invalid "WHERE id IN ()" statements
[DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes#8425)
[Form] Fixed regression in BooleanToStringTransformer from ed83752
[FrameworkBundle] removed obsolete code
[Process] Close unix pipes before calling `proc_close` to avoid a deadlock
Conflicts:
src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/Process/Process.php
This PR was merged into the master branch.
Discussion
----------
[DependencyInjection] added tags validation when compiling a container
| Q | A
| ------------- | ---
| Bug fix? | yes & no
| New feature? | yes & no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7543
| License | MIT
| Doc PR | n/a
When using YAML or XML, the tags validadity are checked during loading, but when using PHP, that's not possible.
So, the added step in the compilation phase does that nicely.
Commits
-------
5cad478 [DependencyInjection] added tags validation when compiling a container
This circular reference cannot be detected by the compiler pass as we
don't check for method arguments there.
The Container itself already detects such circular references at runtime.
So this fix is about circular references that are not detected at
compile time, and are not even detected at runtime because the code that
would cause the detection is never run (generated after a return
statement.)
This PR was merged into the master branch.
Discussion
----------
[Debug] removed usage of a deprecated class (closes#8992)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8992
| License | MIT
| Doc PR | n/a
Commits
-------
c673c0e [Debug] removed usage of a deprecated class (closes#8992)
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] made RegionBundle merge fallback data if using a country-specific locale
See #8442 and symfony/Icu#2.
Essentially, country data fetches from the Intl component do not currently work when using a locale with a country specifier, e.g. `fr_FR`. This change forces a merge on the data against the root language locale, thus making country data available for such locales.
Commits
-------
52d8676 [Intl] made RegionBundle and LanguageBundle merge fallback data when using a country-specific locale
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed FormValidator::findClickedButton() not to be called exponentially
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8317
| License | MIT
| Doc PR | -
Commits
-------
b65a515 [Form] Fixed FormValidator::findClickedButton() not to be called exponentially
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] fixed format duplication in Request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8976
| License | MIT
| Doc PR | n/a
Commits
-------
8c2a733 [HttpFoundation] fixed format duplication in Request
This PR was merged into the master branch.
Discussion
----------
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
#7939 must be merged before this PR is merged.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5113, #5190
| License | MIT
| Doc PR | -
TODO:
- [x] test EntityChoiceList for stricter rules
- [ ] test ModelChoiceList for stricter rules
- [x] remove/deprecate the ChoiceList::getIndicesFor*() methods
Commits
-------
9efdb8e [Form] Deprecated ChoiceList::getIndicesFor*() methods
67ba131 [DoctrineBridge] Improved test coverage of EntityChoiceList
31e5ce5 [Form] Improved test coverage of ChoiceList classes
6283b0e [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
79a214f [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
62fbed6 [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
* 2.3:
Fixed docblock in UserInterface::getSalt()
[Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
[DoctrineBridge] Improved test coverage of EntityChoiceList
[DoctrineBridge] Improved test coverage of EntityChoiceList
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
Removed duplicate annotation
[HttpKernel] made code more reliable
[HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes#8917)
[HttpKernel] fixer HInclude src (closes#8951)
Fixed escaping of service identifiers in configuration
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/GenericEntityChoiceListTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.3.
Commits
-------
7879f07 [DoctrineBridge] Improved test coverage of EntityChoiceList
58e7c10 [Form] Improved test coverage of ChoiceList classes
9542d72 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
72b8807 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
e1bf07f [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
* 2.2:
Fixed docblock in UserInterface::getSalt()
[Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
[DoctrineBridge] Improved test coverage of EntityChoiceList
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[HttpKernel] made code more reliable
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php
src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php
src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.2.
Commits
-------
4d2dc55 [DoctrineBridge] Improved test coverage of EntityChoiceList
9d3628c [Form] Improved test coverage of ChoiceList classes
ed83752 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
30aa1de [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
53f292a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
This PR was merged into the 2.2 branch.
Discussion
----------
[Process][2.2] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8970
| License | MIT
This fix the read of file handles after `proc_close` as described in the issue. I enable some stdin=>stdout pipes tests on windows with some dedicated buffer size. Solving the issue, I finally reproduced this [PHP bug](https://bugs.php.net/bug.php?id=65650) that I first described in my PR note in #8924
Most of Windows usage should be okay, but in case of a program throws lots of output and fills the buffer, some data might be lost/corrupted. Should it be documented ? This is a Windows only known issue.
Commits
-------
1e75cf9 [Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
* 2.2:
[HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes#8917)
[HttpKernel] fixer HInclude src (closes#8951)
Fixed escaping of service identifiers in configuration
This PR was squashed before being merged into the master branch (closes#8928).
Discussion
----------
[Console] Improved xml generated when listing commands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I marked this PR as a BC break, as it breaks the xml schema generated by the command __app/console list --xml__
It replaces the first node (currently _symfony_) by a more generic node name ( _application_ ) and adds the application name and application version if specified in the _Symfony\Component\Console\Application_ constructor.
Before (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<symfony>
...
</symfony>
```
After (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<application name="Composer" version="x.x.x">
...
</application>
```
Commits
-------
7958227 [Console] Improved xml generated when listing commands
* 2.3:
[HttpFoundation] removed extra parenthesis
[Process][2.2] Fix Process component on windows
[HttpFoundation] improve perf of previous merge (refs #8882)
Request->getPort() should prefer HTTP_HOST over SERVER_PORT
Fixing broken http auth digest in some circumstances (php-fpm + apache).
fixed typo
Conflicts:
src/Symfony/Component/Process/Process.php
* 2.2:
[HttpFoundation] removed extra parenthesis
[Process][2.2] Fix Process component on windows
[HttpFoundation] improve perf of previous merge (refs #8882)
Request->getPort() should prefer HTTP_HOST over SERVER_PORT
Fixing broken http auth digest in some circumstances (php-fpm + apache).
fixed typo
Conflicts:
src/Symfony/Component/Process/Process.php
This PR was squashed before being merged into the 2.2 branch (closes#8924).
Discussion
----------
[Process][2.2] Fix Process component on windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8836, #8799, #7078
| License | MIT
This PR fixes Process on windows (almost, see note below).
- Some unit tests were not Windows compatible
- Use a file handle for STDERR as well as STDOUT to avoid blocking
- Decouple pipes and descriptors from Process
As this move some a part of Process in a sub class, I hope merging this in 2.3 and master would not be a PITA. I'm here to make some adjustments after theses merge if needed.
**Important note** :
We are using file handles instead of streams for `proc_open` pipes as described in the code (see [PHP bug #51800](https://bugs.php.net/bug.php?id=51800)). Unfortunately, this workaround may produce corrupted output/error output in some race conditions. That's why `AbstractProcessTest::testProcessPipes` randomly fails when using file handles (on unix and windows).
Commits
-------
4a76c76 [Process][2.2] Fix Process component on windows
* 2.3:
Fixing singular form for kisses, accesses and addresses.
fixed some circular references
[Security] fixed a leak in ExceptionListener
[Security] fixed a leak in the ContextListener
Ignore posix_istatty warnings
removed unused variable
[Form] fix iterator typehint
typos
Button missing getErrorsAsString() fixes#8084 Debug: Not calling undefined method anymore. If the form contained a submit button the call would fail and the debug of the form wasn't possible. Now it will work in all cases. This fixes#8084
Use isset() instead of array_key_exists() in DIC
Fixed annotation
[BrowserKit] fixed method/files/content when redirecting a request
[BrowserKit] removed some headers when redirecting a request
[BrowserKit] fixed headers when redirecting if history is set to false (refs #8697)
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
[BrowserKit] Pass headers when `followRedirect()` is called
Return BC compatibility for `@Route` parameters and default values
Conflicts:
src/Symfony/Component/Security/Http/Firewall/ContextListener.php
* 2.2:
Fixing singular form for kisses, accesses and addresses.
fixed some circular references
[Security] fixed a leak in ExceptionListener
[Security] fixed a leak in the ContextListener
Ignore posix_istatty warnings
typos
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
Return BC compatibility for `@Route` parameters and default values
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
src/Symfony/Component/Console/Application.php
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] fixed a leak in the ContextListener
| 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
Trying to fix leaks when using the same Kernel to handle several requests in a row without resetting the Container or shutting down the Kernel.
Commits
-------
899f176 [Security] fixed a leak in ExceptionListener
2fd8a7a [Security] fixed a leak in the ContextListener
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] fixes some memory leaks
| Q | A
| ------------- | ---
| Bug fix? | kinda
| New feature? | no
| BC breaks? | kinda as the Bundle `$reflected` property was removed
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
6307f41 [HttpKernel] removed a circular reference that prevents PHP GC to do its job
49fe3c7 [HttpKernel] removed the need to use reflection to get a bundle namespace
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed some random leaks
| 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
Commits
-------
970405f fixed some circular references
set logger in extension , so its only done in debug mode
add psr/log to suggest of templating
add test for setLogger and refactor tests to not depend that much an
deprecated functionality
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2] Return BC compatibility for `@Route` parameters and default values
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7724
| License | MIT
Commits
-------
d400b5a Return BC compatibility for `@Route` parameters and default values
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8867
| License | MIT
| Doc PR | n/a
Commits
-------
c931eb7 [HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
* 2.2:
[BrowserKit] fixed method/files/content when redirecting a request
[BrowserKit] removed some headers when redirecting a request
[BrowserKit] fixed headers when redirecting if history is set to false (refs #8697)
[BrowserKit] Pass headers when `followRedirect()` is called
Conflicts:
src/Symfony/Component/BrowserKit/Client.php
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2] [BrowserKit] Pass headers when `followRedirect()` is called
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Tests pass? | yes
| Fixed tickets | #7929
| License | MIT
Commits
-------
0d07af8 [BrowserKit] Pass headers when `followRedirect()` is called
* 2.2:
[Security] fixed some phpdoc
Fixed PHPDoc Blocks
optimized circular reference checker
[HttpKernel] changed fragment URLs to be relative by default (closes#8458)
This PR was merged into the master branch.
Discussion
----------
[Security] Keep other query string parameters when switching users
| Q | A
| ---------------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| Doc PR | n/a
When switching users, the whole query string gets dropped when redirecting after the switch.
I think only the switch user parameter should be dropped from the query string.
Commits
-------
0a338f5 [Security] Keep other query string parameters when switching users
This PR was merged into the master branch.
Discussion
----------
duplicated the DebugClassLoader in the Debug component
| 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
This is a follow-up for #8553.
Commits
-------
d146461 duplicated the DebugClassLoader in the Debug component
This PR was merged into the 2.2 branch.
Discussion
----------
Made fragment URLs relative instead of absolute by default
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8458
| License | MIT
| Doc PR | n/a
This fixes a regression introduced with the new fragment system where fragment URLs were generated as absolute URLs. As per the ESI spec, there is no need to generate an absolute URL and this can even be problematic when dealing with internal sub-requests in a more "complex" hosting environment.
Commits
-------
91234cd [HttpKernel] changed fragment URLs to be relative by default (closes#8458)
* 2.3:
Clear lazy loading initializer after the service is successfully initialized
[FrameworkBundle] added support for double-quoted strings in the extractor (closes#8797)
[SecurityBundle] Move format-dependent tests from SecurityExtensionTest
bumped Symfony version to 2.3.5-DEV
updated VERSION for 2.3.4
updated CHANGELOG for 2.3.4
bumped Symfony version to 2.2.7
updated VERSION for 2.2.6
update CONTRIBUTORS for 2.2.6
updated CHANGELOG for 2.2.6
clearToken exception is thrown at wrong place.
fix typo in test skipped message
[Form] Fixed Form::all() signature for PHP 5.3.3
[Form] Fixed Form::all() signature for PHP 5.3.3
[Locale] Fixed: Locale::setDefault() throws no exception when "en" is passed
[Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed
[Translation] Grammar fix
[Yaml] fixed embedded folded string parsing
[Validator] fixed Boolean handling in XML constraint mappings (closes#5603)
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] add test to ensure Content-Length is preserved on HEAD
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Related to #8873
Commits
-------
42f0596 [HttpFoundation] add test to ensure that Content-Length is preserved on HEAD method
This PR was squashed before being merged into the master branch (closes#8856).
Discussion
----------
[HttpFoundation] Improve test coverage
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
aef78f2 [HttpFoundation] Improve test coverage
This PR was merged into the master branch.
Discussion
----------
fixes fabpots comment at yaml pr#6
Commits
-------
8b7cc14 fixes fabpots comment at yaml pr#6
This PR was squashed before being merged into the master branch (closes#8488).
Discussion
----------
Add container aware trait
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | will create one if merged
This trait can be used inside a class to make it container aware. As it is not always possible to extend the abstract ContainerAware class, the code for creating a container aware class is usually copied over and over (most of the time unchanged), resulting in a lot of redundant code in your project. As my projects are PHP 5.4 based nowadays, I would like to be able to use a trait in these scenarios to improve my workflow.
Commits
-------
4c9e606 Add container aware trait
* 2.2:
bumped Symfony version to 2.2.7
updated VERSION for 2.2.6
update CONTRIBUTORS for 2.2.6
updated CHANGELOG for 2.2.6
clearToken exception is thrown at wrong place.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
fix typo in test skipped message
[Form] Fixed Form::all() signature for PHP 5.3.3
[Translation] Grammar fix
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
Conflicts:
src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Dereferenced Form::&all() since it is not supported for PHP <= 5.3.3
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
see 00bc2708bc
Commits
-------
ea480bd [Form] Fixed Form::all() signature for PHP 5.3.3
This PR was merged into the 2.2 branch.
Discussion
----------
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There was one regression introduced by #8789, namely when exactly one message is passed to `transChoice()`. Before, the following code was perfectly valid:
```php
$translator = new IdentityTranslator(new MessageSelector());
echo $translator->transChoice('There are two apples', 2, array('%count%' => 2));
```
This didn't fail, because internally, the locale `null` was passed to `MessageSelector`, which always returned the index `0` in that case.
Now, the user's locale is passed, and if the selector returns anything but `0`, an exception is thrown.
I removed this exception for the case that exactly one standard message (without explicit interval) is passed. In that case, this message is returned (just like from `trans()`). If the message key contains more than one message, or if the message has explicit intervals, the exception will still be thrown. See the tests for clarification.
A use case for why no exception should be thrown is validation:
```php
/**
* @Assert\Length(min=2, minMessage="Please enter at least two characters")
*/
```
Commits
-------
2b3dcb9 [Translation] Grammar fix
0951b8d [Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Same as #8846 for 2.3+.
Commits
-------
e1f40f2 [Locale] Fixed: Locale::setDefault() throws no exception when "en" is passed
* 2.3:
fixed request format when forwarding a request
[HttpKernel] added a comment to warn about possible inconsistencies
added a functional test for locale handling in sub-requests
Fixed issue #6932 - Inconsistent locale handling in subrequests
fixed locale of sub-requests when explicitely set by the developer (refs #8821)
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php
src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
* 2.2:
fixed request format when forwarding a request
[HttpKernel] added a comment to warn about possible inconsistencies
added a functional test for locale handling in sub-requests
Fixed issue #6932 - Inconsistent locale handling in subrequests
fixed locale of sub-requests when explicitely set by the developer (refs #8821)
Conflicts:
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
fixed request format when forwarding a request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6932
| License | MIT
| Doc PR | n/a
When calling forward() in a controller, the format is not the same as for the master request.
Commits
-------
7e87eb1 fixed request format when forwarding a request
This PR was merged into the 2.2 branch.
Discussion
----------
fixed locale management in sub-requests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6932, #5532, #8604
| License | MIT
| Doc PR | n/a
Same fix as #8821 but for `_locale`, and a rebase of #8604.
Commits
-------
7117328 [HttpKernel] added a comment to warn about possible inconsistencies
c4636e1 added a functional test for locale handling in sub-requests
05fdb12 Fixed issue #6932 - Inconsistent locale handling in subrequests
b3c3159 fixed locale of sub-requests when explicitely set by the developer (refs #8821)
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] added constants for HTTP status code in Response
| 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
This adds constants for HTTP status code in Response. That's give the possibility to use constants instead of numbers in code.
These constants comes from FriendsOfSymfony/FOSRest but I think it is much better to keep them in Response as both the status texts and the constants should be synchronized.
ping @lsmith77
Commits
-------
0e14e1d [HttpFoundation] added constants for HTTP status code in Response
This PR was merged into the master branch.
Discussion
----------
removed deps checks in unit tests
| 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
As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more.
see fabpot/Silex#626 where we did the same a while ago for Silex.
Commits
-------
de50621 removed deps checks in unit tests
* 2.3:
[Routing] fix phpdoc
[Form] Extracted ReferencingArrayIterator out of VirtualFormAwareIterator
[Yaml] Fix comment containing a colon on a scalar line being parsed as a hash.
[Form] Added a test that ensures that setData() reacts to dynamic modifications of a form's children
[Form] Removed exception in Button::setData(): setData() is now always called for all elements in the form tree during the initialization of the tree
[Form] Removed call to deprecated method
[Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms)
[Form] Removed superfluous reset() call
[Form] Fixed: submit() reacts to dynamic modifications of the form children
This PR was merged into the 2.2 branch.
Discussion
----------
[Form][2.2] Fixed Form::submit() to react to dynamic form modifications
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
ref #3767, #3768, #4548, #8748
cc @Burgov
This PR ensures that fields that are added during the submission process of a form are submitted as well. For example:
```php
$builder = $this->createFormBuilder()
->add('country', 'choice', ...)
->getForm();
$builder->get('country')->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
$form = $event->getForm()->getParent();
$country = $event->getForm()->getData();
$form->add('province', 'choice', /* ... something with $country ... */);
});
```
Currently, the field "province" will not be submitted, because the submission loop uses `foreach`, which ignores changes in the underyling array.
Additionally, this PR ensures that `setData()` is called on *every* element of a form (except those inheriting their parent data) when `setData()` is called on the root element (i.e., during initialization). Currently, when some of the intermediate nodes (e.g. embedded forms) are submitted with an empty value, `setData()` won't be called on the nodes below (i.e. the fields of the embedded form) until `get*Data()` is called on them. If `getData()` is *not* called before `createView()`, any effects of `*_DATA` event listeners attached to those fields will not be visible in the view.
Commits
-------
cd27e1f [Form] Extracted ReferencingArrayIterator out of VirtualFormAwareIterator
ccaaedf [Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms)
19b483f [Form] Removed superfluous reset() call
00bc270 [Form] Fixed: submit() reacts to dynamic modifications of the form children