This PR was merged into the 2.8 branch.
Discussion
----------
[HttpKernel] Move required RequestStack args as first arguments
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since we planned to make RequestStack required, we have to move it as first arguments.
Commits
-------
84ba05b [HttpKernel] Move required RequestStack args as first arguments
This PR was merged into the 2.8 branch.
Discussion
----------
[Debug] Add BufferingLogger for errors that happen before a proper logger is configured
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows catching e.g. deprecations that happen during bootstrapping.
Commits
-------
2a9647d [Debug] Add BufferingLogger for errors that happen before a proper logger is configured
This PR was merged into the 2.3 branch.
Discussion
----------
Dispatch console.terminate *after* console.exception
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
The problem is when using the ConsoleHandler from MonologBridge, TERMINATE closes it and removes the output, so when EXCEPTION fires if you want to log the exception it's too late and you don't get any output. See ed4fb54901/src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php (L115-L145)
It is my understanding that TERMINATE is always supposed to come last anyway, so it is a bug in any case, but this particular use case is what prompted the discovery.
Commits
-------
7802345 Dispatch console.terminate *after* console.exception
When a form type provides a BC layer with old form names (all core types
do), the form registry will ask for type extensions registered on the
legacy name for BC, and trigger a warning if it finds any.
The DependencyInjectionExtension should not trigger warnings on its own
when being asked for such extensions (especially when it has none
registered).
Core extensions are also registered using the proper extended type
rather than legacy names.
This PR was merged into the 2.8 branch.
Discussion
----------
removed some Form related deprecation notices
| 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
This removes a deprecation notice.
Commits
-------
4253824 removed some Form deprecation notices
* 2.8:
[Security\Http] Fix dep
added ExceptionHandler::getHtml() to expose the full HTML of an exception
Conflicts:
src/Symfony/Component/Debug/ExceptionHandler.php
src/Symfony/Component/Security/Http/composer.json
This PR was merged into the 2.8 branch.
Discussion
----------
[Security\Http] Fix dep
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should make tests green
Commits
-------
037196c [Security\Http] Fix dep
This PR was merged into the 2.8 branch.
Discussion
----------
added ExceptionHandler::getHtml() to expose the full HTML of an exception
| 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
`ExceptionHandler::createResponse()` has been deprecated in 2.8 to remove the HttpFoundation dependency on `symfony/debug`. But that breaks Silex which relies on this method. As the `decorate` method is private, there is no way in Silex to upgrade. Instead of making the `decorate()` method public, I propose to add a new `getHtml()` method that returns the exception as a full HTML page.
Commits
-------
4d1d277 added ExceptionHandler::getHtml() to expose the full HTML of an exception
This PR was squashed before being merged into the 2.7 branch (closes#15552).
Discussion
----------
[ExpressionLanguage] Fixed expressions cache key generation
| 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
Reworked version of #15537
Difference with original PR:
- sort $names array to ensure its order does not affect caching, added test for it
- minor tweaks for cache key format
- used `foreach` instead of `array_map`
P.S. I'm not proficient with tests so not sure if tests are correct.
Commits
-------
4114a2b [ExpressionLanguage] Fixed expressions cache key generation
* 2.8:
[2.8] Cleanup
allow more versions of the ACL package
[Translator] Added missing changelog notes.
[2.7] Clean deprecated interfaces
use new repo location in some readme.md
[Validator] Cleanup a test
[translation][framework-bundle] Deprecated DiffOperation
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php
src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php
src/Symfony/Component/Form/Tests/ChoiceList/Factory/CachingFactoryDecoratorTest.php
src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php
src/Symfony/Component/Form/Tests/ChoiceList/Factory/PropertyAccessDecoratorTest.php
src/Symfony/Component/Form/Tests/ChoiceList/LegacyChoiceListAdapterTest.php
src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8] Deprecate IntrospectableContainerInterface
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Patch on Security is required for tests compat with 3.0, see #15684
IntrospectableContainerInterface is already deprecated in master.
Commits
-------
c2b94a1 [2.8] Cleanup
This PR was merged into the 2.8 branch.
Discussion
----------
[translation] Deprecated DiffOperation
## Summary:
The ``DiffOperation`` class has been deprecated and ``TargetOperation``
should be used instead, because ``DiffOperation`` has nothing to do
with 'diff', thus its class name is misleading.
Also added detailed documents for all operation interface and classes.
## Background:
The following names should have consistent meanings for all operations:
The name of ``intersection`` is temporarily introduced here to explain this issue.
* [x] ``intersection`` = source ∩ target = {x: x ∈ source ∧ x ∈ target}
* [x] ``all`` = **result of the operation, depends on the operation.**
* [x] ``new`` = all ∖ source = {x: x ∈ all ∧ x ∉ source}
* [x] ``obsolete`` = source ∖ all = {x: x ∈ source ∧ x ∉ all}
The following analysis explains why ``DiffOperation`` should be deprecated.
## Logic of ``MergeOperation``:
* [x] ``all`` = source ∪ target = {x: x ∈ source ∨ x ∈ target}
* [x] ``new`` = all ∖ source = {x: x ∈ target ∧ ∉ source}
* [x] ``obsolete`` = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅
This absolutely makes sense.
## Logic of ``DiffOperation``:
* [ ] ``all`` = intersection ∪ (target ∖ intersection) = target
* [x] ``new`` = all ∖ source = {x: x ∈ target ∧ x ∉ source}
* [x] ``obsolete`` = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target}
The ``all`` part is confusing because 'diff' should either mean 'relative complement' or 'symmetric difference' operation:
### Relative Complement:
* ``all`` = source ∖ target = {x: x ∈ source ∧ x ∉ target}
### Symmetric Difference:
* ``all`` = (source ∖ target) ∪ (target ∖ source) = {x: x ∈ source ∧ x ∉ target ∨ x ∈ target ∧ x ∉ source}
### Current Logic has Nothing to do with "Diff":
* ``all`` = intersection ∪ (target ∖ intersection) = target
So the name of ``DiffOperation`` is misleading and inappropriate.
Unfortunately, there is no corresponding set operation for this class,
so it's hard to give it an apppriate name.
From my point of view, I believe the most accurate name for this class
should be ``TargetOperation`` because its result is same as the target set.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
353c94d [translation][framework-bundle] Deprecated DiffOperation
* 2.8:
[travis] Add PHP 7 to allowed failures until segfaults are fixed
[Intl] Fix test
[Translator][fallback catalogues] fixed circular reference.
bumped Symfony version to 2.3.33
updated VERSION for 2.3.32
update CONTRIBUTORS for 2.3.32
updated CHANGELOG for 2.3.32
Require symfony/intl ~2.4 when Locale::setDefault() is used
[Form][2.7][ Choice type] fixed groups with empty array.
[FrameworkBundle] Fix templating.helper.code.file_link_format when defined by ini setting
[Config] Prototypes info
[console] Use the description when no help is available
Conflicts:
.travis.yml
CHANGELOG-2.3.md
src/Symfony/Component/Form/composer.json
src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
src/Symfony/Component/Translation/composer.json
src/Symfony/Component/Validator/composer.json
* 2.7:
[travis] Add PHP 7 to allowed failures until segfaults are fixed
[Intl] Fix test
[Translator][fallback catalogues] fixed circular reference.
bumped Symfony version to 2.3.33
updated VERSION for 2.3.32
update CONTRIBUTORS for 2.3.32
updated CHANGELOG for 2.3.32
[FrameworkBundle] Fix templating.helper.code.file_link_format when defined by ini setting
[console] Use the description when no help is available
* 2.3:
[Intl] Fix test
[Translator][fallback catalogues] fixed circular reference.
bumped Symfony version to 2.3.33
updated VERSION for 2.3.32
update CONTRIBUTORS for 2.3.32
updated CHANGELOG for 2.3.32
[FrameworkBundle] Fix templating.helper.code.file_link_format when defined by ini setting
[console] Use the description when no help is available
Conflicts:
src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt
src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt
src/Symfony/Component/HttpKernel/Kernel.php
The ``DiffOperation`` class has been deprecated and ``TargetOperation``
should be used instead, because ``DiffOperation`` has nothing to do
with 'diff', thus its class name is misleading.
Also added detailed documents for all operation interface and classes.
The following names should have consistent meanings for all operations:
The name of ``intersection`` is temporarily introduced here to explain this issue.
* [x] ``intersection`` = source ∩ target = {x: x ∈ source ∧ x ∈ target}
* [x] ``all`` = **result of the operation, depends on the operation.**
* [x] ``new`` = all ∖ source = {x: x ∈ all ∧ x ∉ source}
* [x] ``obsolete`` = source ∖ all = {x: x ∈ source ∧ x ∉ all}
The following analysis explains why ``DiffOperation`` should be deprecated.
* [x] ``all`` = source ∪ target = {x: x ∈ source ∨ x ∈ target}
* [x] ``new`` = all ∖ source = {x: x ∈ target ∧ ∉ source}
* [x] ``obsolete`` = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅
This absolutely makes sense.
* [ ] ``all`` = intersection ∪ (target ∖ intersection) = target
* [x] ``new`` = all ∖ source = {x: x ∈ target ∧ x ∉ source}
* [x] ``obsolete`` = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target}
The ``all`` part is confusing because 'diff' should either mean 'relative complement' or 'symmetric difference' operation:
* ``all`` = source ∖ target = {x: x ∈ source ∧ x ∉ target}
* ``all`` = (source ∖ target) ∪ (target ∖ source) = {x: x ∈ source ∧ x ∉ target ∨ x ∈ target ∧ x ∉ source}
* ``all`` = intersection ∪ (target ∖ intersection) = target
So the name of ``DiffOperation`` is misleading and inappropriate.
Unfortunately, there is no corresponding set operation for this class,
so it's hard to give it an apppriate name.
From my point of view, I believe the most accurate name for this class
should be ``TargetOperation`` because its result is same as the target set.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] Fix test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7969503 [Intl] Fix test
* 2.7:
Require symfony/intl ~2.4 when Locale::setDefault() is used
[Form][2.7][ Choice type] fixed groups with empty array.
Conflicts:
src/Symfony/Component/Form/composer.json
src/Symfony/Component/Translation/composer.json
src/Symfony/Component/Validator/composer.json
This PR was merged into the 2.8 branch.
Discussion
----------
[Config] Prototypes info
| Q | A
| ------------- | ---
| Bug fix? | no ?
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Prototypes info is currently ignored by dumpers. It might be useful to add extra informations to the `# Prototype` comment in the `config:dump-reference` output.
Commits
-------
599fcb4 [Config] Prototypes info
This PR was merged into the 2.7 branch.
Discussion
----------
[Form][2.7][ Choice type] fixed groups with empty array.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15634
| License | MIT
| Doc PR | ~
- [x] test
Commits
-------
835aa78 [Form][2.7][ Choice type] fixed groups with empty array.
* 2.8:
Mark deprecated Twig functions as deprecated with the Twig feature
[appveyor] PHP 5.3.11 for Symfony 2.7
[HttpKernel] Group deprecation notices
[Translation] added <tool> element metadata to XliffFileDumper
Conflicts:
appveyor.yml
src/Symfony/Bridge/Twig/AppVariable.php
src/Symfony/Bridge/Twig/Extension/AssetExtension.php
src/Symfony/Bridge/Twig/Extension/FormExtension.php
* 2.7:
Mark deprecated Twig functions as deprecated with the Twig feature
[appveyor] PHP 5.3.11 for Symfony 2.7
[HttpKernel] Group deprecation notices
Conflicts:
appveyor.yml
This PR was merged into the 2.8 branch.
Discussion
----------
[Translation] added <tool> element metadata to XliffFileDumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15190
| License | MIT
| Doc PR | ~
Commits
-------
f667a34 [Translation] added <tool> element metadata to XliffFileDumper
This PR was merged into the 2.3 branch.
Discussion
----------
[console] Use the description when no help is available
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15498
| License | MIT
| Doc PR |
Commits
-------
e5d3f25 [console] Use the description when no help is available
* 2.8:
bumped minimal version in appveyor to 5.3.9
[VarDumper] Fix missing support for dumping PHP7 return type
Require security-acl 2.7 for BC
[travis] disable symfony_debug ext when deps!=no
Require actual version of ACL component until ACL/2.8 branch released
Do not normalize the kernel root directory path (see symfony/symfony#15474).
Don't trigger deprecation on interfaces
[Debug] Ignore silencing for deprecations
[ci] Run minimal versions on appveyor only
Deprecated Security ClassUtils in favor of Acl ClassUtils
Fix appveyor file
consistently use str_replace to unify directory separators (remaining)
* 2.7:
[VarDumper] Fix missing support for dumping PHP7 return type
[travis] disable symfony_debug ext when deps!=no
Do not normalize the kernel root directory path (see symfony/symfony#15474).
Don't trigger deprecation on interfaces
[Debug] Ignore silencing for deprecations
[ci] Run minimal versions on appveyor only
Fix appveyor file
consistently use str_replace to unify directory separators (remaining)
This PR was merged into the 2.3 branch.
Discussion
----------
[ci] Run minimal versions on appveyor only
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Hopefully the last round of ci optimizations: what do you think about running the minimal supported version on appveyor only? This removes one matrix line on travis, and gives more flexibility in choosing the minimal version because, where travis only supports a limited list of minimal versions, windows.php.net provides a binary for each and every php ever released.
Commits
-------
e564805 [ci] Run minimal versions on appveyor only
This PR was merged into the 2.7 branch.
Discussion
----------
Don't trigger deprecation on interfaces
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This can trigger false positives when implementing the interface is required for bc reasons. The DebugClassLoader is able to trigger on demand at runtime when required.
Commits
-------
b5b10b3 Don't trigger deprecation on interfaces
This PR was merged into the 2.7 branch.
Discussion
----------
consistently use str_replace to unify directory separators (2.7)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
Remaining ones from #15614
Commits
-------
17ce649 consistently use str_replace to unify directory separators (remaining)
This PR was merged into the 2.8 branch.
Discussion
----------
Deprecated Security ClassUtils in favor of Acl ClassUtils
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | symfony/symfony/issues/14718
| Relates to | symfony/security-acl/pull/3
| License | MIT
| Doc PR | ~
Should be removed from the core as it's only used in the Acl component.
Commits
-------
4278fe4 Deprecated Security ClassUtils in favor of Acl ClassUtils
* 2.8:
[Console] ProgressBarTest::testAnsiColorsAndEmojis() requires extension mbstring
[SecurityBundle] Skip SetAclCommandTest when sqlite is not available
[VarDumper] Windows compat for SplCasterTest
[Translation][Xliff loader] fixed check target node.
This PR was merged into the 2.8 branch.
Discussion
----------
[VarDumper] Windows compat for SplCasterTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d4a5ecb [VarDumper] Windows compat for SplCasterTest
* 2.8: (21 commits)
Fix merge
Fix typo
Various fixes esp. on Windows
Fix the validation of form resources to register the default theme
Fix the retrieval of the value with property path when using a loader
[appveyor] minor enhancements
[Process] Disable failing tests on Windows
[Translation] Fix the string casting in the XliffFileLoader
Windows and Intl fixes
Add appveyor.yml for C.I. on Windows
[VarDumper] fixed HtmlDumper to target specific the head tag
[travis] merge php: nightly and deps=high test-matrix lines
consistently use str_replace to unify directory separators
Support omitting the <target> node in an .xlf file.
Fix the handling of values for multiple choice types
moved PHP nightly to PHP 7.0
fixed tests using deprecation features
[Form] made deprecation notice more precise
fixed CS
Fix BC break after split of ACL from core
...
Conflicts:
.travis.yml
composer.json
src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
src/Symfony/Component/Locale/Tests/LocaleTest.php
* 2.7:
Various fixes esp. on Windows
Fix the validation of form resources to register the default theme
Fix the retrieval of the value with property path when using a loader
[appveyor] minor enhancements
[Process] Disable failing tests on Windows
[Translation] Fix the string casting in the XliffFileLoader
Windows and Intl fixes
Add appveyor.yml for C.I. on Windows
[VarDumper] fixed HtmlDumper to target specific the head tag
[travis] merge php: nightly and deps=high test-matrix lines
consistently use str_replace to unify directory separators
Support omitting the <target> node in an .xlf file.
Fix the handling of values for multiple choice types
moved PHP nightly to PHP 7.0
[Security] Add missing docblock in PreAuthenticatedToken
Conflicts:
.travis.yml
This PR was merged into the 2.3 branch.
Discussion
----------
consistently use str_replace to unify directory separators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | -
We used a mix of `str_replace` and `strtr` for the same thing. `str_replace` is faster as [I tested myself](https://3v4l.org/MNrgC) which is logical since strtr adds logic we don't need here.
Commits
-------
b9760ef consistently use str_replace to unify directory separators
* 2.3:
Windows and Intl fixes
Add appveyor.yml for C.I. on Windows
[travis] merge php: nightly and deps=high test-matrix lines
[Security] Add missing docblock in PreAuthenticatedToken
Conflicts:
.travis.yml
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/HttpFoundation/JsonResponse.php
src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Add missing docblock in PreAuthenticatedToken
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I noticed the `PreAuthenticatedToken` does not provide any dockblock about its constructor parameters so PHPStorm uses the `AbstractToken` parameters and think I'm using `PreAuthenticatedToken` badly.
This fix it by adding the missing docblock and I also added the string[] possibility for roles in `AbstractToken` as it's present in the code and the exception message.
Commits
-------
1dda0a6 [Security] Add missing docblock in PreAuthenticatedToken
This PR was merged into the 2.3 branch.
Discussion
----------
Add appveyor.yml for C.I. on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | YES, both on Travis (Linux) and on Appveyor (Windows)!
| Fixed tickets | #13934, #15049, #14259, #15045, #15444
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/5654
- testing two matrix lines:
- one without mbtring nor fileinfo nor intl
- one with these ext enables, intl version 51.2 so that almost no test is skipped on our Intl component
- bug fixes thanks to these harder testing conditions
- some display bug on appveyor, [reported here](http://help.appveyor.com/discussions/suggestions/197-support-ansi-color-codes).
Commits
-------
ea5d656 Windows and Intl fixes
8bbd8d9 Add appveyor.yml for C.I. on Windows
Choice values must always be strings, but a place was missing the
casting, breaking the comparison of selected choices when the callback
does not return a string.
* 2.7:
fixed CS
[DependencyInjection] Add missing file headers
fixed typo
made Symfony compatible with both Twig 1.x and 2.x
[FrameworkBundle] Fix precedence of xdebug.file_link_format
* 2.8: (22 commits)
[Form] fixed BC-break on grouped choice lists
[WebProfilerBundle] add import for Twig macro
made Symfony compatible with both Twig 1.x and 2.x
[VarDumper] Add caster for pgsql resources
[Debug/VarDumper] minor cleanups
[Form] only use PropertyPath if not already callable
[Form] fix reworked choice list phpdoc
[DoctrineBridge][Form] Add old tests to legacy group
Fixed warning when command alias is longer than command name
removed _self usage when not needed
Add support for target attributes.
Implement the support of timezone objects in the stub IntlDateFormatter
typofix - https://github.com/vlajos/misspell_fixer
make doctrine mappings compiler pass exception message more understandable
fix debug-ext 003.phpt
[Yaml] Nested merge keys
[FrameworkBundle] [Command] removed unused variable.
[FrameworkBundle] fix serializer config check
[Debug] Enhance DebugClassLoader performance on MacOSX
Add support for variadic arguments in the GetSetNormalizer
...
* 2.7:
[Form] fixed BC-break on grouped choice lists
[WebProfilerBundle] add import for Twig macro
made Symfony compatible with both Twig 1.x and 2.x
[Debug/VarDumper] minor cleanups
[Form] only use PropertyPath if not already callable
[Form] fix reworked choice list phpdoc
[DoctrineBridge][Form] Add old tests to legacy group
Fixed warning when command alias is longer than command name
removed _self usage when not needed
Implement the support of timezone objects in the stub IntlDateFormatter
typofix - https://github.com/vlajos/misspell_fixer
make doctrine mappings compiler pass exception message more understandable
fix debug-ext 003.phpt
[Yaml] Nested merge keys
[FrameworkBundle] [Command] removed unused variable.
[Debug] Enhance DebugClassLoader performance on MacOSX
Add support for variadic arguments in the GetSetNormalizer
[DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key
[DoctrineBridge][Form] Fix EntityChoiceList when indexing by primary foreign key
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] only use PropertyPath if not already callable
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | could be in edge cases
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15542
| License | MIT
| Doc PR | -
Currently it uses a PropertyPath even when the string is already a callable. But the callable string should have higher priority since that is also the one documented in ChoiceListFactoryInterface.
Commits
-------
470b140 [Form] only use PropertyPath if not already callable
This PR was merged into the 2.8 branch.
Discussion
----------
[VarDumper] Add caster for pgsql resources
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If pgsql users could give feedback on this one, that would we great!
Commits
-------
6c3cfe5 [VarDumper] Add caster for pgsql resources
This PR was merged into the 2.8 branch.
Discussion
----------
[Translator] [Xliff] Add support for target attributes.
The previous implementation ignored attributes in target nodes in xliff files
so they were lost when you loaded and then dumped the same file. This change
should fix that problem.
| 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
-------
b913695 Add support for target attributes.
Use ``$this->nodes['attribute']->attributes['value']`` to
replace ``$this->nodes['attribute']->evaluate($functions, $values)``
for method call and property call.
| 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
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fixed warning when command alias is longer than command name
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15511
| License | MIT
Commits
-------
ecfe944 Fixed warning when command alias is longer than command name
* 2.3:
Implement the support of timezone objects in the stub IntlDateFormatter
[DoctrineBridge][Form] Fix EntityChoiceList when indexing by primary foreign key
The previous implementation ignored attributes in target nodes in xliff files
so they were lost when you load and then dump the same file. This change
should fix that problem.
This PR was merged into the 2.3 branch.
Discussion
----------
Implement the support of timezone objects in the stub IntlDateFormatter
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As of PHP 5.5, the IntlDateFormatter accepts to use DateTimeZone or IntlTimeZone objects as timezone in the constructor (and in the new setTimeZone method) rather than timezone ids.
This is even the proper way to pass a timezone from a DateTime object as DateTimeZone names are not all valid ICU identifiers (and there is a PR on the Twig-extensions repo to use such feature to support things properly: https://github.com/twigphp/Twig-extensions/pull/148).
I'm considering this as a bugfix because it is a mismatch between the stub implementation and the real class.
Note that for simplicity, these objects are accepted on all PHP versions, as reproducing the behavior of older versions is not possible in the stub anyway (triggering a warning and making the instantiating with ``new`` return ``null``). We already have such differences anyway (the ``setTimeZone`` method exists in all PHP versions in the stub)
Commits
-------
2856abe Implement the support of timezone objects in the stub IntlDateFormatter
As of PHP 5.5, the IntlDateFormatter accepts to use DateTimeZone or
IntlTimeZone objects as timezone in the constructor (and in the new
setTimeZone method) rather than timezone ids.
This is even the proper way to pass a timezone from a DateTime object as
DateTimeZone names are not all valid ICU identifiers.
This PR was merged into the 2.3 branch.
Discussion
----------
[Serializer] Add support for variadic arguments in the GetSetNormalizer
| 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
There were 2 broken cases:
- when the value was passed, the array was passed as argument, becoming the first value of the variadic array. The array needs to be spread into multiple arguments when calling the method
- when the value was missing, the code would throw a ReflectionException, similar to the issue reported in #13690, because a variadic argument is optional but does not have a default value
Commits
-------
704760b Add support for variadic arguments in the GetSetNormalizer
This PR was merged into the 2.3 branch.
Discussion
----------
[Yaml] Nested merge keys
When trying to use nested merge keys in Yaml, the ref sometimes had the wrong value
eg, with:
```yaml
taz: &taz
a: Steve
w:
p: 1234
nested:
<<: *taz
d: Doug
w: &nestedref
p: 12345
z:
<<: *nestedref
```
in this case, the ref `nestedref` had the value "Doug", which cause this error :
Symfony\Component\Yaml\Exception\ParseException: YAML merge keys used with a scalar value instead of an array at line 38 (near "<<: *nestedref").
It now works as expected
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
note: this PR replace #15241
Commits
-------
500c57e [Yaml] Nested merge keys
in my environment the filename is filled, not "-"
$ php --version
PHP 5.5.27 (cli) (built: Jul 17 2015 12:32:05)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
* 2.8:
[travis] Build standalone phpunit without symfony/yaml
Clean wrong whitespaces
[travis] Build phpunit with local components
[Console] Handle false return value from readline
do not remove space between attributes
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
Allow to define Enum nodes with 1 single element
Fix "[Form] Add flexibility for EntityType"
Remove the duplicated rendering of deprecation messages in the profiler
Fix the retrieval of the default value for variadic arguments
Annotated routes with a variadic parameter
[Locale] Fix Intl requirement
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
Update EngineInterface.php
[Form] Add flexibility for EntityType
[Console] Fix Symfony coding standards violations
[Console] Use readline for user input when available
Better Iban Validation
Added a way to define the priority of service decoration
let Travis builds fail when PHP 7 jobs fail
Conflicts:
.travis.yml
UPGRADE-2.8.md
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Bundle/TwigBundle/composer.json
src/Symfony/Component/Locale/composer.json
* 2.7:
Clean wrong whitespaces
[travis] Build phpunit with local components
do not remove space between attributes
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
Fix the retrieval of the default value for variadic arguments
Annotated routes with a variadic parameter
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
Update EngineInterface.php
let Travis builds fail when PHP 7 jobs fail
Conflicts:
.travis.yml
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Added a way to define the priority of service decoration
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10634
| License | MIT
| Doc PR | symfony/symfony-docs#5600
This PR adds a way to define the priority of service decoration, so, the service with the highest priority will be applied first (the default priority is zero).
```yaml
services:
foo:
class: Foo
bar:
class: Bar
arguments: ['@bar.inner']
decorates: foo
public: false
foobar:
class: Foobar
arguments: ['@foobar.inner']
decorates: foo
decoration_priority: 1
public: false
```
This will result in this code:
```php
$this->services['foo'] = new Bar(new Foobar(new Foo)));
```
Commits
-------
75c98cb Added a way to define the priority of service decoration
* 2.3:
Clean wrong whitespaces
[travis] Build phpunit with local components
do not remove space between attributes
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
Fix the retrieval of the default value for variadic arguments
Annotated routes with a variadic parameter
Fixing DbalSessionHandler to work with a Oracle "limitation" or bug?
Update EngineInterface.php
let Travis builds fail when PHP 7 jobs fail
Conflicts:
.travis.yml
src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
This PR was squashed before being merged into the 2.3 branch (closes#15263).
Discussion
----------
[HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
| Q | A
| ------------- | ---
| Fixed tickets | #15262
| License | MIT
'proxy-revalidate' is not a header on its own but a 'Cache-Control' directive
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
Commits
-------
6c22f0a [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate()
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Improve Iban Validation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/13802
| License | MIT
| Doc PR |
This PR adds 2 more checks for better IBAN validation: the validation of the country code (represented by the first 2 letters) and the format validation according to the country format regex based on http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf.
Commits
-------
07b38de Better Iban Validation
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Use readline for user input when available #DX
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Given I am entering data in an user input
When I use left and right keys to make some changes in what I have typed
Then the cursor should move accordingly instead of adding characters at the end of the line
To make it simple: using the arrow keys (← →) to make changes to what I already typed would be much handier than getting `^[[D` and `^[[C` characters in the terminal and having to delete all chars to type everything again.
I could not add any extra tests to this as the STDIN can't be used during tests. But they are not breaking and I tried again all types of questions (text, choices, hidden) by myself.
Note that `readline` can't be used for hidden questions, as `stty -echo` is not taken into account.
Commits
-------
0534899 [Console] Fix Symfony coding standards violations
8b63d62 [Console] Use readline for user input when available
* 2.8:
[Locale] Add missing @group legacy annotations
[Form] Add missing @group legacy annotations
[Form] Use FQCN form types
Fix security-acl deps
Fix typo
[Security] Removed security-acl from the core
fixed typos
Fix doctrine mapping validation type error
Remove skipping of tests based on ICU data version whenever possible
Fix the handling of null as locale in the stub intl classes
do not dump leading backslashes in class names
fix issue #15377
Skip ::class constant
[Config] type specific check for emptiness
[Form] Deprecated FormTypeInterface::getName() and passing of type instances
Conflicts:
UPGRADE-2.8.md
composer.json
src/Symfony/Bridge/Doctrine/composer.json
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/ClassLoader/ClassMapGenerator.php
src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
src/Symfony/Component/Form/Tests/AbstractExtensionTest.php
src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
src/Symfony/Component/Form/Tests/SimpleFormTest.php
src/Symfony/Component/Locale/Tests/LocaleTest.php
src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
src/Symfony/Component/Security/Acl/README.md
src/Symfony/Component/Security/Acl/composer.json
* 2.7:
[Locale] Add missing @group legacy annotations
Fix security-acl deps
Fix doctrine mapping validation type error
Remove skipping of tests based on ICU data version whenever possible
Fix the handling of null as locale in the stub intl classes
do not dump leading backslashes in class names
fix issue #15377
Skip ::class constant
[Config] type specific check for emptiness
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
Added more country-based tests, added new error type
The error type `NOT_SUPPORTED_COUNTRY_CODE_ERROR` has been added for the
IBANs from unsupported countries, for which we don't have defined a
format. We will not check anymore if a country code against the Intl
component.
The tests have been completed with more tests for each contry we have
formats defined.
The 4 character length check and the case check has been removed. The message code constants
`TOO_SHORT_ERROR` and `INVALID_CASE_ERROR` has been deprecated
* 2.3:
Fix security-acl deps
Fix doctrine mapping validation type error
Remove skipping of tests based on ICU data version whenever possible
Fix the handling of null as locale in the stub intl classes
do not dump leading backslashes in class names
Skip ::class constant
[Config] type specific check for emptiness
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container9.php
src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
src/Symfony/Component/Locale/Tests/LocaleTest.php
src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
src/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
src/Symfony/Component/Validator/Tests/Constraints/CurrencyValidatorTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
Remove skipping of tests based on ICU data version whenever possible
| 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 tests being skipped based on the ICU data version don't actually need it. They might be testing code paths not relying on Intl, or not performing assertions on the values depending on the ICU data and so not dependant on the exact ICU version being used.
this is somewhat related to https://github.com/symfony/symfony/issues/14259 as it allows to reduce the number of tests not running on Travis.
Commits
-------
7994513 Remove skipping of tests based on ICU data version whenever possible
This PR was merged into the 2.3 branch.
Discussion
----------
do not dump leading backslashes in class names
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15001
| License | MIT
| Doc PR |
Commits
-------
ad6cb10 do not dump leading backslashes in class names
This PR was squashed before being merged into the 2.8 branch (closes#15013).
Discussion
----------
[Security] Removed security-acl from the core
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | part of #14718
| License | MIT
| Doc PR | ~
The `Security\Acl` is removed from the core and is loaded from its own repository. All tests were passing and this is fully backwards compatible. I have removed all but the Test files in the first step and added the dependency to verify the Test were still working with the package dependency. The second step was to remove the remaining test files and tests are still running for both the Bundle and the Framework. Once the Read-Only repository is a full standalone repository, this PR can be merged.
- [x] Remove component from the core
- [ ] Remove read-only from https://github.com/symfony/security-acl
Once this PR is merged, I can start working on splitting the SecurityBundle and extracting the ACL part to the AclBundle.
/cc @fabpot
Commits
-------
b26a449 [Security] Removed security-acl from the core
* 2.8: (63 commits)
[Debug] Deprecate ExceptionHandler::createResponse
[Debug] cleanup ExceptionHandlerTest
Reordered the toolbar elements via service priorities
bumped Symfony version to 2.7.4
Increased the z-index of .sf-toolbar-info
Removed an unused media query
updated VERSION for 2.7.3
updated CHANGELOG for 2.7.3
Redesigned "abbr" elements
Restored the old behavior for toolbars with lots of elements
Tweaks and bug fixes
Added some upgrade notes about the new toolbar design
fixed typo in translation keys
Fix the return value on error for intl methods returning arrays
Removed an useless CSS class and added styles for <hr>
Added a new profiler_markup_version to improve BC of the new toolbar
Fix merge
Removed an unused import
Reverted the feature to display different toolbar versions
Minor JavaScript optimizations
...
Conflicts:
CHANGELOG-2.7.md
UPGRADE-2.8.md
src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml
src/Symfony/Component/Debug/composer.json
src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Deprecated FormTypeInterface::getName() and passing of type instances
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #5321, #15008
| License | MIT
| Doc PR | TODO
#### Type Names
This PR deprecates the definition of the `getName()` method of form types. See #15008 for a more detailed description.
Before:
```php
class MyType extends AbstractType
{
public function getName()
{
return 'mytype';
}
// ...
}
```
After:
```php
class MyType extends AbstractType
{
// ...
}
```
You should always reference other types by their fully-qualified class names. Thanks to PHP 5.5, that's easy:
Before:
```php
$form = $this->createFormBuilder()
->add('name', 'text')
->add('age', 'integer')
->getForm();
```
After:
```php
$form = $this->createFormBuilder()
->add('name', TextType::class)
->add('age', IntegerType::class)
->getForm();
```
#### Type Instances
Furthermore, passing of type instances is deprecated.
Before:
```php
$form = $this->createForm(new AuthorType());
```
After:
```php
$form = $this->createForm(AuthorType::class);
```
#### DIC Aliases
When registering a type in the DIC, you should omit the "alias" attribute now.
Before:
```xml
<service id="my.type" class="Vendor\Type\MyType">
<tag name="form.type" alias="mytype" />
<argument type="service" id="some.service.id" />
</service>
```
After:
```xml
<service id="my.type" class="Vendor\Type\MyType">
<tag name="form.type" />
<argument type="service" id="some.service.id" />
</service>
```
Types without dependencies don't need to be registered in the DIC as they can be instantiated right away.
#### Template Block Prefixes
By default, the class name of the type in underscore notation minus "Type" suffix is used as Twig template block prefix (e.g. `UserProfileType` => `user_profile_*`). If you want to customize that, overwrite the new `getBlockPrefix()` method in your type:
```php
class UserProfileType extends AbstractType
{
public function getBlockPrefix()
{
return 'profile';
}
// ...
}
```
Commits
-------
3d9e5de [Form] Deprecated FormTypeInterface::getName() and passing of type instances
* 2.7:
[Debug] cleanup ExceptionHandlerTest
bumped Symfony version to 2.7.4
updated VERSION for 2.7.3
updated CHANGELOG for 2.7.3
fixed typo in translation keys
Fix the return value on error for intl methods returning arrays
Fix merge
Fix missing _route parameter notice in RouterListener logging case
Conflicts:
src/Symfony/Component/Debug/composer.json
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
[Config] deprecate cannotBeEmpty() for boolean and numeric nodes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
d4473f3 [Config] deprecate cannotBeEmpty() for boolean and numeric nodes
This PR was merged into the 2.3 branch.
Discussion
----------
[Config] type specific check for emptiness
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13736
| License | MIT
| Doc PR |
Commits
-------
0199fbf [Config] type specific check for emptiness
This PR was merged into the 2.3 branch.
Discussion
----------
Fix the handling of null as locale in the stub intl classes
The Intl extension accepts null as locale in formatters and the collator and will use the default locale in such case. Given that the stub implementation considers that the default locale is always 'en', it should be supported here too instead of forcing libraries to pass the default locale explicitly. For instance, ``Twig_Extensions_Extension_Intl`` relies on the fact that ``null`` as locale uses the default one: https://github.com/twigphp/Twig-extensions/pull/94
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-demo/pull/123
| License | MIT
| Doc PR | n/a
Commits
-------
d6db6ad Fix the handling of null as locale in the stub intl classes
Many tests being skipped based on the ICU data version don't actually
need it. They might be testing code paths not relying on Intl, or not
performing assertions on the values depending on the ICU data and so not
dependant on the exact ICU version being used.
The Intl extension accepts null as locale in formatters and the
collator and will use the default locale in such case. Given that the
stub implementation considers that the default locale is always 'en', it
should be supported here too instead of forcing libraries to pass the
default locale explicitly.
* 2.7:
[php7] Fix for substr() always returning a string
[Security] Do not save the target path in the session for a stateless firewall
Fix calls to HttpCache#getSurrogate triggering E_USER_DEPRECATED errors.
[DependencyInjection] fixed FrozenParameterBag and improved Parameter…
* 2.3:
[php7] Fix for substr() always returning a string
[Security] Do not save the target path in the session for a stateless firewall
[DependencyInjection] fixed FrozenParameterBag and improved Parameter…
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
This PR was squashed before being merged into the 2.3 branch (closes#15172).
Discussion
----------
[DependencyInjection] fixed FrozenParameterBag and improved Parameter…
The ParameterBagInterface was missing some @throws annotations, so the FrozenParameterBag class was a violation of Liskov subtitution principle. Also the ParameterBagInterface was missing the remove method.
(Optionally the ParameterBagInterface can be later split into two smaller interfaces, because the FrozenParameterBag shouldn't have the add, remove methods in the first place.)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I have also fixed removing elements from FrozenParameterBag, as introduced by @satahippy
https://github.com/symfony/DependencyInjection/pull/8
Commits
-------
3ad0794 [DependencyInjection] fixed FrozenParameterBag and improved Parameter…
* 2.8:
[Yaml] throw a ParseException on invalid data type
[TwigBridge] type-dependent path discovery
Resources as string have the same problem
Introduce failing test case when a SplFileInfo object is passed to the extract() method in the TwigExtractor.
#15331 add infos about deprecated classes to UPGRADE-3.0
[Asset] removed unused private property.
[Twig+FrameworkBundle] Fix forward compat with Form 2.8
[2.6] Static Code Analysis for Components
[Security/Http] Fix test relying on a private property
[Serializer] Fix bugs reported in b5990be491 (commitcomment-12301266)
[Form] Fix not-BC test assertion
[Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http
[Security] removed useless else condition in SwitchUserListener class.
[travis] Tests deps=low with PHP 5.6
Implement resettable containers
[Console] Fix console output with closed stdout
* 2.7:
[Yaml] throw a ParseException on invalid data type
[TwigBridge] type-dependent path discovery
Resources as string have the same problem
Introduce failing test case when a SplFileInfo object is passed to the extract() method in the TwigExtractor.
#15331 add infos about deprecated classes to UPGRADE-3.0
[Asset] removed unused private property.
[Security] removed useless else condition in SwitchUserListener class.
[travis] Tests deps=low with PHP 5.6
[Console] Fix console output with closed stdout
* 2.6:
[Yaml] throw a ParseException on invalid data type
#15331 add infos about deprecated classes to UPGRADE-3.0
[Security] removed useless else condition in SwitchUserListener class.
[travis] Tests deps=low with PHP 5.6
[Console] Fix console output with closed stdout
Without this check, PHP would trigger a warning when an array was passed
to `trim()`. The parser must throw a `ParseException` instance on a
malformed YAML string instead.
* 2.7:
[Twig+FrameworkBundle] Fix forward compat with Form 2.8
[2.6] Static Code Analysis for Components
[Security/Http] Fix test relying on a private property
[Serializer] Fix bugs reported in b5990be491 (commitcomment-12301266)
Conflicts:
src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php
src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Fix not-BC test assertion
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The 2.6 branch is failing because of this case for `Validation::API_VERSION_2_4`, that can't work because `$this->context` is not a mock object, thus has no "expect" method.
See https://travis-ci.org/symfony/symfony/jobs/72100346#L2902
This got unnoticed because only 2.6 is testing the 2.4 validator api.
Commits
-------
5ef7ae9 [Form] Fix not-BC test assertion
This PR was squashed before being merged into the 2.6 branch (closes#15317).
Discussion
----------
[2.6] Static Code Analysis for Components
| 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
Static Code Analysis with Php Inspections (EA Extended):
- fixed couple potential issues when code is running in a phar-file
Commits
-------
37a2353 [2.6] Static Code Analysis for Components
This PR was merged into the 2.8 branch.
Discussion
----------
Implement resettable containers
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | small one
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13448
| License | MIT
| Doc PR | n/a
This allows to release remove references to all services during shutdown, giving much more chances to destruct services and the container through refcounting rather than waiting GC, as it will break cycles between the container and container-aware services.
There is a small BC break for a very edge case: if someone keeps a reference to the container and then shutdowns the kernel, the container would now be cleared and so would not work as intended anymore. But I don't think it is a supported use case. If you shutdown the kernel, the container of this kernel is released by the kernel and should not be used anymore IMO.
Thus, shutting down the kernel generally does not happen except during tests on teardown.
I'm not sure a doc PR is needed here: users of the fullstack framework should never use this feature (the kernel is using it for them). What do you think @weaverryan ?
Commits
-------
4457745 Implement resettable containers
* 2.8: (27 commits)
[2.8] Fix 3.0 incompatible deps
[HttpKernel] Fix lowest dep
[Security] fix check for empty usernames
[Form] updated exception message of ButtonBuilder::setRequestHandler()
[travis] Fix deps=high jobs
Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7
[Serializer] Simplify AbstractNormalizer::prepareForDenormalization()
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
[DependencyInjection] Forbid container cloning
[HttpFoundation] Fix Response::closeOutputBuffers() for HHVM 3.3
[WebProfilerBundle] Add link to show profile of latest request
[DependencyInjection] Remove unused code in XmlFileLoader
[HttpFoundation] Behaviour change in PHP7 for substr
[Console] Set QuestionHelper max attempts in tests
[Form] Fix a BC break in the entity
fix broken ChoiceQuestion
bumped Symfony version to 2.7.3
updated VERSION for 2.7.2
updated CHANGELOG for 2.7.2
bumped Symfony version to 2.6.11
...
Conflicts:
.travis.yml
CHANGELOG-2.3.md
CHANGELOG-2.6.md
CHANGELOG-2.7.md
UPGRADE-2.7.md
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Form/composer.json
src/Symfony/Component/HttpKernel/composer.json
This PR was squashed before being merged into the 2.8 branch (closes#15131).
Discussion
----------
[Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http
Description
---
The `SimpleFormAuthenticatorInterface` and `SimplePreAuthenticatorInterface` rely on `Request`, which means it's a Http land class. This means they don't belong in core.
Having a form login that doesn't depend on the request is an option as well (e.g. a console application might use the question helper to implement a "form" login). However, then there is a need for a new abstraction of the request. I don't think it's worth it.
Furthermore, the only classes typehinting/relying on this interfaces can be found in `Security\Http`.
Implementation
---
The new interfaces extend the old ones for better backwards compability. Symfony doesn't trigger deprecation errors for interfaces, see 6f57b7b552
PR Info Table
---
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
ebb2064 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http
* 2.7:
[HttpKernel] Fix lowest dep
[Security] fix check for empty usernames
[Form] updated exception message of ButtonBuilder::setRequestHandler()
[travis] Fix deps=high jobs
Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7
[Serializer] Simplify AbstractNormalizer::prepareForDenormalization()
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
[DependencyInjection] Remove unused code in XmlFileLoader
[HttpFoundation] Behaviour change in PHP7 for substr
bumped Symfony version to 2.3.32
updated VERSION for 2.3.31
update CONTRIBUTORS for 2.3.31
updated CHANGELOG for 2.3.31
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/HttpKernel/composer.json
* 2.6:
[Security] fix check for empty usernames
[Form] updated exception message of ButtonBuilder::setRequestHandler()
[travis] Fix deps=high jobs
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
[DependencyInjection] Remove unused code in XmlFileLoader
[HttpFoundation] Behaviour change in PHP7 for substr
bumped Symfony version to 2.3.32
updated VERSION for 2.3.31
update CONTRIBUTORS for 2.3.31
updated CHANGELOG for 2.3.31
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
* 2.3:
[Security] fix check for empty usernames
[Form] updated exception message of ButtonBuilder::setRequestHandler()
[travis] Fix deps=high jobs
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
[DependencyInjection] Remove unused code in XmlFileLoader
[HttpFoundation] Behaviour change in PHP7 for substr
bumped Symfony version to 2.3.32
updated VERSION for 2.3.31
update CONTRIBUTORS for 2.3.31
updated CHANGELOG for 2.3.31
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/HttpKernel/Kernel.php
This allows to remove references to all services during shutdown, giving
much more chances to destruct services and the container through
refcounting rather than waiting GC, as it will break cycles between the
container and container-aware services.
* 2.7:
[HttpFoundation] Fix Response::closeOutputBuffers() for HHVM 3.3
[Console] Set QuestionHelper max attempts in tests
[Form] Fix a BC break in the entity
fix broken ChoiceQuestion
bumped Symfony version to 2.7.3
updated VERSION for 2.7.2
updated CHANGELOG for 2.7.2
bumped Symfony version to 2.6.11
updated VERSION for 2.6.10
updated CHANGELOG for 2.6.10
[PropertyAccess] setValue & isWritable loops must only stops on reference and object. References can also be arrays and if the loop stops the value is never set in the object. (Breaks since 2.6.5 commit e3e4695)
* 2.6:
[HttpFoundation] Fix Response::closeOutputBuffers() for HHVM 3.3
bumped Symfony version to 2.6.11
updated VERSION for 2.6.10
updated CHANGELOG for 2.6.10
[PropertyAccess] setValue & isWritable loops must only stops on reference and object. References can also be arrays and if the loop stops the value is never set in the object. (Breaks since 2.6.5 commit e3e4695)
This PR was squashed before being merged into the 2.3 branch (closes#15249).
Discussion
----------
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | not yet
* Allows to fix tests of https://github.com/symfony/psr-http-message-bridge with PHP 5.6.
* Ease the transition to PSR-7 (in PSR-7, almost everything is stream - #15186)
Maybe should I open it against 2.8 but it can be considered a bug fix at least for the part "returning a string as a resource".
Commits
-------
059964d [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Behaviour change in PHP7 for substr
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
In PHP7 the behaviour of substr() changed.
To resume: "Truncating an entire string should result in a string."
See: https://bugs.php.net/bug.php?id=62922
Commits
-------
ba6000b [HttpFoundation] Behaviour change in PHP7 for substr
In PHP7 the behaviour of substr() changed.
To resume: "Truncating an entire string should result in a string."
See: https://bugs.php.net/bug.php?id=62922
This PR was merged into the 3.0-dev branch.
Discussion
----------
[DependencyInjection] Added ParameterBagInterface::remove
| Q | A
| ------------- | ---
| Bug fix? | kinda
| New feature? | no
| BC breaks? | only between 2.X and 3.X, this PR target 3.X
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I created this PR because the method is implemented in `ParameterBag` but is not declared in the interface.
Commits
-------
c13a4ff [DependencyInjection] Added ParameterBagInterface::remove
This PR was merged into the 2.6 branch.
Discussion
----------
[PropertyAccess] BC Break since 2.6.5
setValue & isWratable loops must only stops on reference and object. References can also be arrays and if the loop stops the value is never set in the object. (Breaks since 2.6.5 commit e3e4695)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This merge request fixes the following cases taht was working with version previous to 2.6.5:
A class with a property myArray which can be a multi dimensional array can now be accesed using myArray[foo][bar][baz]
Previously only myArray[foo] was working the break is since commit e3e4695
Commits
-------
1dcca1a [PropertyAccess] setValue & isWritable loops must only stops on reference and object. References can also be arrays and if the loop stops the value is never set in the object. (Breaks since 2.6.5 commit e3e4695)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This merge request fixes the following cases taht was working with version previous to 2.6.5:
A class with a property myArray which can be a multi dimensional array can now be accesed using myArray[foo][bar][baz]
Previously only myArray[foo] was working. The break is since commit e3e4695
This commit adds additionnal testing, and is rebased from 2.6 upstream
* 2.8:
Added 'default' color
[HttpFoundation] Reload the session after regenerating its id
[HttpFoundation] Add a test case to confirm a bug in session migration
[Serializer] Fix ClassMetadata::sleep()
[2.6] Static Code Analysis for Components and Bundles
[Finder] Command::addAtIndex() fails with Command instance argument
[DependencyInjection] Freeze also FrozenParameterBag::remove
[Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig
fix CS
fixed CS
Add a way to reset the singleton
[Security] allow to use `method` in XML configs
[Serializer] Fix Groups tests.
Remove duplicate example
Remove var not used due to returning early (introduced in 8982c32)
[Serializer] Fix Groups PHPDoc
Enhance hhvm test skip message
fix for legacy asset() with EmptyVersionStrategy
[Form] Added upgrade notes for #15061
* 2.7:
Added 'default' color
[HttpFoundation] Reload the session after regenerating its id
[HttpFoundation] Add a test case to confirm a bug in session migration
[Serializer] Fix ClassMetadata::sleep()
[2.6] Static Code Analysis for Components and Bundles
[Finder] Command::addAtIndex() fails with Command instance argument
[DependencyInjection] Freeze also FrozenParameterBag::remove
[Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig
fix CS
fixed CS
Add a way to reset the singleton
[Security] allow to use `method` in XML configs
[Serializer] Fix Groups tests.
Remove duplicate example
Remove var not used due to returning early (introduced in 8982c32)
[Serializer] Fix Groups PHPDoc
Enhance hhvm test skip message
fix for legacy asset() with EmptyVersionStrategy
[Form] Added upgrade notes for #15061
* 2.6:
Added 'default' color
[HttpFoundation] Reload the session after regenerating its id
[HttpFoundation] Add a test case to confirm a bug in session migration
[2.6] Static Code Analysis for Components and Bundles
[Finder] Command::addAtIndex() fails with Command instance argument
[DependencyInjection] Freeze also FrozenParameterBag::remove
[Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig
fix CS
fixed CS
Add a way to reset the singleton
[Security] allow to use `method` in XML configs
Remove duplicate example
Remove var not used due to returning early (introduced in 8982c32)
Enhance hhvm test skip message
* 2.3:
Added 'default' color
[HttpFoundation] Reload the session after regenerating its id
[HttpFoundation] Add a test case to confirm a bug in session migration
[Finder] Command::addAtIndex() fails with Command instance argument
[DependencyInjection] Freeze also FrozenParameterBag::remove
fix CS
fixed CS
Add a way to reset the singleton
[Security] allow to use `method` in XML configs
Remove var not used due to returning early (introduced in 8982c32)
Enhance hhvm test skip message
This PR was squashed before being merged into the 2.7 branch (closes#15176).
Discussion
----------
[Serializer] Fix ClassMetadata::sleep()
| 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
Fix a bug with the `sleep()` method. It is blocking under when using the APC metadata cache.
Commits
-------
2f42801 [Serializer] Fix ClassMetadata::sleep()
This PR was squashed before being merged into the 2.3 branch (closes#15223).
Discussion
----------
[Finder] Command::addAtIndex() fails with Command instance argument
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14384
| License | MIT
| Doc PR | -
Fixed reported bug #14384 and added test case for it. This is a second PR as previous #14385 went bad after I failed to rebase 2.3 branch properly.
Commits
-------
2aff566 [Finder] Command::addAtIndex() fails with Command instance argument
This PR was merged into the 2.3 branch.
Discussion
----------
CS fixes for 2.3
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
To keep fabbot.io happy ;)
Commits
-------
464b67e fix CS
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Fix Groups tests.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
2bd8fb8 [Serializer] Fix Groups tests.
* 2.8:
[VarDumper] Ingore PHPUnit and Prophecy object when they are nested
[2.8] Fix lowest deps
Conflicts:
.travis.yml
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
This PR was squashed before being merged into the 2.8 branch (closes#15141).
Discussion
----------
[DX] [Security] Renamed Token#getKey() to getSecret()
There are 2 very vague parameter names in the authentication process: `$providerKey` and `$key`. Some tokens/providers have the first one, some tokens/providers the second one and some both. An overview:
| Token | `providerKey` | `key`
| --- | --- | ---
| `AnonymousToken` | - | yes
| `PreAuth...Token` | yes | -
| `RememberMeToken` | yes | yes
| `UsernamePasswordToken` | yes | -
Both names are extremely general and their PHPdocs contains pure no-shit-sherlock-descriptions :squirrel: (like "The key."). This made me and @iltar think it's just an inconsistency and they have the same meaning.
...until we dived deeper into the code and came to the conclusion that `$key` has a Security task (while `$providerKey` doesn't really). If it takes people connected to Symfony internals 30+ minutes to find this out, it should be considered for an improvement imo.
So here is our suggestion: **Rename `$key` to `$secret`**. This explains much better what the value of the string has to be (for instance, it's important that the string is not easily guessable and cannot be found out, according to the Spring docs). It also explains the usage better (it's used as a replacement for credentials and to hash the RememberMeToken).
**Tl;dr**: `$key` and `$providerKey` are too general names, let's improve DX by renaming them. This PR tackles `$key` by renaming it to `$secret`.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
*My excuse for the completely unrelated branch name*
Commits
-------
24e0eb6 [DX] [Security] Renamed Token#getKey() to getSecret()
This PR was merged into the 2.6 branch.
Discussion
----------
[Validator] always evaluate binary format when changed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13891
| License | MIT
| Doc PR |
Commits
-------
2ad7e67 [Validator] always evaluate binary format when changed
* 2.7:
Update DateTimeToArrayTransformer.php
Mock microtime() and time() in transient tests
Azerbaijani language pluralization rule
Move HHVM tests out of the allowed failures
* 2.6:
Update DateTimeToArrayTransformer.php
Mock microtime() and time() in transient tests
Azerbaijani language pluralization rule
Move HHVM tests out of the allowed failures
* 2.3:
Update DateTimeToArrayTransformer.php
Mock microtime() and time() in transient tests
Azerbaijani language pluralization rule
Move HHVM tests out of the allowed failures
This PR was merged into the 2.3 branch.
Discussion
----------
Mock microtime() and time() in transient tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
8319ca3 Mock microtime() and time() in transient tests
In AZ, as in TR, pluralization is always 0:
0 kitab (zero books)
1 kitab (1 book)
3 kitab (3 books)
104 kitab (104 books)
Apparently ZF ruleset was wrong in the first place :)
* 2.6:
[2.6] Towards 100% HHVM compat
[Security/Http] Fix test
[Stopwatch] Fix test
Minor fixes
Towards 100% HHVM compat
unify default AccessDeniedExeption message
trigger event with right user (add test)
[Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
[Form] Fixed: Data mappers always receive forms indexed by their names
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Added missing error codes and turned codes into UUIDs
Reopened#12388 on the 2.8 branch.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With the current implementation of error codes, checking which error occurred is unnecessarily complex:
```php
if ($violation->getConstraint() instanceof Length && Length::TOO_SHORT_ERROR === $violation->getCode()) {
// ...
}
```
Also, the code is completely missing for some constraints. This is fixed now. By using UUIDs, the check is reduced to:
```php
if (Length::TOO_SHORT_ERROR === $violation->getCode()) {
// ...
}
```
Also, APIs can simply output the error code and the name of the error without needing to point to the constraint as well.
Before:
```json
[
{
"code": "1",
"name": "TOO_SHORT_ERROR",
"message": "This value is too short. ...",
"constraint": "Symfony\\Component\\Validator\\Constraints\\Length"
}
]
```
After:
```json
[
{
"code": "9ff3fdc4-b214-49db-8718-39c315e33d45",
"name": "TOO_SHORT_ERROR",
"message": "This value is too short. ..."
}
]
```
This makes it possible to implement a service on symfony.com which looks up error codes, e.g.
symfony.com/error?code=9ff3fdc4-b214-49db-8718-39c315e33d45
Such a URL could redirect directly to the documentation of the appropriate constraint. We could even support user-submitted error codes which redirect to the documentation of that constraint.
Commits
-------
8874e88 [Validator] Added missing error codes and turned codes into UUIDs
* 2.3:
Minor fixes
Towards 100% HHVM compat
trigger event with right user (add test)
[Security] Initialize SwitchUserEvent::targetUser on attemptExitUser
[Form] Fixed: Data mappers always receive forms indexed by their names
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Filesystem/Filesystem.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed handling of choices passed in choice groups
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | **yes**
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14915
| License | MIT
| Doc PR | -
I introduced a bug in the 2.7 ChoiceList implementation when choices are passed as groups:
```
$form->add('response', 'choice', array(
'choices' => array(
'Decided' => array($yesObj, $noObj),
'Undecided' => array($maybeObj),
),
// use getName() for the labels
'choice_label' => 'name',
'choices_as_values' => true,
));
```
In this example, since the choices `$yesObj` and `$maybeObj` have the same array index `0`, the same label is displayed for the two options. The problem is that we rely on the keys passed in the "choices" option to identify choices in a choice list (which are, as you see, not guaranteed to be free of duplicates).
This PR changes the new choice list implementation to identify choices by values instead. We already have the guarantee that choices can be identified uniquely by their string values.
This PR should be included in 2.7.2 to fix the regression.
Unfortunately, a few BC breaks in the new implementation are necessary to make this fix:
* The legacy `ChoiceListInterface` was reverted to how it was in 2.6 and does *not* extend the new `ChoiceListInterface` anymore.
* As a consequence, legacy choice lists need to be wrapped into a `LegacyChoiceListAdapter` when they are passed to any place in the framework where a new choice list is expected.
* The new `ChoiceListInterface` has two additional methods `getStructuredValues()` and `getOriginalKeys()` now.
* `ArrayKeyChoiceList::toArrayKey()` was marked as internal.
* `ChoiceListFactoryInterface::createView()` does not accept arrays and Traversables anymore for the `$groupBy` parameter (for simplicity).
@fabpot Where should we document the upgrade path for 2.7.1 => 2.7.2?
Commits
-------
7623dc8 [Form] Fixed handling of choices passed in choice groups
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed: Data mappers always receive forms indexed by their names
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR facilitates writing domain-specific data mappers, since it guarantees that you can access forms by name in the data mapper methods. Currently, `Form::add()` does not set the index of the array passed to the data mapper to the form's name.
Commits
-------
86b7fe5 [Form] Fixed: Data mappers always receive forms indexed by their names
This PR was merged into the 2.7 branch.
Discussion
----------
Fix choice translation domain for expanded choice widget
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15140
| License | MIT
This fix the form component using the translation_domain instead of the choice_translation_domain for expanded choice widgets.
I had to add the possibility to skip label translation when using ```translation_domain => false``` to do this fix so this can be considered a new feature to.
Commits
-------
52755ba Fix choice translation domain for expanded choice widget
The `SwitchUserEvent` is triggered in case an account is switched. This works okay while switching to the user, but on exit the `SwitchUserEvent` is triggered again with the original User. That User was not initialized by the provider yet.
load user by UserInterface instead of username
* 2.6:
[2.6][Validator] Fix BC for Validator's validate method
Very small typo fix
Fix quoting style consistency.
[DependencyInjection] Fail when dumping a Definition with no class nor factory
Normalizing recursively - see #9096
No change - the normalizeParams is a copy-and-paste of the earlier logic
fixes issue with logging array of non-utf8 data
fix validation for Maestro UK card numbers
Conflicts:
src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
src/Symfony/Component/Validator/Validator/LegacyValidator.php
* 2.3:
Fix quoting style consistency.
[DependencyInjection] Fail when dumping a Definition with no class nor factory
Normalizing recursively - see #9096
No change - the normalizeParams is a copy-and-paste of the earlier logic
fixes issue with logging array of non-utf8 data
fix validation for Maestro UK card numbers
This PR was merged into the 2.6 branch.
Discussion
----------
[2.6][Validator] Fix BC for Validator's validate method
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This fix makes method call ``` $validator->validate($value, array()); ``` backward compatible and does not throw
```
[Symfony\Component\Validator\Exception\NoSuchMetadataException]
The class or interface "XXX" does not exist.
```
when the ``` $value ``` is a scalar type.
Commits
-------
ffe25dc [2.6][Validator] Fix BC for Validator's validate method
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Fail when dumping a Definition with no class nor factory
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I tried creating an anonymous inline service with a DefinitionDecorator, but that did not work.
Here is the fix.
Commits
-------
23ad4ad [DependencyInjection] Fail when dumping a Definition with no class nor factory
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fixed sending non array data on submit to ResizeListener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13804, #13851
| License | MIT
| Doc PR |
I agree with @Tobion that #13851 is a bug fix and therefore should be applied on the `2.3` branch too.
Commits
-------
0f185c9 [Form] [EventListener] fixed sending non array data on submit to ResizeListener
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] respect multi-character shortcuts
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15105
| License | MIT
| Doc PR |
The `TextDescriptor` assumed that shortcuts will only consume one space
when calculating the maximum width needed to display the option's
synopsis.
Commits
-------
bd49f23 [Console] respect multi-character shortcuts
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][DependencyInjection] improve deprecation messages
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Also include the service id in the deprecation message.
Commits
-------
9e41fa7 [DependencyInjection] improve deprecation messages
* 2.3:
Fixed the regexp for the validator of Maestro-based credit/debit cards
[Console] Fix STDERR output text on IBM iSeries OS400
[HttpFoundation] Use convention to allow throwing from __toString()
[Form] Fixed: remove quoted strings from Intl date formats (e.g. es_ES full pattern)
[bugfix][MonologBridge] WebProcessor: passing to BaseWebProcessor
[2.3] Static Code Analysis for Components
[Translation][update cmd] taken account into bundle overrides path.
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/Validator/Constraints/CardSchemeValidator.php
This PR was merged into the 2.6 branch.
Discussion
----------
[DependencyInjection] Fixed decoration of service for service with parent
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
0b8b58c [DependencyInjection] Fixed decoration of service for service with parent
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Use convention to allow throwing from __toString()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Corollary to #15076, works without it.
Commits
-------
8982c32 [HttpFoundation] Use convention to allow throwing from __toString()
This PR was squashed before being merged into the 2.3 branch (closes#15058).
Discussion
----------
[Console] Fix STDERR output text on IBM iSeries OS400
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | None
Prior to this PR a Symfony Console command would output error text as random symbols when executed via the IBM console program QSH. Affected error text output such as when a required InputArgument is missing, or when explicitly using `$output->getErrorOutput()->writeln('Some error text here')`.
![Example error output](http://i.imgur.com/PQplK1p.png)
This PR fixes error text so it properly prints to IBM console programs such as QSH and QP2SHELL.
I previously fixed STDOUT for PHP running on IBM iSeries OS400 (Zend Server) using the same approach. Since that PR was merged ConsoleOutput class began using its own output for STDERR which exhibits the same issue STDOUT did.
The following commits and previous Symfony PRs have our relevant discussion about ASCII vs EBCDIC character encoding to fix this issue:
* [Original IBM STDOUT reported in #1434](https://github.com/symfony/symfony/issues/1434)
* [My PR #4152 that fixes#1434](https://github.com/symfony/symfony/pull/4152)
Thanks!
🚀
Commits
-------
23c42ca [Console] Fix STDERR output text on IBM iSeries OS400
This PR was merged into the 2.8 branch.
Discussion
----------
[Console][Table] allow multiple render() calls.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | ~
| Tests pass? | yes
| License | MIT
This is a cherry-pick of #14983.
Commits
-------
b93bcc1 Fixed colspan issues with multiple render() calls
* 2.7:
[FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer
[VarDumper] Fix dump output for better readability
[PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy
* 2.8: (42 commits)
[DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
[Serializer] Fixed typo in comment
[Form] Fixed: Filter non-integers when selecting entities by int ID
[Form] [EventListener] fixed sending non array data on submit to ResizeListener
Fix merge
Fix merge
Add test for HHVM FatalErrors
[2.6][Debug] Fix fatal-errors handling on HHVM
[Debug] Fix log level of stacked errors
[Form] Deprecated "cascade_validation"
[Form] Add "prototype_data" option to collection type
[VarDumper] Fix uninitialized id in HtmlDumper
[Form] Added the 'range' FormType
Fixed fluent interface
[Console] Fix tests on Windows
[2.7] Fix unsilenced deprecation notices
[2.3][Debug] Fix fatal-errors handling on HHVM
[Debug] fix debug class loader case test on windows
Standardize the name of the exception variables
[Debug+VarDumper] Fix handling of PHP7 exception/error model
...
Conflicts:
CHANGELOG-2.7.md
UPGRADE-2.7.md
UPGRADE-2.8.md
src/Symfony/Bridge/Twig/AppVariable.php
src/Symfony/Component/Console/Helper/DialogHelper.php
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php
src/Symfony/Component/Form/AbstractType.php
src/Symfony/Component/Form/AbstractTypeExtension.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
src/Symfony/Component/HttpKernel/Tests/Logger.php
src/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.php
src/Symfony/Component/Routing/Route.php
* 2.7: (36 commits)
[DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
[Serializer] Fixed typo in comment
[Form] Fixed: Filter non-integers when selecting entities by int ID
Fix merge
Fix merge
Add test for HHVM FatalErrors
[2.6][Debug] Fix fatal-errors handling on HHVM
[Debug] Fix log level of stacked errors
[VarDumper] Fix uninitialized id in HtmlDumper
Fixed fluent interface
[Console] Fix tests on Windows
[2.7] Fix unsilenced deprecation notices
[2.3][Debug] Fix fatal-errors handling on HHVM
[Debug] fix debug class loader case test on windows
Standardize the name of the exception variables
[Debug+VarDumper] Fix handling of PHP7 exception/error model
Do not trigger deprecation error in ResolveParameterPlaceHoldersPass
[2.3] Static Code Analysis for Components
Added a small Upgrade note regarding security.context
added missing deprecation in CHANGELOG
...
Conflicts:
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
src/Symfony/Component/HttpKernel/Kernel.php
* 2.6:
Add test for HHVM FatalErrors
[2.6][Debug] Fix fatal-errors handling on HHVM
[2.3][Debug] Fix fatal-errors handling on HHVM
Standardize the name of the exception variables
[2.3] Static Code Analysis for Components
Remove duplicated paths
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
src/Symfony/Component/Security/Http/Firewall/ContextListener.php
src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php
src/Symfony/Component/Security/Http/RememberMe/AbstractRememberMeServices.php
* 2.3:
[2.3][Debug] Fix fatal-errors handling on HHVM
Standardize the name of the exception variables
[2.3] Static Code Analysis for Components
Remove duplicated paths
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php
* 2.6:
[Debug] Fix log level of stacked errors
[VarDumper] Fix uninitialized id in HtmlDumper
Fixed fluent interface
[Debug] fix debug class loader case test on windows
[Debug+VarDumper] Fix handling of PHP7 exception/error model
[2.6][Security][Translation] #14920 update translations
[VarDumper] Cherry-pick code style fixes from 2.7
Bug #14836 [HttpFoundation] Moves default JSON encoding assignment from constructor to property
Conflicts:
src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php
src/Symfony/Component/VarDumper/Caster/DOMCaster.php
src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php
src/Symfony/Component/VarDumper/Caster/PdoCaster.php
src/Symfony/Component/VarDumper/Caster/SplCaster.php
This PR was merged into the 2.6 branch.
Discussion
----------
[Debug+VarDumper] Fix handling of PHP7 "Throwable" exceptions
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
PHP7 may introduce the Throwable interface if the corresponding RFC is accepted (see https://wiki.php.net/rfc/throwable-interface)
This PR adds support for it. We should wait for final approval of the RFC before merging it.
Commits
-------
4dc727f [Debug+VarDumper] Fix handling of PHP7 exception/error model
edf793e [VarDumper] Cherry-pick code style fixes from 2.7
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Add deprecation warning
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| License | MIT
If someone extends FileLoader and do not call the parent constructor a
deprecation warning should be triggered.
Commits
-------
dbfca37 [Config] Add deprecation warning
This PR was squashed before being merged into the 2.7 branch (closes#14975).
Discussion
----------
[Console] Fix tests on Windows
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14975
| License | MIT
| Doc PR | none
Commits
-------
4f0f7ea [Console] Fix tests on Windows
This PR was merged into the 3.0-dev branch.
Discussion
----------
Removed deprecated stuff from the Console component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
a2a449c Removed deprecated stuff from the Console component
This PR was merged into the 2.7 branch.
Discussion
----------
added missing deprecation in CHANGELOG
Commits
-------
ddddeb5 added missing deprecation in CHANGELOG
This PR was merged into the 2.7 branch.
Discussion
----------
Added a small Upgrade note regarding security.context
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ~
| Fixed tickets | #14889
| License | MIT
| Doc PR | ~
I've added a note in the 2.7 upgrade file on which extending implementations should be updated when using 2.7. Along with it, I've removed an unused use statement, fixed some typos and removed a redundant session check as this check is already done at the start of the method.
For #14889 I have also done a search through the docs (2.7), but I couldn't find any remaining examples encouraging the usage of the `SecurityContext(Interface)` anywhere.
Commits
-------
ade1fef Added a small Upgrade note regarding security.context
This PR was squashed before being merged into the 2.3 branch (closes#14890).
Discussion
----------
[2.3] Static Code Analysis for Components
| 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
Static Code Analysis with Php Inspections (EA Extended):
- not optimal regular expressions usage
- strlen miss-use
- not optimal conditional statements in Process and Filesystem
- unsafe uniquid usage
PS: re-creating to no spam history log with reverts
Commits
-------
4a4fea7 [2.3] Static Code Analysis for Components
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
| 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 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
... because quite often the Exception is a result of the `www-data` user not having the appropriate rights at that path.
fixed ProcessFailedException tests
Update ProcessFailedExceptionTest.php
fix indention
fixed indention
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 & automate block gaps.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
---
Depends on https://github.com/symfony/symfony/pull/14741
---
## What it does
- autoprepend appropriate blocks (like cautions, titles, sections, ...) by the correct number of blank lines considering history.
- handle automatically most of the SymfonyStyle guide line breaks and gaps. Fix things such as unwanted double blank lines between titles and admonitions.
- test outputs
- fix an issue using questions with SymfonyStyle, which should not output extra blank lines when using with a non-interactive input.
## Description
`SymfonyStyle` is great, but there are some issues, mostly when using blocks (text blocks, titles and admonitions): some extra blank lines might be generated.
Plus, on the contrary, some line breaks or blank lines around blocks are missing, and the developer need to handle this himself by polluting his code with ugly `if` and `newLine()` statements.
### Before / After :
![screenshot 2015-05-13 a 00 11 59](https://cloud.githubusercontent.com/assets/2211145/7600572/ccfa8904-f90c-11e4-999f-d89612360424.PNG)
As you can see, it's still up to the developper to end his command by a blank line (unless using a block like `SymfonyStyle::success()`) in order to distinct different commands outputs more efficiently.
Everything else is now handled properly, and automatically, according to the rules exposed in the symfony console style guide published some time ago by @javiereguiluz .
Questions (not exposed in the above output) are considered as blocks, and follow, for instance, the same conditions than admonitions: 1 blank line before and after, no more (although, you'll still be able to output more blank lines yourself, using `newLine`).
Commits
-------
fc598ff [Console] SymfonyStyle : fix & automate block gaps.
260702e [Console] SymfonyStyle : Improve EOL consistency by relying on output instance
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Support DateTimeImmutable in transform()
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When passing a DateTimeImmutable instance to DateTimeToLocalizedStringTransformer::transform($dateTime), it throws an exception, `TransformationFailedException('Expected a \DateTime.')`.
The method just converts a date-time object into a string, so there is no reason that it should not support all DateTimeInterface implementations.
DateTimeInterface was added in PHP 5.5, so in order to support earlier versions, we need to do instanceof checks for both DateTime and DateTimeInterface. When Symfony requires PHP 5.5 or larger, we can remove the DateTime check and only check for DateTimeInterface.
This was originally submitted as a PR against the 2.7 branch in #14676.
Commits
-------
17346c5 [Form] Support DateTimeImmutable in transform()
This PR was merged into the 2.6 branch.
Discussion
----------
[Form] add test to avoid regression of #14891
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14891
| License | MIT
| Doc PR |
Commits
-------
12a19c8 [Form] add test to avoid regression of #14891
ResolvedFormType#getTypeExtensions() was calling method
AbstractType#getExtensions() which has been removed in
commit b3081e85a0
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR was squashed before being merged into the 2.3 branch (closes#14738).
Discussion
----------
[HttpFoundation] Get response content as resource several times for PHP >= 5.6
| 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 PHP 5.6, `php://input` can be opened several times.
Commits
-------
9f9b0f7 [HttpFoundation] Get response content as resource several times for PHP >= 5.6
This PR was squashed before being merged into the 2.8 branch (closes#14781).
Discussion
----------
[TwigBundle] Reconfigure twig paths when they are updated
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14771, #14768, #14262, #14778
| License | MIT
Refresh twig paths upon creation and deletion. As we don't care neither about path's modification time nor path's content, a new Resource has been added in the Config Component.
Full discussion in #14778.
Commits
-------
3cbff05 [TwigBundle] Reconfigure twig paths when they are updated
* 2.7:
[Security] Update tests after a merge
[Console] Remove an unused argument and fix a small cs issue
[Translator] avoid serialize unserializable resources.
This PR was merged into the 2.3 branch.
Discussion
----------
[Config] Improved duplicated code in FileLocator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR improves a duplicate check prepending the current path (if exists) to the list of paths.
Commits
-------
30aa4e9 Improved duplicated code in FileLocator
This PR was merged into the 2.6 branch.
Discussion
----------
[Console] Remove an unused argument
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14878
| License | MIT
| Doc PR | -
It was overlooked when doing a refactoring in #8800
I also fixed a small cs issue indicated by fabbot.
Commits
-------
ec14143 [Console] Remove an unused argument and fix a small cs issue
* 2.8: (100 commits)
[DependencyInjection] provide better error message when using deprecated configuration options
[console][TableCell] get cell width without decoration.
Improve the config validation in TwigBundle
[VarDumper] Changed tooltip to expand-all keybinding in OS X
[Bridge\PhpUnit] Fix composer installed phpunit detection
[VarDumper] Fix generic casters calling order
[2.7][SecurityBundle] Remove SecurityContext from Compile
[WebProfilerBundle][logger] added missing deprecation message.
Fix profiler CSS
[Security][Acl] enforce string identifiers
[FrameworkBundle] make `templating.helper.router` service available again for BC reasons
[BrowserKit] Fix bug when uri starts with http.
bumped Symfony version to 2.7.1
updated VERSION for 2.7.0
updated CHANGELOG for 2.7.0
bumped Symfony version to 2.6.10
updated VERSION for 2.6.9
updated CHANGELOG for 2.6.9
fixed tests
bumped Symfony version to 2.3.31
...
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.6.md
CHANGELOG-2.7.md
UPGRADE-2.7.md
UPGRADE-3.0.md
src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
src/Symfony/Bridge/Twig/Extension/AssetExtension.php
src/Symfony/Bridge/Twig/Tests/Extension/AssetExtensionTest.php
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
src/Symfony/Bundle/FrameworkBundle/Resources/config/templating.xml
src/Symfony/Bundle/FrameworkBundle/Resources/config/templating_php.xml
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Debug/ExceptionHandler.php
src/Symfony/Component/DependencyInjection/Container.php
src/Symfony/Component/DependencyInjection/Definition.php
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/legacy-services6.xml
src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services6.xml
src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/legacy-services6.yml
src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml
src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
src/Symfony/Component/Form/CHANGELOG.md
src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
src/Symfony/Component/Routing/Loader/XmlFileLoader.php
src/Symfony/Component/Routing/Loader/YamlFileLoader.php
* 2.7: (95 commits)
[DependencyInjection] provide better error message when using deprecated configuration options
[console][TableCell] get cell width without decoration.
Improve the config validation in TwigBundle
[VarDumper] Changed tooltip to expand-all keybinding in OS X
[Bridge\PhpUnit] Fix composer installed phpunit detection
[VarDumper] Fix generic casters calling order
[2.7][SecurityBundle] Remove SecurityContext from Compile
[WebProfilerBundle][logger] added missing deprecation message.
Fix profiler CSS
[Security][Acl] enforce string identifiers
[FrameworkBundle] make `templating.helper.router` service available again for BC reasons
[BrowserKit] Fix bug when uri starts with http.
bumped Symfony version to 2.7.1
updated VERSION for 2.7.0
updated CHANGELOG for 2.7.0
bumped Symfony version to 2.6.10
updated VERSION for 2.6.9
updated CHANGELOG for 2.6.9
fixed tests
bumped Symfony version to 2.3.31
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Translation/Loader/JsonFileLoader.php
* 2.6:
Improve the config validation in TwigBundle
[WebProfilerBundle][logger] added missing deprecation message.
[Security][Acl] enforce string identifiers
[BrowserKit] Fix bug when uri starts with http.
bumped Symfony version to 2.3.31
updated VERSION for 2.3.30
updated CHANGELOG for 2.3.30
Php Inspections (EA Extended): - resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString -resolved implicit magic methods calls -resolved callable name case mismatches
* 2.3:
Improve the config validation in TwigBundle
[Security][Acl] enforce string identifiers
[BrowserKit] Fix bug when uri starts with http.
bumped Symfony version to 2.3.31
updated VERSION for 2.3.30
updated CHANGELOG for 2.3.30
Php Inspections (EA Extended): - resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString -resolved implicit magic methods calls -resolved callable name case mismatches
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] provide better error message when using deprecated configuration options
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14687
| License | MIT
| Doc PR |
Commits
-------
e1e7440 [DependencyInjection] provide better error message when using deprecated configuration options
This PR was squashed before being merged into the 2.7 branch (closes#14846).
Discussion
----------
[console][TableCell] get cell width without decoration.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | https://github.com/symfony/symfony/pull/14513#issuecomment-108093051
| Tests pass? | yes
| License | MIT
Commits
-------
d93b16f [console][TableCell] get cell width without decoration.
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Fix generic casters calling order
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There is a logical mistake in the calling order of the catch all `*` caster. Casters are called with increasing specificity, from parents first to children classes last. But this one is currently called last, although it is the less specific. Here is the fix in `AbstractCloner`.
All the other changes are adding robustness to potentially not-set array indexes.
Commits
-------
ec124e0 [VarDumper] Fix generic casters calling order
Issue #11045
For now, the Routing DirectoryLoader requires the type `directory`
to be specified so it does not conflict with `AnnotationDirectoryLoader`.
However, this could be refactored.
This PR was merged into the 2.8 branch.
Discussion
----------
[Security] Add setVoters() on AccessDecisionManager
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | partially #12360
| License | MIT
| Doc PR | -
Alternative for #14550
Commits
-------
3fd7cea [Security] Add setVoters() on AccessDecisionManager
This PR was merged into the 2.3 branch.
Discussion
----------
[BrowserKit] Fix bug when uri starts with http.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
6d3ec63 [BrowserKit] Fix bug when uri starts with http.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Static Code Analysis for Components
| 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
Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
- resolved callable name case mismatches
Commits
-------
9eb2b14 Php Inspections (EA Extended): - resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString -resolved implicit magic methods calls -resolved callable name case mismatches
Autoprepend appropriate blocks by the correct number of blank lines.
Handle most of the SymfonyStyle guide line breaks and gaps automatically and fix thing such as double blank lines between titles.
Add output tests.
Fix askQuestion method, which should not output anything when the input isn't interactive.
- resolved possible PHP Fatal in \Symfony\Component\BrowserKit\Cookie::__toString
-resolved implicit magic methods calls
-resolved callable name case mismatches
* 2.6: (21 commits)
Revert "bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)"
InvalidResourceException file name
[Validators] Remove forgotten space in a translation key [nl]
[Validators] Correct translation key and content [nl]
bumped Symfony version to 2.6.9
updated VERSION for 2.6.8
updated CHANGELOG for 2.6.8
added missing CVE number
bumped Symfony version to 2.3.30
updated VERSION for 2.3.29
update CONTRIBUTORS for 2.3.29
updated CHANGELOG for 2.3.29
[Validators] Missing translations for arabic language.
Code style
fixed C
[HttpKernel][Bundle] Check extension implements ExtensionInterface
[DebugBundle] Fix config XSD
[CS] [Console] StreamOuput : fix loose comparison
[Framework][router commands] fixed failing test.
[HttpKernel] Do not call the FragmentListener if _controller is already defined
...
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
* 2.3:
Revert "bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)"
InvalidResourceException file name
[Validators] Remove forgotten space in a translation key [nl]
[Validators] Correct translation key and content [nl]
added missing CVE number
bumped Symfony version to 2.3.30
updated VERSION for 2.3.29
update CONTRIBUTORS for 2.3.29
updated CHANGELOG for 2.3.29
[CS] [Console] StreamOuput : fix loose comparison
[DependencyInjection] Avoid unnecessary calls to strtolower()
Conflicts:
src/Symfony/Component/Console/Output/StreamOutput.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Validators] Correct translation key and content [nl]
The nl file is not up to date. Correct changed translation key.
Commits
-------
5bc4085 [Validators] Correct translation key and content [nl]
This PR was merged into the 2.6 branch.
Discussion
----------
[Serializer] [2.6] Code style
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
This PR fixes some minor code style issues fabbot discovered while I was working on PR #14756.
Commits
-------
864136a Code style
* 2.3:
[Validators] Missing translations for arabic language.
fixed C
[HttpKernel][Bundle] Check extension implements ExtensionInterface
[HttpKernel] Do not call the FragmentListener if _controller is already defined
This PR was merged into the 2.3 branch.
Discussion
----------
n/a
n/a
Commits
-------
d320d27 [HttpKernel] Do not call the FragmentListener if _controller is already defined
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] AbstractNormalizer::instantiateObject allow default values when not optional
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR fixes a bug in the AbstractNormalizer when denormalizing a array with a missing value but a default value set in the class constructor.
Commits
-------
266d53e [Serializer] AbstractNormalizer::instantiateObject allow default values when not optional
* 2.6: (30 commits)
[Translation] fixed JSON loader on PHP 7 when file is empty
Fix typo
Check instance of FormBuilderInterface instead of FormBuilder
[Security] TokenBasedRememberMeServices test to show why encoding username is required
[Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
fixed typo
[console][formater] allow format toString object.
[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
Avoid redirection to XHR URIs
[HttpFoundation] IpUtils::checkIp4() should allow networks
[2.6] Fix HTML escaping of to-source links
Fix HTML escaping of to-source links
ExceptionHandler: More Encoding
Fix the rendering of deprecation log messages
[FrameworkBundle] Removed unnecessary parameter in TemplateController
[DomCrawler] Throw an exception if a form field path is incomplete.
Fixed the indentation in the compiled template for the DumpNode
[Console] Delete duplicate test in CommandTest
[TwigBundle] Refresh twig paths when resources change.
WebProfiler break words
...
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
src/Symfony/Component/Debug/ExceptionHandler.php
* 2.3:
Fix typo
Check instance of FormBuilderInterface instead of FormBuilder
[Security] TokenBasedRememberMeServices test to show why encoding username is required
[Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
[console][formater] allow format toString object.
[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
Avoid redirection to XHR URIs
[HttpFoundation] IpUtils::checkIp4() should allow networks
Fix HTML escaping of to-source links
[FrameworkBundle] Removed unnecessary parameter in TemplateController
[DomCrawler] Throw an exception if a form field path is incomplete.
[Console] Delete duplicate test in CommandTest
[TwigBundle] Refresh twig paths when resources change.
WebProfiler break words
fixed typo
Update README.md
[HttpKernel] Handle an array vary header in the http cache store
[Security][Translation] fixes#14584
[Framework] added test for Router commands.
Handled bearer authorization header in REDIRECT_ form
Conflicts:
src/Symfony/Component/Debug/ExceptionHandler.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Check instance of FormBuilderInterface instead of FormBuilder
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14714
| License | MIT
| Doc PR | -
Commits
-------
44469d0 Check instance of FormBuilderInterface instead of FormBuilder
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][DI] Definition deprecation notice includes the parameters given
| Q | A
| ------------- | ---
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #14687
| License | MIT
This PR won't fix the issue at hand, but should make it a bit easier to debug. Because this is used by the configuration loader, it's hard to trace back where and how it's actually used.
Commits
-------
b322d46 Definition deprecation notice includes the parameters given
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] SymfonyStyle : fix blocks failed when $messages is null
| 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 with `null` as first argument failed, where most of other methods accepting both string and array arguments will simply output an empty string.
At first I wanted to output nothing, or even throw a proper exception. But then I realized how behaves other methods like text or write.
I encountered this issue while executing a console application, in non-interactive mode, that asks questions (without default value) and prints the result immediately using a note block:
```php
$output->note($output->choice('Choice question', array('choice 1', 'choice 2'));
```
![screenshot 2015-05-16 a 11 42 47](https://cloud.githubusercontent.com/assets/2211145/7665616/ba5f343c-fbc0-11e4-811d-6b109aaa8d27.PNG)
Commits
-------
cfd1022 [Console] SymfonyStyle : fix blocks failed when $messages is null.
Using the `SymfonyStyle:block` method with `null` as first argument
failed, where most of other methods accepting both string and array arguments will simply output an empty string.
This PR was squashed before being merged into the 2.3 branch (closes#14670).
Discussion
----------
[Security] TokenBasedRememberMeServices test to show why encoding username is required
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14577
| License | MIT
| Doc PR | no
241538d shows that it's not actually tested, 257b796 reimplements it with test.
I can remove the POC commit if it's not needed.
Commits
-------
63a9736 [Security] TokenBasedRememberMeServices test to show why encoding username is required
This PR was squashed before being merged into the 2.3 branch (closes#14678).
Discussion
----------
[Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14577
| License | MIT
| Doc PR | no
`AbstractRememberMeServices::encodeCookie()` guards against `COOKIE_DELIMITER` in `$cookieParts`.
* it would make `AbstractRememberMeServices::cookieDecode()` broken
* all current extending classes do it anyway (see #14670 )
* added tests – it's not a public method, but it is expected to be used by user implementations – as such, it's good to know that it works properly
Commits
-------
464c39a [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Handle an array vary header in the http cache store
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12118
| License | MIT
| Doc PR | -
Commits
-------
5930800 [HttpKernel] Handle an array vary header in the http cache store
This PR was merged into the 2.7 branch.
Discussion
----------
added supported format in commands supporting --format
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
replaces #14084
Commits
-------
ea874b6 added supported format in commands supporting --format
c4bf217 deprecated the --xml option for commands
Dump messages as tree based on '.' character as a delimeter in path.
For example this rray('foo.bar' => 'value') will be converted to array('foo' => array('bar' => 'value')).
Correctly process cases like this ['foo.bar' => 'test1', 'foo' => 'test2'].
This PR was squashed before being merged into the 2.3 branch (closes#14335).
Discussion
----------
[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13617
| License | MIT
| Doc PR |
When the script filename is just /index.php, dirname() returns '/' for it. In Request::prepareBaseUrl() we append '/' to it (as introduced in #13039), which is wrong in this scenario as the resulting string is '//'.
When we rtrim('/') the output of dirname() then '/' would be constructed in this case, and in all other cases it makes no difference as dirname() already trims the right forward slash if there are path segments.
The test-cases should clarify the exact scenario.
Commits
-------
f24a6dd [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
This PR was squashed before being merged into the 2.8 branch (closes#14403).
Discussion
----------
[Form] deprecate read_only option
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #10658
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3782
Replaces #10676 with a slightly different implementation.
- fixes BC break when 'read_only' => true option and at the same time custom attributes are used by using a normalizer
- adds deprecation notice
- keeps legacy tests
Commits
-------
53330e1 [Form] deprecate read_only option
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Form] Fixed ChoiceType with legacy ChoiceList
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14382
| License | MIT
| Doc PR |
The "Backwards compatibility" condition doesn't grap (e.g. when passing a `SimpleChoiceList` as `choice_list` on `ChoiceType`), as the default value for the `ChoiceType` option `preferred_choices` is `array()` instead of `null`. So I changed the condition from `null === $preferredChoices` to `empty($preferredChoices)`.
Then there was an issue with accessing `attr` in `form_div_layout.html.twig`, since the deprecated `Symfony\Component\Form\Extension\Core\View\ChoiceView` doesn't provide an `attr` attribute. Since the docblocks of `Symfony\Component\Form\ChoiceList\View\ChoiceListView` state `$choices` and `$preferredChoices` to be instances of `Symfony\Component\Form\ChoiceList\View\ChoiceView` instead of `Symfony\Component\Form\Extension\Core\View\ChoiceView` I fixed the template issue by mapping the deprecated `ChoiceView` objects to the new one with an empty `attr`.
@webmozart Could you have a look at it, please?
Without this PR the following example would render numeric values as labels:
```php
$formBuilder->add('choices', 'choice', array(
'choice_list' => new SimpleChoiceList(array(
'creditcard' => 'Credit card payment',
'cash' => 'Cash payment'
))
));
```
Commits
-------
a98e484 [Form] Fix ChoiceType with legacy ChoiceList
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix first choice was invalid when using value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR solves the following issues encountered using question helper and choices questions:
- First choice was not selectable by value.
- ChoiceList with associative choices with mixed string and int keys has same issue with first choice.
- Fix inconsistency by always returning values as strings.
First point exemple:
![screenshot 2015-05-15 a 17 16 12](https://cloud.githubusercontent.com/assets/2211145/7655757/3344b39a-fb26-11e4-9fe7-0775616619bf.PNG)
Last two points are mainly edge cases. Indeed, if a QuestionChoice has something like :
```php
array(
'0' => 'No environment',
'1' => 'My environment 1',
'env_2' => 'My environment 2',
3 => 'My environment 3',
);
```
as choices, you will not be able to select the first choice and get an `InvalidArgumentException`:
```
There were 2 errors:
1) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testChoiceFromChoicelistWithMixedKeys with data set #0 ('0', '0')
InvalidArgumentException: Value "0" is invalid
2) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testChoiceFromChoicelistWithMixedKeys with data set #1 ('No environment', '0')
InvalidArgumentException: Value "No environment" is invalid
```
Moreover, even if you were able to select by value (`No environment`), you'll get an integer instead of a string:
```
Failed asserting that '0' is identical to 0.
```
For more consistency, the solution is to always return a string.
The issue does not exist in 2.6, as the `QuestionChoice::getDefaultValidator` handled things differently.
Commits
-------
03e4ab6 [Console] Fix first choice was invalid when using value
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Throw an exception if a form field path is incomplete
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11807
| License | MIT
| Doc PR | -
Commits
-------
991e65c [DomCrawler] Throw an exception if a form field path is incomplete.
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] trigger a deprecation warning when using the ContainerAwareHttpKernel
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13280
| License | MIT
| Doc PR |
I agree that we should not trigger the deprecation warning when the `ContainerAwareHttpKernel` is used in the framework code. However, developers using this class in their own code should receive a warning to be able to prepare their applications for Symfony 3.0.
Commits
-------
030731a [HttpKernel] trigger a deprecation warning when using the ContainerAwareHttpKernel
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] Delete duplicate test in CommandTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The __get method is not implemented in the Command class, and the deleted test was duplicated with the preceding one.
Commits
-------
4a4eda9 [Console] Delete duplicate test in CommandTest
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Fix HTML escaping of to-source links
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
385a6b7 Fix HTML escaping of to-source links
This PR was merged into the 2.3 branch.
Discussion
----------
[ServerBag] Handled bearer authorization header in REDIRECT_ form
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Apache rewrite module renames client request
header (`HTTP_`) by prepending `REDIRECT_` to
it. http basic authentication and http digest
authentication are properly processed in
REDIRECT_ form, while bearer is processed in
HTTP_ form, but dropped in REDIRECT_ form.
Example:
The following auth headers are handled in ServerBag,
```
HTTP_AUTHORIZATION => Basic aGVsbG86d29ybGQ=
REDIREDCT_HTTP_AUTHOIZATION => Basic aGVsbG86d29ybGQ=
HTTP_AUTHORIZATION => Digest blah
REDIRECT_HTTP_AUTHORIZATION => Digest blah
HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
while
```
REDIRECT_HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
is dropped.
Commits
-------
7b2e2df Handled bearer authorization header in REDIRECT_ form
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix QuestionHelperTest
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR fixes the following issues in `QuestionHelperTest`:
- When using the `InputInterface` mock with interactive option, asking a ChoiceQuestion without specifying max attempts nor a default value led to an infinite loop when invalid values are submitted. In case there is something wrong in tests, it wasn't obvious to understand what's happening, as the process was constantly waiting for inputs.
- `testAmbiguousChoiceFromChoicelist` test was wrong as the autocompleter filled the value and the test was never triggered (+max attempt issue).
Commits
-------
6a0308d [Console] Fix QuestionHelperTest
This PR was merged into the 2.6 branch.
Discussion
----------
[Console] Remove a useless assert in QuestionHelperTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This assert was pretty useless, as it is unreachable under expected circumstances, and does not bring anything to this test purpose otherwise.
Commits
-------
55b2361 [Console] Remove a useless assert in QuestionHelperTest
This PR was merged into the 3.0-dev branch.
Discussion
----------
[3.0]Closures support $this in PHP >= 5.4
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Closures support `$this` in PHP >= 5.4
ping @aitboudad
Commits
-------
38f32c1 $this can be used inside a closure in PHP >= 5.4
This PR was squashed before being merged into the 3.0-dev branch (closes#14155).
Discussion
----------
Removed deprecations in DependencyInjection component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
76ff5a9 Removed deprecations in DependencyInjection component
This PR was squashed before being merged into the 3.0-dev branch (closes#14145).
Discussion
----------
Removed deprecations in Filesystem component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
5d1e558 Removed deprecations in Filesystem component
- When using the `InputInterface` mock with interactive option, asking a
ChoiceQuestion without specifying max attempts nor a default value led
to an infinite loop when invalid values are submitted. In case there is
something wrong in tests, it wasn't obvious to understand what's
happening, as the process was constantly waiting for inputs.
- `testAmbiguousChoiceFromChoicelist` test was wrong as the
autocompleter filled the value and the test was never triggered (+max
attempt issue).
This PR was merged into the 2.3 branch.
Discussion
----------
[Security][Translation] fixes#14584
| Q | A
| ------------- | ---
| Fixed tickets | #14584
| License | MIT
Some french translations are wrong in the security component.
As #14587 has been closed here's my fix.
Commits
-------
34c780f [Security][Translation] fixes#14584
Using question helper and choices questions:
- first choice was not selectable by value.
- ChoiceList with associative choices with mixed string and int keys has same issue with first choice. Add test for all choices.
- Fix inconsistency by always returning values as strings
This PR was merged into the 2.6 branch.
Discussion
----------
[Bridge\Twig] Adding a space between the icon and the error message
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14557
| License | MIT
| Doc PR |
Commits
-------
d0f6342 [Form] Test for space in AbstractBootstrap3LayoutTest::testErrors
7a1fac2 Adding a space between the icon and the error message
* 2.8:
fixed CS
fixed CS
fixed CS
Fix WebProfilerBundle compatiblity with HttpKernel < 2.7
[Validator] Deprecated PHP7-incompatible constraints and related validators
[DebugBundle] Allow alternative destination for dumps
[DebugBundle] Use output mechanism of dumpers instead of echoing
[DebugBundle] Always collect dumps
[FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
UPGRADE-2.7.md
src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/Console/Helper/DialogHelper.php
src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
* 2.7:
fixed CS
fixed CS
fixed CS
Fix WebProfilerBundle compatiblity with HttpKernel < 2.7
[Validator] Deprecated PHP7-incompatible constraints and related validators
[DebugBundle] Allow alternative destination for dumps
[DebugBundle] Use output mechanism of dumpers instead of echoing
[DebugBundle] Always collect dumps
[FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Bundle/FrameworkBundle/composer.json
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Removed unnecessary statement
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Removed unnecessary statement from `PersistentTokenBasedRememberMeServices.php`.
`$series` comes from `$cookieParts` and `$this->tokenProvider->loadTokenBySeries($series);` is supposed to find the token with that value. Doing `$persistentToken->getSeries();` should give us exactly the same value, so it is an unnecessary statement.
Why?
* We don't need it? We won't miss it when it's gone.
* It confuses a code reader who starts guessing why would that be needed (at least I did and lost time because of that).
Unless…
It actually is needed, as we want `TokenProviderInterface` implementations to have a possibility to give a `PersistentTokenInterface` with a different series value than asked… I can make a PR to the testing class so that such requirement is checked upon.
I don't believe that this is BC, as this behaviour isn't documented anywhere and no existing (known to me) implementations return different series than the asked ones (and current tests pass successfully).
Commits
-------
c7a91f1 Removed unnecessary statement from PersistentTokenBasedRememberMeServices.php
* 2.7:
fixed CS
fixed CS
fixed CS
Fix WebProfilerBundle compatiblity with HttpKernel < 2.7
[Validator] Deprecated PHP7-incompatible constraints and related validators
[DebugBundle] Allow alternative destination for dumps
[DebugBundle] Use output mechanism of dumpers instead of echoing
[DebugBundle] Always collect dumps
[FrameworkBundle] Applied new styles to the config:debug & config:dump-reference commands
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Bundle/FrameworkBundle/composer.json
* 2.6:
[DebugBundle] Allow alternative destination for dumps
[DebugBundle] Use output mechanism of dumpers instead of echoing
[DebugBundle] Always collect dumps
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Component/Finder/Expression/Glob.php
* 2.3:
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
src/Symfony/Component/Console/Helper/TableHelper.php
src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php
src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php
src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Pre incrementation/decrementation should be used if possible
| 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
Fixes provided by new fixer: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1113
If this pr is merged I would change the level of the fixer to `symfony`.
Commits
-------
c5123d6 CS: Pre incrementation/decrementation should be used if possible
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Deprecated PHP7-incompatible constraints and related validators
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a3fc6b9 [Validator] Deprecated PHP7-incompatible constraints and related validators
This PR was merged into the 2.6 branch.
Discussion
----------
[DebugBundle] Allow alternative destination for dumps
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14608
| License | MIT
| Doc PR | -
This PR fixes#14608 by adding a new `debug.dump_destination` configuration option to give users control over a stream destination where dumps will be written to.
In HTTP mode, dumps are still/also collected in the toolbar.
This supersedes #14627, #14631 and #14373
Commits
-------
5f255e5 [DebugBundle] Allow alternative destination for dumps
5368483 [DebugBundle] Use output mechanism of dumpers instead of echoing
8cb2abb [DebugBundle] Always collect dumps
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fix tests in HHVM
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR fixes the tests in the Security components when run in HHVM. The failing tests are related to sebastianbergmann/phpunit-mock-objects#207
Commits
-------
139bae7 Fix tests in HHVM
* 2.8:
[EventDispatcher] make listeners removable from an executed listener
[2.7][DoctrineBridge] change Logger interface in tests to use Psr\\Log\\LoggerInterface instead of Symfony\\Component\\HttpKernel\\Log\\LoggerInterface"
[HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead()
bumped Symfony version to 2.7.0
updated VERSION for 2.7.0-BETA2
updated CHANGELOG for 2.7.0-BETA2
Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
[Console] SymfonyStyle: fix block rpadding when escaping '<'
[Console] fix code style
Conflicts:
CHANGELOG-2.7.md
src/Symfony/Component/Form/composer.json
* 2.7:
[EventDispatcher] make listeners removable from an executed listener
[2.7][DoctrineBridge] change Logger interface in tests to use Psr\\Log\\LoggerInterface instead of Symfony\\Component\\HttpKernel\\Log\\LoggerInterface"
[HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead()
bumped Symfony version to 2.7.0
updated VERSION for 2.7.0-BETA2
updated CHANGELOG for 2.7.0-BETA2
Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
[Console] SymfonyStyle: fix block rpadding when escaping '<'
[Console] fix code style
Conflicts:
src/Symfony/Component/Form/composer.json
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] fix code style
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Prevent fabbot from complaining when the `SymfonyStyle` class or the `StyleInterface` are modified (like, for example, [here](a144667d5f)).
Commits
-------
314901e [Console] fix code style
* 2.6:
[EventDispatcher] make listeners removable from an executed listener
[HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead()
Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
Conflicts:
src/Symfony/Component/Validator/Constraints/FalseValidator.php
src/Symfony/Component/Validator/Constraints/NullValidator.php
src/Symfony/Component/Validator/Constraints/TrueValidator.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyFalseValidator2Dot4ApiTest.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyFalseValidatorLegacyApiTest.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyNullValidator2Dot4ApiTest.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyNullValidatorLegacyApiTest.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyTrueValidator2Dot4ApiTest.php
src/Symfony/Component/Validator/Tests/Constraints/LegacyTrueValidatorLegacyApiTest.php
* 2.3:
Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
Conflicts:
src/Symfony/Component/Form/composer.json
src/Symfony/Component/Validator/CHANGELOG.md
src/Symfony/Component/Validator/Constraints/FalseValidator.php
src/Symfony/Component/Validator/Constraints/NullValidator.php
src/Symfony/Component/Validator/Constraints/TrueValidator.php
src/Symfony/Component/Validator/Tests/Constraints/IsFalseValidatorTest.php
src/Symfony/Component/Validator/Tests/Constraints/IsNullValidatorTest.php
src/Symfony/Component/Validator/Tests/Constraints/IsTrueValidatorTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
Add PHP7 compatible versions for the Null/True/False constraints as they are reserved words in PHP7
| Q | A
| ------------- | ---
| Bug fix? | PHP7 compatibility
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | N/A
| Fixed tickets | N/A - helps towards https://github.com/symfony/symfony/issues/14086
| License | MIT
Null, True and False are reserved words in PHP7:
https://wiki.php.net/rfc/reserve_more_types_in_php_7
Commits
-------
44edbdf Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][EventDispatcher] make listeners removable from an executed listener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13972
| License | MIT
| Doc PR |
This fixes#13972 for Symfony 2.3. On Symfony 2.6 and higher, this has already been fixed with #14355.
Commits
-------
54bb399 [EventDispatcher] make listeners removable from an executed listener
* 2.8: (77 commits)
[travis] Use container-based infrastructure
[HttpKernel] use ConfigCache::getPath() method when it exists
[PropertyAccess] Fix setting public property on a class having a magic getter
[Routing] Display file which contain deprecated option
ContainerInterface: unused exception dropped
bumped Symfony version to 2.6.8
updated VERSION for 2.6.7
updated CHANGELOG for 2.6.7
bumped Symfony version to 2.3.29
updated VERSION for 2.3.28
update CONTRIBUTORS for 2.3.28
updated CHANGELOG for 2.3.28
[Debug] Fixed ClassNotFoundFatalErrorHandlerTest
[SecurityBundle] use access decision constants in config
[SecurityBundle] use session auth constants in config
PhpDoc fix in AbstractRememberMeServices
[FrameworkBundle][DX] Add option to specify additional translation loading paths
[Filesystem] Simplified an if statement
fixed CS
[SecurityBundle] Use Enum Nodes Instead Of Scalar
...
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.6.md
src/Symfony/Bridge/Swiftmailer/composer.json
src/Symfony/Bundle/DebugBundle/composer.json
src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt
src/Symfony/Component/Debug/DebugClassLoader.php
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Form/README.md
src/Symfony/Component/Intl/README.md
src/Symfony/Component/Locale/composer.json
src/Symfony/Component/Routing/Loader/XmlFileLoader.php
src/Symfony/Component/Routing/Loader/YamlFileLoader.php
src/Symfony/Component/Security/README.md
src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
src/Symfony/Component/Translation/README.md
src/Symfony/Component/Validator/README.md
src/Symfony/Component/Yaml/Yaml.php
* 2.7: (70 commits)
[travis] Use container-based infrastructure
[HttpKernel] use ConfigCache::getPath() method when it exists
[PropertyAccess] Fix setting public property on a class having a magic getter
[Routing] Display file which contain deprecated option
ContainerInterface: unused exception dropped
bumped Symfony version to 2.6.8
updated VERSION for 2.6.7
updated CHANGELOG for 2.6.7
bumped Symfony version to 2.3.29
updated VERSION for 2.3.28
update CONTRIBUTORS for 2.3.28
updated CHANGELOG for 2.3.28
[Debug] Fixed ClassNotFoundFatalErrorHandlerTest
[SecurityBundle] use access decision constants in config
[SecurityBundle] use session auth constants in config
PhpDoc fix in AbstractRememberMeServices
[Filesystem] Simplified an if statement
[SecurityBundle] Use Enum Nodes Instead Of Scalar
[Debug 2.3] Fix test for PHP7
[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
...
Conflicts:
src/Symfony/Bundle/DebugBundle/composer.json
src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
src/Symfony/Component/Form/README.md
src/Symfony/Component/Intl/README.md
src/Symfony/Component/Security/README.md
src/Symfony/Component/Translation/Loader/CsvFileLoader.php
src/Symfony/Component/Translation/Loader/IniFileLoader.php
src/Symfony/Component/Translation/Loader/MoFileLoader.php
src/Symfony/Component/Translation/Loader/PhpFileLoader.php
src/Symfony/Component/Translation/Loader/PoFileLoader.php
src/Symfony/Component/Translation/Loader/YamlFileLoader.php
src/Symfony/Component/Translation/README.md
src/Symfony/Component/Translation/Translator.php
src/Symfony/Component/Validator/README.md
* 2.6:
[travis] Use container-based infrastructure
[PropertyAccess] Fix setting public property on a class having a magic getter
ContainerInterface: unused exception dropped
Conflicts:
.travis.yml
| 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
When using PropertyAccessor with an object having both a public property
and a magic getter, and one wants to update this property,
PropertyAccessor may lose the property reference.
This occurs when the public property value is a hash:
```php
class Foo
{
/**
* Example: $this->someProperty['foo']['bar'] = 'baz'
* @var array
*/
public $someProperty;
public function __get($name)
{
// ...
}
}
$obj = new Foo();
$obj->someProperty = ['foo' => ['bar' => 'some_value']];
$propertyAccessor->setValue($obj, 'someProperty[foo][bar]', 'another_value');
echo $obj->someProperty['foo']['bar'];
// Before this patch: 'some_value' => fail
// After this patch: 'another_value' => correct
```
Furthermore, public properties are always used before `__get()` by PHP.
This bug is visible since v2.6.5 as d733a887 changed the way
`setValue()` works.
* 2.6: (21 commits)
bumped Symfony version to 2.6.8
updated VERSION for 2.6.7
updated CHANGELOG for 2.6.7
bumped Symfony version to 2.3.29
updated VERSION for 2.3.28
update CONTRIBUTORS for 2.3.28
updated CHANGELOG for 2.3.28
[Debug] Fixed ClassNotFoundFatalErrorHandlerTest
[SecurityBundle] use access decision constants in config
[SecurityBundle] use session auth constants in config
PhpDoc fix in AbstractRememberMeServices
[Filesystem] Simplified an if statement
[SecurityBundle] Use Enum Nodes Instead Of Scalar
[Debug 2.3] Fix test for PHP7
[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
[Translation] simplify getMessages.
[Framework][Translation] added test for debug command.
Run tests on hhvm instead of hhvm-nightly
Use HTTPS in README and some other fixes
add more entropy to generated classnames
...
Conflicts:
.travis.yml
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
bumped Symfony version to 2.3.29
updated VERSION for 2.3.28
update CONTRIBUTORS for 2.3.28
updated CHANGELOG for 2.3.28
PhpDoc fix in AbstractRememberMeServices
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
[FrameworkBundle][EventDispatcher] Add priorities to the debug:event-dispatcher command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | TODO
I find it helps to figure out which priority is needed to override another event listener without digging in the sources.
Commits
-------
952929c [FrameworkBundle][EventDispatcher] Add priorities to the debug:event-dispatcher command
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
43cc877 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed
* 2.3:
[Debug 2.3] Fix test for PHP7
Run tests on hhvm instead of hhvm-nightly
Use HTTPS in README and some other fixes
add more entropy to generated classnames
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
This PR was merged into the 2.6 branch.
Discussion
----------
[Translation] simplify getMessages.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | ~
| Tests pass? | yes
| License | MIT
Commits
-------
db077c1 [Translation] simplify getMessages.
This PR was merged into the 2.6 branch.
Discussion
----------
[DebugBundle] Fix dump() output in API / No-Toolbar context
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With this PR, dumps are written as plain text when the main content-type is not HTML.
With HTML, dumps are inlined when the web debug toolbar is not enabled.
Commits
-------
62f8469 [DebugBundle] Fix dump() output in API/No-Toolbar context
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Ignore \Traversable in default normalizers.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14495
| License | MIT
| Doc PR | n/a
Before the merge of #13500, default normalizers where never called for `\Traversable` objects. This PR restore the previous behavior in a cleaner way.
This is also convenient when dealing with Doctrine's ArrayCollection and serialization groups (see #14495).
ping @symfony/deciders
Commits
-------
c9bff46 [Serializer] Ignore \Traversable in default normalizers. Close#14495.
This PR was merged into the 2.6 branch.
Discussion
----------
[Translation] Fixed test
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Since php7 version 20150301 the json error levels has changed. See http://3v4l.org/Omb8E.
This PR updated the fixture to trigger a syntax error. See http://3v4l.org/OMN7S
Commits
-------
5dca3ff Fixed test
This PR was merged into the 2.6 branch.
Discussion
----------
Fix getOrigin
I am far from sure if this is a correct fix, but I believe it is.
The problem is that `getOrigin()` now returns either the Form it was thrown in or `null`. This causes issues when using the `FormErrorIterator`, like:
```php
// note: errors are deep and flatten
foreach ($form->getErrors(true) as $error) {
echo '* '.$error->getOrigin()->getName().': '.$error->getMessage();
}
```
This now doesn't work for fields that have `error_bubbling => false` or for the root form. In that case, it'll throw an error. Even if I first checked if `getOrigin()` returned `null` or a `FormInterface`, I still had a problem: There is no way to detect which field it was bound to.
Imo, `$error->getOrigin()` should always return the Form that caused them.
/cc @webmozart would love if you can verify that I'm correct here. The form error iterator stuff is still dizzling my head...
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
01eac33 Fix getOrigin
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] [DebugClassLoader] Minor update in deprecation message
| 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
Minor update for PHP version reference in deprecation message.
Before:
```
Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7.0
```
After:
```
Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7 and higher
```
Commits
-------
bdc20e5 [2.7] [minor] [DebugClassLoader] Minor update in deprecation message
| 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
Minor update for PHP version reference in deprecation message.
Before:
```
Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7.0
```
After:
```
Test\Symfony\Component\Debug\Tests\Float uses a reserved class name (Float) that will break on PHP 7+
```
This PR was squashed before being merged into the 2.7 branch (closes#14395).
Discussion
----------
[Validator] Property paths starting with 0 are broken.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14394
| License | MIT
| Doc PR | -
Commits
-------
1ced8da [Validator] Property paths starting with 0 are broken.
* 2.6: (25 commits)
[2.6] link to https://symfony.com where possible
Do not override PHP constants, only use when available
link to https://symfony.com where possible
[FrameworkBundle] Added missing log in server:run command
[Finder] Only use GLOB_BRACE when available
[HttpFoundation] Allow curly braces in trusted host patterns
Fix merge
Fix typo in variable name
[profiler][security] check authenticated user by tokenClass instead of username.
[WebProfiler] fix html syntax for input types
[TwigBundle] Fix deprecated use of FlattenException
[DependencyInjection] Removed extra strtolower calls
Use https://symfony.com/search for searching
[Debug] PHP7 compatibility with BaseException
[Validator] Fixed Choice when an empty array is used in the "choices" option
Fixed tests
[StringUtil] Fixed singularification of 'selfies'
Fix Portuguese (Portugal) translation for Security
improved exception when missing required component
[DependencyInjection] resolve circular reference
...
Conflicts:
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
src/Symfony/Component/Form/README.md
src/Symfony/Component/Intl/README.md
src/Symfony/Component/Security/README.md
src/Symfony/Component/Translation/README.md
src/Symfony/Component/Validator/README.md
This PR was merged into the 2.6 branch.
Discussion
----------
[2.6] link to https://symfony.com where possible
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
2.6-related changes of #14518.
Commits
-------
38bcab0 [2.6] link to https://symfony.com where possible
* 2.3:
link to https://symfony.com where possible
[FrameworkBundle] Added missing log in server:run command
[HttpFoundation] Allow curly braces in trusted host patterns
[profiler][security] check authenticated user by tokenClass instead of username.
Use https://symfony.com/search for searching
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php
src/Symfony/Component/Form/README.md
src/Symfony/Component/Intl/README.md
src/Symfony/Component/Routing/composer.json
src/Symfony/Component/Security/README.md
src/Symfony/Component/Translation/README.md
src/Symfony/Component/Validator/README.md
This PR was squashed before being merged into the 2.6 branch (closes#14515).
Discussion
----------
Do not override PHP constants, only use when available
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
In #12372, the override of internal constants has been deleted, but the definition of `JSON_PRETTY_PRINT` if not available is missing in that PR.
Commits
-------
d5cc056 Do not override PHP constants, only use when available
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Trigger deprecation notices when using PHP7 reserved class names
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
58c0bfe [Debug] Trigger deprecation notices when using PHP7 reserved class names
This PR was squashed before being merged into the 2.7 branch (closes#14351).
Discussion
----------
[WebProfilerBundle] [HttpKernel] A static approach to version feedback
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14349, #13626
| License | MIT
| Doc PR | N/A
This is an alternative approach for the version feedback feature of PR #13626. The original PR performed a server-side HTTP request to symfony.com, which might be problematic in certain environments, see #14349.
This PR makes the following assumptions:
* Symfony's release roadmap is rarely changed
* After the first release of a branch, the Symfony development team is committed to the announced support dates.
* The support period of a stable branch might be extended, but it's usually not reduced.
Given those assumptions, the EOM and EOL dates may be shipped with the Symfony release and may be updated with a later bugfix release. The information would be available offline without any need to query Symfony's servers.
If the user is running the latest bugfix release of a branch, the EOM/EOL dates should be accurate. If he's running an earlier version, he might get a false positive warning about reaching EOM or EOL if the support period has been extended in the meantime. But since he's running an outdated version anyway, would this really be a problem?
Commits
-------
f5f3bba [WebProfilerBundle] [HttpKernel] A static approach to version feedback
* 2.3:
[DependencyInjection] Removed extra strtolower calls
[Validator] Fixed Choice when an empty array is used in the "choices" option
Fixed tests
[StringUtil] Fixed singularification of 'selfies'
Fix Portuguese (Portugal) translation for Security
improved exception when missing required component
CS: unalign =
Show a better error when the port is in use
CS: unalign =>
[FrameworkBundle] Check for 'xlf' instead of 'xliff'
Add better phpdoc message for getListeners method of the EventDispatcher
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php
src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
src/Symfony/Component/Validator/Constraints/ChoiceValidator.php
This PR was merged into the 2.7 branch.
Discussion
----------
[Yaml] Match signature of Yaml::parse() with Parser->parse()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
238589d Add $objectForMap as argument of Yaml::parse()
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fix Portuguese (Portugal) translation
Commits
-------
b62eb73 Fix Portuguese (Portugal) translation for Security
This PR was merged into the 2.3 branch.
Discussion
----------
[StringUtil] Fixed singularification of 'selfies'
| 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
Related to #14191.
At tonights PHP Stockholm meetup we discussed #14191, and we noticed that "selfie" was incorrectly handled as well. One selfie, many selfies.
Commits
-------
7c2b875 [StringUtil] Fixed singularification of 'selfies'
This PR was merged into the 2.7 branch.
Discussion
----------
[Filesystem] deprecate chmod support in dumpFile()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The ability to support a custom permission mask in the `dumpFile()` method is deprecated since Symfony Symfony 2.3.12. This commit adds the `trigger_error()` call if a custom permission mask is passed.
Commits
-------
faee0d7 [Filesystem] deprecate chmod support in dumpFile()
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed Choice when an empty array is used in the "choices" option
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13853
| License | MIT
| Doc PR | -
This is a backport of #14448 for the 2.3 branch.
Commits
-------
8bf8556 [Validator] Fixed Choice when an empty array is used in the "choices" option
This PR was squashed before being merged into the 2.3 branch (closes#14470).
Discussion
----------
[DependencyInjection] Removed extra strtolower calls
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`Alias` already lowercase the `$id` in the constructor. Using `ContainerBuilder::hasAlias()` and `ContainerBuilder::hasDefinition()` inside the code makes an extra strtolower call.
Commits
-------
3bfbf45 [DependencyInjection] Removed extra strtolower calls
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Fixed missing tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #11422 and #14446
Commits
-------
2892902 Fixed tests
This PR was merged into the 2.6 branch.
Discussion
----------
[DependencyInjection] resolve circular reference
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11422, #14445
| License | MIT
| Doc PR |
This issue has been fixed in #11422. Due to a bad merge in 3bed1b7988 it partially appeared again in Symfony 2.6 or higher.
Commits
-------
8b3b3ce [DependencyInjection] resolve circular reference
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Supports hassers and setters for groups annotations
| 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
For more coherence with the new `ObjectNormalizer` (#13257), this PR allows to add `@Groups` annotations on hasser and setter methods too.
Commits
-------
9c87ecc [Serializer] Supports hassers and setters for groups annotations
This PR was squashed before being merged into the master branch (closes#14151).
Discussion
----------
Removed deprecations in Serializer component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e90e9b2 Removed deprecations in Serializer component
* 2.8:
[Debug] Fix deprecated use of DebugClassLoader
Revert "[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response"
[Validator] Fixed Choice when an empty array is used in the "choices" option
* 2.7:
[Debug] Fix deprecated use of DebugClassLoader
Revert "[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response"
[Validator] Fixed Choice when an empty array is used in the "choices" option
This PR was merged into the 2.7 branch.
Discussion
----------
Revert "[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response"
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This partially reverts commit 22f4807522:
it broke BC (see https://github.com/silexphp/Silex/pull/1142 and 22f4807522 (commitcomment-10857485))
Commits
-------
10c5ffb Revert "[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response"
This PR was merged into the 2.6 branch.
Discussion
----------
[Validator] Fixed Choice when an empty array is used in the "choices" option
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13853
| License | MIT
| Doc PR | -
Commits
-------
a5a41b2 [Validator] Fixed Choice when an empty array is used in the "choices" option
* 2.8: (61 commits)
[Debug] Fix ClassNotFoundFatalErrorHandler candidates lookups
[2.6][Translator] Extend, refactor and simplify Translator tests.
[VarDumper] Allow preserving a subset of cut arrays
[Console] Bind the closure (code) to the Command if possible
[VarDumper] Added support for SplFileObject
[VarDumper] Added support for SplFileInfo
Update DebugClassLoader.php
inject asset packages in assets helper service
[travis] Do not exclude legacy tests on 2.7
[HttpFoundation] remove getExtension method
[2.6][Translation] fix legacy tests.
[Form] Removed remaining deprecation notices in the test suite
[Form] Moved deprecation notice triggers to file level
[Debug] Map PHP errors to LogLevel::CRITICAL
[FrameworkBundle][Server Command] add address port number option.
[Routing][DependencyInjection] Support .yaml extension in YAML loaders
[DX] improve file loader error for router/other resources in bundle
[FrameworkBundle] Initialize translator with the default locale.
[FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors
[2.7][Translation] remove duplicate code for loading catalogue.
...
Conflicts:
composer.json
src/Symfony/Bridge/Swiftmailer/composer.json
src/Symfony/Component/Console/Helper/DialogHelper.php
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php
src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php
src/Symfony/Component/Locale/composer.json
* 2.7: (40 commits)
[Debug] Fix ClassNotFoundFatalErrorHandler candidates lookups
[2.6][Translator] Extend, refactor and simplify Translator tests.
Update DebugClassLoader.php
inject asset packages in assets helper service
[travis] Do not exclude legacy tests on 2.7
[HttpFoundation] remove getExtension method
[2.6][Translation] fix legacy tests.
[Form] Removed remaining deprecation notices in the test suite
[Form] Moved deprecation notice triggers to file level
[Debug] Map PHP errors to LogLevel::CRITICAL
[Routing][DependencyInjection] Support .yaml extension in YAML loaders
[DX] improve file loader error for router/other resources in bundle
[FrameworkBundle] Initialize translator with the default locale.
[FrameworkBundle] Fix Routing\DelegatingLoader resiliency to fatal errors
[2.7][Translation] remove duplicate code for loading catalogue.
[2.6][Translation] remove duplicate code for loading catalogue.
[HttpKernel] Cleanup ExceptionListener
CS fixes
[DependencyInjection] Show better error when the Yaml component is not installed
[2.3] SCA for Components - reference mismatches
...
The ability to support a custom permission mask in the `dumpFile()`
method is deprecated since Symfony Symfony 2.3.12. This commit adds the
`trigger_error()` call if a custom permission mask is passed.
This PR was merged into the 2.8 branch.
Discussion
----------
[VarDumper] Allow preserving a subset of cut arrays
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
208ca94 [VarDumper] Allow preserving a subset of cut arrays
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Bind the closure (code) to the Command if possible
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
This allow this kind of code:
```php
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
$application = new Application();
$application->add((new Command('process')))
->setDescription('Play all other commands')
->setCode(function (InputInterface $input, OutputInterface $output) use ($application) {
$application = $this->getApplication();
$help = $application->find('help');
$output->writeln($help->getHelp());
})
;
$application->run();
```
Commits
-------
ff4424a [Console] Bind the closure (code) to the Command if possible
Using name property of ReflectionClass instance in strncmp instead of __toString() return value, the latter seemed to breaking one of hte vendor bundles we use, and it seems fine now with the former.
This PR was merged into the 2.3 branch.
Discussion
----------
[EventDispatcher] Added the sorted priority information on phpdoc of the getListeners method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
Added the sorting by descending priority information on the `EventDisparcherInterface`
Commits
-------
c3eecb5 Add better phpdoc message for getListeners method of the EventDispatcher
This PR was merged into the 2.6 branch.
Discussion
----------
[2.6][EventDispatcher] make listeners removable from an executed listener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13972
| License | MIT
| Doc PR |
Commits
-------
f36803e [EventDispatcher] make listeners removable from an executed listener
This PR was squashed before being merged into the 2.7 branch (closes#14366).
Discussion
----------
[HttpFoundation] remove getExtension method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Since the minimum PHP version in 2.7 is 5.3.9 we can delete the `getExtension` method and use the real `\SplFileInfo::getExtension()`
Commits
-------
55ecf3b [HttpFoundation] remove getExtension method
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Map PHP errors to LogLevel::CRITICAL
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See https://github.com/Seldaek/monolog#log-levels for reference.
This is #14294 on 2.7 (not 2.6)
Commits
-------
1dcfbdd [Debug] Map PHP errors to LogLevel::CRITICAL
This PR was squashed before being merged into the 2.3 branch (closes#14325).
Discussion
----------
[Routing][DependencyInjection] Support .yaml extension in YAML loaders
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14319
| License | MIT
| Doc PR | -
YAML [FAQ](http://www.yaml.org/faq.html) states that .yaml file extension should be used whenever possible. I tweaked YamlFileLoader supports() method in Symfony Routing component to accept both .yml and .yaml and added some asserts in tests for that behavior.
This PR replaces #14319 as it was based on 2.7. BTW Is there a way to "rebase" PR branch without redoing all the work?
Commits
-------
dd5a811 [Routing][DependencyInjection] Support .yaml extension in YAML loaders
This PR was merged into the 2.7 branch.
Discussion
----------
[Finder] Removed duplicated toRegex() code
This patch removes duplicated `toRegex()` code by using the already existing `Glob` class. As this class wasn't unit-tested to begin with, this duplication also makes sure this class is tested properly.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14075
| License | MIT
Commits
-------
6150c3a Removed duplicated toRegex() code
This PR was squashed before being merged into the 2.3 branch (closes#14231).
Discussion
----------
[DependencyInjection] Show better error when the Yaml component is not installed
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
As the Yaml component is a suggested dependency, if someone try to use the `YamlFileLoader` or the `YamlDumper` without the component will get an ugly message:
```
PHP Fatal error: Class 'Symfony\Component\Yaml\Dumper' not found in xxxx
```
With this PR the error will be an exception with the message: `Unable to dump the container as the Symfony Yaml Component is not installed.` for `YamlDumper` and `Unable to load YAML files service definitions as the Symfony Yaml Component is not installed.'` for `YamlFileLoader`
Commits
-------
870a299 [DependencyInjection] Show better error when the Yaml component is not installed
This PR was squashed before being merged into the 2.3 branch (closes#14206).
Discussion
----------
[2.3] SCA for Components - reference mismatches
| 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
Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- worked out some of reference mismatches
Commits
-------
f732659 [2.3] SCA for Components - reference mismatches
This PR was squashed before being merged into the 2.3 branch (closes#14097).
Discussion
----------
[2.3] Static Code Analysis for Components
| 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
Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- array_keys/array_values usage as foreach array
- foreach value by reference - added unsets to keep scope clear
- strstr usage as strpos fixed
- array_push miss-use resolved
Commits
-------
78cc93c [2.3] Static Code Analysis for Components
This PR was merged into the 2.7 branch.
Discussion
----------
[Translation] Revert inlining fallback catalogues as it might cause inconsistent results when a cache is used
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14315
| License | MIT
| Doc PR | n/a
The results from `getCatalogue()` are inconsistent when we're in production *and* a cache comes into play.
This is due to the changes in 6eb5e7395c, where the fallback catalogues will be *merged* into the primary catalogue when it is written to the cache.
Strictly speaking, this is a BC break because it behaved differently before.
I am not sure what the relevance of this might be in practice.
However, it may cause headaches because
* The result changes only in the second+ try (when the cache is warm); a priori you cannot tell whether you're going to see this
* The catalogue is clearly not what the loader provided
* You have no chance of telling whether the message was originally available in the catalogue or not
* Generally, for every message you retrieve from the catalogue, you have no way of telling which locale it actually comes from (it need not be from the catalogue's locale, and the catalogue does not provide fallback catalogues either)
Regarding the last point, you usually don't care when using the `Translator`. Its purpose is to get the "best" translation available. However, when you bother to explicitly retrieve the catalogue, chances are your intentions are different.
Commits
-------
12a183a Revert inlining the fallback messages in production that was added in 6eb5e7395c
* 2.7:
[HttpKernel] fixed a regression when no exception listeners are registered
renamed some confusing tests
propel/propel1 is now useless
bumped Symfony version to 2.7.0
updated VERSION for 2.7.0-BETA1
updated CHANGELOG for 2.7.0-BETA1
[2.3] Fix @link annotations
[2.7] For @link annotations
[2.6] Fix @link annotations
[2.7][Console] Count the array instead of
[Config][cache factory] check type of callback argument.
Fix javascript
[2.3][Translation] test refresh cache when resources File change.
Added deprecation message and original color back
[Translator] Cache does not take fallback locales into consideration
* 2.3:
renamed some confusing tests
[2.3] Fix @link annotations
Fix javascript
[2.3][Translation] test refresh cache when resources File change.
[Translator] Cache does not take fallback locales into consideration
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
This PR was merged into the 2.3 branch.
Discussion
----------
renamed some confusing tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
a8e4c43 renamed some confusing tests
This PR was merged into the 2.7 branch.
Discussion
----------
[Config][cache factory] check type of callback argument.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | #14178
| Tests pass? | yes
| License | MIT
/cc @mpdude
Commits
-------
11f798c [Config][cache factory] check type of callback argument.
This PR was squashed before being merged into the 2.7 branch (closes#14283).
Discussion
----------
[2.7][Console] Count the $messages array instead of $message
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | n/a
| License | MIT
I think you mean $messages instead of $message. With this patch, the number of messages is correctly counted.
Commits
-------
95aa167 [2.7][Console] Count the array instead of
* 2.8:
[Translation] avoid freshness check based on content *inside* the cache.
[Translator] Cache does not take fallback locales into consideration
[Translator] Cache does not take fallback locales into consideration
[VarDumper] Fix call site detection
[Form] Cleanup deprecation notices
[Console] Made output docopt compatible
[Process] Fix volatile test
Remove some useless @group annotations
Removed useless strtolower call
[Validator] Use strict comparisons in loaders
CS: Use "self" keyword instead of class name if possible
Conflicts:
.travis.yml
src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
src/Symfony/Component/Form/FormTypeExtensionInterface.php
src/Symfony/Component/Form/FormTypeInterface.php
* 2.6:
[Translator] Cache does not take fallback locales into consideration
[VarDumper] Fix call site detection
[Process] Fix volatile test
Remove some useless @group annotations
Removed useless strtolower call
[Validator] Use strict comparisons in loaders
CS: Use "self" keyword instead of class name if possible
Conflicts:
.travis.yml
src/Symfony/Component/Translation/Translator.php
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Fix call site detection
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`$trace[$i]['file']` is not always defined and `call_user_func_array` should also be filtered out.
Commits
-------
d8fb6a4 [VarDumper] Fix call site detection
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Cleanup deprecation notices
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This uses the same technique used for FlattenException in HttpKernel that prevents repeated notices triggered by the constructor.
Commits
-------
3f58862 [Form] Cleanup deprecation notices
This PR was squashed before being merged into the 2.7 branch (closes#13220).
Discussion
----------
[Console] Made output docopt compatible
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6329
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/5016
This was harder than I thought. To sum up:
* The output now follows the [docopt](http://docopt.org/) specification
* There is a new `addUsage` method to add more usage patterns
* The handling of spaces in the descriptors is refactored to make it easier to understand and to make it render better (using sprintf's features only made it worse imo)
Todo
---
* [x] Add test for `addUsage` and friends
* [x] Add test for multiline descriptions of arguments
* <s>Convert long descriptions to multiline automatically</s>
* [ ] Submit a doc PR for `addUsage`
Question
---
The docopt specification suggests we should add these usage patterns:
%command.name% -h | --help
%command.name% --version
I didn't do that yet, as I think it'll only makes the output more verbose and it's already pretty obvious.
I've taken some decisions which I don't think everybody agrees with. I'm willing to change it, so feel free to comment :)
/cc @Seldaek
Commits
-------
3910940 [Console] Made output docopt compatible
* 2.3:
Remove some useless @group annotations
Removed useless strtolower call
[Validator] Use strict comparisons in loaders
CS: Use "self" keyword instead of class name if possible
* 2.7:
[Config] Delegate creation of ConfigCache instances to a factory.
[Form] Fixed DateType/TimeType that were broken since 849fb29984 and 1c4a75a00a
[Console] Fixed SymfonyStyle when get terminal width fails
[SecurityBundle] UserPasswordEncoderCommand: Improve & simplify the command usage
Fixed the line length of the new Symfony Styles
[Debug] Skip unsilencing test on PHP7
[Profiler][Logger] fixed cycle odd/even.
Update logger.html.twig
Conflicts:
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Config/CHANGELOG.md
src/Symfony/Component/HttpKernel/composer.json
src/Symfony/Component/Routing/composer.json
src/Symfony/Component/Translation/composer.json
* 2.6:
[Form] Fixed DateType/TimeType that were broken since 849fb29984 and 1c4a75a00a
[Debug] Skip unsilencing test on PHP7
[Profiler][Logger] fixed cycle odd/even.
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fixed SymfonyStyle when get terminal width fails
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a52b658 [Console] Fixed SymfonyStyle when get terminal width fails
This PR was squashed before being merged into the 2.7 branch (closes#14178).
Discussion
----------
[Config] Delegate creation of ConfigCache instances to a factory.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes (refactoring, new flex point)
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | we'll see :-)
| Fixed tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#5136
In the Routing/Router and Translation/Translator, delegate creation of ConfigCache instances to a factory. The factory can be setter-injected but will default to a BC implementation.
The ```ConfigCacheFactoryInterface``` is designed in a way that captures the common ```$cache = new ...; if (!$cache->isFresh()) { ... do sth }``` pattern. But more importantly, this design allows factory implementations to take additional measures to avoid race conditions before actually filling the cache.
By using an exchangeable ConfigCache factory it becomes possible to implement different resource (freshness) checking strategies, especially service-based ones.
The goal is to be able to validate Translators and Routers generated by database-based loaders. It might also help with symfony/AsseticBundle#168. This PR only contains the minimum changes needed, so the rest could be implemented in a bundle outside the core (at least for the beginning).
Component/HttpKernel/Kernel::initializeContainer still uses the ConfigCache implementation directly as there is no sensible way of getting/injecting a factory service (chicken-egg).
This is a pick off #7230. It replaces #7781 which was against the master branch. Also see #7781 for additional comments/explanations.
## Todo
* [ ] Allow `symfony/config` `~3.0.0` in `composer.json` for the HttpKernel and Translator component as well as TwigBundle once this PR has been merged into the master branch (fail deps=high tests for the time being).
Commits
-------
6fbe9b1 [Config] Delegate creation of ConfigCache instances to a factory.
This PR was merged into the 3.0-dev branch.
Discussion
----------
[3.0][Console][OutputStyle] Implements verbosity levels methods
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A - Travis build for #14032
| License | MIT
Implements the verbosity level methods from `OutputInterface` for the new `OutputStyle` abstract class in 3.0 branch.
Fixes Travis builds with `deps=high` env var for #14032 PR and future console style updates.
=========
Related to: #14032, #14057, #14138, #14132, #14172, ...
Commits
-------
a30f507 [Console] [OutputStyle] Implements verbosity methods
This PR was merged into the 2.7 branch.
Discussion
----------
Fix symfony/form dependend components
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Because both the FrameworkBundle and the Doctrine bridge use the new choice list feature of 2.7, they are incompatible with Form below 2.7
Commits
-------
278f5c9 Fix symfony/form dependend components
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Use "self" keyword instead of class name if possible
| 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
Fixes provided by new fixer: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1116
If this pr is merged I would change the level of the fixer to `symfony`.
Commits
-------
e72128f CS: Use "self" keyword instead of class name if possible
* 2.7: (60 commits)
[Translation][Profiler] fixed Collect empty Messages.
[VarDumper] Towards PHP7 support
Fix currently broken tests
[Form][choice] added choice_translation_domain to avoid trans options.
[Translation][Profiler] added the number of times a translation has been used.
[DoctrineBridge] Removed useless code
[Debug] Updated CHANGELOG
[Debug] Use symfony_debug_backtrace() in FatalErrorException when available
[Debug] Add debug extension to the test suite
[Debug] Add symfony_debug_backtrace() that works with fatal errors
[Form] Updated CHANGELOG and UPGRADE files
[HttpKernel] Embed the original exception as previous to bounced exceptions
Added feedback about the current symfony version
Deprecated precision option in favor of scale
[Enhancement] netbeans - force interactive shell when limited detection
Automatically start server:run if server:start failed
Tweaked some console command styles
[FrameworkBundle] fixes displaying of deprecation notices.
make date formats and number formats configurable
Revert "Added missing changelog entry"
...
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.6.md
src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php
src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
src/Symfony/Component/Debug/CHANGELOG.md
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Form/CHANGELOG.md
src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
* 2.6:
[VarDumper] Towards PHP7 support
Conflicts:
src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php
src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Towards PHP7 support
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
That's a start
Commits
-------
df484da [VarDumper] Towards PHP7 support
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Use strict comparisons in loaders
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | n/a
Commits
-------
efc1c03 [Validator] Use strict comparisons in loaders
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][Form][choice] added choice_translation_domain to avoid trans options.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | ~
| Tests pass? | yes
| License | MIT
see https://github.com/symfony/symfony/issues/12941#issuecomment-72904531
Commits
-------
5a33c2c [Form][choice] added choice_translation_domain to avoid trans options.
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Updated CHANGELOG and UPGRADE files
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR includes the changes from #14050 in the CHANGELOG/UPGRADE files.
Commits
-------
6863ba5 [Form] Updated CHANGELOG and UPGRADE files
This PR was merged into the 2.7 branch.
Discussion
----------
Deprecated precision option in favor of scale
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #7383
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/5005
Scale is the number of digits to the right of the decimal point in a number, precision isn't. See the referenced ticket for more context.
Commits
-------
2a2f7e2 Deprecated precision option in favor of scale
* 2.6: (24 commits)
[HttpKernel] Embed the original exception as previous to bounced exceptions
[Enhancement] netbeans - force interactive shell when limited detection
[FrameworkBundle] fixes displaying of deprecation notices.
Revert "Added missing changelog entry"
[Debug] Tweak docblocks
[Debug] Rework a bit the PHP doc
Added missing changelog entry
[StringUtil] Fixed singularification of 'movies'
[Debug] Renamed "context" key to "scope_vars" to avoid any ambiguity
Fix some phpdocs for Twig extensions & templating helpers
[Debug] Made code in ErrorHandler easier to read
Use specialized config methods instead of the generic ifTrue() method
Fix the AJAX profiling
bumped Symfony version to 2.6.7
updated VERSION for 2.6.6
updated CHANGELOG for 2.6.6
Safe escaping of fragments for eval()
bumped Symfony version to 2.3.28
updated VERSION for 2.3.27
update CONTRIBUTORS for 2.3.27
...
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
[HttpKernel] Embed the original exception as previous to bounced exceptions
[Enhancement] netbeans - force interactive shell when limited detection
[StringUtil] Fixed singularification of 'movies'
Fix some phpdocs for Twig extensions & templating helpers
Use specialized config methods instead of the generic ifTrue() method
[DoctrineBridge] Add missing variable declaration in testcase
Conflicts:
src/Symfony/Component/Console/Application.php
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Embed the original exception as previous to bounced exceptions
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14073
| License | MIT
| Doc PR | -
Commits
-------
bb020f4 [HttpKernel] Embed the original exception as previous to bounced exceptions
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] Added feedback about the current symfony version
Description
---
This PR adds some visual and textual information about the Symfony version that is currently used. It'll indicate when the used version has reached eom or eol. I hope this will make people more aware of the fact that they should update (as I've seen quite some people using completely outdated Symfony versions).
Screenshot
---
![sf-toolbar-version-info](https://cloud.githubusercontent.com/assets/749025/6099512/da59c99e-affa-11e4-8093-173857901769.png)
PR Information
---
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes (didn't test though)
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a4551f9 Added feedback about the current symfony version
This PR was squashed before being merged into the 2.7 branch (closes#14196).
Discussion
----------
Tweaked some console command styles
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14174
| License | MIT
| Doc PR | -
As discussed, after updating the first console commands to the new style guide, we were going to introduce the needed tweaks. This PR is the first one with those tweaks.
### Tables
Headers now are displayed in the usual green color used frequently by Symfony commands:
![table_header](https://cloud.githubusercontent.com/assets/73419/6980286/a126e8cc-d9ef-11e4-8d1e-9a5be21564eb.png)
### Command tiles and section titles
I see these titles in a beautiful blue color ... but lots of people use color schemes which make them almost unreadable. Now they use the yellow color frequently used by Symfony commands:
![command_section_titles](https://cloud.githubusercontent.com/assets/73419/6980292/b499627c-d9ef-11e4-9940-e134ee0eb02f.png)
### Listings
Elements in a listing no longer add an extra blank line. See #14174 for the rationale.
Commits
-------
dcf1801 Tweaked some console command styles
This PR was merged into the 2.7 branch.
Discussion
----------
[Translation][Profiler] fixed infiinite loop when collect msg from fallback
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | ~
| Tests pass? | yes
| License | MIT
Commits
-------
59f2172 [Translation][Profiler] fixed infiinite loop when collect msg from fallback.
The word 'movies' was singularified to 'movy'. There seem to be only two
words ending in 'ovies', which are 'movies' and 'anchovies'. The singular
of the latter is 'anchovy'. All other words ending in 'vies' singularify to
'vy', so the word 'movies' is an exception to the general rule.
According to https://github.com/Seldaek/monolog#log-levels
the level `NOTICE` means "Normal but significant events".
So when a PHP notice occurs, it's not a "normal" event,
but an error.
That's why all PHP errors should use at lease the `WARNING` error
level.
This PR was squashed before being merged into the 3.0-dev branch (closes#14147).
Discussion
----------
Removed deprecations in Process component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
8ef1960 Removed deprecations in Process component
This PR was squashed before being merged into the 3.0-dev branch (closes#14150).
Discussion
----------
Removed deprecations in Templating component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
c936361 Removed deprecations in Templating component
* 2.3:
bumped Symfony version to 2.3.28
updated VERSION for 2.3.27
update CONTRIBUTORS for 2.3.27
updated CHANGELOG for 2.3.27
isFromTrustedProxy to confirm request came from a trusted proxy.
Safe escaping of fragments for eval()
Conflicts:
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpKernel/HttpCache/Esi.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 3.0-dev branch.
Discussion
----------
Removed deprecations in VarDumper component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
854300a Removed deprecations in VarDumper component
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Add casters for Reflection* classes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Will need a rebase on top of #14079 and #14077 to be mergeable/green.
Commits
-------
64d6e76 [VarDumper] Add casters for Reflection* classes
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Refactored choice lists to support dynamic label, value, index and attribute generation
This is a rebase of #12148 on the 2.7 branch.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #4067, #5494, #3836, #8658, #12148
| License | MIT
| Doc PR | TODO
I implemented the additional options "choice_label", "choice_name", "choice_value", "choice_attr", "group_by" and "choices_as_values" for ChoiceType. Additionally the "preferred_choices" option was updated to accept callables and property paths.
The "choices_as_values" option will be removed in Symfony 3.0, where the choices will be passed in the values of the "choices" option by default. The reason for that is that, right now, choices are limited to strings and integers (i.e. valid array keys). When we flip the array, we remove that limitation. Since choice labels are always strings, we can also always use them as array keys:
```php
// Not possible currently, but possible with "flip_choices"
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
));
```
All the features described here obviously also apply to subtypes of "choice", such as "entity".
**choice_label**
Returns the label for each choice. Can be a callable (which receives the choice as first and the key of the "choices" array as second argument) or a property path.
If `null`, the keys of the "choices" array are used as labels.
```php
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'yes' => true,
'no' => false,
'maybe' => null,
),
'choices_as_values' => true,
'choice_label' => function ($choice, $key) {
return 'form.choice.'.$key;
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
Status::getInstance(Status::YES),
Status::getInstance(Status::NO),
Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'choice_label' => 'displayName',
));
```
**choice_name**
Returns the form name for each choice. That name is used as name of the checkbox/radio form for this choice. It is also used as index of the choice views in the template. Can be a callable (like for "choice_label") or a property path.
The generated names must be valid form names, i.e. contain alpha-numeric symbols, underscores, hyphens and colons only. They must start with an alpha-numeric symbol or an underscore.
If `null`, an incrementing integer is used as name.
```php
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'choice_name' => function ($choice, $key) {
// use the labels as names
return strtolower($key);
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => Status::getInstance(Status::YES),
'No' => Status::getInstance(Status::NO),
'Maybe' => Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'choice_name' => 'value',
));
```
**choice_value**
Returns the string value for each choice. This value is displayed in the "value" attributes and submitted in the POST/PUT requests. Can be a callable (like for "choice_label") or a property path.
If `null`, an incrementing integer is used as value.
```php
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'choice_value' => function ($choice, $key) {
if (null === $choice) {
return 'null';
}
if (true === $choice) {
return 'true';
}
return 'false';
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => Status::getInstance(Status::YES),
'No' => Status::getInstance(Status::NO),
'Maybe' => Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'choice_value' => 'value',
));
```
**choice_attr**
Returns the additional HTML attributes for choices. Can be an array, a callable (like for "choice_label") or a property path.
If an array, the key of the "choices" array must be used as keys.
```php
// array
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'choice_attr' => array(
'Maybe' => array('class' => 'greyed-out'),
),
));
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'choice_attr' => function ($choice, $key) {
if (null === $choice) {
return array('class' => 'greyed-out');
}
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => Status::getInstance(Status::YES),
'No' => Status::getInstance(Status::NO),
'Maybe' => Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'choice_value' => 'htmlAttributes',
));
```
**group_by**
Returns the grouping used for the choices. Can be an array/Traversable, a callable (like for "choice_label") or a property path.
The return values of the callable/property path are used as group labels. If `null` is returned, a choice is not grouped.
If `null`, the structure of the "choices" array is used to construct the groups.
```php
// default
$builder->add('attending', 'choice', array(
'choices' => array(
'Decided' => array(
'Yes' => true,
'No' => false,
),
'Undecided' => array(
'Maybe' => null,
),
),
'choices_as_values' => true,
));
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'group_by' => function ($choice, $key) {
if (null === $choice) {
return 'Undecided';
}
return 'Decided';
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => Status::getInstance(Status::YES),
'No' => Status::getInstance(Status::NO),
'Maybe' => Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'group_by' => 'type',
));
```
**preferred_choices**
Returns the preferred choices. Can be an array/Traversable, a callable (like for "choice_label") or a property path.
```php
// array
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'preferred_choices' => array(true),
));
// callable
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => true,
'No' => false,
'Maybe' => null,
),
'choices_as_values' => true,
'preferred_choices' => function ($choice, $key) {
return true === $choice;
},
));
// property path
$builder->add('attending', 'choice', array(
'choices' => array(
'Yes' => Status::getInstance(Status::YES),
'No' => Status::getInstance(Status::NO),
'Maybe' => Status::getInstance(Status::MAYBE),
),
'choices_as_values' => true,
'preferred_choices' => 'preferred',
));
```
**Technical Changes**
To properly implement all this, the old `ChoiceListInterface` class was deprecated and replaced by a new, slimmer one. The creation of choice views is now separated from choice lists. Hence a lot of logic is not executed anymore when processing (but not displaying) a form.
Internally, a `ChoiceListFactoryInterface` implementation is used to construct choice lists and choice views. Two decorators exist for this class:
* `CachingFactoryDecorator`: caches choice lists/views so that multiple fields displaying the same choices (e.g. in collection fields) use the same choice list/view
* `PropertyAccessDecorator`: adds support for property paths to a factory
**BC Breaks**
The option "choice_list" of ChoiceType now contains a `Symfony\Component\Form\ChoiceList\ChoiceListInterface` instance, which is a super-type of the deprecated `ChoiceListInterface`.
**Todos**
- [ ] Adapt CHANGELOGs
- [ ] Adapt UPGRADE files
- [ ] symfony/symfony-docs issue/PR
Commits
-------
94d18e9 [Form] Fixed CS
7e0960d [Form] Fixed failing layout tests
1d89922 [Form] Fixed tests using legacy functionality
d6179c8 [Form] Fixed PR comments
26eba76 [Form] Fixed regression: Choices are compared by their values if a value callback is given
a289deb [Form] Fixed new ArrayChoiceList to compare choices by their values, if enabled
e6739bf [DoctrineBridge] DoctrineType now respects the "query_builder" option when caching the choice loader
3846b37 [DoctrineBridge] Fixed: don't cache choice lists if query builders are constructed dynamically
03efce1 [Form] Refactored choice lists to support dynamic label, value, index and attribute generation
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Add and use Caster::PREFIX_* consts
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Will need a rebase on top of #14058 once it is merged
Commits
-------
86cf8de [VarDumper] Make use of Caster::PREFIX_* consts
This PR was merged into the 3.0-dev branch.
Discussion
----------
Removed deprecation in translation component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
2220b90 Removed deprecation in translation component
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Fix tests typo
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ✘
| License | MIT
| Doc PR | ✘
I guess there is a typo here, Travis reported (php >=5.6, see https://travis-ci.org/symfony/symfony/jobs/56527757 for instance):
> 1) Symfony\Component\VarDumper\Tests\CliDumperTest::testSpecialVars56
Undefined variable: out
/home/travis/build/symfony/symfony/vendor/symfony/phpunit-bridge/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php:38
/home/travis/build/symfony/symfony/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php:218
Commits
-------
c5f39aa [VarDumper] CliDumper: fix test typo
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Fix dumping references as properties
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Just discovered this while reviewing an other PR.
Using `array_combine()` preserves references now.
Commits
-------
6c6560e [VarDumper] Fix dumping references as properties
This PR was merged into the 3.0-dev branch.
Discussion
----------
Removed deprecations in Console component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | ~
Commits
-------
1a8f87d Removed deprecations in Console component
* 2.7:
[RFC][Console] Added console style guide helpers (v2)
[Validator] Add missing pt_BR translations
[Translation][Profiler] Added a Translation profiler.
Add parsing of hexadecimal strings for PHP 7
[VarDumper] Add filters to casters
Trim final stop from deprecation message
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
[VarDumper] Add VarDumperTestCase and related trait
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php
src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php
* 2.6:
[Validator] Add missing pt_BR translations
Add parsing of hexadecimal strings for PHP 7
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Bridge/Propel1/Logger/PropelLogger.php
src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf
* 2.3:
[Validator] Add missing pt_BR translations
Add parsing of hexadecimal strings for PHP 7
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf
src/Symfony/Component/Yaml/Parser.php
This PR was squashed before being merged into the 2.7 branch (closes#14057).
Discussion
----------
[RFC][Console] Added console style guide helpers (v2)
*(Rebased to 2.7)*
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12014, #12035, symfony/symfony-docs#4265
| License | MIT
| Doc PR | todo
## Proposed API
### Code
```php
// Symfony command
protected function execute(InputInterface $input, OutputInterface $output)
{
$output = new SymfonyStyle($output);
$output->title('Lorem Ipsum Dolor Sit Amet');
$output->text(array(
'Duis aute irure dolor in reprehenderit in voluptate velit esse',
'cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat'
));
$output->ln();
$output->table(array('Name', 'Method', 'Scheme', 'Host', 'Path'), array(
array('admin_post_new', 'ANY', 'ANY', 'ANY', '/admin/post/new'),
array('admin_post_show', 'GET', 'ANY', 'ANY', '/admin/post/{id}'),
array('admin_post_edit', 'ANY', 'ANY', 'ANY', '/admin/post/{id}/edit'),
array('admin_post_delete', 'DELETE', 'ANY', 'ANY', '/admin/post/{id}'),
));
$output->caution(array(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.',
'foo'
));
$output->section('Consectetur Adipisicing Elit Sed Do Eiusmod');
$output->listing(array(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod, tempor incididunt ut labore et dolore magna aliqua.',
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.',
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
));
$customValidator = function ($value) {
if ($value == 'foo') {
throw new \Exception('cannot be foo');
}
return $value;
};
// hidden question
$output->note($output->askHidden('Hidden question'));
// choice questions
$output->note($output->choice('Choice question no default', array('choice1', 'choice2')));
$output->note($output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1'));
// confirmation questions
$output->note($output->confirm('Confirmation with yes default', true) ? 'yes' : 'no');
$output->note($output->confirm('Confirmation with no default', false) ? 'yes' : 'no');
// standard questions
$output->note($output->ask('Question no default'));
$output->note($output->ask('Question no default and custom validator', null, $customValidator));
$output->note($output->ask('Question with default', 'default'));
$output->note($output->ask('Question with default and custom validator', 'default', $customValidator));
$output->note('Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.');
$output->success('Lorem ipsum dolor sit amet, consectetur adipisicing elit');
$output->error('Duis aute irure dolor in reprehenderit in voluptate velit esse.');
$output->warning('Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.');
$output->progressStart(100);
for ($i = 0; $i < 100; $i++) {
usleep(10000);
$output->progressAdvance();
}
$output->progressFinish();
}
```
### Output
```
$ php app/console command
Lorem Ipsum Dolor Sit Amet
==========================
// Duis aute irure dolor in reprehenderit in voluptate velit esse
// cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
------------------- -------- -------- ------ -----------------------
Name Method Scheme Host Path
------------------- -------- -------- ------ -----------------------
admin_post_new ANY ANY ANY /admin/post/new
admin_post_show GET ANY ANY /admin/post/{id}
admin_post_edit ANY ANY ANY /admin/post/{id}/edit
admin_post_delete DELETE ANY ANY /admin/post/{id}
------------------- -------- -------- ------ -----------------------
! [CAUTION] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
! dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. Lorem ipsum dolor sit amet,
! consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
! veniam, quis nostrud exercitation ullamco laboris.
!
! foo
Consectetur Adipisicing Elit Sed Do Eiusmod
-------------------------------------------
* Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod, tempor incididunt ut labore et dolore magna aliqua.
* Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.
* Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Hidden question:
> <f><o><o><enter>
! [NOTE] foo
Choice question no default:
[0] choice1
[1] choice2
> <enter>
[ERROR] Value "" is invalid
Choice question no default:
[0] choice1
[1] choice2
> 0<enter>
! [NOTE] choice1
Choice question with default [choice1]:
[0] choice1
[1] choice2
> 1<enter>
! [NOTE] choice2
Confirmation with yes default (yes/no) [yes]:
> <enter>
! [NOTE] yes
Confirmation with no default (yes/no) [no]:
> <enter>
! [NOTE] no
Question no default:
> <enter>
[ERROR] A value is required.
Question no default:
> foo<enter>
! [NOTE] foo
Question no default and custom validator:
> foo<enter>
[ERROR] cannot be foo
Question no default and custom validator:
> <enter>
[ERROR] A value is required.
Question no default and custom validator:
> foo<enter>
[ERROR] cannot be foo
Question no default and custom validator:
> bar<enter>
! [NOTE] bar
Question with default [default]:
> <enter>
! [NOTE] default
Question with default and custom validator [default]:
> <enter>
! [NOTE] default
! [NOTE] Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
! Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
! fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit
! esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.
[OK] Lorem ipsum dolor sit amet, consectetur adipisicing elit
[ERROR] Duis aute irure dolor in reprehenderit in voluptate velit esse.
[WARNING] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.
100/100 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
```
### Screenshots
![screen1](https://cloud.githubusercontent.com/assets/127811/4507077/53bc009c-4b09-11e4-937c-44fe7fe30dc0.png)
![screen2](https://cloud.githubusercontent.com/assets/127811/4507078/53bf982e-4b09-11e4-8b5a-8c44c20ae4d9.png)
![screen](https://cloud.githubusercontent.com/assets/127811/6848451/b2e64848-d3a3-11e4-9916-43bd377684ca.png)
Commits
-------
96b4210 [RFC][Console] Added console style guide helpers (v2)
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Add VarDumperTestCase and related trait
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows writing assertions that use the dump of a variable for comparison.
Commits
-------
57da9ae [VarDumper] Add VarDumperTestCase and related trait
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Unary operators should be placed adjacent to their operands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Update before upcoming changes on PHP CS Fixer 1.7
To keep fabbot.io happy ;)
Commits
-------
2367f4a CS: Unary operators should be placed adjacent to their operands
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Binary operators should be arounded by at least one space
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Update before upcoming changes on PHP CS Fixer 1.7
To keep fabbot.io happy ;)
Commits
-------
ec2cec6 CS: Binary operators should be arounded by at least one space
* 2.7: (29 commits)
[Validator] Added missing Hungarian translation
remove usage of deprecated class
Fix merge
Fix merge
CS: fixes
[Translation][Extractor] Allow extracting an array of files besides extracting a directory
[VarDumper] Fix dumping ThrowingCasterException
[Console][Table] Add support for colspan/rowspan + multiple header lines
Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places
Displays friendly message if the event does not have any registered listeners
[VarDumper] Ctrl+click toggles-all and fix IE8 support
Implemented check on interface implementation
[Form] [TwigBridge] Bootstrap layout whitespace control
|Validator] Add PHPUnit hint in AbstractConstraintValidatorTest
[VarDumper] implement expand all on ALT+click
[WebProfilerBundle] Fixed collapsed profiler menu icons
[travis] Kill tests when a new commit has been pushed
fixed CS
Change behavior to mirror hash_equals() returning early if there is a length mismatch
CS fixing
...
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml
src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Translator] fix test for php 7 compatibility
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086 for Translation component
| License | MIT
| Doc PR | -
Commits
-------
02b829f [Translator] fix test for php 7 compatibility
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] prefix should not be escaped
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12826
| License | MIT
| Doc PR | -
The phpdoc of `ProcessBuilder#setPrefix` says:
```
Adds an unescaped prefix to the command string.
```
But in the current implementation, the prefix is merged with arguments array and then is escaped which seems wrong.
Commits
-------
67f65c9 Update phpdoc of ProcessBuilder#setPrefix()
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Fix dumping ThrowingCasterException
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This cleans up dumping ThrowingCasterException to what I really intended to dump since the beginning.
Commits
-------
9944589 [VarDumper] Fix dumping ThrowingCasterException
* 2.6:
CS: fixes
Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places
[Form] [TwigBridge] Bootstrap layout whitespace control
[travis] Kill tests when a new commit has been pushed
fixed CS
Change behavior to mirror hash_equals() returning early if there is a length mismatch
CS fixing
Prevent modifying secrets as much as possible
Update StringUtils.php
Whitespace
Update StringUtils.php
StringUtils::equals() arguments in RememberMe Cookie based implementation are confused
CS: general fixes
[SecurityBundle] removed a duplicated service definition and simplified others.
Conflicts:
src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
* 2.3:
CS: fixes
Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places
[travis] Kill tests when a new commit has been pushed
fixed CS
Change behavior to mirror hash_equals() returning early if there is a length mismatch
CS fixing
Prevent modifying secrets as much as possible
Update StringUtils.php
Whitespace
Update StringUtils.php
CS: general fixes
[SecurityBundle] removed a duplicated service definition and simplified others.
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_collapsed.html.php
src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml
src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
This PR was squashed before being merged into the 2.7 branch (closes#14002).
Discussion
----------
[Translation][Extractor] Allow extracting an array of files besides extracting a directory
| 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
Give ability to extractors to extract from an array of files a file, or a Traversable besides a directory.
The following commit adds the new feature to the following extractors:
PhpExtractor and TwigExtractor.
It also corrects the interface documentation to show the new options allowed as a parameter.
I found this change useful as I've got a custom translation:update command that instead of extracting from $rootPath. '/Resources/views/' it extracts from the files that git is showing as modified. The command usually runs much faster than the default as it only parses the needed files.
Commits
-------
9d6596c [Translation][Extractor] Allow extracting an array of files besides extracting a directory
This PR was squashed before being merged into the 2.7 branch (closes#13438).
Discussion
----------
[Console][Table] Add support for colspan/rowspan + multiple header lines
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | #13368, #13369
| Tests pass? | yes
| License | MIT
This PR introduce a new feature described in #13368 and #13369,
I created a new class ```TableCell``` which can allow us to specify colspan/rowspan for each cell.
```php
$table->addRow([new TableCell("data", array('rowspan' => 1, 'colspan' => 2)), 'data']);
```
- [x] #13368 Add support for colspan/rowspan
- [x] #13369 Add support for multiple header lines
- [ ] add doc
Commits
-------
ed18767 [Console][Table] Add support for colspan/rowspan + multiple header lines
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Ctrl+click toggles-all and fix IE8 support
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12757, #12612
| License | MIT
| Doc PR | -
I choose Ctrl+click instead of the initial Alt+click because after testing both on Windows and Ubuntu, Alt+click is bound by the Browser/OS for other things. Ctrl+click is OK.
Commits
-------
70f1f24 [VarDumper] Ctrl+click toggles-all and fix IE8 support
12c1feb [VarDumper] implement expand all on ALT+click
This PR was squashed before being merged into the 2.7 branch (closes#13482).
Discussion
----------
Implemented check on interface implementation
| Q | A
| ------------- | ---
| Bug fix? | Yes
| New feature? | No
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes
| Fixed tickets | #13480
| License | MIT
| Doc PR |
Commits
-------
2a79ace Implemented check on interface implementation
This PR was squashed before being merged into the 2.6 branch (closes#12948).
Discussion
----------
[Form] [TwigBridge] Bootstrap layout whitespace control
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While working with Symfony's Bootstrap layout I have found few minor issues:
- [x] Choice labels are rendered with extra spaces
- [x] Whitespace control for all form widgets (like in default layout)
What was done:
- All failing tests from `AbstractLayoutTest` were copied to `AbstractBootstrap3LayoutTest` and adapted for Bootstrap layout. One of the main fixes was to change class checking for input (e.g., Bootstrap requires "form-control").
- Removed ` ` and hardcoded space before error message. Spacing here should be handled with CSS.
- Trimmed all unnecessary spaces from widget blocks (whitespace control)
Commits
-------
e8b0678 [Form] [TwigBridge] Bootstrap layout whitespace control
When one extends AbstractConstraintValidatorTest, If test fails
the output is not very easy to understand because all "magic"
is done in the parent class. So we have to read the code of the
parent class to understand what happened.
This PR was merged into the 2.7 branch.
Discussion
----------
[Translation] merge all fallback catalogues messages into current catalo...
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | ~
| Tests pass? | yes
| License | MIT
The amount of reduced memory depend on number of defined fallbacks and the size of messages.
For example if we defined 2 fallbacks and we have a large file like ~20 mb we save (~40 mb)
![selection_004](https://cloud.githubusercontent.com/assets/1753742/6737082/3af85be2-ce61-11e4-8104-4330944070cc.png)
Commits
-------
6eb5e73 [Translation] merge all fallback catalogues messages into current catalogue.
This PR was merged into the 2.3 branch.
Discussion
----------
CS: general fixes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
After this PR the whole 2.3 version will be valid when running PHP CS Fixer.
It is also first step to apply PHP CS Fixer on next version.
To keep fabbot.io happy ;)
Commits
-------
063ae13 CS: general fixes
* 2.7: (55 commits)
CS: fix some license headers
CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
Improve triggering of the deprecation error
[SecurityBundle] Fix typos in LogoutUrlHelper
[VarDumper] add caster for MongoCursor objects
make it possible to dump inlined services to XML
[VarDumper] Fixed notice when Exchange is mocked
[Translation] keep old array structure of resourcesFiles to avoid BC.
removed deprecated notices that make the tests fail
use visited lookup with reference to gain performance
[VarDumper] with-er interface for Cloner\Data
Replace GET parameters when changed
tweaked phpdocs
[Process] Fix outdated Process->start() docblock
prevent inlining service configurators
Improve entropy of generated salt
Complete the removal of API versions in the validator component
[Validator] deprecated API version
Removed 2.5 bc layer
[SecurityBundle] UserPasswordEncoderCommand: fix help arguments order.
...
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.6.md
src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Component/Console/Helper/DialogHelper.php
src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
src/Symfony/Component/Form/ResolvedFormType.php
src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
* 2.6:
CS: fix some license headers
CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
use visited lookup with reference to gain performance
Replace GET parameters when changed
[FrameworkBundle][debug:config] added support for dynamic configurations.
[WebProfiler] Fix partial search on url in list
Conflicts:
src/Symfony/Bridge/Propel1/Form/EventListener/TranslationCollectionFormListener.php
src/Symfony/Bridge/Propel1/Form/EventListener/TranslationFormListener.php
* 2.3:
CS: fix some license headers
CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
use visited lookup with reference to gain performance
Replace GET parameters when changed
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
This PR was merged into the 2.3 branch.
Discussion
----------
CS: fix some license headers
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Commits
-------
2b74841 CS: fix some license headers
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] with-er interface for Cloner\Data
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | symfony/symfony-docs#5106
I should have this idea earlier... :)
Commits
-------
2462c5b [VarDumper] with-er interface for Cloner\Data
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] add caster for MongoCursor objects
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This one is inspired from [PsySH's equivalent](https://github.com/bobthecow/psysh/blob/master/src/Psy/Presenter/MongoCursorPresenter.php).
Looking at the interface of the Mongo extension, the other classes may need a caster too.
So if a real Mongo user can write casters for them, that'd be great! (in an other PR, on top of this one)
Commits
-------
1008e6c [VarDumper] add caster for MongoCursor objects
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Improve triggering of the setDefaultOptions deprecation error
Bundles wanting to support both Sf 2.3 and Sf 2.7 (which is a common requirement as both have at least 2 more years of maintaince) would have custom form types with both option methods defined (`setDefaultOptions` for <2.7 support and `configureOptions` for >2.7,>3.0 support). In such case, I don't think there is anything wrong with the code and a deprecation error shouldn't be triggered.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
811b711 Improve triggering of the deprecation error
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] make it possible to dump inlined services to XML
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13557
| License | MIT
| Doc PR |
Commits
-------
504e338 make it possible to dump inlined services to XML
This PR was merged into the 2.3 branch.
Discussion
----------
Replace GET parameters when changed in form
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13962
| License | MIT
| Doc PR | -
Commits
-------
fa9fb5c Replace GET parameters when changed
This PR was merged into the 2.7 branch.
Discussion
----------
Remove the API version in the validator component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13458
| License | MIT
| Doc PR | n/a
This completes the work of #13517
Commits
-------
9438206 Complete the removal of API versions in the validator component
75088c0 [Validator] deprecated API version
0c69f69 Removed 2.5 bc layer
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] collapse/inline cut structures
Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This tweaks the dump output to make it a bit prettier (best viewed with `?w=1`)
Commits
-------
8443268 [VarDumper] collapse/inline cut structures
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Improved yaml syntax
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR adds support for this:
```yaml
services:
manager:
class: UserManager
arguments:
- true
calls:
- method: setLogger
arguments:
- @logger
- method: setClass
arguments:
- User
tags:
- name: manager
alias: user
```
Commits
-------
0eb34f3 [DependencyInjection] Added support for keys "method" and "arguments" in "calls" statement for yaml format
This PR was merged into the 2.6 branch.
Discussion
----------
[DependencyInjection] prevent inlining service configurators
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Currently, only the `PhpDumper` is able to dump inlined service
configurators. Since Symfony applications dump the compiled container
in XML, inlined configurators will break this process.
We did something similar before with service factories in #13914.
Commits
-------
34619fe prevent inlining service configurators
This PR was merged into the 2.6 branch.
Discussion
----------
[DomCrawler] Improve namespace discovery performance
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12298
| License | MIT
| Doc PR | -
Before this quick-fix, xpath axes like `child::*` or `descendant-or-self::*` were considered namespaces. As a result, far too many xpath queries were being executed during namespace discovery.
Here's a full blackfire before/after comparision of @salaman's script: https://blackfire.io/profiles/compare/a80b9e77-8e55-45d3-a348-7d34a51053b6/graph
![domcrawler-xpath-query](https://cloud.githubusercontent.com/assets/190447/6767384/ba93c57a-d024-11e4-84e1-e58dd7527f03.png)
Commits
-------
b6af002 [DomCrawler] Improve namespace discovery performance
Currently, only the `PhpDumper` is able to dump inlined service
configurators. Since Symfony applications dump the compiled container
in XML, inlined configurators will break this process.
* 2.6:
Fix small coding style
[2.3] Static Code Analysis for Components
[Form] fixed phpdoc
CS: Convert double quotes to single quotes
Fixed MongoODM entity loader. Improved loading behavior of entities and documents by reusing entity loader.
[Validator] added Japanese translation for unmatched charset (id: 80)
[WebProfilerBundle] fixed undefined buttons.
[WebProfilerBundle] Fix javascript toolbar on IE8
[DependencyInjection] Highest precedence for user parameters
bumped Symfony version to 2.6.6
[Translation][MoFileLoader] fixed load empty translation.
updated VERSION for 2.6.5
updated CHANGELOG for 2.6.5
bumped Symfony version to 2.3.27
updated VERSION for 2.3.26
update CONTRIBUTORS for 2.3.26
updated CHANGELOG for 2.3.26
[HttpKernel] UriSigner::buildUrl - default params for http_build_query
Conflicts:
src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Convert double quotes to single quotes
| 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
Changes generated automatically by upcoming PHP CS Fixer.
To keep fabbot.io happy ;)
Commits
-------
f99c22c CS: Convert double quotes to single quotes
Up until now xpath axes (child::*, descendant-or-self::** etc) were considered namespaces.
As a result, far too many xpath queries were being executed while namespace discovery.
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] [Security] [ACL] Improved MaskBuilder and PermissionMap
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13566
| License | MIT
| Doc PR | I'll do it if needed
This PR refers to #13697 . The previous PR introduced a BC break, so i provide this one which is backward compatible.
The MaskBuilderRetrievalInterface::getMaskBuilder methods allows us to retrieve a new instance of the MaskBuilder used in our application, even if it's a custom one.
I also added a MaskBuilderInterface and an AbstractMaskBuilder which can be a great helper.
Commits
-------
3d79d8b added MaskBuilderRetrievalInterface
89a1f2a improved MaskBuilder
This PR was squashed before being merged into the 2.3 branch (closes#13995).
Discussion
----------
[2.3] Static Code Analysis for Components
| 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
Static Code Analysis with Php Inspections (EA Extended), no functional changes:
- [Filesystem] : nested ifs, not optimal ifs
- in_array() miss-uses
- class re-implements an interface of super(s)
- array_keys/array_values as foreach array - fixed cases where changes has sense
Commits
-------
4abfabf [2.3] Static Code Analysis for Components
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Add catch-all-objects hook for casters
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Allows to create generic casters for any type of objects
Commits
-------
5999964 [VarDumper] Add catch-all-objects hook for casters
If `router.request_context.host` is defined in `parameters.yml` and if this
key is used in `globals` section of twig bundle then the value registered in the
DIC/parameters is the default value (`localhost`).
It occurs because generall the framework bundle is defined before the twig
bundle. So after the first loop, the (user) value registered in the
`ContainerBuilder` is overridden by the default value of the framework bundle.
And so, when it comes the time to process twig bundle, the last one gets the
default value, and not the user value.
This patch force the merge of default value, but give an highest precedence of
user parameters for each extensions.
This PR was squashed before being merged into the 2.6 branch (closes#13944).
Discussion
----------
[HttpKernel] UriSigner::buildUrl - default params for http_build_query
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
UriSigner fail to verify hash when custom ini setting arg_separator.output is used.
It was introduced in https://github.com/symfony/symfony/pull/12574
Commits
-------
3d6933f [HttpKernel] UriSigner::buildUrl - default params for http_build_query
* 2.7:
Marked the ResolveParameterPlaceHoldersPassTest as legacy
[ExpressionLanguage] fixed issues when parsing postfix expressions
remove unused code
do not inline service factories
resolve class parameters in service factories
[Serializer] Fix object normalization exceptions
* 2.6:
Marked the ResolveParameterPlaceHoldersPassTest as legacy
[ExpressionLanguage] fixed issues when parsing postfix expressions
remove unused code
do not inline service factories
resolve class parameters in service factories
[Serializer] Fix object normalization exceptions
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php
src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php
src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
This PR was merged into the 2.6 branch.
Discussion
----------
[2.6] Marked the ResolveParameterPlaceHoldersPassTest as legacy
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Splitted the ResolveParameterPlaceHoldersPassTest to obtain a legacy test to avoid deprecation rise.
Commits
-------
67ca1f4 Marked the ResolveParameterPlaceHoldersPassTest as legacy
* 2.7:
`ResolveParameterPlaceHoldersPass` unit tests
Fixing wrong variable name from #13519
[translation][initialize cache] Remove dead code.
[DependencyInjection] fixed service resolution for factories
[HttpKernel] Throw a LogicException when kernel.exception does not led to a Response
[FrameworkBundle] Added domain column when debugging translations
[PhpUnitBridge] do not replace but require-dev in symfony/symfony
[acl][command][SecurityBundle] Fixed user input option mode to be an Array
Conflicts:
composer.json
Exception shall be thrown when parsing the following expressions:
foo."#", foo."bar", foo.**, foo.123
The original parser didn't throw exception for foo."#", foo.** and
foo.123
| 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 was merged into the 2.6 branch.
Discussion
----------
[DependencyInjection] do not inline service factories
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13913
| License | MIT
| Doc PR |
The `XmlDumper`, which is used in the full-stack framework to dump the
used container, is not capable to dump inlined factories.
Commits
-------
663ae9f do not inline service factories
* 2.6:
`ResolveParameterPlaceHoldersPass` unit tests
Fixing wrong variable name from #13519
[translation][initialize cache] Remove dead code.
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] `ResolveParameterPlaceHoldersPass` unit tests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When working #13924, I noticed that there were no tests for the `ResolveParameterPlaceHoldersPass` class. So I decided to add them for the `2.3` branch too.
Commits
-------
b8d42b3 `ResolveParameterPlaceHoldersPass` unit tests
* 2.6:
[DependencyInjection] fixed service resolution for factories
[acl][command][SecurityBundle] Fixed user input option mode to be an Array
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
* 2.3:
[DependencyInjection] fixed service resolution for factories
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] fixed service resolution for factories
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13455
| License | MIT
| Doc PR | n/a
In the service container, factories can be defined with a class/method pair or a service/method pair.
The class or service value can be a container parameter, but it was not supported everywhere, this PR fixes that.
Note that the method can never be a container parameter as this is supported nowhere in the current code, so this has not been changed.
Another PR will fix the 2.6 way of configuring a factory.
Commits
-------
f86ad95 [DependencyInjection] fixed service resolution for factories
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Throw a LogicException when kernel.exception does not lead to a Response
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
22f4807 [HttpKernel] Throw a LogicException when kernel.exception does not led to a Response
* 2.7:
[travis] Do no tar in //
[translation][performances] move loading resources into Translator initialize.
allow to cache entity loader based on query builder
[Assets] Make templating.helper.assets service available again for BC reasons
[2.3] Static Code Analysis for Components
* 2.7:
Changed visibility of setUp() and tearDown to protected
Changed visibility of setUp() and tearDown to protected
[2.7] Fix travis file
[HttpFoundation] MongoDbSessionHandler::read() now checks for valid session age
[Debug] reintroduce charset param to ExceptionHandler
Changed visibility of setUp() and tearDown to protected
[WebProfilerBundle] Set debug+charset on the ExceptionHandler fallback
[Debug] deprecate ExceptionHandler::utf8Htmlize
Added default button class
used HTML5 meta charset tag and removed hardcoded ones
Revert "bug #13715 Enforce UTF-8 charset for core controllers (WouterJ)"
fixed XSS in the exception handler
Php Inspections (EA Extended) - static code analysis includes:
[2.3] Remove most refs uses
[FrameworkBundle] Read config/validation/*.(xml|yml) files
Test with local components instead of waiting for the subtree-splitter when possible
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php
src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php
src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php
src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php
src/Symfony/Component/Debug/ExceptionHandler.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php
src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php
This PR was merged into the 2.6 branch.
Discussion
----------
[Debug] reintroduce charset param to ExceptionHandler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
For some reason, we removed the charset arg of the constructor in 2.5, then used the same position to add fileLinkFormat in 2.6. This is a BC break with 2.3.
This PR reintroduces charset at second position, with some heuristic to keep compat with 2.6
Commits
-------
c8bd867 [Debug] reintroduce charset param to ExceptionHandler
* 2.6:
[HttpFoundation] MongoDbSessionHandler::read() now checks for valid session age
Changed visibility of setUp() and tearDown to protected
[WebProfilerBundle] Set debug+charset on the ExceptionHandler fallback
Added default button class
used HTML5 meta charset tag and removed hardcoded ones
Revert "bug #13715 Enforce UTF-8 charset for core controllers (WouterJ)"
fixed XSS in the exception handler
Php Inspections (EA Extended) - static code analysis includes:
[2.3] Remove most refs uses
Test with local components instead of waiting for the subtree-splitter when possible
Conflicts:
.travis.yml
* 2.3:
[HttpFoundation] MongoDbSessionHandler::read() now checks for valid session age
[WebProfilerBundle] Set debug+charset on the ExceptionHandler fallback
used HTML5 meta charset tag and removed hardcoded ones
Revert "bug #13715 Enforce UTF-8 charset for core controllers (WouterJ)"
Conflicts:
src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Bundle] Fix charset config
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13715, #7617, #7532
| License | MIT
| Doc PR | -
This reverts #13715 and resurrects #7532, which was fine.
Commits
-------
ef41059 [WebProfilerBundle] Set debug+charset on the ExceptionHandler fallback
cbd0525 used HTML5 meta charset tag and removed hardcoded ones
6ca7fc9 Revert "bug #13715 Enforce UTF-8 charset for core controllers (WouterJ)"
* 2.3:
Changed visibility of setUp() and tearDown to protected
fixed XSS in the exception handler
Php Inspections (EA Extended) - static code analysis includes:
[2.3] Remove most refs uses
Test with local components instead of waiting for the subtree-splitter when possible
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
src/Symfony/Component/Config/Util/XmlUtils.php
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/Debug/ExceptionHandler.php
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/OptionsResolver/Options.php
src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
src/Symfony/Component/Yaml/Inline.php
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Remove most refs uses
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13813
| License | MIT
| Doc PR | -
Removes some references usages. They are error prone, and trigger too many copies-on-writes.
Commits
-------
8862705 [2.3] Remove most refs uses
Reduce couple count calls in [Yaml]
Modernize type casting, fix several strict comparisons
Unsets merged
Elvis operator usage
Short syntax for applied operations
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Replace BadMethodCallException by MappingException
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no (`AnnotationLoader` will be introduced in 2.7)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
469b8e7 [Serializer] Replace BadMethodCallException by UnexpectedValueException