This PR was merged into the 2.8 branch.
Discussion
----------
fix Merge branch '2.7' into 2.8 JsonFileLoader
This fix a merge commit see 5593bdd56e. The `stream_is_local` and `file_exists` checks are all ready done in the parent `FileLoader` class.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | none
| License | MIT
| Doc PR | none
Commits
-------
692deff fix Merge branch '2.7' into 2.8 JsonFileLoader
This PR was squashed before being merged into the 2.7 branch (closes#14940).
Discussion
----------
Documented minor BC break introduced in AssetHelper
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14898
| License | MIT
| Doc PR | -
This should be an easy fix. As this AssetHelper is removed in 3.0 I think no correction for 3.0 would be needed.
Commits
-------
777dc45 Documented minor BC break introduced in AssetHelper
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] Make AppVariable check if security.context exists
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If security isn't configured in the application, neither the `security.context` service, nor the `security.token_storage` service exists.
Therefore, if a third-party bundle relies on the `app.user` or `app.security` (deprecated) check in Twig templates, an exception was thrown about asking for an non-existing service:
```yml
security: false
```
```twig
{% if app.user %}
<div>
...
</div>
{% endif %}
```
```
You have requested a non-existent service "security.context"
```
Instead, this patch checks if the `security.context` actually exists before trying to use it, and returns null otherwise.
Note that the **GlobalVariables** class, used for twig app globals in previous versions, and still used for PHP templating, behaves the same way.
So this is basically a BC break.
Commits
-------
ea71174 [TwigBridge] Make AppVariable check if security.context exists
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] Improved exception message if custom implementation of OptionsResolverInterface is used
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Improved exception message if custom implementation of ```OptionsResolverInterface``` is used within ```AbstractType::setDefaultOptions()``` or ```AbstractTypeExtension::setDefaultOptions()```.
Before:
```
Argument 1 passed to Symfony\Component\Form\AbstractType::configureOptions() must be an instance of Symfony\Component\OptionsResolver\OptionsResolver, instance of Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver given
```
After:
```
Argument 1 passed to Symfony\Component\Form\AbstractType::setDefaultOptions() must be an instance of Symfony\Component\OptionsResolver\OptionsResolver, instance of Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver given
```
Commits
-------
aa945d3 [2.7] Improved exception message if custom implementation of ```OptionsResolverInterface``` is used
This PR was merged into the 3.0-dev branch.
Discussion
----------
Fix wrong merge
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
51b44bc Fix wrong merge
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Improved exception message if custom implementation of ```OptionsResolverInterface```
is used within ```AbstractType::setDefaultOptions()``` or ```AbstractTypeExtension::setDefaultOptions()```.
Before:
```
Argument 1 passed to Symfony\Component\Form\AbstractType::configureOptions() must be an instance of Symfony\Component\OptionsResolver\OptionsResolver, instance of Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver given
```
After:
```
Argument 1 passed to Symfony\Component\Form\AbstractType::setDefaultOptions() must be an instance of Symfony\Component\OptionsResolver\OptionsResolver, instance of Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver given
```
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] improved message for deprecated requirements
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ef15e11 improved message for deprecated requirements
* 2.7:
Fix test name
fixed CS
Allow new lines in Messages translated with transchoice() (replacement for #14867)
[Form] Swap new ChoiceView constructor arguments to ease migrating from the deprecated one
[2.3] Fix tests on Windows
[Yaml] remove partial deprecation annotation
Silence invasive deprecation warnings, opt-in for warnings
Documenting how to keep option value BC - see #14377
Conflicts:
src/Symfony/Bridge/Doctrine/composer.json
src/Symfony/Bridge/Twig/composer.json
This PR was merged into the 3.0-dev branch.
Discussion
----------
[SecurityBundle] Update DoctrineBundle version
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The versions < 1.4 of DoctrineBundle uses the old way to create a factory service, this is fixed in 1.4, so we should use at least this version in the tests.
Commits
-------
3d68b32 Update DoctrineBundle version
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Fix test name
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
7bb0812 Fix test name
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes#14897).
Discussion
----------
Allow new lines in Messages translated with transchoice() (replacement for #14867)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Hi,
I found that the MessageSelector does not handle new lines in messages very well.
I suggest adding the "s" modifier to the regexp used to identify the parts and ranges.
What do you think?
PS: would be nice to have this change also in Symfony 2.6 & 2.7
Commits
-------
786b8a6 Allow new lines in Messages translated with transchoice() (replacement for #14867)
This PR was merged into the 3.0-dev branch.
Discussion
----------
[FrameworkBundle][SecurityBundle] Fix security tests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Since `templating.helper.assets` is only available when the `php` engine is enabled, this piece of code only makes sense when the `php` engine is enabled.
This PR also fixes the `SecurityBundle` tests, for the 3 remaining failing tests see doctrine/DoctrineBundle#435
Commits
-------
67994d6 Fixed tests
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Swap new ChoiceView constructor arguments to ease migrating from the deprecated one
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14193
| License | MIT
| Doc PR | -
Commits
-------
909d2b9 [Form] Swap new ChoiceView constructor arguments to ease migrating from the deprecated one
This PR was merged into the 2.7 branch.
Discussion
----------
Documenting how to keep option value BC - see #14377
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14377 (kinda)
| License | MIT
| Doc PR | symfony/symfony-docs#5179
Hi guys!
I'm still making sense of the form changes, but it seems that this before and after isn't totally honest - your option values will change, unless your add this extra option.
@webmozart look correct to you?
Thanks!
Commits
-------
deb9db8 Documenting how to keep option value BC - see #14377
This PR was merged into the 3.0-dev branch.
Discussion
----------
[DoctrineBridge] Fix DoctrineType
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Seems that a wrong merge breaks the `DoctrineType`. Because the minimum version in 3.0 is 5.5 we can use `$this` inside a closure.
Commits
-------
0010452 Fix DoctrineType
This PR was squashed before being merged into the 2.3 branch (closes#14926).
Discussion
----------
[2.3] Fix tests on Windows
There were quite a few tests failing when running on my Windows PC. These fixes are the ones I could easily fix.
| Q | A
| --- | ---
| License | MIT
| Fixed tickets | -
Commits
-------
e3e5f3d [2.3] Fix tests on Windows
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Postpone setting the date header on a Response
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14906
| License | MIT
| Doc PR | -
The only risk of doing this is if someone called `getDate()` and the date header was not present, the date might be slightly different than the one sent with the headers.
`getDate()` could also set the date header first time it's requested (do a lazy initialisation).
Commits
-------
2ad3b0d [HttpFoundation] Postpone setting the date header on a Response
* 2.7:
[Console] SymfonyStyle : Fix blocks wordwrapping
[Console] SymfonyStyle : Fix blocks output is broken on windows cmd
[Validator] remove partial deprecation annotation
Updated UPGRADE-2.4.md
[Form] Support DateTimeImmutable in transform()
Show the FormType and FormTypeExtension in case of deprecated use of setDefaultOptions
[FrameworkBundle] Document form.csrf_provider service deprecation
[Form] add test to avoid regression of #14891
without this change allways the legacy code get called
[Form] Fix call to removed method (BC broken in 2.3)
Fix ask and askHidden methods
[HttpFoundation] Get response content as resource several times for PHP >= 5.6
Change error message to reflect SecurityContext deprecation.
fixed merge
Issue #14815
[Console] SymfonyStyle : fix & automate block gaps.
[Console] SymfonyStyle : Improve EOL consistency by relying on output instance
Improved duplicated code in FileLocator
* 2.6:
[Validator] remove partial deprecation annotation
Updated UPGRADE-2.4.md
[Form] Support DateTimeImmutable in transform()
[Form] add test to avoid regression of #14891
without this change allways the legacy code get called
[Form] Fix call to removed method (BC broken in 2.3)
[HttpFoundation] Get response content as resource several times for PHP >= 5.6
Improved duplicated code in FileLocator
* 2.3:
[Form] Support DateTimeImmutable in transform()
[Form] Fix call to removed method (BC broken in 2.3)
[HttpFoundation] Get response content as resource several times for PHP >= 5.6
Improved duplicated code in FileLocator
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] SymfonyStyle : fix blocks wordwrapping
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Allow to print strings with a length greater than the terminal length in a block by allowing to cut words.
Indeed, currently such code won't work:
```php
//Terminal is 80 chars wide
$sfStyle->caution(str_repeat('#', 78)); //Caution uses 3 chars as prefix (' ! ')
```
> [Symfony\Component\Debug\Exception\ContextErrorException]
Warning: str_repeat(): Second argument has to be greater than
or equal to 0
Of course, this is only a foolish example. But there is no reason the command should fail when trying to output a long word (as we could imagine it could be a FQCN, absolute path or anything else), nor just because the terminal width is too small.
Commits
-------
58f2fad [Console] SymfonyStyle : Fix blocks wordwrapping
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] SymfonyStyle : fix blocks output is broken on windows cmd
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Using `SymfonyStyle::block` method, output is broken on windows cmd:
![screenshot 2015-05-23 a 18 00 18 - copie](https://cloud.githubusercontent.com/assets/2211145/7788763/43135ea0-0249-11e5-8a82-7f788384bc03.PNG)
Windows cmd seems to wrap lines as soon as the terminal width is reached, whether there are following characters or not.
I've encountered this behavior with multiple command prompts available on Windows, like Console2, ConEmu, Cmdr, ... But as most of them are simple cmd wrappers, the output is identic. The only good fellow in there is Cygwin which provides an Unix-like env and command-line interface.
This PR solves this issue by assuming that the lineLength (not the terminal width), used to wrap lines internally within the `SymfonyStyle::block` method, should be the terminal width - 1.
Commits
-------
ea3d768 [Console] SymfonyStyle : Fix blocks output is broken on windows cmd