This PR was merged into the 2.3 branch.
Discussion
----------
[PropertyAccess] Backport fixes from 2.7
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While merging 2.3 into 2.7, I noticed that many fixes were merged into 2.7 that should have been merged into 2.3. This PR backports them, with a few other fixes applied when merging 2.3 into 2.7.
Commits
-------
cb1c87a [PropertyAccess] Backport fixes from 2.7
This PR was merged into the 2.7 branch.
Discussion
----------
[PropertyAccess] Fix isPropertyWritable not using the reflection cache
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While merging 2.3 into 2.7, I noticed that isPropertyWritable did not make use of the reflection cache of getWriteAccessInfo. This PR fixes it.
Commits
-------
8a52fcd [PropertyAccess] Fix isPropertyWritable not using the reflection cache
* 2.3:
[Validator] use correct term for a property in docblock (not "option")
[PropertyAccess] Remove most ref mismatches to improve perf
[Validator] EmailValidator cannot extract hostname if email contains multiple @ symbols
[NumberFormatter] Fix invalid numeric literal on PHP 7
Use XML_ELEMENT_NODE in nodeType check
[PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
[PropertyAccess] Throw an UnexpectedTypeException when the type do not match
[FrameworkBundle] Add tests for the Controller class
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php
src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
src/Symfony/Component/PropertyAccess/PropertyPath.php
src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
src/Symfony/Component/Validator/Constraints/EmailValidator.php
This PR was merged into the 2.3 branch.
Discussion
----------
[PropertyAccess] Remove most ref mismatches to improve perf
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR is for PHP5 where ref mismatches is a perf pain: it removes all ref mismatches along the "getValue" path, and keeps only the required ones on the "setValue" path.
Commits
-------
72940d7 [PropertyAccess] Remove most ref mismatches to improve perf
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] small refactoring for scheme requirement
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | refactoring
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18106
| License | MIT
| Doc PR |
Commits
-------
85f5e01 [Routing] small refactoring for scheme requirement
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] use correct term for a property in docblock (not "option")
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/18218
| License | MIT
| Doc PR | -
Commits
-------
e38d954 [Validator] use correct term for a property in docblock (not "option")
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle][2.7] Add tests for the Controller class
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Backport tests of #18193 to the `abstract` Controller.
Commits
-------
514a060 [FrameworkBundle] Add tests for the Controller class
This PR was merged into the 2.3 branch.
Discussion
----------
[FrameworkBundle][2.3] Add tests for the Controller class
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Backport tests of #18193 to the `abstract` Controller.
Commits
-------
ca56be1 [FrameworkBundle] Add tests for the Controller class
This PR was merged into the 2.3 branch.
Discussion
----------
[PropertyAccess] Throw an UnexpectedTypeException when the type do not match
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17738, #18032
| License | MIT
| Doc PR | -
Made in coordination with @dunglas,
Diff best viewed [ignoring whitspaces](https://github.com/symfony/symfony/pull/18210/files?w=1).
Quoting #18032:
> it appears that the current implementation is error prone because it throws a `\TypeError` that is an `Error` in PHP 7 but a regular `Exception` in PHP 5 because it uses the Symfony polyfill.
Programs wrote in PHP 5 and catching all exceptions will catch this "custom" `\TypeError ` but not those wrote in PHP 7. It can be very hard to debug.
> In this alternative implementation:
> * catching type mismatch is considered a bug fix and applied to Symfony 2.3
> * for every PHP versions, a domain exception is thrown
Commits
-------
5fe2b06 [PropertyAccess] Reduce overhead of UnexpectedTypeException tracking
10c8d5e [PropertyAccess] Throw an UnexpectedTypeException when the type do not match
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Use XML_ELEMENT_NODE in nodeType check
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Making use of the predefined dom constant `XML_ELEMENT_NODE` (which value is `1`) makes more sense while interpreting `parents()` it's functionality. See http://php.net/manual/en/dom.constants.php
Commits
-------
cffea91 Use XML_ELEMENT_NODE in nodeType check
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] getIncrementalOutput should work without calling getOutput
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17937
| License | MIT
Commits
-------
37d8695 [Process] getIncrementalOutput should work without calling getOutput
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Test DNS Url constraints using checkdnsrr() mock
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a4b42d1 [Validator] Test DNS Url constraints using checkdnsrr() mock
* 2.3:
Improved the PHPdoc of FileSystem::copy()
[Validator] Test DNS Email constraints using checkdnsrr() mock
[travis] Run real php subprocesses on hhvm for Process component tests
bug #18161 [Translation] Add support for fuzzy tags in PoFileLoader
[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
[Form] Fix INT64 cast to float in IntegerType.
[SecurityBundle][PHPDoc] Added method doumentation for SecurityFactoryInterface
FrameworkBundle: Client: getContainer(): fixed phpdoc
[Validator] Updating inaccurate docblock comment
Conflicts:
.travis.yml
src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php
This PR was squashed before being merged into the 2.3 branch (closes#18195).
Discussion
----------
Improved the PHPdoc of FileSystem::copy()
| Q | A
| ------------- | ---
| Branch | 2.3+
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12937
| License | MIT
| Doc PR | -
Commits
-------
9ad67ca Improved the PHPdoc of FileSystem::copy()
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Test DNS Email constraints using checkdnsrr() mock
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
165755a [Validator] Test DNS Email constraints using checkdnsrr() mock
This PR was merged into the 2.3 branch.
Discussion
----------
[travis] Run real php subprocesses on hhvm for Process component tests
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Let's see if this speeds up hhvm test matrix line.
Commits
-------
c722e35 [travis] Run real php subprocesses on hhvm for Process component tests
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#18175).
Discussion
----------
[Translation] Add support for fuzzy tags in PoFileLoader
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18161
| License | MIT
| Doc PR | -
The traditional gettext tools usually try to find similar strings when
updating translations. This results in some strings having a translation
but being marked as "fuzzy", even if the translation is not correct.
The expected result when a string is marked as fuzzy is that it should
not be used by the translation system. Using symfony, though, the
translations were used, which could result in "funny" messages being
displayed in the interface despite being often completely out of
context.
This commit discards messages in .po files that have a '#, fuzzy' flag.
This commit can (and imo should) be back-ported as-is to the 2.x branch.
Commits
-------
970b956 bug #18161 [Translation] Add support for fuzzy tags in PoFileLoader
The traditional gettext tools usually try to find similar strings when
updating translations. This results in some strings having a translation
but being marked as "fuzzy", even if the translation is not correct.
The expected result when a string is marked as fuzzy is that it should
not be used by the translation system. Using symfony, though, the
translations were used, which could result in "funny" messages being
displayed in the interface despite being often completely out of
context.
This commit discards messages in .po files that have a '#, fuzzy' flag.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 18161
| License | MIT
| Doc PR | -
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Replace kernel.debug with member variable
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | unlikely
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
While digging around I noticed that someone added debug to the constructor, but didn't replace all the `%kernel.debug%` strings. This PR is just to improve consistency.
Technically this could cause a BC break if someone was using a compiler pass to alter the argument of the constructor while the other config was relying on `%kernel.debug%`, but the likelihood of that is probably very low.
Commits
-------
181f256 Use debug member variable
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18077, #18067
| License | MIT
| Doc PR | -
Commits
-------
03c008c [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
6b6073f [Form] Fix INT64 cast to float in IntegerType.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#18114).
Discussion
----------
[SecurityBundle][PHPDoc] Added method doumentation for SecurityFactor…
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10870
| License | MIT
| Doc PR |
Commits
-------
cfb3ea1 [SecurityBundle][PHPDoc] Added method doumentation for SecurityFactoryInterface
This PR was merged into the 2.3 branch.
Discussion
----------
FrameworkBundle: Client: getContainer(): fixed phpdoc
| Q | A
| ------------- | ---
| Branch | lowest applicable and maintained version
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
The kernel [might be shut down](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/Kernel.php#L164) and then the method will return null instead of a ContainerInterface object.
---
I've stumbled upon when I was trying to do this in my [test](https://github.com/symfony/framework-bundle/blob/master/Test/WebTestCase.php):
```php
/**
* @var Client|null
*/
private static $client;
public static function tearDownAfterClass()
{
$entityManager = $client->getContainer()
->get('doctrine')
->getManager();
// remove entities created by tests
}
public function testWhatever()
{
self::$client = self::createClient();
// entities are created
}
```
`$client->getContainer()` has given me `null` while I was expecting the container, as the PHPDoc say I would. Unpleasant debugging and WTFing.
Commits
-------
7462fa5 FrameworkBundle: Client: getContainer(): fixed phpdoc