If null is passed to denormalize(), no property values can be set on
the denormalized object. Additionally, this fixes passing values to
the denormalized object's constructor if the incoming data is an object.
* 2.5:
[Translator] Use quote to surround invalid locale
[Validator] Fixed memory leak in ValidatorBuilder
[FrameworkBundle] changed KernelTestCase::getKernelClass() to check $_SERVER['KERNEL_DIR'] before invoking getPhpUnitXmlDir()
Optimize assertLocale regexp
[ExpressionLanguage] Fixed an issue with # characters in double quoted string literals
[Validator] Fixed object initializers in 2.5 version of the Validator
Add some tweaks to the pt_BR translations
[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
Conflicts:
src/Symfony/Component/Process/ProcessPipes.php
* 2.4:
[Translator] Use quote to surround invalid locale
Optimize assertLocale regexp
[ExpressionLanguage] Fixed an issue with # characters in double quoted string literals
Add some tweaks to the pt_BR translations
[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
Conflicts:
src/Symfony/Component/Validator/Tests/ValidationVisitorTest.php
* 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