This PR was squashed before being merged into the 2.3 branch (closes#16897).
Discussion
----------
[Form] Fix constraints could be null if not set
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If the form options has no key for constraints the default should be an empty array to be ignored by the loop in the FormValidator. The default without this fix is ```null``` and foreach will throw an error.
The "Bug" also still exists in master-Branch.
Commits
-------
f80e0eb [Form] Fix constraints could be null if not set
This PR was merged into the 3.1-dev branch.
Discussion
----------
Allows access to payload in callback validator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15092
| License | MIT
| Doc PR | none
Commits
-------
26cd91d allows access to payload in callback validator
This PR was merged into the 2.7 branch.
Discussion
----------
[Translation][Writer] avoid calling setBackup if the dumper is not FileDumper
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | n/a
Commits
-------
369b2d4 [Translation][Writer] avoid calling setBackup if the dumper is not an instance of FileDumper.
This PR was squashed before being merged into the 2.3 branch (closes#17134).
Discussion
----------
[Finder] Check PHP version before applying a workaround for a PHP bug
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | --
Commits
-------
cba206a [Finder] Check PHP version before applying a workaround for a PHP bug
* 2.8:
Ability to set empty version strategy in packages
Display Ajax request from newest to oldest in the toolbar
CLI: use request context to generate absolute URLs
[SecurityBundle] Optimize dependency injection tests
Sort bundles in config commands
[HttpFoundation] Do not overwrite the Authorization header if it is already set
tag for dumped PHP objects must be a local one
* 2.7:
Ability to set empty version strategy in packages
CLI: use request context to generate absolute URLs
[SecurityBundle] Optimize dependency injection tests
Sort bundles in config commands
[HttpFoundation] Do not overwrite the Authorization header if it is already set
tag for dumped PHP objects must be a local one
* 2.3:
[SecurityBundle] Optimize dependency injection tests
[HttpFoundation] Do not overwrite the Authorization header if it is already set
tag for dumped PHP objects must be a local one
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Serializer] Add a new DateTime normalizer
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
This PR add support for dates and times to the Normalizer component. It supports all date and time formats supported by PHP. Dates and times are normalized in the RFC 3339 format by default. The output format can be customized using the `$context` parameter. The default format can be changed using a constructor parameter.
Usage:
```php
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Serializer;
$serializer = new Serializer(array(new DateTimeNormalizer()));
echo $serializer->normalize(new \DateTimeImmutable('2016/01/01'));
// 2016-01-01T00:00:00+00:00
echo $serializer->normalize(new \DateTime('2016/01/01'));
// 2016-01-01T00:00:00+00:00
echo $serializer->normalize(new \DateTime('2016/01/01'), null, array(DateTimeNormalizer::FORMAT_KEY => 'Y'))
// 2016
var_dump($serializer->denormalize('2016-01-01T00:00:00+00:00', \DateTimeInterface::class));
// class DateTimeImmutable#1 (3) {
// public $date =>
// string(26) "2016-01-01 00:00:00.000000"
// public $timezone_type =>
// int(1)
// public $timezone =>
// string(6) "+00:00"
// }
var_dump($serializer->denormalize('2016-01-01T00:00:00+00:00', \DateTime::class));
// class DateTime#1 (3) {
// public $date =>
// string(26) "2016-01-01 00:00:00.000000"
// public $timezone_type =>
// int(1)
// public $timezone =>
// string(6) "+00:00"
// }
```
Commits
-------
6749a70 [Serializer] Add a new DateTime normalizer
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Yaml] deprecate parsing the !!php/object tag
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #16877
| License | MIT
| Doc PR |
Commits
-------
3380346 [Yaml] deprecate parsing the !!php/object tag
f146c8d tag for dumped PHP objects must be a local one
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] tag for dumped PHP objects must be a local one
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16877
| License | MIT
| Doc PR |
Commits
-------
9d03478 tag for dumped PHP objects must be a local one
* 3.0: (36 commits)
Fixed form types in profiler
[Process] Use stream based storage to avoid memory issues
Fix upgrade guides concerning erroneous removal of assets helper
[Process] Remove a misleading comment
Fix markdown typo
ChooseBaseUrl should return an index
[Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
[FrameworkBundle] Don't log twice with the error handler
synchronize 2.8 and 3.0 upgrade files
Remove useless is_object condition
[Process] Fix typo, no arguments needed anymore
[Serializer] Introduce constants for context keys
Fixed the documentation of VoterInterface::supportsAttribute
Fixed Bootstrap form theme form "reset" buttons
Fixed the form profiler when using long form types
[PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn't exist
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
...
* 2.8: (48 commits)
[Process] Use stream based storage to avoid memory issues
Fix upgrade guides concerning erroneous removal of assets helper
[Process] Remove a misleading comment
Fix markdown typo
ChooseBaseUrl should return an index
[Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
[FrameworkBundle] Don't log twice with the error handler
synchronize 2.8 and 3.0 upgrade files
Remove useless is_object condition
[Process] Fix typo, no arguments needed anymore
[Serializer] Introduce constants for context keys
Fixed the documentation of VoterInterface::supportsAttribute
Fixed Bootstrap form theme form "reset" buttons
Fixed the form profiler when using long form types
[PropertyInfo] PhpDocExtractor: Fix a notice when the property doesn't exist
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
synchronize 2.7 and 3.0 upgrade files
...
* 2.7: (28 commits)
[Process] Use stream based storage to avoid memory issues
Fix upgrade guides concerning erroneous removal of assets helper
[Process] Remove a misleading comment
Fix markdown typo
ChooseBaseUrl should return an index
[Form] ChoiceType: Fix a notice when 'choices' normalizer is replaced
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
[FrameworkBundle] Don't log twice with the error handler
Remove useless is_object condition
[Process] Fix typo, no arguments needed anymore
[Serializer] Introduce constants for context keys
Fixed the documentation of VoterInterface::supportsAttribute
Fixed Bootstrap form theme form "reset" buttons
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
synchronize 2.7 and 3.0 upgrade files
fix merge 2.3 into 2.7 for SecureRandom dependency
Use is_subclass_of instead of reflection
Use is_subclass_of instead of Reflection when possible
...
* 2.3:
[Process] Remove a misleading comment
Improve the phpdoc of SplFileInfo methods
[Process] Use stream based storage to avoid memory issues
Fixed the documentation of VoterInterface::supportsAttribute
Remove useless duplicated tests
[FrameworkBundle] Optimize framework extension tests
Use is_subclass_of instead of Reflection when possible
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Process] Use stream based storage to avoid memory issues
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17390
| License | MIT
Commits
-------
da73125 [Process] Use stream based storage to avoid memory issues
This PR was merged into the 2.3 branch.
Discussion
----------
Fixed the documentation of VoterInterface::supportsAttribute
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14655
| License | MIT
| Doc PR | -
Commits
-------
d662c2a Fixed the documentation of VoterInterface::supportsAttribute
This PR was merged into the 2.7 branch.
Discussion
----------
[Asset] ChooseBaseUrl should return an offset
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Enforce chooseBaseUrl to return an integer offset to the baseUrls member.
Commits
-------
0d041c3 ChooseBaseUrl should return an index
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Introduce constants for context keys
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Introduces constants for keys. Follow up @xabbuh's https://github.com/symfony/symfony/pull/17113/files#r48598904
Commits
-------
c56c7bf [Serializer] Introduce constants for context keys
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Remove useless is_object condition
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
[This condition](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Serializer/Serializer.php#L185) is useless, because ```$class``` is not used in ```getNormalizer()```.
Commits
-------
f6fd5e4 Remove useless is_object condition
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Refactor serializer normalize method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The serializer normalize method contains some dead or duplicate code. This PR refactor the method to make it simpler.
I tried to keep the same Exceptions in the same situations but they could probably be simplified too. (The last case only append if you pass a ressource to the serializer.)
Commits
-------
2bb5f45 Refactor serializer normalize method
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Symfony PSR-6 implementation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
From the provided README.md:
This component provides a strict [PSR-6](http://www.php-fig.org/psr/psr-6/) implementation for adding cache to your applications. It is designed to have a low overhead so that caching is fastest. It ships with a few caching adapters for the most widespread and suited to caching backends. It also provides a `doctrine/cache` proxy adapter to cover more advanced caching needs.
Todo:
- [ ] add more tests
- [ ] add a FilesystemAdapter
Commits
-------
91e482a [Cache] Symfony PSR-6 implementation
This PR was squashed before being merged into the 3.1-dev branch (closes#17323).
Discussion
----------
[DependencyInjection] Deprecate unsupported attributes/elements for alias
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #17256
| License | MIT
Following https://github.com/symfony/symfony/pull/17133, this PR deprecates using unsupported keywords on alias definition.
For example the following examples will trigger deprecations:
```xml
<?xml version="1.0" encoding="utf-8"?>
<container>
<services>
<service id="bar" alias="foo" class="Foo">
<tag name="foo.bar" />
</service>
</services>
</container>
```
```yml
services:
bar:
alias: foo
parent: quz
```
Commits
-------
49eb65c [DependencyInjection] Deprecate unsupported attributes/elements for alias
* 2.3:
Fixed correct class name in thrown exception
Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
Removed a duplicated test in CardSchemeValidatorTest
Fix perf and mem issue when using token_get_all
[SecurityBundle] fix SecureRandom service constructor args
Normalize params only when used.
This PR was merged into the 2.3 branch.
Discussion
----------
Fix performance (PHP5) and memory (PHP7) issues when using token_get_all
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16868
| License | MIT
| Doc PR | -
Although it's not the case anymore on PHP 7, on PHP 5, `is_array` checks are much slower than `isset` checks.
Also from @peteward in #17384:
> New PHP7 memory manager will not release small buckets to OS automatically in cases exposed by `token_get_all()`. This function call addition specifically for PHP7 will reclaim this memory to keep the footprint down of long processe
> See above ticket and suggested actions by PHP internals team for long-running tasks (https://bugs.php.net/70098) - I think `cache:clear/warmup` on a heavy app justifies this.
> We're running on cloud-based hosting platforms under memory limitations (Platform.sh). When memory is exceeded we're into swap and the cache clearing process goes from seconds to minutes for the initial deployment, which really slows our development workflow and also causes holding page delays.
Commits
-------
e555aad Add gc_mem_caches() call for PHP7 after itoken_get_all() as new memory manager will not release small buckets to OS automatically
d1f72d8 Fix perf and mem issue when using token_get_all
* 3.0:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.8.3
updated VERSION for 2.8.2
updated CHANGELOG for 2.8.2
bumped Symfony version to 2.7.10
updated VERSION for 2.7.9
updated CHANGELOG for 2.7.9
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
added missing requirement
removed obsolete tests, fixed composer.json
do not ship with a custom rng implementation
[Console] HHVM read input stream bug
Fix max width for multibyte keys in choice question
[Console] Display console application name even when no version set
Remove calls to non-existing method
Remove empty statements.
* 2.8:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.8.3
updated VERSION for 2.8.2
updated CHANGELOG for 2.8.2
bumped Symfony version to 2.7.10
updated VERSION for 2.7.9
updated CHANGELOG for 2.7.9
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
added missing requirement
removed obsolete tests, fixed composer.json
do not ship with a custom rng implementation
[Console] HHVM read input stream bug
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.7.md
CHANGELOG-2.8.md
composer.json
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/HttpKernel/Kernel.php
* 2.7:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.7.10
updated VERSION for 2.7.9
updated CHANGELOG for 2.7.9
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
Conflicts:
composer.json
src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[ClassLoader] Use symfony/polyfill-apcu
[HttpFoundation][Cookie] Cookie DateTimeInterface fix
bumped Symfony version to 2.3.38
updated VERSION for 2.3.37
update CONTRIBUTORS for 2.3.37
updated CHANGELOG for 2.3.37
Conflicts:
.travis.yml
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.3 branch.
Discussion
----------
[ClassLoader] Use symfony/polyfill-apcu
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes APC usage on PHP 7 or when APCu bc-layer is disabled
Commits
-------
623595f [ClassLoader] Use symfony/polyfill-apcu
This PR was merged into the 3.1-dev branch.
Discussion
----------
[VarDumper] Add flags to allow fine tuning dumps representation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15856
| License | MIT
| Doc PR | -
The `DUMP_STRING_LENGTH` behavior has been requested in #15856,
the `DUMP_LIGHT_ARRAY` behavior is what should have been done for the VarDumperTestTrait. Anticipated usage is opt-in, by adding `<env name="DUMP_LIGHT_ARRAY" value="1" />` in `phpunit.xml.dist`.
Any more flags proposal anyone? Better names maybe?
Commits
-------
a35ceb0 [VarDumper] Add flags to allow fine tuning dumps representation
This PR was squashed before being merged into the 2.8 branch (closes#17253).
Discussion
----------
[Console] HHVM read input stream bug
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| License | MIT
HHVM readline() function requires a parameter see:
https://github.com/facebook/hhvm/blob/master/hphp/runtime/ext/readline/ext_readline.php
But the php readline does not require one.
```
In Symfony\Component\Console\Helper\QuestionHelper
…
readFromInput($stream)
…
```
we use readline() without a parameter.
HHVM Version:
```
HipHop VM 3.10.1 (rel)
Compiler: tags/HHVM-3.10.1-0-g689b4969a141620ee5a282ce0dbf72278c84d44b
Repo schema: 6c99ee1f98340f6f3ef397a332583f0e843a627d
```
Docker Container:
```
docker run --rm -it -v `pwd`:`pwd` -w `pwd` brunoric/hhvm:deb hhvm test.php ls
```
Test.php
```
<?php
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Helper\QuestionHelper;
require_once "vendor/autoload.php";
$console = new Application();
$console
->register('ls')
->setDescription('Try input')
->setCode(function (InputInterface $input, OutputInterface $output) {
$question = new Question('Your email address: ');
$question->setValidator(
function ($answer) {
return $answer;
}
);
$question->setMaxAttempts(5);
$helper = new QuestionHelper();
$email = $helper->ask($input, $output, $question);
$output->writeln(sprintf('Email Adress: <info>%s</info>', $email));
})
;
$console->run();
```
composer.json
```
{
"require": {
"symfony/console": "^3.0"
}
}
```
Result:
No input is possible and you got a warning
```
Your email address:
Warning: readline() expects exactly 1 parameter, 0 given in /clitest/vendor/symfony/console/Helper/QuestionHelper.php on line 436
Email Adress:
```
Fix:
Add a empty string parameter to readline() or use fgets() for hhvm.
Commits
-------
e7f17a7 [Console] HHVM read input stream bug
* 2.8:
Fix max width for multibyte keys in choice question
[Console] Display console application name even when no version set
Remove empty statements.
* 2.7:
Fix max width for multibyte keys in choice question
[Console] Display console application name even when no version set
Remove empty statements.
This PR was merged into the 3.1-dev branch.
Discussion
----------
Add placeholders into log messages
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15753
| License | MIT
| Doc PR |
Commits
-------
c92fcdb Added placeholders to all log messages instead of hardcoded values
This PR was merged into the 3.1-dev branch.
Discussion
----------
[HttpFoundation] Allow to get all the mime types associated to a format in the Request
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
This PR creates a new method in ``Request`` to allow to get all the mime types associated to a format.
This is useful in the case of a format negotiator which needs to convert a list of format to a list of mime types (see [the ``FormatNegotiator`` of the ``FOSRestBundle``](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Negotiation/FormatNegotiator.php#L126))
Commits
-------
4618c9f [HttpFoundation] Allow to get all the mime types associated to a format in the Request
This PR was squashed before being merged into the 2.3 branch (closes#17326).
Discussion
----------
[Console] Display console application name even when no version set
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When displaying help of an Application with a name but no version, it show "Console Tool" instead of the application name.
Commits
-------
61e810e [Console] Display console application name even when no version set
* 3.0: (22 commits)
[Yaml] Fix tests on PHP 7.0.2
[FrameworkBundle] Don't log twice with the error handler
[2.7] Workaround https://bugs.php.net/63206
[2.3] Workaround https://bugs.php.net/63206
Add closing parenthesis
[Serializer] Unset object_to_populate after using it
Typo fix
[WebProfiler] Fixed sf-minitoolbar height
[HttpFoundation] Fixed Request HTTP_USER_AGENT on 3.X versions
[2.3] Static Code Analysis for Components
[Serializer] Use $context['cache_key'] to enhance caching
Removed non-existent directory from composer autoload
Fixed erroneous deprecation notice for extended Interfaces
[Routing] cs fix
Added support \IteratorAggregate for UniqueEntityValidator
Update AbstractChoiceListTest.php
[Serializer] Allow to use proxies in object_to_populate
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Use proper class to fetch $versionStrategy property
Added sort order SORT_STRING for params in UriSigner
...
Conflicts:
src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
* 2.8:
[Yaml] Fix tests on PHP 7.0.2
[FrameworkBundle] Don't log twice with the error handler
[2.7] Workaround https://bugs.php.net/63206
[2.3] Workaround https://bugs.php.net/63206
Add closing parenthesis
[Serializer] Unset object_to_populate after using it
[Serializer] Allow to use proxies in object_to_populate
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/HttpFoundation/JsonResponse.php
* 2.7:
[Yaml] Fix tests on PHP 7.0.2
[2.7] Workaround https://bugs.php.net/63206
[2.3] Workaround https://bugs.php.net/63206
Add closing parenthesis
[Serializer] Unset object_to_populate after using it
[Serializer] Allow to use proxies in object_to_populate
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Allow to use proxies in object_to_populate
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15627, dunglas/DunglasApiBundle#381
| License | MIT
| Doc PR | n/a
Allows to populate a proxy (or any class having the given type).
Commits
-------
b16b5b9 [Serializer] Allow to use proxies in object_to_populate
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] Fix tests on PHP 7.0.2
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #1234
| License | MIT
| Doc PR | -
Related to https://bugs.php.net/66179 that has been fixed in 7.0.2
Commits
-------
902f6dd [Yaml] Fix tests on PHP 7.0.2
* 2.8:
Typo fix
[WebProfiler] Fixed sf-minitoolbar height
[2.3] Static Code Analysis for Components
[Serializer] Use $context['cache_key'] to enhance caching
Fixed erroneous deprecation notice for extended Interfaces
[Routing] cs fix
Added support \IteratorAggregate for UniqueEntityValidator
Update AbstractChoiceListTest.php
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Use proper class to fetch $versionStrategy property
Added sort order SORT_STRING for params in UriSigner
Remove normalizer cache in Serializer class
[Serializer] ObjectNormalizer: context can contain not serializable data
* 2.7:
Typo fix
[2.3] Static Code Analysis for Components
Added support \IteratorAggregate for UniqueEntityValidator
Update AbstractChoiceListTest.php
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Use proper class to fetch $versionStrategy property
Added sort order SORT_STRING for params in UriSigner
Remove normalizer cache in Serializer class
* 2.3:
Typo fix
[2.3] Static Code Analysis for Components
Added support \IteratorAggregate for UniqueEntityValidator
Fix#17306 Paths with % in it are note allowed (like urlencoded)
Added sort order SORT_STRING for params in UriSigner
Remove normalizer cache in Serializer class
This PR was merged into the 2.8 branch.
Discussion
----------
[Serializer] Allow context to contain not serializable data
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Allow the context to contain not serializable data even for the `ObjectNormalizer` (BC break fix).
Commits
-------
996f69d Merge pull request #2 from nicolas-grekas/ser-cache
8560c13 [Serializer] Use $context['cache_key'] to enhance caching
c1740fc [Serializer] ObjectNormalizer: context can contain not serializable data
This PR was merged into the 2.3 branch.
Discussion
----------
[Serializer] Remove normalizer cache in Serializer class
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The serializer cache the normalizer/denormalizer to use based only on the class and format. But the supportsNormalization and supportDenormalization methods can decide based on the data passed leading to hard to find bugs when the serializer used a cached normalizer it shouldn't use.
Commits
-------
8566dc1 Remove normalizer cache in Serializer class
* 3.0:
[WebProfilerBundle] Remove loading status from AJAX toolbar after error
Add missing apostrophe in setSaveHandler phpdoc
[VarDumper] Fix typo
bug #14246 [Filesystem] dumpFile() negates default file permissions
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
* 2.8:
[WebProfilerBundle] Remove loading status from AJAX toolbar after error
Add missing apostrophe in setSaveHandler phpdoc
[VarDumper] Fix typo
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
* 2.7:
Add missing apostrophe in setSaveHandler phpdoc
[VarDumper] Fix typo
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
[FrameworkBundle] Add case in Kernel directory guess for PHPUnit
This PR was merged into the 3.1-dev branch.
Discussion
----------
[DependencyInjection] Make YamlFileLoader raise a deprecation notice if a service definition contains unsupported keywords.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Merry Christmas Symfony!!!
Commits
-------
bb5f118 [DependencyInjection] make YamlFileLoader raise a deprecation notice if a service definition contains unsupported keywords.
This PR was merged into the 3.0 branch.
Discussion
----------
bug #14246 [Filesystem] dumpFile() negates default file permissions
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14246
| License | MIT
| Doc PR | none
Remain BC compatible with Symfony 2.8.
Without this change a chmod is needed after calling `dumpFile`, making it non atomic.
Commits
-------
53d6d4b bug #14246 [Filesystem] dumpFile() negates default file permissions
* 3.0:
[Process] Fix potential race condition
[PhpUnitBridge] Re-enable the garbage collector
typo
[FrameworkBundle] Allow to autowire service_container
[FrameworkBundle] Set the kernel.name properly after a cache warmup
Fix toolbar display when nvd3 is loaded on page
Removed spaces before semicolon
cast arrays to objects after parsing has finished
* 2.8:
[Process] Fix potential race condition
[PhpUnitBridge] Re-enable the garbage collector
typo
[FrameworkBundle] Allow to autowire service_container
[FrameworkBundle] Set the kernel.name properly after a cache warmup
Fix toolbar display when nvd3 is loaded on page
Removed spaces before semicolon
cast arrays to objects after parsing has finished
Conflicts:
src/Symfony/Bridge/PhpUnit/bootstrap.php
src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml
src/Symfony/Component/Console/Helper/DialogHelper.php
* 2.7:
[Process] Fix potential race condition
[PhpUnitBridge] Re-enable the garbage collector
typo
[FrameworkBundle] Set the kernel.name properly after a cache warmup
Removed spaces before semicolon
This PR was squashed before being merged into the 3.1-dev branch (closes#17191).
Discussion
----------
[Serializer] Move the normalization logic in an abstract class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As suggested by @xabbuh, move all the normalization logic for objects in an abstract class.
It will ease the maintenance as well as adding new features such as #17113 and #16143.
I've introduced a new abstract class to avoid BC breaks in `AbstractNormalizer`. As a (good) side effect, all normalizers now benefits from the caching system introduced in #16547.
Commits
-------
3bec813 [Serializer] Move the normalization logic in an abstract class
This PR was merged into the 2.8 branch.
Discussion
----------
[Yaml] cast arrays to objects after parsing has finished
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17190
| License | MIT
| Doc PR |
Casting arrays to objects must happen after the complete YAML string has
been parsed to avoid errors when parsing subsequent lines.
Commits
-------
8251d67 cast arrays to objects after parsing has finished
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] recognize when a block scalar is left
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17116
| License | MIT
| Doc PR |
The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.
Commits
-------
3a22165 [Yaml] recognize when a block scalar is left
The parser did not recognize when the block scalar was completely parsed
and thus treated following comments as they need to be kept leading to
parse errors on the following lines.
This PR was merged into the 2.3 branch.
Discussion
----------
bug #14246 [Filesystem] dumpFile() non atomic
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14246
| License | MIT
| Doc PR | none
Remove race condition where `dumpFile` has written the resulting file but has not given access yet.
Commits
-------
e4015d5 bug #14246 [Filesystem] dumpFile() non atomic
* 3.0:
Fix merge
[Process] Fix running tests on HHVM>=3.8
[Form] Improved performance of ChoiceType and its subtypes
Removed an object as route generator argument
* 2.8:
Fix merge
[Process] Fix running tests on HHVM>=3.8
[Form] Improved performance of ChoiceType and its subtypes
Removed an object as route generator argument
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Improved performance of ChoiceType and its subtypes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I found out today that, although CachingFactoryDecorator is part of Symfony 2.7, it is not configured to be used in the DI configuration. This simple in-memory cache improved the page load by 50% for one considerably large form with many (~600) choice/entity fields that I was working on today.
Also, caching of query builders with parameters was broken, since the parameters are represented by objects. PHP's object hashes were used to calculate the cache keys, hence the cache always missed. I converted parameters to arrays for calculating the cache keys to fix this problem.
Commits
-------
a0ef101 [Form] Improved performance of ChoiceType and its subtypes
* 3.0:
[Form] fix Catchable Fatal Error if choices is not an array
[Process] Fix a transient test
[Process] Fix potential race condition leading to transient tests
[DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException
[Routing] removed unused variable in PhpMatcherDumperTest class.
[travis] use github token to fetch deps from ZIP files
[DependencyInjection] fixes typo in triggered deprecation notice.
[Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class.
[Form] Fixed regression on Collection type
add missing symfony/polyfill-php55 dependency
* 2.8:
[Form] fix Catchable Fatal Error if choices is not an array
[Process] Fix a transient test
[Process] Fix potential race condition leading to transient tests
[DoctrineBridge] [PropertyInfo] Catch Doctrine\ORM\Mapping\MappingException
[Routing] removed unused variable in PhpMatcherDumperTest class.
[travis] use github token to fetch deps from ZIP files
[DependencyInjection] fixes typo in triggered deprecation notice.
[Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class.
[Form] Fixed regression on Collection type
add missing symfony/polyfill-php55 dependency
Conflicts:
src/Symfony/Component/DependencyInjection/SimpleXMLElement.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php
src/Symfony/Component/HttpFoundation/composer.json
* 2.7:
[Form] fix Catchable Fatal Error if choices is not an array
[Process] Fix a transient test
[Process] Fix potential race condition leading to transient tests
[Routing] removed unused variable in PhpMatcherDumperTest class.
[travis] use github token to fetch deps from ZIP files
[DependencyInjection] fixes typo in triggered deprecation notice.
[Form] improve deprecation messages for the "empty_value" and "choice_list" options in the ChoiceType class.
Conflicts:
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
* 2.3:
[Process] Fix potential race condition leading to transient tests
[Routing] removed unused variable in PhpMatcherDumperTest class.
[travis] use github token to fetch deps from ZIP files
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix a transient test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15617
| License | MIT
| Doc PR | -
Commits
-------
7e2c67c [Process] Fix a transient test
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fix Catchable Fatal Error if choices is not an array
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR |
Since 2.7.8 I got a BC-Break Error
Catchable Fatal Error: Argument 1 passed to Symfony\Component\Form\Extension\Core\Type\ChoiceType::normalizeLegacyChoices() must be of the type array, null given
normalizeLegacyChoices work only with array, so if choices not an array, just don't try to normlize.
Commits
-------
f3c2a9b [Form] fix Catchable Fatal Error if choices is not an array