This PR was merged into the 2.5-dev branch.
Discussion
----------
[FrameworkBundle] Extract KernelTestCase from WebTestCase
| Q | A
| ------------- | ---
| Bug fix? | No
| New feature? | Yes
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes
| Fixed tickets | None
| License | MIT
| Doc PR | symfony/symfony-docs#3311
Previous discussion is in #7704. Opened new PR to target master branch.
This idea came to me while reading the Cookbook article [How to create a Console Command - Testing Commands](http://symfony.com/doc/master/cookbook/console/console_command.html#testing-commands) and I wanted to hear feedback from others before submitting a patch.
Basically the Cookbook article states that when testing a Command that extending `WebTestCase` is a good way to get access to the Kernel and thus the Container. This struck me as weird because I was wanting to test a Command, which doesn't really have anything to do with "the web."
Currently `WebTestCase` doesn't do anything internally that looks like web-specific work, and the class docblock itself states "WebTestCase is the base class for functional tests.".
After a suggestion in #7704 by @beberlei, I decided to take his advice and now have the following implementation:
Extracted a new class `KernelTestCase` from `WebTestCase` and instead allow WebTestCase to extend KernelTestCase. Pulled all methods up into KernelTestCase except `createClient()` because `createClient()` is focused solely on creating a Client for issuing web-based requests.
Benjamin's solution provides us a clear extension point from `KernelTestCase` for Command-based tests and also provides 100% backwards-compatibility without the need to deprecate WebTestCase.
Commits
-------
c4f14fb Extract new base test class KernelTestClass
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Translation] Added template for relative file paths in FileDumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/9845
| License | MIT
| Doc PR |
Added ability to support templates for relative paths to translation files.
The file dumpers will try to create the directories if not existing.
Also made `IcuResFileDumper` extending `FileDumper`.
Commits
-------
a04175e Changed placeholders
623d149 Added a ConcreteDumper
84f0902 [Translation] Added template for relative file paths
This PR was merged into the 2.5-dev branch.
Discussion
----------
[FrameworkBundle] Added a translation:debug command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR is based on #10076 but fixes a bunch of issues for edge cases. It also uses the new Table helper.
Original description:
This pull request adds a `translation:debug` command that can be used to inspect unused / missing messages and compare them with the fallback ones (for example to detect copy pasted strings). This is inspired by this ruby project https://github.com/glebm/i18n-tasks
Example of output:
![image](https://f.cloud.github.com/assets/47313/2311673/84ae301c-a2f3-11e3-8bf6-96034369e46c.png)
Commits
-------
f039bde [FrameworkBundle] fixed edge cases for translation:debug and tweaked the output
597a310 Added a translation:debug command
This PR was squashed before being merged into the 2.5-dev branch (closes#10017).
Discussion
----------
[FrameworkBundle] Add HHVM support for built-in web server
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
Using HHVM as built-in web server for development from console.
```
hhvm app/console server:run
```
Commits
-------
66798ba9 [FrameworkBundle] Add HHVM support for built-in web server
This PR was squashed before being merged into the 2.5-dev branch (closes#10100).
Discussion
----------
[ClassLoader] A PSR-4 compatible class loader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This is a PSR-4 compatible class loader that I'd like to contribute to the ClassLoader component. Since PSR-4 is the most recent FIG standard for an autoloader, I thought a compatible loader should be part of a feature-complete ClassLoader component.
See: http://www.php-fig.org/psr/psr-4/
PSR-4 does neither replace PSR-0, nor are those standards 100% compatible. This is why I implemented the standard as a new class.
If you decide that my PR is worth merging, I would also provide a PR for symfony-docs with a documentation.
Commits
-------
6837df3 [ClassLoader] A PSR-4 compatible class loader
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpKernel] fixed serialization of the request data collector
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10361
| License | MIT
| Doc PR | n/a
This fixes a regression introduced in #10352.
Commits
-------
6102f99 [HttpKernel] fixed serialization of the request data collector
This PR was squashed before being merged into the 2.5-dev branch (closes#10314).
Discussion
----------
[Serializer] added support for is.* methods in GetSetMethodNormalizer
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10297
| License | MIT
| Doc PR | N/A
Using ``is`` prefix for boolean variables is considered a standard, not only in PHP but also in Java (from which Symfony2 derives lot standards).
I was not sure if this is BCB but answered "no". Was not sure if I should update ``CHANGELOG`` file and did so, but if you find it irrelevant, go ahead and merge without it. I don't know if I should create a PR for docs because it does not explicitly say that the normalizer supports only ``get.*`` methods as getters.
_Note: Objects that contain behaviour also can use other prefixes like ``can``, ``has``, ``should``, but their presence in ``GetSetMethodNormalizer`` is relevant as they do not provide state (``has`` is debatable)._
Commits
-------
480219f [Serializer] added support for is.* methods in GetSetMethodNormalizer
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] deprecated TableHelper in favor of Table
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9788, #9680, #9325
| License | MIT
| Doc PR | symfony/symfony-docs#3627
This PR makes the Table helper stateless. It also adds a way to define global styles and to change/tweak existing styles easily.
The second commit adds the possibility to add a separator anywhere in the table output.
Commits
-------
21784ce [Console] make it possible to pass a style directly to Table::setStyle()
14caaec [Console] added the possibility to insert a table separator anywhere in a table output
39c495f [Console] deprecated TableHelper in favor of Table
* 2.4:
[Form][2.3] Fixes empty file-inputs getting treated as extra field.
changed some PHPUnit assertions to more specific ones
fixed Kernel::stripComments() normalizing new-lines
added a BC comment
Update FileLoader to fix issue #10339
bumped Symfony version to 2.3.12
updated VERSION for 2.3.11
update CONTRIBUTORS for 2.3.11
updated CHANGELOG for 2.3.11
Throw exception when unable to normalize embedded object
Fixed evaluation of short circuit operators
Follow-up to #10312: Fixed minor performance related issues in Yaml\Inline.
[2.4][HttpKernel] Fix issue #10209 When the profiler has `only_exception` option activated and a subrequest throw an exception, the parent profile cannot be found.
This PR was squashed before being merged into the 2.3 branch (closes#10251).
Discussion
----------
[Form][2.3] Fixes empty file-inputs getting treated as extra field.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8575 (https://github.com/symfony/symfony/pull/8575#issuecomment-34867485)
| License | MIT
Re-applies 968fe23 (PR #8575).
The test for this already exists, it was just this line that got overwritten by eb9f76d5ba (diff-ca5e25b47f3ecc94cd557946aeb486c6L542)
To clarify, this is a PR into 2.3 branch - this already exists in 2.4 (and later from this PR: https://github.com/symfony/symfony/pull/9146)
Commits
-------
8d99d75 [Form][2.3] Fixes empty file-inputs getting treated as extra field.
* 2.3:
changed some PHPUnit assertions to more specific ones
fixed Kernel::stripComments() normalizing new-lines
added a BC comment
Update FileLoader to fix issue #10339
This PR was merged into the 2.5-dev branch.
Discussion
----------
[DataCollector] Improves the readability of the collected arrays in the profiler
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR is based on #10155.
Original description:
It simply improves the readability of the collected arrays in the profiler:
__before__:
```
Array(date => Array(year => , month => , day => ), time => Array(hour => ))
```
__after__:
```
[
date => [
year => ,
month => ,
day =>
],
time => [
hour =>
]
]
```
Commits
-------
dce66c9 removed double-stringification of values in the profiler
1cda2d4 [HttpKernel] tweaked value exporter
3f297ea Improves the readability of the collected arrays in the profiler.
This PR was merged into the 2.5-dev branch.
Discussion
----------
removed as many usage of the request service as possible without breaking BC
| 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
-------
d638369 removed as many usage of the request service as possible without breaking BC
This PR was merged into the 2.4 branch.
Discussion
----------
[2.4][HttpKernel] Fix issue #10209
When the profiler has `only_exception` option activated and a subrequest which
throw an exception, the parent profile cannot be found.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Fix issue #10209
Commits
-------
b949c49 [2.4][HttpKernel] Fix issue #10209 When the profiler has `only_exception` option activated and a subrequest throw an exception, the parent profile cannot be found.
This PR was merged into the 2.3 branch.
Discussion
----------
Update FileLoader to fix issue #10339
This fixes an issue in Symfony\Component\Config\Loader\FileLoader
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10339
| License | MIT
| Doc PR | none
Commits
-------
3988728 Update FileLoader to fix issue #10339
FileLoader now uses resolved FileLoader's (the one that explicitly
supports that resource) FileLocatorInterface instance before falling
back to its own when trying to load resources in import() method.
* 2.3:
bumped Symfony version to 2.3.12
updated VERSION for 2.3.11
update CONTRIBUTORS for 2.3.11
updated CHANGELOG for 2.3.11
Follow-up to #10312: Fixed minor performance related issues in Yaml\Inline.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.4:
[Process] minor fixes
Improve performance of getNextEmbedBlock by removing unnecessary preg_match and function calls.
Avoid unnecessary line indentation calculation.
Optimise Inline::evaluateScalar() for parsing strings.
fixed CS
fixed parsing Mongo DSN and added Test for it
() is also a valid delimiter
Adding PHP 5.6 to travis-ci tests
Update BCryptPasswordEncoder.php
[Validator] Removed PHP <5.3.3 specific code which is not officially supported.
Fixed wrong redirect url if path contains some query parameters
* 2.3:
[Process] minor fixes
Improve performance of getNextEmbedBlock by removing unnecessary preg_match and function calls.
Avoid unnecessary line indentation calculation.
Optimise Inline::evaluateScalar() for parsing strings.
fixed CS
fixed parsing Mongo DSN and added Test for it
() is also a valid delimiter
Adding PHP 5.6 to travis-ci tests
Update BCryptPasswordEncoder.php
[Validator] Removed PHP <5.3.3 specific code which is not officially supported.
Fixed wrong redirect url if path contains some query parameters
This PR was squashed before being merged into the 2.3 branch (closes#10305).
Discussion
----------
[Process] minor fixes
| Q | A
| ------------- | ---
| Fixed tickets | [n/a]
| License | MIT
The "same" PR as #10220, but on "2.3" branch
Commits
-------
f03e5dc [Process] minor fixes
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Debug] enhance non-PSR-0 compatibility for case mismatch test
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Fix compatibility with non-PSR-0/4 loading schemes.
See https://github.com/symfony/symfony/pull/10201#issuecomment-35567573
Commits
-------
120e197 [Debug] enhance non-PSR-0 compatibility for case mismatch test
This PR was squashed before being merged into the 2.5-dev branch (closes#9862).
Discussion
----------
[FrameworkBundle] Added configuration for additionnal request formats
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/8934
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3402
Reopening of https://github.com/symfony/symfony/pull/8944
# TODO
- [x] Fix wrong xml configuration definition (Thanks @WouterJ)
- [x] Change configuration key `additional_formats` to a more meaningful one
- [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)
Commits
-------
f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
This PR was merged into the 2.5-dev branch.
Discussion
----------
[FrameworkBundle][Console] Load command from DIC after command from bundles.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
It's better to load a command from DIC after other one. Because it allow easy
override of default (symfony/assetic/doctrine) command. The end user could do:
# config.yml
services:
assetic.command.dump:
class: SensioLabs\Shim\Assetic\DumpCommand
tags:
- { name: console.command }
**Note**: This is not a new feature... It could be very cool to have it for symfony 2.4 ;)
Commits
-------
34f4ef5 [FrameworkBundle][Console] Load command from DIC after command from bundles.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Debug] error stacking + fatal screaming + case testing
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Ported from https://github.com/nicolas-grekas/Patchwork/
Three enhancements for Symfony debug mode:
- detect case mismatches between loaded class name, its declared name and its source file name
- dismiss hard to debug blank pages related to non-catchable-@-silenced fatal errors (```@(new Toto) + parse error in Toto.php``` => enjoy debugging)
- work around https://bugs.php.net/42098 / https://bugs.php.net/54054 / https://bugs.php.net/60149 / https://bugs.php.net/65322 (fixed in 5.5.5)
An other thing I didn't port is scope isolation: the current `require` in autoloaders is done in their scope, so local $vars / $this (with access to private props/methods) is easily accessible from required files. Shouldn't proper separation prevent that?
Commits
-------
6de362b [Debug] error stacking+fatal screaming+case testing
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Removed PHP <5.3.3 specific code which is not officially supported
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There is some code in the validator component which handles a PHP bug for versions strictly inferiors to 5.3.3. Since these versions are not supported (the requirements say 5.3.3 minimum) I thought we could remove it.
Regards.
Commits
-------
f10c974 [Validator] Removed PHP <5.3.3 specific code which is not officially supported.
* 2.3:
Revert "bug #10207 [DomCrawler] Fixed filterXPath() chaining (robbertkl)"
Bypass sigchild detection if phpinfo is not available
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
* 2.4:
Revert "Fix "Array was modified outside object" in ResizeFormListener."
Added failing test
bumped Symfony version to 2.4.3
updated VERSION for 2.4.2
updated CHANGELOG for 2.4.2
bumped Symfony version to 2.3.11
updated VERSION for 2.3.10
update CONTRIBUTORS for 2.3.10
updated CHANGELOG for 2.3.10
[Console] removed problematic regex
fixed various inconsistencies
[DomCrawler] Added support for <area> tags to be treated as links
Fix "Array was modified outside object" in ResizeFormListener.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
Revert "Fix "Array was modified outside object" in ResizeFormListener."
Added failing test
bumped Symfony version to 2.3.11
updated VERSION for 2.3.10
update CONTRIBUTORS for 2.3.10
updated CHANGELOG for 2.3.10
[Console] removed problematic regex
[DomCrawler] Added support for <area> tags to be treated as links
Fix "Array was modified outside object" in ResizeFormListener.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
When the profiler has `only_exception` option activated and a subrequest
throw an exception, the parent profile cannot be found.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
It's better to load a command from DIC after other one. Because it
allow easy override of default (symfony/assetic/doctrine) command.
The end user could do:
# config.yml
services:
assetic.command.dump:
class: SensioLabs\Shim\Assetic\DumpCommand
tags:
- { name: console.command }
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] removed problematic regex
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9462
| License | MIT
| Doc PR | n/a
This PR is a quick implementation of a replacement fora problematic regex.
Commits
-------
80bc41e [Console] removed problematic regex
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Added support for <area> tags to be treated as links
The [HTML area tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area) behaves exactly like the `a` tag in that they're both clickable, and if it has a `href` follows a link. The Link class works the same with both tags.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
23acd26 [DomCrawler] Added support for <area> tags to be treated as links
The onSubmit() method of the ResizeFormListener class is assuming the data is an array, and calling unset directly inside a foreach. This works fine in most scenarios, but if data is an instance of IteratorAggregate, it breaks with the following error:
Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener::onSubmit(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in ./vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php line 142
This is because the foreach loop is using an Iterator in the background, but the ResizeFormListener has unset the underlying data directly, causing the Iterator and data to be out of sync. When the data is an instance of IteratorAggregate, the loop should use the iterator directly and not rely on foreach.
The onSubmit method has been updated accordingly.
* 2.4:
fixed various inconsistencies
reduced recursion when building DumperPrefixCollection
renamed variables - making next change more readable
removing dead code.
[ExpressionLanguage] added some tests for the built-in constant() function
[ExpressionLanguage] added some documentation about functions
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Fixed incorrect handling of image inputs
* 2.3:
fixed various inconsistencies
reduced recursion when building DumperPrefixCollection
renamed variables - making next change more readable
removing dead code.
[DomCrawler] Fixed filterXPath() chaining
[DomCrawler] Fixed incorrect handling of image inputs
Conflicts:
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php
src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php
src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php
src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
This PR was merged into the 2.4 branch.
Discussion
----------
[ExpressionLanguage] added some documentation about functions
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10216
| License | MIT
| Doc PR | n/a
This adds documentation about how to define a function in the expression language.
Commits
-------
600d481 [ExpressionLanguage] added some documentation about functions
This PR was merged into the 2.5-dev branch.
Discussion
----------
[EventDispatcher] simplified code for TraceableEventDispatcher
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
42e4c7b [EventDispatcher] simplified code for TraceableEventDispatcher
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Stopwatch] Allow getting duration of events without calling stop()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | [#10175](https://github.com/symfony/symfony/issues/10175)
| License | MIT
| Doc PR | [#3539](https://github.com/symfony/symfony-docs/pull/3539)
Commits
-------
2efe461 Allow retrieving unstopped stopwatch events
d3d097d Include running periods in duration
This PR was merged into the 2.5-dev branch.
Discussion
----------
Made some HHVM-related fixes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
1240758 [Routing] fixed CS
e223395 [Debug] fixed case differences between PHP and HHVM (classes are case-insensitive anyway in PHP)
23acc24 [Debug] made order of suggestions predictable in error messages
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] fixed wrong reference in TraceableEventDispatcher
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9748, #9727
| License | MIT
| Doc PR | n/a
This PR fixes#9748 and #9727 by removing the `id` state. Only private method signatures have been changed, so that qualifies for a fix in 2.3.
The `getNotCalledListeners()` is a bit special as it tries to get non-called listeners. It passes `null` as the event id as if a listener has been called more than once, getting the first call is enough.
Commits
-------
acd3317 [HttpKernel] fixed wrong reference in TraceableEventDispatcher
* 2.4:
$default can be string
Fix wording for Process class documentation
Option can be bool too (eg. --force)
[Form] Update DateTime objects only if the actual value has changed
Revert "bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco)"
[HttpFoundation] fixed typo
Added delta for Request comparison
add zh_TW validator translations
Added Bulgarian translation for security component
* 2.3:
$default can be string
Fix wording for Process class documentation
Option can be bool too (eg. --force)
[Form] Update DateTime objects only if the actual value has changed
Revert "bug #10091 [Translation] Update PluralizationRules.php (guilhermeblanco)"
[HttpFoundation] fixed typo
Added delta for Request comparison
add zh_TW validator translations
Added Bulgarian translation for security component
This PR was merged into the 2.5-dev branch.
Discussion
----------
Adds PTY mode & convenience method mustRun()
This makes two additions. I've split them into separate commits so that you can pull them separately if required.
1. Adds PTY mode.
In contrast to the existing TTY mode, the proc_open call becomes the master not the process currently executing.
2. Adds a ``mustRun`` method
This is merely for convenience:
```php
# Before
$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}
$proc = new Process($cmd);
if (0 !== $proc->run()) {
throw new ProcessFailedException($proc);
}
# After
(new Process($cmd))->mustRun();
(new Process($cmd))->mustRun();
Commits
-------
dbd264a adds cache for isPtySupported()
6c11207 attempts to fix tests on Travis
2ff1870 adds convenience method mustRun
53441aa adds support for PTY mode
This PR was merged into the 2.5-dev branch.
Discussion
----------
[WebProfilerBundle] Use inline images instead of asset() in form-panel
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | silexphp/Silex-WebProfiler#33
| License | MIT
| Doc PR |
In the ```form.html.twig```-template in dev-master the twig function ```assert()``` is used to load the images for the toggle-buttons. This is bad, as the profiler is also used in other projects, which maybe do not have an ```assert()``` function, like Silex.
In version 2.4.x this is not an issue, as the new images were introduced for 2.5.
I change the assert() part to inline data-images with this [converter](http://www.askapache.com/online-tools/base64-image-converter/). Compression was enabled, so the images should be as small as possible. I also compressed the toolbar-icon a little bit further.
While switching between before (dev-master) and after (this PR) I have not spotted any visual difference.
Commits
-------
12eabd8 remove unused icons
f259157 Further compress icon
eb6d02c Use inline images instead of asset() function
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
INI_SCANNER_RAW change the default scanner mode of parse_ini_files to parse all values without evaluate. This allow values with single quotes, "no" and "false" and raise an error if you use the deprecated "#" as comment character.
This change is specially good for shared translations, because a translator haven't to know that he can't use a few restricted terms.
And has a residual improvement: it's twice fast that use the default value (INI_SCANNER_NORMAL) in my tests
This PR was squashed before being merged into the 2.3 branch (closes#10151).
Discussion
----------
[Form] Update DateTime objects only if the actual value has changed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now the Form component replaces DateTime fields with new Objects, therefore the hash is changing.
This leads to unnecessary database updated when working with doctrine. With this patch the DateTime object
of the actual entity is only replaced if the value has been changed.
Commits
-------
1f22d3a [Form] Update DateTime objects only if the actual value has changed
Sometimes, tests are failing because REQUEST_TIME
changes between the creation of the various sub-requests.
By using delta, we allow maximum of second of difference.
Example: https://travis-ci.org/symfony/symfony/jobs/17668158#L511
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator][Translation] add zh_TW validator translations
add Traditional Chinese validator translations.
Commits
-------
c755e85 add zh_TW validator translations
* 2.4:
fixed CS
allow the TextAreaFormField to be used with valid/invalid HTML
Create security.id.xlf
[DependencyInjection] Remove unneeded file
[Twig] removed obsolete conditions on Twig versions
added lines to exceptions for the trans and transchoice tags
[FrameworkBundle] Merged multiple line input into one line to fix the tests.
[Form] Make FormInterface::add docblock more explicit
[Security] Add zh_CN translations
Routing condition bugfix
[Validator][Translation]update zh_CN translations
[Validator] Minor fix in XmlLoader
* 2.3:
fixed CS
allow the TextAreaFormField to be used with valid/invalid HTML
Create security.id.xlf
[DependencyInjection] Remove unneeded file
[Twig] removed obsolete conditions on Twig versions
added lines to exceptions for the trans and transchoice tags
[Form] Make FormInterface::add docblock more explicit
[Security] Add zh_CN translations
[Validator][Translation]update zh_CN translations
[Validator] Minor fix in XmlLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Remove unneeded file
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I think the file was moved here by mistake from the fixtures.
Commits
-------
caf1809 [DependencyInjection] Remove unneeded file
This PR was merged into the 2.3 branch.
Discussion
----------
added lines to exceptions for the trans and transchoice tags
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10120
| License | MIT
| Doc PR | n/a
Commits
-------
ee0470d added lines to exceptions for the trans and transchoice tags
This PR was merged into the 2.3 branch.
Discussion
----------
Remove obsolete conditions
| 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
In `composer.json`, Twig version is set to 1.12 as a minimum, so all conditions about earlier Twig versions can be safely removed.
Commits
-------
c3ff76a [Twig] removed obsolete conditions on Twig versions
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Routing] Add createRoute method for AnnotationClassLoader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
This allows to use a custom route class. So if you want to support
annotations for Routing in Silex it can now be done while keeping the
custom routing options Silex supports.
Commits
-------
97404b3 Add createRoute method for AnnotationClassLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
Commits
-------
23216aa [Form] Make FormInterface::add docblock more explicit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When replacing a child form from within a form event, it's not obvious that you have to use the 'add' method. Though it's minor, this will save somebody a google search.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[TwigBridge] Added support for json format in twig:lint command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10026
| License | MIT
| Doc PR | -
Commits
-------
4d2f94a [TwigBridge] Added support for json format in twig:lint command
621f991 [TwigBridge] Cleaned documentation of twig:lint command
This PR was merged into the 2.4 branch.
Discussion
----------
[Security] fix DI for SimpleFormAuthenticationListener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10093
| License | MIT
| Doc PR | -
The problematic commit was f2f15f54f9
Commits
-------
b3f5fa9 [Security] fix DI for SimpleFormAuthenticationListener
This allows to use a custom route class. So if you want to support
annotations for Routing in Silex it can now be done while keeping the
custom routing options Silex supports.
This PR was squashed before being merged into the 2.5-dev branch (closes#10005).
Discussion
----------
[Security] Added named encoders to EncoderFactory
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9743
| License | MIT
| Doc PR | -
This PR is basically merging FOSAdvancedEncoder. I think it's better than having a separate bundle that most of it's code is a copy of the core.
A use case is: having a different encoders or bcrypt cost based on the user's roles.
Commits
-------
c69e2ca [Security] Added named encoders to EncoderFactory
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Routing] Added an extension point for globals in AnnotationClassLoader
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We need to add a new extension point for global to be able to support
`@Method` on class:
``` php
/**
* @Route("/api")
* @Method("GET")
*/
class FooBarController
{
/**
* @Route("/")
*/
public function listAction()
{
}
/**
* @Route("/new")
* @Method("POST")
*/
public function newAction()
{
}
}
```
Commits
-------
8f7524e [Routing] Added an extension point for globals in AnnotationClassLoader
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Component/Security] Fixed some phpdocs in Security/Core
| Q | A
| ------------- | ---
| Bug fix? | kinda*
| New feature? | no
| License | MIT
\* - those missing phpdocs lead to problems when debugging with IDE, as well as some were wrong (i.e. `SecurityContextInterface::isGranted()`) as parameters differ in interface & class implementing it
Commits
-------
80fae1d [Component/Security] Fixed some phpdocs in Security/Core
This PR was squashed before being merged into the 2.5-dev branch (closes#9967).
Discussion
----------
Form debugger storage
This PR continues #9857
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9123
| License | MIT
| Doc PR | -
Commits
-------
744da7f Form debugger storage
This PR was squashed before being merged into the 2.5-dev branch (closes#9980).
Discussion
----------
[Routing][FrameworkBundle] Deprecated the apache dumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9652
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3446
Commits
-------
6258cfa [Routing][FrameworkBundle] Deprecated the apache dumper
This PR was merged into the 2.3 branch.
Discussion
----------
Prevent WDT from creating a session
The wdt should not create a session.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: N/A
Todo: -
License of the code: MIT
Documentation PR: N/A
Commits
-------
4791351 Prevent WDT from creating a session
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] Errors now reference the field they were added to and the violation/exception that caused them
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9472, #9582
| License | MIT
| Doc PR | -
Commits
-------
c8a0ee6 [Form] Errors now reference the field they were added to and the violation/exception that caused them
This PR was squashed before being merged into the 2.5-dev branch (closes#9776).
Discussion
----------
[Console] Added the possibility to set a different default command
I am not quite sure if this is the best approach to solve the issue but the solution I provide works. Let me know your suggestions to improve it.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8058
| License | MIT
| Doc PR | symfony/symfony-docs#3426
Commits
-------
418de05 [Console] Added the possibility to set a different default command
* 2.4:
udpated LICENSE year
update year on licenses
rundown and typo fix
[Process] Fix#9861 : Revert TTY mode
[Form] Update minimal requirement in composer.json
Fix Empty translations with Qt files
[Console] Fixed command name guessing if an alternative is an alias.
Update UPGRADE-2.3.md to account for #9388
[WebProfilerBundle] Fixed profiler toolbar icons for XHTML.
[BrowserKit] Throw exception on invalid cookie expiration timestamp
[Propel1Bridge][ModelChoiceList] add exception message for invalid classes
This PR was merged into the 2.3 branch.
Discussion
----------
[All] update license year to 2014
| Q | A |
| --- | --- |
| Bug fix? | n |
| New feature? | n |
| BC breaks? | n |
| Deprecations? | n |
| Tests pass? | y |
| Fixed tickets | na |
| License | MIT |
| Doc PR | na |
Sent using [Gush](https://github.com/cordoval/gush)
sorry about the previous PR now closed, forgot Gush had branched off of master and not 2.3
Commits
-------
8ace5f9 update year on licenses
This PR was merged into the 2.5-dev branch.
Discussion
----------
[OptionsResolver] Allow giving a callback as an allowedValue to OptionsResolver
I recently had to use an option which was an array and could contain some one or multiple values from a list. As it could contain all possible combinations, it was not possible to validate it with a list of allowed values.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/3437
Commits
-------
07d1d30 Allow giving a callback as an allowedValue to OptionsResolver
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix#9861 : Revert TTY mode
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9861
| License | MIT
This revert the TTY mode support for the process component
Commits
-------
160b1cf [Process] Fix#9861 : Revert TTY mode
This PR was squashed before being merged into the 2.3 branch (closes#9948).
Discussion
----------
[WebProfilerBundle] Fixed profiler toolbar icons for XHTML.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Profiler page itself is entirely autonomic, but toolbar is not - unfortunately currently it doesn't work in XHTML documents :(.
#9877 backported to `2.3` branch.
Commits
-------
296c4d1 [WebProfilerBundle] Fixed profiler toolbar icons for XHTML.
This PR was merged into the 2.3 branch.
Discussion
----------
Propel1 exception message
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9932
| License | MIT
| Doc PR | none
This add exception message for `ModelChoiceList` and `ModelType` when `class` parameter is not provided or invalid
Commits
-------
047492f [Propel1Bridge][ModelChoiceList] add exception message for invalid classes
Instead correctly use the array of schemes from the Route.
Also adjusted the dumpers to dump the correct data.
I extended the tests to not only test the deprecated behavior, but also
the new schemes-requirement.
* 2.4:
Revert "bug #9601 [Routing] Remove usage of deprecated _scheme requirement (Danez)"
bumped Symfony version to 2.4.2
updated VERSION for 2.4.1
updated CHANGELOG for 2.4.1
bumped Symfony version to 2.3.10
updated VERSION for 2.3.9
update CONTRIBUTORS for 2.3.9
updated CHANGELOG for 2.3.9
Add support SAPI cli-server
Fix hardcoded listenerTag name in error message
[HttpFoundation] Documented public properties.
[Routing] add missing unit tests for Route and RouteCollection classes
Conflicts:
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
bumped Symfony version to 2.3.10
updated VERSION for 2.3.9
update CONTRIBUTORS for 2.3.9
updated CHANGELOG for 2.3.9
Add support SAPI cli-server
Fix hardcoded listenerTag name in error message
[HttpFoundation] Documented public properties.
[Routing] add missing unit tests for Route and RouteCollection classes
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Tests/RouteCollectionTest.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
test for class route annotation
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I mention that AnnotationClassLoaderTest don't test class route annotation functional.
This patch add test for class route annotation
Commits
-------
ac94ddb test for class route annotation
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Documented public properties
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9670
| License | MIT
| Doc PR | -
`$request` and `$query` parameter bags could be hard to get for a newcommer, who's used to `$_POST` and `$_GET` variables. Some people claim naming makes no sense (see #9671).
For consistency I documented all public properties.
Commits
-------
1b79831 [HttpFoundation] Documented public properties.
These annotations are artificially bumping the code coverage. Unreached
code should be reported in the coverage report, even if we cannot reach
100% coverage for some safeguards.
Thus, some places using them were actually testable (and tested) code.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Finder] Added GLOB_BRACE support in Finder::in() method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9705
| License | MIT
| Doc PR | ~
**before**
```php
$finder->files()->in([
'My/First/Directory',
'My/Second/Directory',
'My/Third/Directory',
]);
```
**after**
```php
$finder->files()->in('My/{First,Second,Third}/Directory');
```
Commits
-------
e2698fc [Finder] Included GLOB_BRACE support in the CHANGELOG.
30814d3 [Finder] Added a test case for the GLOB_BRACE in Finder:in().
da67f5d [Finder] Added GLOB_BRACE support in Finder::in() method
This PR was squashed before being merged into the 2.3 branch (closes#9925).
Discussion
----------
[Routing] add missing unit tests for Route and RouteCollection classes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Just add few unit tests in Route and RouteCollection classes to have a full coverage.
Commits
-------
7bbd568 [Routing] add missing unit tests for Route and RouteCollection classes
* 2.4:
removed unneeded use statements
[DoctrineBridge] Fixed an issue with DoctrineParserCache
removed unneeded use statements
Prepend Child Bundle paths before the parent
[Routing] add unit tests for Symfony\Component\Routing\RequestContext class
* 2.3:
removed unneeded use statements
Prepend Child Bundle paths before the parent
[Routing] add unit tests for Symfony\Component\Routing\RequestContext class
Conflicts:
src/Symfony/Component/Form/Extension/Csrf/CsrfExtension.php
src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php
src/Symfony/Component/Validator/ConstraintValidatorFactory.php
This PR was merged into the 2.3 branch.
Discussion
----------
removed unneeded use statements
| Q | A
| ------------- | ---
| License | MIT
Commits
-------
7f9a366 removed unneeded use statements
* 2.4:
[Security] fixed pre/post authentication checks
fixed missing use statements
Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term.
Fixed CSS
[Intl] Added round support for ROUND_CEILING, ROUND_FLOOR, ROUND_DOWN, ROUND_UP
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
addressed == -> === suggestion
Fixed#9020 - Added support for collections in service#parameters
fixes PSR-0 issues in tests
adjusted behavior to always copy override on url files
Skips test that need full lib-intl.
* 2.3:
[Security] fixed pre/post authentication checks
Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term.
Fixed CSS
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
addressed == -> === suggestion
Fixed#9020 - Added support for collections in service#parameters
fixes PSR-0 issues in tests
adjusted behavior to always copy override on url files
Skips test that need full lib-intl.
Conflicts:
src/Symfony/Component/Security/Acl/Tests/Permission/MaskBuilderTest.php
src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememerMeTokenTest.php
src/Symfony/Component/Security/Core/Tests/User/AccountCheckerTest.php
src/Symfony/Component/Security/Core/Tests/User/InMemoryProviderTest.php
src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememberMeTokenTest.php
src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememerMeTokenTest.php
src/Symfony/Component/Security/Tests/Core/User/AccountCheckerTest.php
src/Symfony/Component/Security/Tests/Core/User/InMemoryProviderTest.php
src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php
src/Symfony/Component/Security/Tests/Core/User/UserCheckerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
| Q | A
| ------------- | ---
| Bug fix? | yes
| BC breaks? | no*
| Tests pass? | yes
| Fixed tickets | #9903
| License | MIT
\* as described in mentioned issue, before this PR there was thrown exception `UnexpectedValueException`, which was not correct, but I guess some people trying to hide the bug could use `try {} catch` on it.
Commits
-------
38287e7 [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] fixed pre/post authentication checks
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8510, #9622
| License | MIT
| Doc PR | N/A
After further investigation of #8510, I found that all checks in the `checkPreAuth` actually belongs to `checkPostAuth` and the same goes for checks in `CheckPostAuth` (I checked the original source from Spring and indeed, that's how it is implemented there: see https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/dao/AbstractUserDetailsAuthenticationProvider.java#L305
).
So, this PR fixes that issue. I think that we can do this change safely in 2.3 as the error message is the same for all causes by default (`$hideUserNotFoundExceptions` is `true` by default in `UserAuthenticationProvider`).
The only "real" change is whether the authentication is checked or not.
Commits
-------
ada82a2 [Security] fixed pre/post authentication checks
This PR was squashed before being merged into the 2.5-dev branch (closes#9855).
Discussion
----------
[Twig] Decouple Twig commands from the Famework
I want to use the command `twig:lint` in a Silex project.
In this PR, I've moved the class `Symfony\Bundle\TwigBundle\Command\LintCommand` to `Symfony\Bridge\Twig\Command\LintCommand` and removed dependency to the `ContainerAwareCommand`.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes (renamed class)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/9818#issuecomment-30961360
| License | MIT
| Doc PR | n/a
- [ ] Move command `twig:debug` once merged.
- [x] Lazy load twig service
Commits
-------
907748d [Twig] Decouple Twig commands from the Famework
This PR was merged into the 2.5-dev branch.
Discussion
----------
[WIP] [FrameworkBundle] removed some more dependencies on the request service
| Q | A
| ------------- | ---
| Bug fix? | kinda (see linked tickets)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8915, #9185
| License | MIT
| Doc PR | n/a
/cc @kriswallsmith
Commits
-------
4f3d502 [FrameworkBundle] removed some more dependencies on the request service
This PR was merged into the 2.3 branch.
Discussion
----------
fixed some PSR-0 class names
| 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
-------
a38e2c0 fixes PSR-0 issues in tests
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem | WCM] 9339 fix stat on url for filesystem copy
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9339
| License | MIT
| Doc PR | na
supersedes https://github.com/symfony/symfony/pull/9863
Commits
-------
4fba412 adjusted behavior to always copy override on url files
When overriding the Symfony RoleHierarchy it would be great to be able to get access to the buildRoleMap-method and map-variable for more advanced usage.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Validator] Added Doctrine cache
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/9887
| License | MIT
| Doc PR |
I propose to keep the `CacheInterface` and deprecate only the `ApcCache`.
It will leave the classes depending on a `CacheInterface` unchanged and will allow to adapt new cache providers in the future.
Commits
-------
3c4de45 [Validator] Added Doctrine cache
* 2.4:
fix some cs
use restore_error_handler instead of set_error_handler($previous)
fix#9321 Crawler::addHtmlContent add gbk encoding support
[Console] fixed column width when using the Table helper with some decoration in cells
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
Fix for cache-key conflict when having a \Traversable as choices
[Security] removed obsolete comment
* 2.3:
fix some cs
use restore_error_handler instead of set_error_handler($previous)
fix#9321 Crawler::addHtmlContent add gbk encoding support
[Console] fixed column width when using the Table helper with some decoration in cells
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
Fix for cache-key conflict when having a \Traversable as choices
[Security] removed obsolete comment
Conflicts:
src/Symfony/Component/Console/Helper/TableHelper.php
src/Symfony/Component/Security/Tests/Http/Firewall/ExceptionListenerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Console] fixed column width when using the Table helper with some decoration in cells
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8152, #9366
| License | MIT
| Doc PR | n/a
This PR fixes the same issue as #9366 but works in all situations (all kind of styles, when the string is shorter than any other one or larger than any other ones, ...).
I'm not very satisfied with the fix and especially the `computeLengthWithoutDecoration` method, but the whole helper should be rethought to make it stateless (out of the scope of this PR).
Commits
-------
5b4d057 [Console] fixed column width when using the Table helper with some decoration in cells
This PR was merged into the 2.5-dev branch.
Discussion
----------
WebTestCase: Assume relative KERNEL_DIR is relative to phpunit.xml[.dist]?
When using the `KERNEL_DIR` setting in phpunit.xml[.dist] files for the `WebTestCase`, a relative path seems to be interpreted relative to the cwd.
That makes no difference in the probably most common case of having the phpunit config in the project's top level directory and just running `phpunit`. It makes a difference however when running it from a lower level dir and referencing the config with `-c ../../phpunit.xml`.
A conservative change would be to interpret the `KERNEL_DIR` as relative to cwd and only try it as relative to the phpunit.xml[.dist] file if the first path does not exist.
A more consistent approach would be to always have it (in case of relative paths) being relative to the config file. That might break things for folks who intentionally start phpunit from different directories to use different kernels.
The docs seem not to say anything about how it is supposed to used, the example values provided suggest using an absolute path.
Opinions?
Commits
-------
05dc0e1 Consider KERNEL_DIR setting as relative to the PhpUnit XML file if it does not point to a directory (relative to the current cwd)
This PR was squashed before being merged into the 2.3 branch (closes#8997).
Discussion
----------
[Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
<table>
<tr>
<td><b>Q</b></td>
<td><b>A</b></td>
</tr>
<tr>
<td>Bug fix?</td>
<td>yes</td>
</tr>
<tr>
<td>New feature</td>
<td>no</td>
</tr>
<tr>
<td>BC breaks?</td>
<td>no</td>
</tr>
<tr>
<td>Deprecations?</td>
<td>no</td>
</tr>
<tr>
<td>Tests pass?</td>
<td>yes</td>
</tr>
<tr>
<td>Fixed tickets</td>
<td>#3085, #8974</td>
</tr>
<tr>
<td>License</td>
<td>MIT</td>
</tr>
<tr>
<td>Doc PR</td>
<td>n/a</td>
</tr>
</table>
Problem occurs while user is impersonated. Authentication process generates new token and doeas not preserve role ```ROLE_PREVIOUS_ADMIN```. Ex. when parameter ```security.always_authenticate_before_granting``` is enabled.
Commits
-------
a7baa3b [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
* 2.4:
[Security] simplified some unit tests
[Security] made code easier to understand, added some missing unit tests
[DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
[DomCrawler] Fixed creating form objects from form nodes.
disabled php.ini changes when using HHVM in .travis.yml
[Process] fixed HHVM support
Add support for HHVM in the getting of the PHP executable
[Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
* 2.3:
[Security] made code easier to understand, added some missing unit tests
[DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
[DomCrawler] Fixed creating form objects from form nodes.
disabled php.ini changes when using HHVM in .travis.yml
[Process] fixed HHVM support
Add support for HHVM in the getting of the PHP executable
[Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fix ExceptionListener to catch correctly AccessDeniedException if is not first exception
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9544, #8467?, #9823
| License | MIT
| Doc PR |
Same as #9823 but with some refactoring of the code and with some unit tests.
When merging to 2.4, the unit tests can be simplified a bit.
Commits
-------
172fd63 [Security] made code easier to understand, added some missing unit tests
616b6c5 [Security] fixed error 500 instead of 403 if previous exception is provided to AccessDeniedException
This PR was merged into the 2.3 branch.
Discussion
----------
[Dependencyinjection] Fixed handling of inlined references in the AnalyzeServiceReferencesPass
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8299, #9829
| License | MIT
| Doc PR | n/a
Hopefully a better fix for #9829 (ping @jakzal). Unit tests coming soon.
In some cases `InlineServiceDefinitionsPass` replaces a Reference with a service Definition. In such scenarios `AnalyzeServiceReferencesPass` was falling into an infinite loop.
Commits
-------
d650295 [DependencyInjection] fixed InlineServiceDefinitionsPass to not inline a service if it's part of the current definition (to avoid an infinite loop)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Bridge] [DoctrineExtension] Allow cache drivers that are not an EM's child
| Q | A
| ------------- | ---
| Bug fix? | [no]
| New feature? | [yes]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes|]
| Fixed tickets | []
| License | MIT
| Doc PR | [https://github.com/doctrine/doctrine2/pull/808, https://github.com/doctrine/DoctrineBundle/pull/224]
Commits
-------
7528e4c Allow cache drivers that are not an EM's child
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed IBAN validator with 0750447346 value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
cf88ba5 [Validator] Fixed IBAN validator with 0750447346 value
This PR was squashed before being merged into the 2.3 branch (closes#9875).
Discussion
----------
Fixed typo
| 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
-------
660ab38 Fixed typo
* 2.4:
fixed CS
fixed a typo
fixed CS for lambdas
[Yaml] fixed some license headers
Fixes message value for objects
Check for hour, minute & second validity
avoid tables to have apparently long blank line breaks and be too far appart for long nested array params
fixed various typos
[Filesystem] Fixed mirror for symlinks
[Validator] Removed duplicated test for IBAN in data provider
* 2.3:
fixed a typo
fixed CS for lambdas
[Yaml] fixed some license headers
Fixes message value for objects
Check for hour, minute & second validity
fixed various typos
[Filesystem] Fixed mirror for symlinks
[Validator] Removed duplicated test for IBAN in data provider
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
src/Symfony/Component/Console/Application.php
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/Filesystem/Tests/FilesystemTest.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Finder] Fix finder date constraints and tests
Description:
When you search some files with date constraints, all folders are given, even if they are not in the date scope.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9303
| License | MIT
Commits
-------
4ccafa6 Fix finder date constraints and tests
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Form] added getter to transformer chain
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9503
| License | MIT
| Doc PR | na
Commits
-------
3565d96 added getter to transformer chain
This PR was merged into the 2.5-dev branch.
Discussion
----------
Added MutableAclProvider::deleteSecurityIdentity
This provides a very simple function to enable the deletion of a SecurityIdentity.
Developers can add a listener on the delete of a user and remove all the related ACLs.
Foreign keys already ensure that the ACEs are properly deleted.
Among the problems of not deleting the SecurityIdentity:
* Inconsistent database, referring to a non-existent user.
* If a user is deleted and another is created with the same name, it will inherit all the old user’s ACEs
Not addressed by this PR: Changing a user’s username breaks the related ACLs. See #5787
See also: https://groups.google.com/forum/#!topic/symfony2/mGTXlTWiMs8/discussion
Commits
-------
bdbbe58 [Security][Acl] Issue #5787 : Added MutableAclProvider::deleteSecurityIdentity
This PR was squashed before being merged into the 2.5-dev branch (closes#8423).
Discussion
----------
Update LocaleTest.php
de_CH locales does not fallback to de
see https://github.com/symfony/symfony/issues/5314
Commits
-------
572126b Update LocaleTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
fixed various typos
| 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
-------
2f15ac7 fixed various typos
* 2.4: (44 commits)
[FrameworkBundle] Add missing license headers
Fix parent serialization of user object
[DependencyInjection] fixed typo
added condition to avoid skipping tests on JSON_PRETTY support
add memcache, memcached, and mongodb extensions to run skipped tests
[DependencyInjection] Fixed support for backslashes in service ids.
fix#9356 [Security] Logger should manipulate the user reloaded from provider
[FrameworkBundle] Added extra details in XMLDescriptor to improve container description
fixed CS
Crawler default namespace fix
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
[HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
fix 5528 let ArrayNode::normalizeValue respect order of value array provided
fix#7243 allow 0 as arraynode name
Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes#9403).
BinaryFileResponse should also return 416 or 200 on some range-requets
fix deprecated usage and clarify constructor defaults for number formatter
Bumping dependency to ProxyManager to allow testing against the new 0.5.x branch changes
Do normalization on tag options
bumped Symfony version to 2.3.9
...
* 2.3: (31 commits)
Fix parent serialization of user object
[DependencyInjection] fixed typo
add memcache, memcached, and mongodb extensions to run skipped tests
[DependencyInjection] Fixed support for backslashes in service ids.
fix#9356 [Security] Logger should manipulate the user reloaded from provider
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
[HttpFoundation] fixed constants that do exist in 2.3 (only in 2.4)
fix 5528 let ArrayNode::normalizeValue respect order of value array provided
fix#7243 allow 0 as arraynode name
Fixed issue in BaseDateTimeTransformer when invalid timezone cause Transformation filed exception (closes#9403).
BinaryFileResponse should also return 416 or 200 on some range-requets
Do normalization on tag options
bumped Symfony version to 2.3.9
updated VERSION for 2.3.8
update CONTRIBUTORS for 2.3.8
updated CHANGELOG for 2.3.8
[Filesystem] Changed the mode for a target file in copy() to be write only.
[Console] fixed CS
fixed TableHelper when cell value has new line
Improved and fixed grammar mistakes. Added pluralized messages
...
Conflicts:
src/Symfony/Component/BrowserKit/Cookie.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Matcher/UrlMatcher.php
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] hide output of ProgressHelper when isDecorated is false
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9511
| License | MIT
| Doc PR | n/a
Commits
-------
006cb81 [Console] show no output in ProgressHelper when isDecorated is false (fixes#9511)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Security][Acl] Add MutableAclProvider::updateUserSecurityIdentity
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5787
| License | MIT
| Doc PR | symfony/symfony-docs#3319
This provides a very simple function to enable the update of a User's username while keeping its associated ACEs (by updating its corresponding UserSecurityIdentity)
Developers can add a listener on the preUpdate of a user and remove all the related ACLs:
```php
if ($args->hasChangedField('username')) {
$aclProvider = $this->container->get('security.acl.provider');
$oldUsername = $args->getOldValue ('username');
$user = $args->getEntity();
$aclProvider->updateUserSecurityIdentity(UserSecurityIdentity::fromAccount($user) , $oldUsername);
}
```
Among the problems of not updating the UserSecurityIdentity:
- Inconsistent database, referring to a non-existent user.
- The user loses all its associated permissions
- If another user is created with the old username, it will inherit all the first user’s ACEs
This PR intends to fix Issue #5787 and is similar to and inspired from PR #8305.
This will also be heavily impacted by the outcome of #8848
Commits
-------
da53d92 [Security][Acl] Fix#5787 : Add MutableAclProvider::updateUserSecurityIdentity
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Fixed support for backslashes in service ids.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9801
| License | MIT
| Doc PR |
This change is needed for consistency with `camelize()` which is used in [`ProxyDumper`](https://github.com/symfony/symfony/blob/2.3/src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php#L69) and [`PhpDumper`](https://github.com/symfony/DependencyInjection/blob/2.3/Dumper/PhpDumper.php#L1275).
Either this PR needs to be merged for consistency or #9610 rolled back (if we don't want to support backslashes in service ids).
Anyone could tell me why we're not using the `camelize()` method internally in the `Container`?
Commits
-------
c6f210b [DependencyInjection] Fixed support for backslashes in service ids.
This PR was merged into the 2.4 branch.
Discussion
----------
[Form] Improved debugger icon
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Changes the form icon in the toolbar to be pixel perfect.
| before | after |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| ![before](https://f.cloud.github.com/assets/890645/1558707/8c4e2d42-4fa4-11e3-9397-376f761869a2.png) | ![after](https://f.cloud.github.com/assets/890645/1558708/90257844-4fa4-11e3-8a83-73d163d47261.png) |
Commits
-------
74e59fe Changes the form icon in the toolbar to be pixel perfect.
This PR was merged into the 2.5-dev branch.
Discussion
----------
[EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've been recently in the position to use the DependencyInjection Component and the EventDispatcher together but not HttpKernel. To make it easier to use these two together I propose moving RegisterListenersPass to the EventDispatcher component where the ContainerAwareEventDispatcher already resides.
Commits
-------
89b8e0a [EventDispatcher][HttpKernel] Move RegisterListenersPass from HttpKernel to EventDispatcher.
This PR was squashed before being merged into the 2.5-dev branch (closes#9668).
Discussion
----------
[DepdencyInjection] forgot to add definition of dumped container member variable parameters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5408
| License | MIT
| Doc PR | n/a
this fixes the allowing of access to parameters property of the dumped container
Commits
-------
5b02d3f [DepdencyInjection] forgot to add definition of dumped container member variable parameters
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpKernel] Remove FrameworkBundle dependency in BundleTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
`HttpKernel` tests fatal due to missing dependency `AddConsoleCommandPass`.
Also removed unused import.
Commits
-------
20a064f [HttpKernel] Remove FrameworkBundle dependency in BundleTest
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Console] Added a way to set the process title
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
* I did not write test, because I want to RFC the idea before
* Do we want the process update its name when a sub command is executed by a master command ?
Commits
-------
204a25e [Console] Added a way to set the process title
This PR was squashed before being merged into the 2.4 branch (closes#9771).
Discussion
----------
Crawler default namespace fix
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9732, #6650
| License | MIT
| Doc PR | symfony/symfony-docs/pull/2979
Fix backwards compatibility of xml namespaces for having only one default namespace.
Commits
-------
cfff054 Crawler default namespace fix
This PR was squashed before being merged into the 2.5-dev branch (closes#9773).
Discussion
----------
[Form] Added delete_empty option to allow proper emptyData handling of collections
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes/no?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9375
| License | MIT
| Doc PR | symfony/symfony-docs#3338
This PR adresses the issue that if you have a form collection with the option required => false and you submit an empty collection so you will get a ArrayCollection that contains en element with the value null.
This behaviour was introduced with the following changes from symfony/symfony#3257
In addition to the above mentioned ticket there is also a description about the same issue here: http://stackoverflow.com/questions/19474872/symfony2-form-collection-allow-add-and-allow-delete-null-error-silex
With the changes of this PR the new option empty_data is introduced. With this option you will be able to ignore/delete such empty collections, so they will neither be validated nor appear as empty field in the result.
The option will remove/ignore such empty collections if you add them newly and if allow_add is enabled and
removes such empty collections only if allow_delete is enabled.
With setting required and empty_data accordingly it will be now flexible to customize to the outcome you want to achieve.
Thanks to @bschussek for the great work together - We have to discuss how to name this option so if delete
or ignore is the appropriate name.
Commits
-------
8bdb7a0 [Form] Added delete_empty option to allow proper emptyData handling of collections
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Security] [Acl] [MaskBuilder] Refactor common code and reduce nesting
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Refactored some common code and moved a comparison to an earlier statement.
Commits
-------
7d85809 Refactor common code and reduce nesting
This PR was squashed before being merged into the 2.3 branch (closes#9769).
Discussion
----------
[BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8311
| License | MIT
| Doc PR |
Commits
-------
3132b04 [BrowserKit] fixes#8311 CookieJar is totally ignorant of RFC 6265 edge cases
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Remove usage of deprecated _scheme requirement
**This is exact the same commit as it was in #9585, which was not merged due to my fault. Sorry for the noise.**
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8898, #8176
| License | MIT
| Doc PR |
I removed all usages of the deprecated _scheme requirement inside the Routing Component.
Most parts were pretty easy and after multiple refactorings I came up with the solution to have a Route::hasScheme() method and check against this method.
I also checked for performance and after trying in_array, arra_flip+isset and foreach, the last one was clearly the winner.
https://gist.github.com/Danez/7609898#file-test_performance-php
I also adjusted all tests that test '_scheme' to also check the new schemes-requirement.
Commits
-------
557dfaa Remove usage of deprecated _scheme in Routing Component
This PR was merged into the 2.3 branch.
Discussion
----------
[Filesystem] Changed the mode for a target file in copy() to be write only
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9789
| License | MIT
| Doc PR | -
Stream wrappers like S3 [do not support w+](http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.StreamWrapper.html) and we don't read here anyway (as pointed out in #9789).
Commits
-------
10e43b7 [Filesystem] Changed the mode for a target file in copy() to be write only.
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fix router matching pattern against multiple hosts
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8811, #6744
| License | MIT
| Doc PR |
When you had a pattern that matched on multiple host then only the first one was displayed as "almost matching". Fixed router matching against the same pattern on multiple hosts so now it shows every "almost match" on different hosts.
Commits
-------
f727b22 [Routing] Fix router matching pattern against multiple hosts
This PR was squashed before being merged into the 2.4 branch (closes#9768).
Discussion
----------
[FrameworkBundle] Fixed bug in XMLDescriptor
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Fixed bug in container:debug command where parameter value doesn't get printed.
Commits
-------
34d0b1d [FrameworkBundle] Fixed bug in XMLDescriptor
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Removed unnecessary condition (looks like it's been copy/pasted from
line 84).
Instead correctly use the array of schemes from the Route.
Also adjusted the dumpers to dump the correct data.
I extended the tests to not only test the deprecated behavior, but also
the new schemes-requirement.
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator]Fixed getting wrong msg when value is an object in Exception
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
cdb5ae0 [Validator]Fixed getting wrong msg when value is an object in UnexpectedTypeException
This PR was merged into the 2.3 branch.
Discussion
----------
allow TraceableEventDispatcher to reuse event instance in nested events
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9710, #9727
| License | MIT
Commits
-------
454ce16 allow TraceableEventDispatcher to reuse event instance in nested events
* 2.4:
[Debug] fixed tests
ErrorHandlerTest: restore_error_handler() on assertion failure
Fixed typo
[validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
Reset the box model to content-box in the web debug toolbar
[FrameworkBundle] Allowed "0" as a checkbox value in the php template.
raising delta on stopwatch as travis really breaks with less than 35
Switched to correct gender of "Token"
bumped Symfony version to 2.4.1
updated VERSION for 2.4.0
updated CHANGELOG for 2.4.0
fixed typos in several translations
[HttpKernel] use static late binding when dumping out container
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.3:
Fixed typo
[validator] throw an exception if isn't an instance of ConstraintValidatorInterface.
Reset the box model to content-box in the web debug toolbar
[FrameworkBundle] Allowed "0" as a checkbox value in the php template.
raising delta on stopwatch as travis really breaks with less than 35
Switched to correct gender of "Token"
fixed typos in several translations
[HttpKernel] use static late binding when dumping out container
This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes#9678).
Discussion
----------
[HttpKernel] use static late binding when dumping out container
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9649
| License | MIT
| Doc PR |
This PR gives the ability to override the stripComments method in descendants (and to disable the memory-eater container whitespace stripping)
Commits
-------
2e241cc [HttpKernel] use static late binding when dumping out container
The neutral gender "das Token" is used in science to describe an array of bits or chars, where as the masculin "der Token" is commenly used for keys in communications and authentication in the network.
I guess the a CSRF-Token is more a key for authentication then a bit array.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] fix typos in several translations
| Q | A
| ------------- | ---
| Fixed tickets | --
| License | MIT
Similar to #9681, but for 2.3, with one additional change.
Commits
-------
8209a7f fixed typos in several translations
* 2.4:
updated Composer suggested packages
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
Fixed typo in phpdoc
Default form.csrf_protection.enabled to csrf_protection.enabled
Handled the scenario when no entity manager is passed with closure query builder.
Enabled csrf_protection by default if form.csrf_protection is enabled
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
[Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
* 2.3:
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
Fixed typo in phpdoc
Handled the scenario when no entity manager is passed with closure query builder.
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
[Debug] ensured that a fatal PHP error is actually fatal after being handled by our error handler
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
* 2.2:
updated VERSION for 2.2.11
update CONTRIBUTORS for 2.2.11
updated CHANGELOG for 2.2.11
[HttpKernel] made a small optimization to Bundle initialization
minor optimalization at bundle initialization
[EventDispatcher] tweaked README
removed observer pattern, in favour of mediator
[DoctrineBridge] normalized class names in the ORM type guesser
Fix `extract` method to avoid recalculating count() for each iteration.
use the correct class name to retrieve mapped class' metadata and repository
[WebProfilerBundle] Fixed js escaping in time.html.twig
Conflicts:
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.4 branch.
Discussion
----------
Fixed BC break in csrf protection
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9429
| License | MIT
| Doc PR | n/a
Commits
-------
d00954a Default form.csrf_protection.enabled to csrf_protection.enabled
This PR was merged into the 2.2 branch.
Discussion
----------
Removed observer pattern, in favour of mediator
| Q | A
| ------------- | ---
| Doc fix? | yes
| New docs? | no
| Applies to | *
| Fixed tickets | #9344
I don't think this is the best tool to implement the observer pattern.
I just have copied the sentence from:
https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst
but maybe could be improved with something like:
"Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern"
[edit-1]
I think this could be modified also here:
https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig
Commits
-------
ab3e231 [EventDispatcher] tweaked README
b9ad62e removed observer pattern, in favour of mediator
This PR was merged into the 2.2 branch.
Discussion
----------
[DoctrineBridge] normalized class names in the ORM type guesser
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5837
| License | MIT
| Doc PR | n/a
Commits
-------
a1b9c2e [DoctrineBridge] normalized class names in the ORM type guesser
This PR was merged into the 2.2 branch.
Discussion
----------
use the correct class name to retrieve mapped class' metadata and reposi...
...tory
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9646
| License | MIT
| Doc PR |
The validation context isn't necessarily the entity being validated. In case that you added the Unique Entity constraint inside your custom type via the ``constraints`` option the validation context will be the ``Form`` class itself. Thus, not the validation context should be used to get the class metadata and the repository of the validated entity, but the entity itself should be used.
Commits
-------
cd4df11 use the correct class name to retrieve mapped class' metadata and repository
Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.
Since this count will never change during the method execution, this change make the code a bit more efficient.
* 2.4:
[Debug] fixed unit tests
Avoid notice from being *eaten* by fatal error.
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
fixed lexing expression ending with spaces
Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
[Validator] Replaced inexistent interface.
[HttpKernel] Fix profiler event-listener usage outside request stack context
When getting the session's id, check if the session is not closed
Fix undefined offset when formatting namespace suggestions
Adjusting CacheClear Warmup method to namespaced kernels
* 2.3:
[Debug] fixed unit tests
Avoid notice from being *eaten* by fatal error.
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
Fixes#9633, Removed dependency to Symfony\Bundle\FrameworkBundle\Tests\TestCase
[Validator] Replaced inexistent interface.
When getting the session's id, check if the session is not closed
Adjusting CacheClear Warmup method to namespaced kernels
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
* 2.2:
Teardown used wrong property
Modified guessDefaultEscapingStrategy to not escape txt templates
Fix DateType for 32bits computers.
Fixed the registration of validation.xml file when the form is disabled
When getting the session's id, check if the session is not closed
This introduced a regression from #9246, with an incomplete fix ;
As the `started` flag on the NativeSessionStorage was not `true`
anymore when saving the session, the session id was always empty
when saving it, and thus when sending the `PHPSESSID` cookie
This PR was merged into the 2.3 branch.
Discussion
----------
Adjusting CacheClear Warmup method to namespaced kernels
Backported the patch in #9525 to the 2.3 branch.
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | have not tried yet
| License | MIT
| Fixed tickets | further fixes#1431
My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.
When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.
However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.
1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)
The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.
What are your thoughts on this? If this sounds reasonable i'll do further enhancements and check tests.
Commits
-------
00d79d5 Adjusting CacheClear Warmup method to namespaced kernels
* 2.4:
[HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object.
Fixed mistake in upgrade docu
bumped Symfony version to 2.4.0
updated VERSION for 2.4.0-RC1
updated CHANGELOG for 2.4.0-RC1
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it.
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
* 2.3:
Fixed mistake in upgrade docu
Container::camelize also takes backslashes into consideration
fixed typos
fixed @expectedException class names
fixed some typos
fixed @expectedException class names
Typo and better wording for german validator translation
This PR was squashed before being merged into the master branch (closes#9597).
Discussion
----------
[Security] Typos in Security's ExpressionLanguage
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9593
| License | MIT
| Doc PR | none
Fixed the ExpressionLanguage and added the tests. It looks ok to me, but please, take a close look (some people will depend on this working right, including me :D ).
Thanks !
Commits
-------
087403b [Security] Typos in Security's ExpressionLanguage
* 2.3: (24 commits)
Add german translation for several validators (Greater/Equal/Less)
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Removed useless check if self::$trustProxies is set
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
[Intl] fixed datetime test as described in #9455
bumped Symfony version to 2.3.8
updated VERSION for 2.3.7
updated CHANGELOG for 2.3.7
re-factor Propel1 ModelChoiceList
[Form] Added method Form::getClickedButton() to remove memory leak in FormValidator
[Locale] fixed the failing test described in #9455
...
Conflicts:
src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php
src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php
src/Symfony/Bridge/Propel1/Tests/Propel1TestCase.php
src/Symfony/Component/Form/Tests/CompoundFormTest.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Process/Process.php
* 2.2:
No Entity Manager defined exception
fixed CS
[Acl] Fix for issue #9433
[Validator] fix docblock typos
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
Fix mistake in translation's service definition.
if handler_id is identical to null fix
CS fix
Fixed ModelChoiceList tests in Propel1 bridge.
[AclProvider] Fix incorrect behaviour when partial results returned from cache
Check if the pipe array is empty before calling stream_select()
re-factor Propel1 ModelChoiceList
[Locale] fixed the failing test described in #9455
[Process] fix phpdoc and timeout of 0
bug #9445 [BrowserKit] fixed protocol-relative url redirection
Conflicts:
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php
This PR was merged into the master branch.
Discussion
----------
[SecurityBundle] Added csrf_token_generator and csrf_token_id as new
names for csrf_provider and intention options
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #9176
| License | MIT
| Doc PR | n/a
Commits
-------
f2f15f5 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new names for csrf_provider and intention options
This PR was merged into the master branch.
Discussion
----------
[Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9104
| License | MIT
| Doc PR | -
It might happen that `require_once` will include a file second time (for example with links or case-changed paths). Therefore we need to check if a class exists before requiring the file.
I also removed an unused argument from two methods (`$loader`).
Commits
-------
0baae4c [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error.
This PR was merged into the master branch.
Discussion
----------
Cache Warmup Breaks Namespaced Kernel
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | have not tried yet
| License | MIT
| Fixed tickets | further fixes#1431
My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.
When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.
However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.
1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)
The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.
What are your thoughts on this? If this sounds reasonable i'll do further enhancements and check tests.
Commits
-------
9e7788e Cache Warmup Breaks Namespaced Kernel
It might happen that require_once will include a file second time (for
example with links or case-changed paths). Therefore we need to check
if a class exists before requiring the file.
This PR was merged into the 2.2 branch.
Discussion
----------
[BrowserKit] fixed protocol-relative url redirection
Fixed redirects to protocol relative URLs, e.g. //www.example.org. Previously the code would treat this as a relative URL.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9445
| License | MIT
| Doc PR |
Commits
-------
e8b5c84 bug #9445 [BrowserKit] fixed protocol-relative url redirection
This PR was merged into the master branch.
Discussion
----------
unify constructor initialization style throughout symfony
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
In almost all classes symfony uses property initialization when the value is static. Constructor initialization is only used for things that actually have logic, like passed parameters or dynamic values. IMHO it makes the code much more readable because property definition, phpdoc and default value is in one place. Also one can easily see what the constructor implements for logic like overridden default value of a parent class. Otherwise the real deal is just hidden behind 10 property initializations. One more advantage is that it requires less code. As you can see, the code was almost cut in half (210 additions and 395 deletions).
I unified it accordingly across symfony. Sometimes it was [not even consistent within one class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Definition/BaseNode.php#L32). At the same time I recognized some errors like missing parent constructor call, or undefined properties or private properties that are not even used.
I then realized that a few Kernel tests were not passing because they were deeply implementation specific like modifying booted flag with a custom `KernelForTest->setIsBooted();`. I improved and refactored the kernel tests in the __second commit__.
__Third commit__ unifies short ternary operator, e.g. `$foo ?: new Foo()`. __Forth commit__ unifies missing parentheses, e.g. `new Foo()`.
Commits
-------
077a089 unify missing parentheses
2888594 unify short ternary operator
2a9daff [HttpKernel] better written kernel tests
111ac18 unify constructor initialization style throughout symfony
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] fixed the issue described in #9480
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9480
| License | MIT
| Doc PR | -
Commits
-------
7d35ce3 [HttpFoundation] fixed the issue described in #9480
This PR was squashed before being merged into the 2.2 branch (closes#9485).
Discussion
----------
[Acl] Fix for issue #9433
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9433
| License | MIT
| Doc PR |
Two new test for issue #9433 :
`testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()`
`testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()`
The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database.
All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database.
Commits
-------
a38fab9 [Acl] Fix for issue #9433
This PR was merged into the 2.2 branch.
Discussion
----------
[Process] fix phpdoc and timeout of 0
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
getTimeout says it returns null when it's disabled. But passing 0 or 0.0 also disabled timeouts. So it should be treated as null as well. also it says it returns integer whereas it returns float.
Commits
-------
1758010 [Process] fix phpdoc and timeout of 0
This PR was merged into the 2.2 branch.
Discussion
----------
[AclProvider] Fix incorrect behavior when partial results returned from cache
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9515
| License | MIT
| Doc PR | none
[AclProvider] Fix incorrect behavior when partial results returned from cache
findAcls wasn't throwing the NotAllAclsFoundException with the partial result when some acls were retrieved from the cache. This will fix that behavior. Ideally we would update it to cache items that were not found so it wouldn't have to query the db every time for non existent items, but I'm not sure if that is possible.
I'm not sure if the ACL cache is being used very much, I didn't find any docs about it but it seems to work except for this issue. It might be more appropriate to merge the fix in master if no one is relying on it to work in 2.2.
Commits
-------
edae59c [AclProvider] Fix incorrect behaviour when partial results returned from cache
This PR was merged into the 2.2 branch.
Discussion
----------
[DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
7730d8d [DependencyInjection] removed the unused Reference and Parameter classes use statements from the compiled container class
This PR was merged into the master branch.
Discussion
----------
unify and fix callable phpdoc throughout symfony
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
I unified the phpdoc to use "callable" as type. It wasn't done consistently. It varied between mixed, callback, callable.
I think callable is best because php 5.4 even has a typehint callable.
Commits
-------
6d5ddce unify and fix callable phpdoc throughout symfony
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] use the new request_stack service in the GlobalVariables object
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
9c2ce49 [FrameworkBundle] use the new request_stack object in the GlobalVariables object
This PR was merged into the master branch.
Discussion
----------
[Console] Revert BC-break for verbose option value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9285
| License | MIT
| Doc PR | ~
Closes#9285
----
PR #8835 "fixed" the input value for verbosity option with `VALUE_OPTIONAL`. And syntax like
```
cli.php -v command
cli.php --verbose command
```
Is broken now, because `ArgvInput` tries to use argument as verbose value (#9285).
For now i added a test for this case and revert this changes.
Commits
-------
432bbe1 [Console] Revert a28eb8 because of BC break
5e03e9a [Console] Add test for --verbose before argument
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
2e07338 [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class
This PR was merged into the master branch.
Discussion
----------
[Translation] make IdentityTranslater consistent with normal translator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
The MessageSelector should not be required in the constructor of the IdentityTranslator because it's also optional for the [Translator](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Translator.php#L64).
I also fixed the TranslatorInterface phpdoc and the IdentityTranslator params similar to 90a20d7835
Commits
-------
7cdb260 [Translation] make IdentityTranslater consistent with normal translator
This PR was squashed before being merged into the master branch (closes#9540).
Discussion
----------
[Security] Added a missing field in SimpleAuthenticationHandler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Added tests and made a small CS fix as a bonus.
Btw, the properties are protected. Do we really want to provide extension points here?
Commits
-------
d553347 [Security] Added a missing field in SimpleAuthenticationHandler
This PR was squashed before being merged into the master branch (closes#9536).
Discussion
----------
[FrameworkBundle] Update 2 dependencies (currently broken)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
## Dependency on http-foundation
In b1a062d232 the `RequestStack` was moved to `http-foundation`, because of this the `framework-bundle` now also depends on `http-foundation`: b1a062d232 (diff-3) (at least in services.xml).
We got an error while installing the framework-bundle `2.4.*` with `prefer-stable` in our composer.json. We currently get framework-bundle 2.4 with http-kernel and http-foundation 2.3. An alternative fix would be raising the requirement of http-kernel to 2.4, but I think this is the "purest" declaration of dependencies.
Update 1
## Dependency on config
In 05e9ca7509 the config component was updated with an xml reference dumper for configuration. In the same commit the frameworkbundle dump command is updated to make use of the 2 newly introduced classes. It is currently possible to get an installation with config `2.3`, which in turn leads to an exception when running the dump-reference command:
```
$ app/console config:dump-reference framework
# Default configuration for extension with alias: "framework"
PHP Fatal error: Class 'Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper
```
Update 2
## Dependency on http-kernel
We just found out that the dependency on http-kernel should also be updated to `2.4`. That's because the framework-bundle injects the `RequestStack` now and doesn't set the request on the `RouterListener` service anymore. Without updating the dependency it is possible to get a `RouterListener` that is not aware of the request stack (< 2.4) and none of your routes will work.
*tests are failing because of some race condition I guess?*
Commits
-------
fe5d8f8 [FrameworkBundle] Update 2 dependencies (currently broken)
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] make currency bundle merge fallback locales when accessing data, ...
...allowing use of country-specific locales
Fixes#9262.
Commits
-------
edc287b [Intl] make currency bundle merge fallback locales when accessing data, allowing use of country-specific locales
This PR was merged into the 2.2 branch.
Discussion
----------
CS fix
I hope this is not BC break though handler_id checking should be done with identical comparison operator I believe.
Commits
-------
1b6b1e9 if handler_id is identical to null fix
In Request::getClientIps() on line 772 there is a check if self::$trustedProxies is not set. If this condition evaluates to true the method will return.
Because of this the second identical check on line 783 will never evaluate to true, as when reaching this position self::$trustedProxies must be set.
This PR was merged into the master branch.
Discussion
----------
Add missing dependency to expression-language
Add missing dependency, without this dependency, PHPUnit can't run successfully.
Commits
-------
4206e98 Add missing dependency to expression-language
My kernel has been moved and namespaced to `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKernel`. This worked fine until a change was made to how the kernel temp stuff is handled in the warmup phase.
When the app generates its own cache (i.e you run cache without warmup and access the site) everything is generated ok and the .meta files generate the proper reference to the FQN of the Kernel.
However if the warmup is used, it uses `Cfs\Bundle\MultiSiteBundle\Kernel\CfsKerne_` as the temporary Kernel, and when it does "fix references to the Kernel in .meta files" it generates 2 errors.
1. It does not use a string safe tempKernel name, so it never finds the reference to the kernel
2. If you fix that, then it replaces the FQN of the tempKernel with `CfsKernel`, the non-namespaced name of the proper Kernel (it also leaves the character count wrong in the serialization `C:43:<class>` where 43 is the char count for the FQN above)
The two changes above fix this, by escaping the string and replacing it with a FQN Kernel Class name.
What are your thoughts on this?
This PR was merged into the 2.2 branch.
Discussion
----------
[Locale] fixed the failing test described in #9455
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9455
| License | MIT
| Doc PR | -
Commits
-------
3f91039 [Locale] fixed the failing test described in #9455
* 2.3: (25 commits)
bumped Symfony version to 2.2.11
updated VERSION for 2.2.10
update CONTRIBUTORS for 2.2.10
updated CHANGELOG for 2.2.10
fixed version
Request::overrideGlobals() may call invalid ini value
Force Luhn Validator to only work with strings
Fixed bug with lazy services
[Translation] fixed the error in the dumper test as described in #9475
deleted mixing string concatenation inside a sprintf
"__call()" should be displayed only if $this->magicCall is true
[Console] fix phpdoc and constructor default value
Add media-query for printing: Do not print the toolbar.
Fix ProgressHelper redraw when redrawFreq is greater than 1
Update toolbar.css.twig
slovenian translations fixed
slovenian translations fixed
[DependencyInjection] fixed YamlDumper did not make services private.
[FrameworkBundle] fix routing container parameter exception message
[Form] fix and unify phpdoc
...
Conflicts:
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
bumped Symfony version to 2.2.11
updated VERSION for 2.2.10
update CONTRIBUTORS for 2.2.10
updated CHANGELOG for 2.2.10
fixed version
Request::overrideGlobals() may call invalid ini value
Force Luhn Validator to only work with strings
[Translation] fixed the error in the dumper test as described in #9475
[Console] fix phpdoc and constructor default value
Conflicts:
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/HttpKernel/Kernel.php
According to http://php.net/manual/ja/ini.core.php ,
there's not variable_order, but variables_order (with trailing "s").
Perhaps it breaks BC for some developer who unsets
'request_order' ini value and sets 'variable_order' manually?
This PR was merged into the 2.3 branch.
Discussion
----------
[Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When using a ProgressHelper object with redrawFreq > 1, there are situation where redraw may never occur.
E.g.
redrawFreq = 2
setContent = 1
advance(2) ... the redraw event is detected by 0 == current % redrawFreq.
I've tested the patch against phpunit and my local environment.
Maybe, a new test can be implemented to avoid the previous example, but I'm not familiar with mock object... :)
Commits
-------
5eca1fb Fix ProgressHelper redraw when redrawFreq is greater than 1
The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting).
This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.
This PR was merged into the master branch.
Discussion
----------
adjust doctrine dependencies
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9384, #9385
| License | MIT
| Doc PR | -
I went through all components/bundles/bridges in symfony and searched for doctrine dependencies. Then looked if it only requires a subset (annotations instead of common for example).
Commits
-------
7366901 adjust doctrine dependencies
This PR was merged into the master branch.
Discussion
----------
[Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I renamed `flushOutput()` and `flushErrorOutput()` to `clearOutput()` and `clearErrorOutput()` since I find the current naming unintuitive. When reading [the blog post about this feature](http://symfony.com/blog/new-in-symfony-2-4-flushing-stdout-and-stderr-on-a-process) I initially thought that the output would be flushed to the console (as in `ob_flush()`).
Using "clear" on the other hand conforms well with [our conventions](http://symfony.com/doc/current/contributing/code/conventions.html).
Commits
-------
1811367 [Process] Renamed flushOutput() and flushErrorOutput() to clearOutput() and clearErrorOutput()
This PR was merged into the master branch.
Discussion
----------
set mergeFallback to true,
If your default locale is de_CH for example, then you get an incomplete list of locales. This issue has been resolved in the LanguageBundle and RegionBundle but not in for the LocaleBundle. Would be also a good idea for the CurrencyBundle
Commits
-------
4587d4e set mergeFallback to true, otherwise an uncomplete list is shown with default locale is for example de_CH
This PR was merged into the 2.3 branch.
Discussion
----------
[WebProfilerBundle] Small bugfix in CSS: don't make links bold.
If the CSS in your application has something like `a { font-weight: bold; }` to make links bold by default, they will also show up **bold** in the profilers toolbar, which doesn't look right. This patch explicitly sets the font-weight to 'normal', as it should be.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
984566d Add media-query for printing: Do not print the toolbar.
cf1b7cf Update toolbar.css.twig
b6738b6 Set the font-weight for links to 'normal', to prevent ugly bold links.
This PR was merged into the master branch.
Discussion
----------
Fix bug with variable named context to securityContext
Commits
-------
38433d7 Fix bug with variable named context to securityContext in SimplePreAuthenticationListener->handle function
This PR was merged into the 2.3 branch.
Discussion
----------
Slovenian translations fixed for Symfony 2.3
Commits
-------
1ec42ec slovenian translations fixed
* 2.2:
slovenian translations fixed
[DependencyInjection] fixed YamlDumper did not make services private.
[FrameworkBundle] fix routing container parameter exception message
update CONTRIBUTORS
added content length header to BinaryFileResponse
[Routing] added working test case for issue #5135
This PR was merged into the master branch.
Discussion
----------
[Config] Quoting reserved characters
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a5c0123 Use Inline class to quote reserved characters
This PR was merged into the master branch.
Discussion
----------
[Console] make parent constructor test more reliable
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixes | #9186 , f2b60e9
| Tests pass? | yes
| license? | MIT
It also fixes the test since f2b60e9 and improves phpdoc
The second commit improves regex performance to validate name (using possesive quantifier).
I did some basic performance tests http://3v4l.org/PuvuL
The new regex only takes 1/3 of the time compared to the old one!
Commits
-------
5798029 [Console] improve regex performance to validate name
22b09ce [Console] make parent constructor test more reliable
This PR was merged into the 2.3 branch.
Discussion
----------
fixed issue with clone now the children of the original form are preserved and the clone form is given new children
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 9414
| License | MIT
| Doc PR |
this commit fixes#9414
Commits
-------
b952bcb fixed issue with clone now the children of the original form are preserved and the clone form is given new children
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fix and unify phpdoc
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| license? | MIT
- Fixes FormTypeGuesserInterface that must return ValueGuess for guessRequired etc. instead of abstract Guess because its excepted for example by FormFactory.
- Unify array typehints that was not done consistently.
Commits
-------
7a754c3 [Form] fix and unify phpdoc
This PR was merged into the 2.2 branch.
Discussion
----------
[FrameworkBundle] add test for #5135 and simplify routing container parameter resolution
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixes | #5135
| Tests pass? | yes
| license? | MIT
1. [FrameworkBundle] added working test case for issue #5135
2. [FrameworkBundle] fix routing container parameter exception message which did not really make sense and improve regex performance
Commits
-------
719e037 [FrameworkBundle] fix routing container parameter exception message
8513ac9 [Routing] added working test case for issue #5135
This PR was merged into the master branch.
Discussion
----------
Add X-Debug-Url profiler url header
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | None
Hey, working with rest APIs I find it way more convenient to have the profiler url directly in the header ... We human are used to deal with hypermedia!
A little bit of hateoas in symfony :)
Commits
-------
2f09754 Add X-Debug-Url profiler url header
* 2.3:
fixed CS
fixed CS
[HttpKernel] fixed memory limit display in MemoryDataCollector
Fixed the error handling when decoding invalid XML to avoid a Warning
[Form] Fixed: The "data" option is taken into account even if it is NULL
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
* 2.2:
fixed CS
Fixed the error handling when decoding invalid XML to avoid a Warning
[Form] Fixed: The "data" option is taken into account even if it is NULL
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
Conflicts:
src/Symfony/Component/Form/Extension/Core/Type/FormType.php
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] Update deprecation message
Small addition to (doc string only):
https://github.com/symfony/symfony/pull/9252
Commits
-------
b057fab [FrameworkBundle] Update deprecation message
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6686, #7673
| License | MIT
| Doc PR | n/a
The removal of the Profiler dependency on the TraceableEventDispatcher (#9170) allows to remerge the patch from #9068 that fixes#6686.
This PR also cleans up how profiles are stored. A Profile is now always stored only once.
The fix will only be available on 2.4+ as the changes are too deep to be backported to 2.2 and 2.3.
Commits
-------
1e1835e [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
This PR was merged into the 2.2 branch.
Discussion
----------
[Form] Fixed: The "data" option is taken into account even if it is NULL
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
c1a3eb3 [Form] Fixed: The "data" option is taken into account even if it is NULL
This PR was merged into the master branch.
Discussion
----------
prevent PHP from magically setting a 302 header
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (for people relying on getting a magic 302 when setting a Location header)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
this needs a test case .. but first let me know if you are ok with this change.
see http://www.php.net/manual/en/function.header.php
Commits
-------
c140d4f prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php
This PR was squashed before being merged into the master branch (closes#9252).
Discussion
----------
[FrameworkBundle] Only enable CSRF protection when enabled in config
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | maybe?
| Deprecations? | no
| Tests pass? | I hope, master was already broken here
| License | MIT
bf85e8365a introduced new service configuration for CSRF protection in the frameworkbundle. It is always enabled even if you don't use it. Since it also depends on enabling the session that's not so nice.
Commits
-------
60dce14 [FrameworkBundle] Only enable CSRF protection when enabled in config
This PR was merged into the 2.2 branch.
Discussion
----------
[DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
According to [section 3.7 of RFC 2616][], media-type attribute names in the `Content-Type` header are case-insensitive.
Therefore, identification of the `text` type and the `charset` parameter in the `Content-Type` header should be case-insensitive.
[section 3.7 of RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
Commits
-------
17a2d66 [DomCrawler] [HttpFoundation] Make `Content-Type` attributes identification case-insensitive
* 2.3:
Fixed English usage for existing users.
Clean up of WebProfiler Controller classes:
[Process] Fix#9343 : revert file handle usage on Windows platform
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Process] Fix#9343 : revert file handle usage on Windows platform
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9343
| License | MIT
Hello,
I propose to revert the use of file handles only for `STDOUT` on Windows platform (see implementation in 2.2.6 [here](4059720232/src/Symfony/Component/Process/Process.php (L231-L242))).
When I decoupled pipes management from `Process` in #8924, I used file handles for both `STDOUT` and `STDERR`. This was an error as it introduced random failure in reading the handles (reported as [PHP#65650](https://bugs.php.net/bug.php?id=65650)).
Reverting to the previous implementation solves the issue. My apologies for the issues it introduced.
Versions that have been affected by the bug are 2.2.7, 2.2.8, 2.2.9, 2.3.4, 2.3.5 and 2.3.6.
Side note : I thought about testing the file handles implementation on *nix, but it fails most of the time where as Windows is okay. Unit testing on windows is okay (AbstractProcessTest::testProcessPipes tests it), but I don't provide a travis compatible test.
Commits
-------
e9dd408 [Process] Fix#9343 : revert file handle usage on Windows platform
Added missing "@throws" PHPdoc comments in controllers
Updated deprecated reference to Symfony\Component\HttpKernel\Debug\ExceptionHandler to use Symfony\Component\Debug\ExceptionHandler instead
* 2.3:
[DoctrineBridge] Added type check to prevent calling clear() on arrays
[Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
Fix docblock typo
This PR was merged into the master branch.
Discussion
----------
[2.4][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
#9333 merged into master.
Commits
-------
9a8ec64 Merge branch 'fix-csrf-default-2.3' into fix-csrf-default-2.4
baa2356 [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
408769e bug #9328 [2.3][Form] Changed FormTypeCsrfExtension to use the form's name as default intention (bschussek)
* 2.2:
[DoctrineBridge] Added type check to prevent calling clear() on arrays
[Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
Fix docblock typo
Conflicts:
src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
ping @stof
follow-up PR to #9327
Commits
-------
219e44d [Intl] Improved FormTypeCsrfExtension to use the type class as default intention if the form name is empty
* 2.3:
Improve documentation of X-Forwarded-For header handling
[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
Removed unused use statements.
Make usleep longer and simplify assertions
Added japanese translation resource for security component.
Replaced the @inheritdoc with an actual list of params since the original method has a different signature.
fix typo : StdClass should be stdClass with little "s"
Remove unnecessary continue from Request
[Yaml] Fixed the escaping of strings starting with a dash when dumping
Fix in ChainLoader.php
fixed wrong started states
* 2.2:
[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
Removed unused use statements.
Make usleep longer and simplify assertions
Added japanese translation resource for security component.
[Yaml] Fixed the escaping of strings starting with a dash when dumping
Fix in ChainLoader.php
fixed wrong started states
This PR was merged into the master branch.
Discussion
----------
[Console] make InputArgument::setDefault() chainable
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
To allow chaining of methods, setDefault should return the InputArgument. I'm not quite sure if you would tread this as a BC break?
best regards
Philipp
Commits
-------
7b7a4c1 [Console] make InputArgument::setDefault() chainable
This PR was merged into the 2.2 branch.
Discussion
----------
[DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Previously, writing an association getter like this was impossible:
```php
public function addTag(Tag $tag) { ... }
public function removeTag(Tag $tag) { ... }
public function getTags()
{
return $this->tags->toArray();
}
```
Using `toArray()` is a useful way to restrict modifications of the collection to the specified methods. But previously, CollectionToArrayTransformer failed in this case, because it did not accept arrays as input.
Commits
-------
55001ab [DoctrineBridge] Loosened CollectionToArrayTransformer::transform() to accept arrays
This PR was merged into the master branch.
Discussion
----------
[Form] Add missing use in form renderer
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9296
| License | MIT
| Doc PR | -
Commits
-------
7686867 [Form] Add missing use in form renderer
This PR was merged into the master branch.
Discussion
----------
Removed dead code (unused use statements).
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
eced94b Removed dead code (unused use statements).
* 2.3:
bumped Symfony version to 2.3.7
updated VERSION for 2.3.6
updated CHANGELOG for 2.3.6
bumped Symfony version to 2.2.10
updated VERSION for 2.2.9
update CONTRIBUTORS for 2.2.9
updated CHANGELOG for 2.2.9
[Security] limited the password length passed to encoders
[HttpKernel] Fixed a test (compiler pass class name has been changed).
assets:install command should mirror .dotfiles (.htaccess)
PoFileDumper - PO headers
removed whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php
src/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php
src/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php
src/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php
src/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php
* 2.2:
bumped Symfony version to 2.2.10
updated VERSION for 2.2.9
update CONTRIBUTORS for 2.2.9
updated CHANGELOG for 2.2.9
[Security] limited the password length passed to encoders
assets:install command should mirror .dotfiles (.htaccess)
PoFileDumper - PO headers
removed whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php
This PR was merged into the master branch.
Discussion
----------
[Debug] Fixed `ClassNotFoundFatalErrorHandler`
After running the test suite, this produced a Fatal Error. Having continue in a child method is not allowed.
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | None
| License | MIT
| Doc PR | None
Commits
-------
ecee5c2 [Debug] Fixed `ClassNotFoundFatalErrorHandler`
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] Fixed a test (compiler pass class name has been changed)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, if #9259 also gets merged
| Fixed tickets | -
| License | MIT
| Doc PR | -
**I've sent it against wrong branch. It should be merged in 2.3. Sorry.**
Commits
-------
fae01c1 [HttpKernel] Fixed a test (compiler pass class name has been changed).
* 2.3:
[Process] Fix#9182 : random failure on pipes tests
Fixed propel guessed relations
[FramworkBundle][HttpKernel] Check event listener services are not abstract
fixed CS
Check for lock existence before unlinking
remove MinCount and MaxCount contraints. It has been replaced by Count constraints.
[FrameworkBundle] fixed path replacement on Windows
Conflicts:
src/Symfony/Bridge/Propel1/Tests/Form/PropelTypeGuesserTest.php
* 2.2:
[Process] Fix#9182 : random failure on pipes tests
Fixed propel guessed relations
[FramworkBundle][HttpKernel] Check event listener services are not abstract
fixed CS
Check for lock existence before unlinking
[FrameworkBundle] fixed path replacement on Windows
Conflicts:
src/Symfony/Component/Process/Process.php
This PR was merged into the master branch.
Discussion
----------
[Form] fix missing use statement for exception UnexpectedTypeException
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets |
| License | MIT
| Doc PR |
fix missing use statement for exception `Symfony\Component\Form\Exception\UnexpectedTypeException`
cc @bschussek
Commits
-------
ea91533 [form] fix missing use statement for exception UnexpectedTypeException
This PR was merged into the master branch.
Discussion
----------
[Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9210
| License | MIT
| Doc PR | -
This is a follow-up PR of #6554 that splits the CsrfTokenGenerator into two separate classes for generating and managing CSRF tokens. As a consequence, it is now possible to explicitly remove or refresh CSRF tokens if they should be used only once. See #9210 for more information.
Commits
-------
d4bb5f4 [Security\Csrf] Split CsrfTokenGenerator into CsrfTokenManager and TokenGenerator
My logs are filled with a bazillion errors stating "Warning: unlink(/var/www/mysite/app/cache/prod/http_cache/md/cf/47/c693da5dab3eccb65fa36a9b4b07ad0f7cc4.lck): No such file or directory in /var/www/mysite/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 53"
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed cache warmup of paths which contain back-slashes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8781
| License | MIT
| Doc PR | n/a
From #8781
"
At this step in the warmup process there is a string replacement made, but paths with backslashes
are written into the cache file as something like `C:\\path\\to\\cache/pro_/...` but the str_replace
searches for the plain string `C:\path\to\cache/pro_/...`, which produces no matches.
The fix solves this by using var_export to escape the search (and replace) paths so they match the
format originally output into the cache file.
"
Commits
-------
526d285 [FrameworkBundle] fixed path replacement on Windows
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
Commits
-------
31c6c62 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
* 2.3:
Fix: duplicate usage of Symfony\Component\HttpFoundation\Response
[Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
Revert "merged branch Tobion/flattenexception (PR #9111)"
[Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
This PR was squashed before being merged into the master branch (closes#7887).
Discussion
----------
[FrameworkBundle] adds routing/container descriptors
The goal of this PR is to add descriptors (as in #7454) for routing and container. This will permit add a `--format` option to `router:debug` and `container:debug` commands (with `txt`, `json`, `xml` and `md` formats).
Commits
-------
22f9bc8 [FrameworkBundle] adds routing/container descriptors
This PR was squashed before being merged into the master branch (closes#8835).
Discussion
----------
[Console] Fixed verbose option when passing verbosity level as option value
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Currently passing a verbosity level to verbose option on console doesn't work unless using the shotcuts _-v_, _-vv_, _-vvv_.
This also fix _accept_value_ in the xml generated by __console help --xml__ for people using the xml output ;)
Commits
-------
a28eb8b [Console] Fixed verbose option when passing verbosity level as option value
* 2.2:
[Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
[Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
This PR was squashed before being merged into the master branch (closes#8927).
Discussion
----------
[Templating] fix logic regarding template references and many phpdocs
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects
related to fabpot/Twig#1183 but does not depend on it
Commits
-------
f6c12bd [Templating] fix logic regarding template references and many phpdocs
This PR was merged into the master branch.
Discussion
----------
[RC][Form] Let null values clear fields in PATCH requests
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
I've changed the way form checks wherever or not to submit childs by checking submitted data with array_key_exists and not with just isset.
This way in PATCH requests values are not processed when they are not in array and not also when the value is null. Currently there is no way to null a value with a PATCH request, even passing it null.
This can lead to some BC breaks depending on how users used form in their code.
Commits
-------
f5812c5 [Form] Let null values to unset fields in PATCH requests
This PR was squashed before being merged into the master branch (closes#8637).
Discussion
----------
[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7672
| License | MIT
| Doc PR | Not yet
Hi,
Here is a quite basic attempt to be able to disable the internal validation of the ChoiceFormField. It's pretty basic.
Feel free to tell me what you think guys. Maybe I should check the `validationDisabled` property at the beginning of the `containsOption()` method ?
I'll make the documentation PR as soon as the implementation will be validated.
Regards.
Commits
-------
739bf71 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] added a way to override the Request class
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7461, #7453
| License | MIT
| Doc PR | symfony/symfony-docs#3021
This is an alternative implementation for #7461.
I've also reverted #7381 and #7390 as these changes are not needed anymore.
Todo:
- [ ] add some tests
Commits
-------
464439d [HttpFoundation] added a way to override the Request class
This PR was merged into the master branch.
Discussion
----------
Decoupled TraceableEventDispatcher from the Profiler
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This PR removes the Profiler dependency on the TraceableEventDispatcher. That makes things more decoupled and cleaner. This PR also cleans up how profiles are stored; a Profile is now always stored only once.
I've created a `LateDataCollectorInterface` that is implemented for data collector that needs to get information from data that are available very late in the request process (when the request and the response are not even available anymore). The `lateCollect()` method is called just before the profile is stored.
We have 3 data collectors that implement that interface:
* Time: As the traceable event dipsatcher gets inject timing information via the stopwatch about all events (including the `terminate` one), we need to get events from the stopwatch as late as possible.
* Event: The traceable event dispatcher gathers all called listeners to determine non-called ones. To be able to accurately do that for all events (including the `terminate` one), we need to get the data as late as possible.
* Memory: We want to get the memory as late as possible to get the most accurate number as possible
I'm not very happy with the name and as always, better suggestions would be much appreciated.
This is an extract from #9168
Commits
-------
5cedea2 [HttpKernel] added LateDataCollectorInterface
9c4bc9a [HttpKernel] decoupled TraceableEventDispatcher and Profiler
This PR was merged into the master branch.
Discussion
----------
[Security] Added Security\Csrf sub-component with better token generation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TODO
**Update September 27, 2013**
This PR simplifies the CSRF mechanism to generate completely random tokens. A random token is generated once per ~~intention~~ token ID and then stored in the session. Tokens are valid until the session expires.
Since the CSRF token generator depends on `StringUtils` and `SecureRandom` from Security\Core, and since Security\Http currently depends on the Form component for token generation, I decided to add a new Security\Csrf sub-component that contains the improved CSRF token generator. Consequences:
* Security\Http now depends on Security\Csrf instead of Form
* Form now optionally depends on Security\Csrf
* The configuration for the "security.secure_random" service and the "security.csrf.*" services was moved to FrameworkBundle to guarantee BC
In the new Security\Csrf sub-component, I tried to improve the naming where I could do so without breaking BC:
* CSRF "providers" are now called "token generators"
* CSRF "intentions" are now called "token IDs", because that's really what they are
##### TODO
- [ ] The documentation needs to be checked for references to the configuration of the application secret. Remarks that the secret is used for CSRF protection need to be removed.
- [ ] Add aliases "csrf_token_generator" and "csrf_token_id" for "csrf_provider" and "intention" in the SecurityBundle configuration
- [x] Make sure `SecureRandom` never blocks for `CsrfTokenGenerator`
Commits
-------
7f02304 [Security] Added missing PHPDoc tag
2e04e32 Updated Composer dependencies to require the Security\Csrf component where necessary
bf85e83 [FrameworkBundle][SecurityBundle] Added service configuration for the new Security CSRF sub-component
2048cf6 [Form] Deprecated the CSRF implementation and added an optional dependency to the Security CSRF sub-component instead
85d4959 [Security] Changed Security HTTP sub-component to depend on CSRF sub-component instead of Form
1bf1640 [Security] Added CSRF sub-component
This PR was merged into the master branch.
Discussion
----------
[Form] Rewrite boolean attributes to match HTML spec
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Same as #7856
> 'The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.' - http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attribute
This commit modifies widget_container_attributes and widget_attributes so that:
* `true` values render as the attribute name with the attribute name repeated as the value
* `false` values are not rendered
The comparison is strict using sames() in twig.
Previously `false` values would have been rendered as `some-attribute=""` which according to the spec would actually make them a boolean attribute and therefore equal to true.
Commits
-------
b85577b [Form] Improved test coverage of widget_attributes and widget_container_attributes blocks
8e4c2a7 [Form] Rewrite boolean attributes to match HTML spec
This PR was merged into the 2.2 branch.
Discussion
----------
[Form] enforce correct timezone
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | not sure if this is a BC break...
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I'm using the Form component to handle JSON requests which come from AJAX requests. The JSON is formed by the Angular toJson method
A typical request would be:
```
{
name: "Some name"
start: "2013-08-21T05:00:00.000Z"
end: "2013-08-21T15:00:00.000Z"
}
```
Note that in this case, what I entered in my input boxes are 7:00 for start and 17:00 for end times. As you can see, Angular (or Chrome, I'm not sure), converts this to the "Z" timezone. Since I cannot enforce the correct timezone client side, the timezone will differ from the one configured in the DateTimeType, however, instead of resulting in either an error or a conversion to the correct timezone, I get a datetime object in the wrong timezone, eventually resulting in wrong values in the database.
By checking the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied, this problem is solved.
Commits
-------
b0349a1 [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied
* 2.3:
fixed Client when using the terminable event
Fix problem with Windows file links (backslash in JavaScript string)
[Security] fixed wrong phpdoc
[DependencyInjection] Prevented inlining of lazy loaded private service definitions.
[Routing] removed extra argument
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
Added doc comments
Conflicts:
src/Symfony/Component/Routing/Router.php
src/Symfony/Component/Security/Http/Firewall.php
* 2.2:
fixed Client when using the terminable event
Fix problem with Windows file links (backslash in JavaScript string)
[Security] fixed wrong phpdoc
[Routing] removed extra argument
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
Added doc comments
Conflicts:
src/Symfony/Component/HttpFoundation/Request.php
This PR was merged into the master branch.
Discussion
----------
[Filesystem] introduced new Exception base classes
The Filesystem class now throws a ```FileNotFoundException``` if a file could not be found, rather than an basic ```IOException```. The new exception is still a child of the ```IOException```, this way it doesn' t breack BC.
The ```IOException``` now also takes as the first argument an path to the file of interest, which can be used via the ```getPath()``` method.
The switch to the FilesystemInterface will allow you to have an implementation accessing S3 or Dropbox, etc. and still inject it into a classes, which are requiring the Filesystem.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| Doc PR | symfony/symfony-docs#2947
Commits
-------
c2e43d0 [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages
785080a [Filesystem] introduced new Exception base classes
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] made the cache key generation configurable for the default HttpCache store
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9088
| License | MIT
| Doc PR | n/a
Commits
-------
780b77a [HttpKernel] made the cache key generation configurable for the default HttpCache store
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values
Header `HTTP_X_FORWARDED_PROTO` can contain various values. Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Tests pass? | yes
| Fixed tickets | #9101
| License | MIT
Commits
-------
d997443 [HttpFoundation] Header `HTTP_X_FORWARDED_PROTO` can contain various values Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows value chaining (`https, http`, where `https` is always first when request is encrypted).
* 2.3:
bumped Symfony version to 2.3.6
updated VERSION for 2.3.5
updated CHANGELOG for 2.3.5
Set cost type to integer
bumped Symfony version to 2.2.9
updated VERSION for 2.2.8
updated CHANGELOG for 2.2.8
bumped the version
fixed typo
updated VERSION for 2.2.7
update CONTRIBUTORS for 2.2.7
updated CHANGELOG for 2.2.7
bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
fixed HTML5 form attribute handling XPath query
Removed old way of building icu data.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Discussion
----------
Make the getNode function public (DomCrawler)
The getNode function should be public so that DomElement objects can be accessed directly if need be without having to loop manually.
Use case: Want to get to the tagname of a specific domelement.
Commits
-------
9868415 Make getNode function public
This PR was squashed before being merged into the master branch (closes#8288).
Discussion
----------
[Process] Added support for stdout and stderr flush (Issue #7884)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7884
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/2728
**To-do**
- [x] Submit changes to the documentation.
- [x] Fix a test broken on travis.
- [x] Fix mistakes on the documentation.
- [x] Removed flush + get methods.
- [x] Changed tests assert calls.
This PR introduces flushing methods for both stdout and stderr on Process class. The new methods are:
- flushOutput(): clears the output buffer.
- flushErrorOutput(): clears the error output buffer.
Tests for new methods are included on the PR.
Commits
-------
90daef7 [Process] Added support for stdout and stderr flush (Issue #7884)
This PR was merged into the master branch.
Discussion
----------
[Translation] Added support for JSON format (both loader and dumper).
Based on `IniFileLoader\Dumper`.
Q | A
--- | ---
Bug fix? |no
New feature? | yes
BC breaks?| no
Deprecations? |no
Tests pass? | yes
Fixed tickets | -
License | MIT
Doc | this component don't have docs
Commits
-------
fcef021 [Translation] Added support for JSON format (both loader and dumper).
This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).
This PR was merged into the master branch.
Discussion
----------
Update FormTypeCsrfExtension.php
There is no need to store the FormFactory in an Attribute.
The FormFactory can be retrieved directly.
Commits
-------
90d59ea Update FormTypeCsrfExtension.php
This PR was merged into the master branch.
Discussion
----------
[Validator] Simplified usage of the Callback constraint
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | fixes#2480, replaces #3939
| License | MIT
| Doc PR | symfony/symfony-docs#3012
Commits
-------
cccb1db [Validator] Simplified usage of the Callback constraint
* 2.2:
bumped Symfony version to 2.2.9
updated VERSION for 2.2.8
updated CHANGELOG for 2.2.8
bumped the version
fixed typo
updated VERSION for 2.2.7
update CONTRIBUTORS for 2.2.7
updated CHANGELOG for 2.2.7
bugix: CookieJar returns cookies with domain "domain.com" for domain "foodomain.com"
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
The regexp matching prefixes is naive and matches most of strings followed by a colon. It is also incomplete as it does not match all the supported characters (like the unicode ones). It is simple though and sufficient in most situations.
This PR was merged into the master branch.
Discussion
----------
[DomCrawler] Added auto-discovery and explicit registration of namespaces in filter() and filterByXPath()
| Q | A
| --- | ---
|Bug fix: | no
|Feature addition: |yes
|Backwards compatibility break: | yes, default namespace is no longer removed in the `addContent` method
|Symfony2 tests pass: | yes|
|Fixes the following tickets: | #4845
|Todo: | -
|License of the code:| MIT
|Documentation PR: | symfony/symfony-docs#2979
* added support for automatic discovery and explicit registration of document namespaces for `Crawler::filterXPath()` and `Crawler::filter()`
* improved content type guessing in `Crawler::addContent()`
* [BC BREAK] `Crawler::addXmlContent()` no longer removes the default document namespace
I mentioned in #4845 it would probably be possible to use [DOMNode::lookupNamespaceURI()](http://www.php.net/manual/en/domnode.lookupnamespaceuri.php) to find a namespace URI by given prefix. Unfortunately we cannot use it here since we'd have to call it on a node in the namespace we're looking for.
Current implementation makes the following query to find a namespace:
```php
$domxpath->query('(//namespace::*[name()="media"])[last()]')
```
Commits
-------
77e2fa5 [DomCrawler] Removed checks if CssSelector is present.
9110468 [DomCrawler] Enabled manual namespace registration.
be1e4e6 [DomCrawler] Enabled default namespace prefix overloading.
943d446 [DomCrawler] Updated the CHANGELOG with namespace auto-registration details.
c6fbb13 [DomCrawler] Added support for an automatic default namespace registration.
587e2dd [DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
c905bba [DomCrawler] Added more tests for namespaced filtering.
6e717a3 [DomCrawler] Made sure only the default namespace is removed when loading an XML content.
e5b8abb [DomCrawler] Added auto-discovery of namespaces in Crawler::filter() and Crawler::filterByXPath().
* 2.3:
Run all tests in parallel.
Fixed an entity class name.
[HttpKernel] fix usage of deprecated FlattenException
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
* 2.2:
Run all tests in parallel.
Fixed an entity class name.
Conflicts:
.travis.yml
src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
This PR was squashed before being merged into the master branch (closes#9095).
Discussion
----------
[ExpressionLanguage] Introduce a ParserCacheInterface with array/doctrine implementations
| 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
-------
c8e6799 [ExpressionLanguage] Introduce a ParserCacheInterface with array/doctrine implementations
Some proxies use `ssl` instead of `https`, as well as Lighttpd mod_proxy allows
value chaining (`https, http`, where `https` is always first when request is encrypted).
* 2.3:
[Locale] added support for the position argument to NumberFormatter::parse()
[Locale] added some more stubs for the number formatter
[Yaml] fixed typo
[Yaml] fixed a test on PHP < 5.4
[DomCrawler]Crawler guess charset from html
fixed PHP 5.3 compatibility
[Yaml] reverted previous merge partially (refs #8897)
[Security] remove unused logger
[Security] fix typo
[Yaml] Fixed filename in the ParseException message
* 2.2:
[Locale] added support for the position argument to NumberFormatter::parse()
[Locale] added some more stubs for the number formatter
[Yaml] fixed typo
[Yaml] fixed a test on PHP < 5.4
[DomCrawler]Crawler guess charset from html
fixed PHP 5.3 compatibility
[Yaml] reverted previous merge partially (refs #8897)
[Security] remove unused logger
[Security] fix typo
[Yaml] Fixed filename in the ParseException message
Conflicts:
src/Symfony/Component/Console/Input/InputDefinition.php
src/Symfony/Component/Locale/Stub/StubNumberFormatter.php
src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
This PR was merged into the master branch.
Discussion
----------
[ExpressionLanguage] made minor tweaks
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9087
| License | MIT
| Doc PR | n/a
* made ExpressionLanguage::parse return an ParsedExpression instance
* optimized the size of the serialization of expressions
Commits
-------
e869136 [ExpressionLanguage] renamed addFunction() to register()
5076ec7 [ExpressionLanguage] optimized serialization of nodes and expressions
60b9f85 [ExpressionLanguage] made ExpressionLanguage::parse return an ParsedExpression instance
This PR was squashed before being merged into the 2.2 branch (closes#9074).
Discussion
----------
[DomCrawler]Crawler guess charset from html
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9061
| License | MIT
| Doc PR | n/a
Commits
-------
e5282e8 [DomCrawler]Crawler guess charset from html
This PR was merged into the 2.2 branch.
Discussion
----------
[Yaml] Fixed filename in the ParseException message
| Q | A
| ------------- | ---
| Bug fix? | sort of
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | —
| License | MIT
| Doc PR | —
Yaml component throws an exception with corrupt filename because of `json_encode`:
```
[Symfony\Component\Yaml\Exception\ParseException]
A YAML file cannot contain tabs as indentation in "\/var\/www\/app\/config.yml" at line 42 (near " foo: bar").
```
Commits
-------
da44651 [Yaml] Fixed filename in the ParseException message
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] [Fragment] Fixed CS
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Only two simple CS fixes.
Commits
-------
7d53314 [HttpKernel] Fragment Fixed CS
This PR was merged into the master branch.
Discussion
----------
New Component: Expression Language
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8850, #7352
| License | MIT
| Doc PR | not yet
TODO:
- [ ] write documentation
- [x] add tests for the new component
- [x] implement expression support for access rules in the security component
- [x] find a better character/convention for expressions in the YAML format
- [x] check the performance of the evaluation mode
- [x] better error messages in the evaluation mode
- [x] add support in the Routing
- [x] add support in the Validator
The ExpressionLanguage component provides an engine that can compile and
evaluate expressions.
An expression is a one-liner that returns a value (mostly, but not limited to, Booleans).
It is a strip-down version of Twig (only the expression part of it is
implemented.) Like Twig, the expression is lexed, parsed, and
compiled/evaluated. So, it is immune to external injections by design.
If we compare it to Twig, here are the main big differences:
* only support for Twig expressions
* no ambiguity for calls (foo.bar is only valid for properties, foo['bar'] is only valid for array calls, and foo.bar() is required for method calls)
* no support for naming conventions in method calls (if the method is named getFoo(), you must use getFoo() and not foo())
* no notion of a line for errors, but a cursor (we are mostly talking about one-liners here)
* removed everything specific to the templating engine (like output escaping or filters)
* no support for named arguments in method calls
* only one extension point with functions (no possibility to define new operators, ...)
* and probably even more I don't remember right now
* there is no need for a runtime environment, the compiled PHP string is self-sufficient
An open question is whether we keep the difference betweens arrays and hashes.
The other big difference with Twig is that it can work in two modes (possible
because of the restrictions described above):
* compilation: the expression is compiled to PHP and is self-sufficient
* evaluation: the expression is evaluated without being compiled to PHP (the node tree produced by the parser can be serialized and evaluated afterwards -- so it can be saved on disk or in a database to speed up things when needed)
Let's see a simple example:
```php
$language = new ExpressionLanguage();
echo $language->evaluate('1 + 1');
// will echo 2
echo $language->compile('1 + 2');
// will echo "(1 + 2)"
```
The language supports:
* all basic math operators (with precedence rules):
* unary: not, !, -, +
* binary: or, ||, and, &&, b-or, b-xor, b-and, ==, ===, !=, !==, <, >, >=, <=, not in, in, .., +, -, ~, *, /, %, **
* all literals supported by Twig: strings, numbers, arrays (`[1, 2]`), hashes
(`{a: "b"}`), Booleans, and null.
* simple variables (`foo`), array accesses (`foo[1]`), property accesses
(`foo.bar`), and method calls (`foo.bar(1, 2)`).
* the ternary operator: `true ? true : false` (and all the shortcuts
implemented in Twig).
* function calls (`constant('FOO')` -- `constant` is the only built-in
functions).
* and of course, any combination of the above.
The compilation is better for performances as the end result is just a plain PHP string without any runtime. For the evaluation, we need to tokenize, parse, and evaluate the nodes on the fly. This can be optimized by using a `ParsedExpression` or a `SerializedParsedExpression` instead:
```php
$nodes = $language->parse($expr, $names);
$expression = new SerializedParsedExpression($expr, serialize($nodes));
// You can now store the expression in a DB for later reuse
// a SerializedParsedExpression can be evaluated like any other expressions,
// but under the hood, the lexer and the parser won't be used at all, so it''s much faster.
$language->evaluate($expression);
```
That's all folks!
I can see many use cases for this new component, and we have two use cases in
Symfony that we can implement right away.
## Using Expressions in the Service Container
The first one is expression support in the service container (it would replace
#8850) -- anywhere you can pass an argument in the service container, you can
use an expression:
```php
$c->register('foo', 'Foo')->addArgument(new Expression('bar.getvalue()'));
```
You have access to the service container via `this`:
container.get("bar").getvalue(container.getParameter("value"))
The implementation comes with two functions that simplifies expressions
(`service()` to get a service, and `parameter` to get a parameter value). The
previous example can be simplified to:
service("bar").getvalue(parameter("value"))
Here is how to use it in XML:
```xml
<parameters>
<parameter key="value">foobar</parameter>
</parameters>
<services>
<service id="foo" class="Foo">
<argument type="expression">service('bar').getvalue(parameter('value'))</argument>
</service>
<service id="bar" class="Bar" />
</services>
```
and in YAML (I chose the syntax randomly ;)):
```yaml
parameters:
value: foobar
services:
bar:
class: Bar
foo:
class: Foo
arguments: [@=service("bar").getvalue(parameter("value"))]
```
When using the container builder, Symfony uses the evaluator, but with the PHP
dumper, the compiler is used, and there is no overhead as the expression
engine is not needed at runtime. The expression above would be compiled to:
```php
$this->get("bar")->getvalue($this->getParameter("value"))
```
## Using Expression for Security Access Control Rules
The second use case in Symfony is for access rules.
As we all know, the way to configure the security access control rules is confusing, which might lead to insecure applications (see http://symfony.com/blog/security-access-control-documentation-issue for more information).
Here is how the new `allow_if` works:
```yaml
access_control:
- { path: ^/_internal/secure, allow_if: "'127.0.0.1' == request.getClientIp() or has_role('ROLE_ADMIN')" }
```
This one restricts the URLs starting with `/_internal/secure` to people browsing from the localhost. Here, `request` is the current Request instance. In the expression, there is access to the following variables:
* `request`
* `token`
* `user`
And to the following functions:
* `is_anonymous`
* `is_authenticated`
* `is_fully_authenticated`
* `is_rememberme`
* `has_role`
You can also use expressions in Twig, which works well with the `is_granted` function:
```jinja
{% if is_granted(expression('has_role("FOO")')) %}
...
{% endif %}
```
## Using Expressions in the Routing
Out of the box, Symfony can only match an incoming request based on some pre-determined variables (like the path info, the method, the scheme, ...). But some people want to be able to match on more complex logic, based on other information of the Request object. That's why we introduced `RequestMatcherInterface` recently (but we no default implementation in Symfony itself).
The first change I've made (not related to expression support) is implement this interface for the default `UrlMatcher`. It was simple enough.
Then, I've added a new `condition` configuration for Route objects, which allow you to add any valid expression. An expression has access to the `request` and to the routing `context`.
Here is how one would configure it in a YAML file:
```yaml
hello:
path: /hello/{name}
condition: "context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'"
```
Why do I keep the context as all the data are also available in the request? Because you can also use the condition without using the RequestMatcherInterface, in which case, you don't have access to the request. So, the previous example is equivalent to:
```yaml
hello:
path: /hello/{name}
condition: "request.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') =~ '/firefox/i'"
```
When using the PHP dumper, there is no overhead as the condition is compiled. Here is how it looks like:
```php
// hello
if (0 === strpos($pathinfo, '/hello') && preg_match('#^/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches) && (in_array($context->getMethod(), array(0 => "GET", 1 => "HEAD")) && preg_match("/firefox/i", $request->headers->get("User-Agent")))) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'hello')), array ());
}
```
Be warned that conditions are not taken into account when generating a URL.
## Using Expressions in the Validator
There is a new Expression constraint that you can put on a class. The expression is then evaluated for validation:
```php
use Symfony\Component\Validator\Constraints as Assert;
/**
* @Assert\Condition(condition="this.getFoo() == 'fo'", message="Not good!")
*/
class Obj
{
public function getFoo()
{
return 'foo';
}
}
```
In the expression, you get access to the current object via the `this` variable.
## Dynamic annotations
The expression language component is also very useful in annotations. the SensoLabs FrameworkExtraBundle leverages this possibility to implement HTTP validation caching in the `@Cache` annotation and to add a new `@Security` annotation (see sensiolabs/SensioFrameworkExtraBundle#238.)
Commits
-------
d4ebbfd [Validator] Renamed Condition to Expression and added possibility to set it onto properties
a3b3a78 [Validator] added a constraint that runs an expression
1bcfb40 added optimized versions of expressions
984bd38 mades things more consistent for the end user
d477f15 [Routing] added support for expression conditions in routes
86ac8d7 [ExpressionLanguage] improved performance
e369d14 added a Twig extension to create Expression instances
38b7fde added support for expression in control access rules
2777ac7 [HttpFoundation] added ExpressionRequestMatcher
c25abd9 [DependencyInjection] added support for expressions in the service container
3a41781 [ExpressionLanguage] added support for regexes
9d98fa2 [ExpressionLanguage] added the component
This PR was merged into the 2.3 branch.
Discussion
----------
Fix `use` statements in HttpKernel\Client
Commits
-------
5d5ea9a Fix `use` statements in HttpKernel\Client
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] fix typo and remove unused logger
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
a33cc51 [Security] remove unused logger
62de9c1 [Security] fix typo
This PR was merged into the master branch.
Discussion
----------
[Security] Remove unused use statement
Commits
-------
6981669 Remove unused use statement
* 2.3:
fixed phpdoc
Fix some annotates
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
[HttpKernel] remove unneeded strtoupper
updated the composer install command to reflect changes in Composer
Conflicts:
src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
* 2.2:
Fix some annotates
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
[HttpKernel] remove unneeded strtoupper
updated the composer install command to reflect changes in Composer
Conflicts:
src/Symfony/Component/Console/Application.php
src/Symfony/Component/Console/Command/Command.php
src/Symfony/Component/Console/Input/InputDefinition.php
src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php
src/Symfony/Component/Locale/Locale.php
src/Symfony/Component/Locale/README.md
src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php
This PR was squashed before being merged into the 2.2 branch (closes#9067).
Discussion
----------
Fix some annotates
| 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
send those fixes in branch 2.2
This pr includes #9065
Commits
-------
de39bd5 Fix some annotates
This PR was merged into the 2.2 branch.
Discussion
----------
[FrameworkBundle] made sure that the debug event dispatcher is used everywhere
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6686, #7673
| License | MIT
| Doc PR | n/a
Commits
-------
f65a526 [FrameworkBundle] made sure that the debug event dispatcher is used everywhere
This PR was merged into the master branch.
Discussion
----------
[Security] Split the component into 3 sub-components Core, ACL, HTTP
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9047, #8848
| License | MIT
| Doc PR | -
The rationale behind this PR is to be able to use any of the sub components without requiring all the dependencies of the other sub components. Specifically, I'd like to use the core utils for an improved CSRF protection mechanism (#6554).
Commits
-------
14e9f46 [Security] removed unneeded hard dependencies in Core
5dbec8a [Security] fixed README files
62bda79 [Security] copied the Resources/ directory to Core/Resources/
7826781 [Security] Split the component into 3 sub-components Core, ACL, HTTP
This PR was squashed before being merged into the master branch (closes#8635).
Discussion
----------
[Config] Create XML Reference Dumper
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Only Yaml was supported. This PR adds support for XML. This makes it easier to test XML schema's (see symfony-cmf/MenuBundle#114 ), helps us at the docs with our configuration reference and helps others using XML with symfony.
## Todo
- [x] Prototyped arrays don't work properly
- [x] Add comments (see Yaml dumper)
- [x] Add namespaces support
## Side effects
I've moved the reference dumpers to their own namespace and renamed the original reference dumper to `YamlReferenceDumper`. The old one is kept for BC, but deprecated.
/cc @dantleech
Commits
-------
05e9ca7 [Config] Create XML Reference Dumper
* 2.3:
fixes RequestDataCollector bug, visible when used on Drupal8
[Console] fixed exception rendering when nested styles
[Console] added some more information about OutputFormatter::replaceStyle()
[Console] fixed the formatter for single-char tags
[Console] Escape exception message during the rendering of an exception
[DomCrawler] fixed HTML5 form attribute handling
Making tests pass on mac os x without this change tests would fail under mac os x at least in 10.8.2
[BrowserKit] Fixed the handling of parameters when redirecting
[Process] Properly close pipes after a Process::stop call
fixed bytes conversion when used on 32-bits systems
Typo fix
HttpFoundation RequestTest - Fixed indentation and removed comments
HttpFoundation Request test for #8619
LICENSE files moved to meta folders
added missing method in the UPGRADE file for 2.2 (closes#8941)
[Form] Fixed: "required" attribute is not added to <select> tag if no empty value
[Translation] Removed an unneeded return annotation.
[DomCrawler] Added missing docblocks and removed unneeded return annotation.
Conflicts:
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
* 2.2:
fixes RequestDataCollector bug, visible when used on Drupal8
[Console] fixed exception rendering when nested styles
[Console] added some more information about OutputFormatter::replaceStyle()
[Console] fixed the formatter for single-char tags
[Console] Escape exception message during the rendering of an exception
[BrowserKit] Fixed the handling of parameters when redirecting
Typo fix
HttpFoundation RequestTest - Fixed indentation and removed comments
HttpFoundation Request test for #8619
LICENSE files moved to meta folders
added missing method in the UPGRADE file for 2.2 (closes#8941)
[Translation] Removed an unneeded return annotation.
[DomCrawler] Added missing docblocks and removed unneeded return annotation.
Conflicts:
src/Symfony/Component/BrowserKit/Client.php
src/Symfony/Component/DomCrawler/Crawler.php
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] made request stack feature BC
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8904 see comments
| License | MIT
Commits
-------
08a42e7 [HttpKernel] made request stack feature BC
In Drupal8 ```$request->attributes->all()``` returns an array with a 0 key whose value is the ```Drupal\user\Entity\User```
```php
array(
0 => Drupal\user\Entity\User,
...
)
```
```('_route' == $key && is_object($value))``` is therefore true which provokes an exception:
```php
FatalErrorException: Error: Call to undefined method Drupal\user\Entity\User::getPath() in [...]/RequestDataCollector.php line 54
```
This patch corrects this with a simple replacement of == by ===
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Fixed exception rendering
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9045
| License | MIT
| Doc PR | n/a
When an exception message contains styles, the output is not the expected one. This PR addresses this issue.
Commits
-------
c8d0342 [Console] fixed exception rendering when nested styles
1f88a28 [Console] added some more information about OutputFormatter::replaceStyle()
a47d663 [Console] fixed the formatter for single-char tags
c6c35b3 [Console] Escape exception message during the rendering of an exception
This PR was squashed before being merged into the 2.3 branch (closes#8197).
Discussion
----------
[DomCrawler] fixed HTML5 form attribute handling
Fixed HTML5 form attribute handling and improved a test case to test more thoroughly
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6239
| License | MIT
| Doc PR | no
Commits
-------
04e730e [DomCrawler] fixed HTML5 form attribute handling
This PR was merged into the 2.3 branch.
Discussion
----------
[Process][2.3] Properly close pipes after a Process::stop call
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When calling `Process::stop`, if the process does not stop before the end of the method, pipes are not close, `proc_close` is not called.
I added a test that randomly fails without the patch :
```
phpunit --filter=testStartAfterATimeout --repeat 100 Tests/SimpleProcessTest.php
PHPUnit 3.8-g55a6dd0 by Sebastian Bergmann.
Configuration read from /Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/phpunit.xml.dist
....E.E......E.....E..........EE..............EEE..EE.......E.. 63 / 100 ( 63%)
E.E................E....EE.......E...
Time: 29.55 seconds, Memory: 6.75Mb
There were 18 errors:
1) Symfony\Component\Process\Tests\SimpleProcessTest::testStartAfterATimeout
fclose(): 89 is not a valid stream resource
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:95
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:80
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:62
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:938
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:229
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Tests/AbstractProcessTest.php:490
```
And of course, I solved the issue, tests are now OK.
Commits
-------
d84df4c [Process] Properly close pipes after a Process::stop call
This PR was merged into the 2.3 branch.
Discussion
----------
fixed bytes conversion when used on 32-bits systems
| Q | A
| ------------- | ---
| Bug fix? | yes (on 32-bits systems)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8977
| License | MIT
| Doc PR | n/a
This PR reverts #7413 and #742, which does not work well when a number is big (3Go for instance) and the machine is 32bits.
Commits
-------
b3ae29d fixed bytes conversion when used on 32-bits systems
This PR was squashed before being merged into the master branch (closes#7852).
Discussion
----------
[2.3][EventDispatcher] Make events lighter
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | symfony/symfony-docs#2476
I've taken the previous discussions and taking into consideration @fabpot does not want to break BC. This PR now provides the `EventDispatcher` as an argument to listeners. I've made a second separate commit which also passes the event name.
This PR is alternative to #7582
Commits
-------
e2bff32 [2.3][EventDispatcher] Make events lighter
This PR was merged into the 2.2 branch.
Discussion
----------
[DomCrawler] Added missing docblocks and removed redundant type in a return annotation
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d414213 [DomCrawler] Added missing docblocks and removed unneeded return annotation.
This PR was merged into the 2.2 branch.
Discussion
----------
[Translation] Removed a @return annotation
This is the only `@return null` left...
Commits
-------
d6f4def [Translation] Removed an unneeded return annotation.
* 2.3:
[FrameworkBundle][Security] Replaced void return type with null for consistency
fixed CS
NativeSessionStorage regenerate
removed unneeded comment
Use setTimeZone if this method exists.
Fix FileResource test
fixed wrong usage of unset()
[HttpFoundation] Fixed the way path to directory is trimmed.
[Console] Fixed argument parsing when a single dash is passed.
* 2.2:
[FrameworkBundle][Security] Replaced void return type with null for consistency
fixed CS
NativeSessionStorage regenerate
removed unneeded comment
Use setTimeZone if this method exists.
Fix FileResource test
fixed wrong usage of unset()
[HttpFoundation] Fixed the way path to directory is trimmed.
[Console] Fixed argument parsing when a single dash is passed.
Conflicts:
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
This PR was squashed before being merged into the 2.2 branch (closes#9026).
Discussion
----------
[FrameworkBundle][Security] Replaced void return type with null for consistency
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We're using `null` everywhere else.
Commits
-------
e4100ac [FrameworkBundle][Security] Replaced void return type with null for consistency
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Fixed argument parsing when a single dash is passed.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8986
| License | MIT
| Doc PR |
Commits
-------
42019f6 [Console] Fixed argument parsing when a single dash is passed.
I had the following test failing on OS X before:
There was 1 failure:
1) Symfony\Component\Config\Tests\Resource\FileResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] Fixed the way path to directory is trimmed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | re #8388
| License | MIT
| Doc PR | -
Commits
-------
773e716 [HttpFoundation] Fixed the way path to directory is trimmed.
* 2.3:
[WebProfilerBundle] fixed toolbar for IE8 (refs #8380)
[HttpFoundation] removed double-slashes (closes#8388)
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
* 2.2:
[HttpFoundation] removed double-slashes (closes#8388)
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8507
| License | MIT
| Doc PR | n/a
Commits
-------
4f5b8f0 [HttpFoundation] tried to keep the original Request URI as much as possible to avoid different behavior between ::createFromGlobals() and ::create()
This PR was merged into the 2.2 branch.
Discussion
----------
[TwigBridge] fixed form rendering when used in a template with dynamic inheritance
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5284
| License | MIT
| Doc PR | n/a
Commits
-------
4c1dbc7 [TwigBridge] fixed form rendering when used in a template with dynamic inheritance
* 2.3:
[HttpKernel] added a check for private event listeners/subscribers
[FrameworkBundle] fixed registration of the register listener pass
[Form] Fixed regression causing invalid "WHERE id IN ()" statements
[DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes#8425)
[Form] Fixed regression in BooleanToStringTransformer from ed83752
[FrameworkBundle] removed obsolete code
[Process] Close unix pipes before calling `proc_close` to avoid a deadlock
[Process] Fix process merge in 2.3
[Intl] made RegionBundle and LanguageBundle merge fallback data when using a country-specific locale
* 2.2:
[HttpKernel] added a check for private event listeners/subscribers
[FrameworkBundle] fixed registration of the register listener pass
[Form] Fixed regression causing invalid "WHERE id IN ()" statements
[DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes#8425)
[Form] Fixed regression in BooleanToStringTransformer from ed83752
[FrameworkBundle] removed obsolete code
[Process] Close unix pipes before calling `proc_close` to avoid a deadlock
Conflicts:
src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed registration of private event listeners/subscribers
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6541
| License | MIT
| Doc PR | n/a
When registering a private event subscriber/listener, the listener was just ignored.
This PR does two things to fix the problem:
* the event listener pass is done earlier to get access to the private services
* when a private service is identified, a proper exception is thrown
Commits
-------
8444339 [HttpKernel] added a check for private event listeners/subscribers
427ee19 [FrameworkBundle] fixed registration of the register listener pass
This PR was merged into the master branch.
Discussion
----------
[DependencyInjection] added tags validation when compiling a container
| Q | A
| ------------- | ---
| Bug fix? | yes & no
| New feature? | yes & no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7543
| License | MIT
| Doc PR | n/a
When using YAML or XML, the tags validadity are checked during loading, but when using PHP, that's not possible.
So, the added step in the compilation phase does that nicely.
Commits
-------
5cad478 [DependencyInjection] added tags validation when compiling a container
This circular reference cannot be detected by the compiler pass as we
don't check for method arguments there.
The Container itself already detects such circular references at runtime.
So this fix is about circular references that are not detected at
compile time, and are not even detected at runtime because the code that
would cause the detection is never run (generated after a return
statement.)
This PR was merged into the master branch.
Discussion
----------
[Debug] removed usage of a deprecated class (closes#8992)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8992
| License | MIT
| Doc PR | n/a
Commits
-------
c673c0e [Debug] removed usage of a deprecated class (closes#8992)
This PR was merged into the master branch.
Discussion
----------
[PropelBridge] PropelTypeGuesser can now recognize columns by their phpName
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Until now, the `PropelTypeGuesser` could only find columns by their name.
Example: `created_at` was recognized but `createdAt` wasn't.
This PR adds the ability to match column's phpNames (in a case-insensitive way).
Commits
-------
764e915 [PropelBridge] PropelTypeGuesser can now recognize columns by their phpName
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] made RegionBundle merge fallback data if using a country-specific locale
See #8442 and symfony/Icu#2.
Essentially, country data fetches from the Intl component do not currently work when using a locale with a country specifier, e.g. `fr_FR`. This change forces a merge on the data against the root language locale, thus making country data available for such locales.
Commits
-------
52d8676 [Intl] made RegionBundle and LanguageBundle merge fallback data when using a country-specific locale
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed FormValidator::findClickedButton() not to be called exponentially
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8317
| License | MIT
| Doc PR | -
Commits
-------
b65a515 [Form] Fixed FormValidator::findClickedButton() not to be called exponentially
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpFoundation] fixed format duplication in Request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8976
| License | MIT
| Doc PR | n/a
Commits
-------
8c2a733 [HttpFoundation] fixed format duplication in Request
This PR was merged into the master branch.
Discussion
----------
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
#7939 must be merged before this PR is merged.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5113, #5190
| License | MIT
| Doc PR | -
TODO:
- [x] test EntityChoiceList for stricter rules
- [ ] test ModelChoiceList for stricter rules
- [x] remove/deprecate the ChoiceList::getIndicesFor*() methods
Commits
-------
9efdb8e [Form] Deprecated ChoiceList::getIndicesFor*() methods
67ba131 [DoctrineBridge] Improved test coverage of EntityChoiceList
31e5ce5 [Form] Improved test coverage of ChoiceList classes
6283b0e [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
79a214f [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
62fbed6 [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
* 2.3:
Fixed docblock in UserInterface::getSalt()
[Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
[DoctrineBridge] Improved test coverage of EntityChoiceList
[DoctrineBridge] Improved test coverage of EntityChoiceList
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
Removed duplicate annotation
[HttpKernel] made code more reliable
[HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes#8917)
[HttpKernel] fixer HInclude src (closes#8951)
Fixed escaping of service identifiers in configuration
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/GenericEntityChoiceListTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.3.
Commits
-------
7879f07 [DoctrineBridge] Improved test coverage of EntityChoiceList
58e7c10 [Form] Improved test coverage of ChoiceList classes
9542d72 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
72b8807 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
e1bf07f [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
* 2.2:
Fixed docblock in UserInterface::getSalt()
[Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
[DoctrineBridge] Improved test coverage of EntityChoiceList
[Form] Improved test coverage of ChoiceList classes
[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
[Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
[Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
[HttpKernel] made code more reliable
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php
src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php
src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/Tests/AbstractProcessTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
Same as #7940, rebased onto 2.2.
Commits
-------
4d2dc55 [DoctrineBridge] Improved test coverage of EntityChoiceList
9d3628c [Form] Improved test coverage of ChoiceList classes
ed83752 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
30aa1de [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
53f292a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
This PR was merged into the master branch.
Discussion
----------
[Validator] The default option name can now be omitted when defining constraints as annotations
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When a constraint has a default option, but other options should be set as well, the name of the default option had to be set explicitly when defining the constraint as annotation:
```php
/** @GreaterThan(value=2, message="Should be greater than 2") */
private $value;
```
After this PR, it is possible to omit the name of the default option:
```php
/** @GreaterThan(2, message="Should be greater than 2") */
private $value;
```
Commits
-------
5499a29 [Validator] The default option name can now be omitted when defining constraints as annotations
This PR was merged into the 2.2 branch.
Discussion
----------
[Process][2.2] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8970
| License | MIT
This fix the read of file handles after `proc_close` as described in the issue. I enable some stdin=>stdout pipes tests on windows with some dedicated buffer size. Solving the issue, I finally reproduced this [PHP bug](https://bugs.php.net/bug.php?id=65650) that I first described in my PR note in #8924
Most of Windows usage should be okay, but in case of a program throws lots of output and fills the buffer, some data might be lost/corrupted. Should it be documented ? This is a Windows only known issue.
Commits
-------
1e75cf9 [Process] Fix#8970 : read output once the process is finished, enable pipe tests on Windows
This PR was squashed before being merged into the master branch (closes#8657).
Discussion
----------
Added option to show controllers optionally in the router:debug command
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Added option to show controllers in the router debug command as a convenience function.
app/console router:debug --show-controllers
Commits
-------
6fd32f3 Added option to show controllers optionally in the router:debug command
* 2.2:
[HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes#8917)
[HttpKernel] fixer HInclude src (closes#8951)
Fixed escaping of service identifiers in configuration
This PR was squashed before being merged into the master branch (closes#8928).
Discussion
----------
[Console] Improved xml generated when listing commands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I marked this PR as a BC break, as it breaks the xml schema generated by the command __app/console list --xml__
It replaces the first node (currently _symfony_) by a more generic node name ( _application_ ) and adds the application name and application version if specified in the _Symfony\Component\Console\Application_ constructor.
Before (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<symfony>
...
</symfony>
```
After (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<application name="Composer" version="x.x.x">
...
</application>
```
Commits
-------
7958227 [Console] Improved xml generated when listing commands
* 2.3:
[HttpFoundation] removed extra parenthesis
[Process][2.2] Fix Process component on windows
[HttpFoundation] improve perf of previous merge (refs #8882)
Request->getPort() should prefer HTTP_HOST over SERVER_PORT
Fixing broken http auth digest in some circumstances (php-fpm + apache).
fixed typo
Conflicts:
src/Symfony/Component/Process/Process.php
* 2.2:
[HttpFoundation] removed extra parenthesis
[Process][2.2] Fix Process component on windows
[HttpFoundation] improve perf of previous merge (refs #8882)
Request->getPort() should prefer HTTP_HOST over SERVER_PORT
Fixing broken http auth digest in some circumstances (php-fpm + apache).
fixed typo
Conflicts:
src/Symfony/Component/Process/Process.php
This PR was squashed before being merged into the 2.2 branch (closes#8924).
Discussion
----------
[Process][2.2] Fix Process component on windows
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8836, #8799, #7078
| License | MIT
This PR fixes Process on windows (almost, see note below).
- Some unit tests were not Windows compatible
- Use a file handle for STDERR as well as STDOUT to avoid blocking
- Decouple pipes and descriptors from Process
As this move some a part of Process in a sub class, I hope merging this in 2.3 and master would not be a PITA. I'm here to make some adjustments after theses merge if needed.
**Important note** :
We are using file handles instead of streams for `proc_open` pipes as described in the code (see [PHP bug #51800](https://bugs.php.net/bug.php?id=51800)). Unfortunately, this workaround may produce corrupted output/error output in some race conditions. That's why `AbstractProcessTest::testProcessPipes` randomly fails when using file handles (on unix and windows).
Commits
-------
4a76c76 [Process][2.2] Fix Process component on windows
* 2.3:
Fixing singular form for kisses, accesses and addresses.
fixed some circular references
[Security] fixed a leak in ExceptionListener
[Security] fixed a leak in the ContextListener
Ignore posix_istatty warnings
removed unused variable
[Form] fix iterator typehint
typos
Button missing getErrorsAsString() fixes#8084 Debug: Not calling undefined method anymore. If the form contained a submit button the call would fail and the debug of the form wasn't possible. Now it will work in all cases. This fixes#8084
Use isset() instead of array_key_exists() in DIC
Fixed annotation
[BrowserKit] fixed method/files/content when redirecting a request
[BrowserKit] removed some headers when redirecting a request
[BrowserKit] fixed headers when redirecting if history is set to false (refs #8697)
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
[BrowserKit] Pass headers when `followRedirect()` is called
Return BC compatibility for `@Route` parameters and default values
Conflicts:
src/Symfony/Component/Security/Http/Firewall/ContextListener.php
* 2.2:
Fixing singular form for kisses, accesses and addresses.
fixed some circular references
[Security] fixed a leak in ExceptionListener
[Security] fixed a leak in the ContextListener
Ignore posix_istatty warnings
typos
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
Return BC compatibility for `@Route` parameters and default values
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
src/Symfony/Component/Console/Application.php
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] fixed a leak in the ContextListener
| 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
Trying to fix leaks when using the same Kernel to handle several requests in a row without resetting the Container or shutting down the Kernel.
Commits
-------
899f176 [Security] fixed a leak in ExceptionListener
2fd8a7a [Security] fixed a leak in the ContextListener
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] fixes some memory leaks
| Q | A
| ------------- | ---
| Bug fix? | kinda
| New feature? | no
| BC breaks? | kinda as the Bundle `$reflected` property was removed
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
6307f41 [HttpKernel] removed a circular reference that prevents PHP GC to do its job
49fe3c7 [HttpKernel] removed the need to use reflection to get a bundle namespace
This PR was merged into the 2.2 branch.
Discussion
----------
Fixed some random leaks
| 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
-------
970405f fixed some circular references
This PR was merged into the master branch.
Discussion
----------
Added 'host' option to firewall configuration
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7103
| License | MIT
| Doc PR |
This is a follow-up of #8880.
Commits
-------
94d648b Added 'host' option to firewall configuration
set logger in extension , so its only done in debug mode
add psr/log to suggest of templating
add test for setLogger and refactor tests to not depend that much an
deprecated functionality
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2] Return BC compatibility for `@Route` parameters and default values
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7724
| License | MIT
Commits
-------
d400b5a Return BC compatibility for `@Route` parameters and default values
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8867
| License | MIT
| Doc PR | n/a
Commits
-------
c931eb7 [HttpKernel] fixed route parameters storage in the Request data collector (closes#8867)
* 2.2:
[BrowserKit] fixed method/files/content when redirecting a request
[BrowserKit] removed some headers when redirecting a request
[BrowserKit] fixed headers when redirecting if history is set to false (refs #8697)
[BrowserKit] Pass headers when `followRedirect()` is called
Conflicts:
src/Symfony/Component/BrowserKit/Client.php
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2] [BrowserKit] Pass headers when `followRedirect()` is called
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Tests pass? | yes
| Fixed tickets | #7929
| License | MIT
Commits
-------
0d07af8 [BrowserKit] Pass headers when `followRedirect()` is called
* 2.2:
[Security] fixed some phpdoc
Fixed PHPDoc Blocks
optimized circular reference checker
[HttpKernel] changed fragment URLs to be relative by default (closes#8458)
This PR was merged into the master branch.
Discussion
----------
[Security] Keep other query string parameters when switching users
| Q | A
| ---------------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| Doc PR | n/a
When switching users, the whole query string gets dropped when redirecting after the switch.
I think only the switch user parameter should be dropped from the query string.
Commits
-------
0a338f5 [Security] Keep other query string parameters when switching users
This PR was merged into the master branch.
Discussion
----------
duplicated the DebugClassLoader in the Debug component
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This is a follow-up for #8553.
Commits
-------
d146461 duplicated the DebugClassLoader in the Debug component
This PR was merged into the 2.2 branch.
Discussion
----------
Made fragment URLs relative instead of absolute by default
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8458
| License | MIT
| Doc PR | n/a
This fixes a regression introduced with the new fragment system where fragment URLs were generated as absolute URLs. As per the ESI spec, there is no need to generate an absolute URL and this can even be problematic when dealing with internal sub-requests in a more "complex" hosting environment.
Commits
-------
91234cd [HttpKernel] changed fragment URLs to be relative by default (closes#8458)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Until now, the `PropelTypeGuesser` could only find columns by their
name.
Example: `created_at` was recognized but `createdAt` wasn't.
This PR adds the ability to match column's phpNames (in a
case-insensitive way).
* 2.3:
Clear lazy loading initializer after the service is successfully initialized
[FrameworkBundle] added support for double-quoted strings in the extractor (closes#8797)
[SecurityBundle] Move format-dependent tests from SecurityExtensionTest
bumped Symfony version to 2.3.5-DEV
updated VERSION for 2.3.4
updated CHANGELOG for 2.3.4
bumped Symfony version to 2.2.7
updated VERSION for 2.2.6
update CONTRIBUTORS for 2.2.6
updated CHANGELOG for 2.2.6
clearToken exception is thrown at wrong place.
fix typo in test skipped message
[Form] Fixed Form::all() signature for PHP 5.3.3
[Form] Fixed Form::all() signature for PHP 5.3.3
[Locale] Fixed: Locale::setDefault() throws no exception when "en" is passed
[Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed
[Translation] Grammar fix
[Yaml] fixed embedded folded string parsing
[Validator] fixed Boolean handling in XML constraint mappings (closes#5603)
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
[FrameworkBundle] added support for double-quoted strings in the extractor (closes#8797)
[SecurityBundle] Move format-dependent tests from SecurityExtensionTest
Conflicts:
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] add test to ensure Content-Length is preserved on HEAD
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Related to #8873
Commits
-------
42f0596 [HttpFoundation] add test to ensure that Content-Length is preserved on HEAD method
This PR was squashed before being merged into the master branch (closes#8856).
Discussion
----------
[HttpFoundation] Improve test coverage
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
aef78f2 [HttpFoundation] Improve test coverage
This PR was merged into the master branch.
Discussion
----------
fixes fabpots comment at yaml pr#6
Commits
-------
8b7cc14 fixes fabpots comment at yaml pr#6
This PR was squashed before being merged into the master branch (closes#8488).
Discussion
----------
Add container aware trait
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | will create one if merged
This trait can be used inside a class to make it container aware. As it is not always possible to extend the abstract ContainerAware class, the code for creating a container aware class is usually copied over and over (most of the time unchanged), resulting in a lot of redundant code in your project. As my projects are PHP 5.4 based nowadays, I would like to be able to use a trait in these scenarios to improve my workflow.
Commits
-------
4c9e606 Add container aware trait
This PR was squashed before being merged into the 2.2 branch (closes#8840).
Discussion
----------
[SecurityBundle] Move format-dependent tests from SecurityExtensionTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | —
| License | MIT
| Doc PR | —
This PR solves issue with tests in the SecurityBundle: current structure of tests force to repeat the same test case for every format (PHP, XML, YAML) even if it doesn't depend on them (see #8782).
Commits
-------
d463e25 [SecurityBundle] Move format-dependent tests from SecurityExtensionTest
* 2.2:
bumped Symfony version to 2.2.7
updated VERSION for 2.2.6
update CONTRIBUTORS for 2.2.6
updated CHANGELOG for 2.2.6
clearToken exception is thrown at wrong place.
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
fix typo in test skipped message
[Form] Fixed Form::all() signature for PHP 5.3.3
[Translation] Grammar fix
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
Conflicts:
src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Form] Dereferenced Form::&all() since it is not supported for PHP <= 5.3.3
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
see 00bc2708bc
Commits
-------
ea480bd [Form] Fixed Form::all() signature for PHP 5.3.3
This PR was merged into the 2.2 branch.
Discussion
----------
[Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
There was one regression introduced by #8789, namely when exactly one message is passed to `transChoice()`. Before, the following code was perfectly valid:
```php
$translator = new IdentityTranslator(new MessageSelector());
echo $translator->transChoice('There are two apples', 2, array('%count%' => 2));
```
This didn't fail, because internally, the locale `null` was passed to `MessageSelector`, which always returned the index `0` in that case.
Now, the user's locale is passed, and if the selector returns anything but `0`, an exception is thrown.
I removed this exception for the case that exactly one standard message (without explicit interval) is passed. In that case, this message is returned (just like from `trans()`). If the message key contains more than one message, or if the message has explicit intervals, the exception will still be thrown. See the tests for clarification.
A use case for why no exception should be thrown is validation:
```php
/**
* @Assert\Length(min=2, minMessage="Please enter at least two characters")
*/
```
Commits
-------
2b3dcb9 [Translation] Grammar fix
0951b8d [Translation] Fixed regression: When only one rule is passed to transChoice(), this rule should be used
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Locale] Fixed: StubLocale::setDefault() throws no exception when "en" is passed
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Same as #8846 for 2.3+.
Commits
-------
e1f40f2 [Locale] Fixed: Locale::setDefault() throws no exception when "en" is passed
* 2.3:
fixed request format when forwarding a request
[HttpKernel] added a comment to warn about possible inconsistencies
added a functional test for locale handling in sub-requests
Fixed issue #6932 - Inconsistent locale handling in subrequests
fixed locale of sub-requests when explicitely set by the developer (refs #8821)
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
src/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php
src/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php
* 2.2:
fixed request format when forwarding a request
[HttpKernel] added a comment to warn about possible inconsistencies
added a functional test for locale handling in sub-requests
Fixed issue #6932 - Inconsistent locale handling in subrequests
fixed locale of sub-requests when explicitely set by the developer (refs #8821)
Conflicts:
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
fixed request format when forwarding a request
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6932
| License | MIT
| Doc PR | n/a
When calling forward() in a controller, the format is not the same as for the master request.
Commits
-------
7e87eb1 fixed request format when forwarding a request
This PR was merged into the 2.2 branch.
Discussion
----------
fixed locale management in sub-requests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6932, #5532, #8604
| License | MIT
| Doc PR | n/a
Same fix as #8821 but for `_locale`, and a rebase of #8604.
Commits
-------
7117328 [HttpKernel] added a comment to warn about possible inconsistencies
c4636e1 added a functional test for locale handling in sub-requests
05fdb12 Fixed issue #6932 - Inconsistent locale handling in subrequests
b3c3159 fixed locale of sub-requests when explicitely set by the developer (refs #8821)
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] added constants for HTTP status code in Response
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This adds constants for HTTP status code in Response. That's give the possibility to use constants instead of numbers in code.
These constants comes from FriendsOfSymfony/FOSRest but I think it is much better to keep them in Response as both the status texts and the constants should be synchronized.
ping @lsmith77
Commits
-------
0e14e1d [HttpFoundation] added constants for HTTP status code in Response
This PR was merged into the master branch.
Discussion
----------
removed deps checks in unit 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
As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more.
see fabpot/Silex#626 where we did the same a while ago for Silex.
Commits
-------
de50621 removed deps checks in unit tests
* 2.3:
[Routing] fix phpdoc
[Form] Extracted ReferencingArrayIterator out of VirtualFormAwareIterator
[Yaml] Fix comment containing a colon on a scalar line being parsed as a hash.
[Form] Added a test that ensures that setData() reacts to dynamic modifications of a form's children
[Form] Removed exception in Button::setData(): setData() is now always called for all elements in the form tree during the initialization of the tree
[Form] Removed call to deprecated method
[Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms)
[Form] Removed superfluous reset() call
[Form] Fixed: submit() reacts to dynamic modifications of the form children
This PR was merged into the 2.2 branch.
Discussion
----------
[Form][2.2] Fixed Form::submit() to react to dynamic form modifications
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
ref #3767, #3768, #4548, #8748
cc @Burgov
This PR ensures that fields that are added during the submission process of a form are submitted as well. For example:
```php
$builder = $this->createFormBuilder()
->add('country', 'choice', ...)
->getForm();
$builder->get('country')->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
$form = $event->getForm()->getParent();
$country = $event->getForm()->getData();
$form->add('province', 'choice', /* ... something with $country ... */);
});
```
Currently, the field "province" will not be submitted, because the submission loop uses `foreach`, which ignores changes in the underyling array.
Additionally, this PR ensures that `setData()` is called on *every* element of a form (except those inheriting their parent data) when `setData()` is called on the root element (i.e., during initialization). Currently, when some of the intermediate nodes (e.g. embedded forms) are submitted with an empty value, `setData()` won't be called on the nodes below (i.e. the fields of the embedded form) until `get*Data()` is called on them. If `getData()` is *not* called before `createView()`, any effects of `*_DATA` event listeners attached to those fields will not be visible in the view.
Commits
-------
cd27e1f [Form] Extracted ReferencingArrayIterator out of VirtualFormAwareIterator
ccaaedf [Form] PropertyPathMapper::mapDataToForms() *always* calls setData() on every child to ensure that all *_DATA events were fired when the initialization phase is over (except for virtual forms)
19b483f [Form] Removed superfluous reset() call
00bc270 [Form] Fixed: submit() reacts to dynamic modifications of the form children
* 2.3:
[Locale] fixed build-data exit code in case of an error
fixed request format of sub-requests when explicitely set by the developer (closes#8787)
Sets _format attribute only if it wasn't set previously by the user.
Exclude little words of 'ee' to 'oo' plural transformation
fixed the format of the request used to render an exception
Fix typo in the check_path validator
added a missing use statement (closes#8808)
fix for Process:isSuccessful()
Include untrusted host in the exception message
Conflicts:
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
src/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php
* 2.2:
[Locale] fixed build-data exit code in case of an error
fixed request format of sub-requests when explicitely set by the developer (closes#8787)
Sets _format attribute only if it wasn't set previously by the user.
Exclude little words of 'ee' to 'oo' plural transformation
fixed the format of the request used to render an exception
Fix typo in the check_path validator
added a missing use statement (closes#8808)
fix for Process:isSuccessful()
Conflicts:
UPGRADE-3.0.md
src/Symfony/Component/Locale/Resources/data/build-data.php
This PR was merged into the 2.2 branch.
Discussion
----------
Sets _format attribute only if it wasn't set previously by the user
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8787, #8791
| License | MIT
| Doc PR |
Commits
-------
9bb7a3d fixed request format of sub-requests when explicitely set by the developer (closes#8787)
fa35597 Sets _format attribute only if it wasn't set previously by the user.
This PR was merged into the 2.2 branch.
Discussion
----------
[HttpKernel] Fix request _format duplication for HttpKernel's ExceptionListener
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8777, #8778
| License | MIT
This is a better fix for #8777.
Commits
-------
f946108 fixed the format of the request used to render an exception
This PR was merged into the master branch.
Discussion
----------
[Console] Improved searching commands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I was very annoyed when I typed the command ``app/console a:d`` and I saw this exception ``The namespace "a" is ambiguous (assets, assetic)``. However, the shortcut ``a:d`` is unambiguous (``assets:install`` vs ``assetic:dump``).
Commits
-------
0beec8a [Console] Improved searching commands
This PR was merged into the 2.2 branch.
Discussion
----------
[Process] fix for Process:isSuccessful()
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | []
| License | MIT
| Doc PR | []
This is a rebase of https://github.com/symfony/symfony/pull/8801
If you call isSuccessful() on a running process you would get true because of 0 == null. I think that is not the expected behavior and that is not what phpdoc @return block said so.
Commits
-------
262879d fix for Process:isSuccessful()
* 2.3:
[Process] Use a consistent way to reset data of the process latest run
CS fix
[HttpFoundation] Fixed removing a nonexisting namespaced attribute.
[Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector
SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event
Conflicts:
src/Symfony/Component/Process/Process.php
* 2.2:
[Process] Use a consistent way to reset data of the process latest run
CS fix
[HttpFoundation] Fixed removing a nonexisting namespaced attribute.
[Validation] Fixed IdentityTranslator to pass correct Locale to MessageSelector
SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event
Conflicts:
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.2 branch.
Discussion
----------
[MonologBridge] Allow SwiftMailerHandler to listen to kernel.terminate.event
This PR accompanies symfony/MonologBundle#51. Both are intended to fixsymfony/symfony-standard#425.
MonologBundle configures SwiftMailerHandler as a Monolog handler and injects the proper transport service.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 425
| License | MIT
| Doc PR | 2905
Commits
-------
62238b8 CS fix
c6ecd83 SwiftMailerHandler in Monolog bridge now able to react to kernel.terminate event
This PR was merged into the 2.2 branch.
Discussion
----------
[2.2][Process] Use a consistent way to reset data of the process latest run
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
It is actually useful when cloning or running again a process.
Commits
-------
0723c10 [Process] Use a consistent way to reset data of the process latest run
As Composer is now widely used in the PHP world, having to run composer
install before running the test suite is expected. This also has the
nice benefit of removing a bunch of code, making things easier to
maintain (there is only one place to declare a dev dependency), and
probably more.
Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files"
{HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage
Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files"
* 2.3:
[Process] Revert change
[Process] Fix#8746 : slowness added in unit tests since #8741
[Process] Fix#8742 : Signal-terminated processes are not successful
corrected English grammar (s/does not exists/does not exist)
[Process] Add more precision to Process::stop timeout
[Process] Avoid zombie process in case of unit tests failure
[Process] Fix#8739
[Process] Add failing test for #8739
[Process] Fix CS
[TwigBridge] removed superflous ; when rendering form_enctype() (closes#8660)
Fixed documentation grammar for AuthenticationManagerInterface::authenticate()
[Validator] fixed the wrong isAbstract() check against the class (fixed#8589)
[TwigBridge] Prevent code extension to display warning
Fix internal sub-request creation
[FrameworkBundle] made code more generic
[Form] Moved auto_initialize option to the BaseType
Use strstr instead of strpos
Make sure ContextErrorException is loaded during compile time errors
Fix empty process argument escaping on Windows
Ignore null value in comparison validators
Conflicts:
src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix#8742 : Signal-terminated processes are not successful
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | require #8741 to be merged to pass tests
| Fixed tickets | #8742
| License | MIT
Commits
-------
909fab6 [Process] Fix#8742 : Signal-terminated processes are not successful
* 2.2:
corrected English grammar (s/does not exists/does not exist)
[Process] Add more precision to Process::stop timeout
[Process] Avoid zombie process in case of unit tests failure
[Process] Fix#8739
[Process] Add failing test for #8739
[Process] Fix CS
Fixed documentation grammar for AuthenticationManagerInterface::authenticate()
[Validator] fixed the wrong isAbstract() check against the class (fixed#8589)
[TwigBridge] Prevent code extension to display warning
Use strstr instead of strpos
Conflicts:
src/Symfony/Component/Finder/Shell/Command.php
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.2 branch.
Discussion
----------
[Process][2.2] Fix#8739
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8739
| License | MIT
This adds a fix to #8739. Whenever a call is done to to any non-blocking methods (`Process::isRunning`, `Process::isStopped`, `Process::isTerminated`, `Process::getStatus`, `Process::getPid`...), buffers are read, and callback executed.
Such code will now work :
```
$process->start(function ($type, $data) {
echo $data;
});
while ($process->isRunning()) {
// some stuff
// callback is executed
}
```
Commits
-------
fa769a2 [Process] Add more precision to Process::stop timeout
57d4159 [Process] Avoid zombie process in case of unit tests failure
3ef517b [Process] Fix#87397716fb2 [Process] Add failing test for #8739bff6f3c [Process] Fix CS
This PR was merged into the master branch.
Discussion
----------
changed the ESI fragment renderer to be always registered
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This is an alternative implementation for #8427
Commits
-------
09f727b changed the ESI fragment renderer to be always registered
This PR was merged into the master branch.
Discussion
----------
[TwigBundle] Created stopwatch tag for profiling templates
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7953
| License | MIT
| Doc PR | symfony/symfony-docs#2630
This PR is the continuation of #7953
This PR adds a new tag to Twig which you can use to time parts of a template and see it in the timing tab of the profiler.
Usage:
````jinja
{% stopwatch foo %}
... some things that gets timed
{% endstopwatch %}
````
Commits
-------
29a58e7 change the stopwatch argument to be any valid expression
4590974 removed code that prevents the stopwatch to work properly
2f67776 removed unneeded safeguard as it's already done during compilation
bbad387 fixed CS
f39ed57 Created stopwatch tag
The $_ENV superglobal is not populated if E is not present in the variables_order directive. Since populating this variable is not recommended (for performance reasons), we should not rely on it.
This change updates the builder so $env=null is never passed to proc_open(). Instead we always merge the $_SERVER superglobal into any environment variables that were manually set on the builder (unless inherit has been disabled).
This PR was merged into the master branch.
Discussion
----------
[Security] Added a check for strategies in AccessDecisionManager
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8646
| License | MIT
Commits
-------
ee36380 [Security] Added a check for strategies in AccessDecisionManager
This PR was merged into the master branch.
Discussion
----------
Add the referer information that could help you findout where's the link comes from
| 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
#8218 rebased on master and slightly tweaked.
Commits
-------
8eb163d [HttpKernel] tweaked previous commit
bb5954e Add the referer information that could help you findout where's the link comes from.
This PR was squashed before being merged into the master branch (closes#8639).
Discussion
----------
[DoctrineBridge] [ORM] Use custom cache namespace option if it is specified
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This allows an option `namespace` to be used instead of having Symfony generate the hash. If the option is not set, the original behaviour will occur.
While this code will execute on the current version, this change depends on https://github.com/doctrine/DoctrineBundle/pull/198 to fully work.
Commits
-------
e6687d9 [DoctrineBridge] [ORM] Use custom cache namespace option if it is specified
This PR was squashed before being merged into the 2.3 branch (closes#8349).
Discussion
----------
[Form] Moved auto_initialize option to the BaseType
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8162
| License | MIT
| Doc PR | -
I'm not fully confident in this change, so let someone review it before mergin please. My thinking was - since "auto_initialized" option is always passed to a form factory, it should be required by the base type.
Commits
-------
6ed0fdf [Form] Moved auto_initialize option to the BaseType
This PR was squashed before being merged into the master branch (closes#8587).
Discussion
----------
[Filesystem] fixed exception message when not a able to write to a directory
| 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 simply fixes an exception message in the Filesystem Component when a directory is not writable while dumping a file via `dumpFile()`.
Commits
-------
8b32a4b [Filesystem] fixed exception message when not a able to write to a directory
This PR was squashed before being merged into the master branch (closes#8640).
Discussion
----------
[Console] Added more semantic commands to detect verbosity
| 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
-------
0fa3a74 [Console] Added more semantic commands to detect verbosity
This PR was squashed before being merged into the master branch (closes#8603).
Discussion
----------
[Console] Added a way to set terminal dimensions
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8595
| License | MIT
| Doc PR | n/
Commits
-------
ce32981 [Console] Added a way to set terminal dimensions
This PR was merged into the 2.3 branch.
Discussion
----------
Validators
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR avoid comparison validators to be executed if the compared value is null.
Commits
-------
48338fc Ignore null value in comparison validators
This PR was squashed before being merged into the master branch (closes#8663).
Discussion
----------
[DependencyInjection] Test constants
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | **yes**
| License | MIT
Added a test for constant support in XML configuration files.
Related PR: #8661
Commits
-------
9acedb7 [DependencyInjection] Test constants
* 2.3:
added missing support for the new output API in PHP 5.4+
Fixed bug introduced in #8675
made the filesystem loader compatible with Twig 2.0
bumped Symfony version to 2.3.4-DEV
updated VERSION for 2.3.3
updated CHANGELOG for 2.3.3
bumped Symfony version to 2.2.6
updated VERSION for 2.2.5
update CONTRIBUTORS for 2.2.5
updated CHANGELOG for 2.2.5
[Intl] Updated stubs to reflect ICU 51.2
replaced deprecated Twig features
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
added missing support for the new output API in PHP 5.4+
Fixed bug introduced in #8675
made the filesystem loader compatible with Twig 2.0
bumped Symfony version to 2.2.6
updated VERSION for 2.2.5
update CONTRIBUTORS for 2.2.5
updated CHANGELOG for 2.2.5
replaced deprecated Twig features
Conflicts:
src/Symfony/Bridge/Twig/Extension/FormExtension.php
src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] add missing support for the new output API in PHP 5.4...
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As of PHP 5.4, the new output API has been introduced:
* https://github.com/php/php-src/blob/master/README.NEW-OUTPUT-API
* 11d24c1593
* https://bugs.php.net/bug.php?id=64977
Commits
-------
188c0ce [HttpFoundation] added missing support for the new output API in PHP 5.4+
This PR was merged into the master branch.
Discussion
----------
Adapt security collector template name to webprofiler conventions
| Q | A
| ------------- | ---
| Bug fix? | no, but syntax consistency & future compatibility(?)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | fabpot/Twig#1156 which was reverted but will be merged in the future
| License | MIT
Use Twig namespace syntax instead of bundle syntax for security webprofiler template to be consistent with @WebProfiler template names.
Commits
-------
66c792b Adapt security collector template name to webprofiler conventions
Without adding the exists() method, the code happens to work by chance,
just because the current implementation of Twig exits() method calls
findTemplate().
But we know that it won't be the case anymore as of Twig 2.0.
This PR was merged into the 2.2 branch.
Discussion
----------
replaced deprecated Twig features
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As Symfony depends on Twig 1.11+, removing the usage of deprecated features will allow Symfony 2.2+ to work with Twig 2.0.
Commits
-------
322f880 replaced deprecated Twig features
This PR was merged into the 2.3 branch.
Discussion
----------
[Intl] Updated stubs to reflect ICU 51.2
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In addition to the upgrade of the ICU component to ICU 51.2, this PR upgrades the stub classes to behave like their C counterparts do with ICU 51.2.
Commits
-------
8fa0453 [Intl] Updated stubs to reflect ICU 51.2
This PR was merged into the master branch.
Discussion
----------
adds ability to define an idle timeout
This adds the ability to define an idle timeout which in contrast to the current timeout considers only the time since the last output was produced by a process.
It also adds a special exception for timeout cases.
Commits
-------
b922ba2 adds ability to define an idle timeout
* 2.3:
[HttpKernel] Added a missing use statement.
[Process] Increased the timeout in a test to prevent random failures when travis is under a heavy load.
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpKernel] Added a missing use statement
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Build was broken by #8572 merged into 2.3 and master.
Commits
-------
ccb497a [HttpKernel] Added a missing use statement.
* 2.3:
moved some fixed dep versions from 2.2.* to ~2.2 (refs #8613)
[HttpKernel] added a missing dep for dev
[Form] fixed wrong call to setTimeZone() (closes#8644)
Fix issue with \DateTimeZone::UTC / 'UTC' for PHP 5.4
[Form] Fixed patched forms to be valid even if children are not submitted
Revert "[Form] Fix of "PATCH'ed forms are never valid""
[Form] Fixed: If a form is not present in a request, it is not automatically submitted
Fixes link indices
[Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser
Revert "[Form] Remove "value" attribute on empty_value option"
[routing] added ability for apache matcher to handle array values
removed dead code and fixed CS
[Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes#8589)
* 2.2:
[HttpKernel] added a missing dep for dev
[Form] fixed wrong call to setTimeZone() (closes#8644)
Fix issue with \DateTimeZone::UTC / 'UTC' for PHP 5.4
[Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser
[routing] added ability for apache matcher to handle array values
removed dead code and fixed CS
[Validator] fixed StaticMethodLoader trying to invoke methods of abstract classes (closes#8589)
Conflicts:
src/Symfony/Bundle/TwigBundle/TokenParser/RenderTokenParser.php
src/Symfony/Component/Form/FormConfigBuilder.php
src/Symfony/Component/HttpKernel/composer.json
src/Symfony/Component/Validator/Tests/GraphWalkerTest.php
This PR was squashed before being merged into the master branch (closes#8416).
Discussion
----------
[Serializer] Add the missing context support inside the XmlEncoder
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
$context variable was added in symfony 2.3 but not inside this encoder
Commits
-------
5c27d7e [Serializer] Add the missing context support inside the XmlEncoder
This PR was squashed before being merged into the master branch (closes#8490).
Discussion
----------
[Validator] improved image validator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | symfony/symfony-docs#2840
CHANGELOG
* Added options to validate image aspect ratio (`minRatio` and `maxRatio`)
* Added options to validate if the image ratio is square, landscape or portrait (`allowSquare`, `allowLandscape`, and `allowPortrait`)
Commits
-------
b030624 [Validator] improved image validator
This PR was merged into the master branch.
Discussion
----------
[Serializer] Added XML attributes support in XmlEncoder
This is a rebase and refactoring of #8424.
---
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8424
| License | MIT
| Doc PR | -
---
| New Code | Result
| --- | ---
| Code coverage | 100%
| PSR-2 | No violations
| PHP-CS-Fixer | No changes
---
### TODO
- [ ] **Q**: I looked through `symfony-docs` for any mention of `xml_root_node_name` which is already implemented, but failed to find any. How to best document those new additions?
Commits
-------
21218cc [Serializer] Added XML attributes support for DomDocument in XmlEncoder.
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed patched forms to be valid even if children are not submitted
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8111
| License | MIT
| Doc PR | -
#8362 was reverted because it introduces a failing test that is caused by a regression. This PR takes the alternative approach that
* unsubmitted fields in the PATCH request remain unsubmitted
* `isValid()` ignores unsubmitted children
* `mapFormsToData()` ignores unsubmitted children
In my opinion this is a more proper solution than #8362.
Commits
-------
85330a6 [Form] Fixed patched forms to be valid even if children are not submitted
50f201e Revert "[Form] Fix of "PATCH'ed forms are never valid""
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fixed: If a form is not present in a request, it is not automatically submitted
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8385
| License | MIT
| Doc PR | -
This PR changes the following behavior of `handleRequest()`:
Current behavior:
```php
$_POST = array('foo' => 'bar');
$form = $factory->createNamed('myform', 'mytype');
// "myform" is not present in the request
$form->handleRequest();
assert(true === $form->isSubmitted());
```
Behavior after PR:
```php
$_POST = array('foo' => 'bar');
$form = $factory->createNamed('myform', 'mytype');
// "myform" is not present in the request
$form->handleRequest();
assert(false === $form->isSubmitted());
```
As #8385 pointed out, the latter behavior is expected, so I consider the current behavior a bug.
Commits
-------
cb5e765 [Form] Fixed: If a form is not present in a request, it is not automatically submitted
This PR was merged into the 2.3 branch.
Discussion
----------
Fixes link indices
Fixes links in the symfony/intl README.md
Commits
-------
d1e5710 Fixes link indices
This PR was merged into the 2.2 branch.
Discussion
----------
[Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser
| Q | A
| ------------- | ---
| Bug fix? | yes (together with #8623)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7678#8478#8526
| License | MIT
| Doc PR | -
Commits
-------
97cbb19 [Form] Removed the "disabled" attribute from the placeholder option in select fields due to problems with the BlackBerry 10 browser
This PR was merged into the 2.2 branch.
Discussion
----------
[Routing] add ability for apache matcher to handle array values
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8567
Commits
-------
c138304 [routing] added ability for apache matcher to handle array values
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] deprecates FlashBag::getIterator() method
This PR does not fix#8294 but this issue is not fixable. The `FlashBag::getIterator()` method actualy does not make any sense and is confusing. It should be removed. I just added a `@deprecated` tag and `Will be removed in 3.0.` message because removing it now would introduce a BC break. I guess issue #8294 can be closed after merge as it make not more sense than the incriminated method.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8294
Commits
-------
ce8a7d6 [HttpFoundation] deprecated FlashBag::getIterator() method
This PR was merged into the master branch.
Discussion
----------
[WebProfilerBundle] make toolbar listener instantiation conditional
In the `WebProfilerBundle`, if `intercept_redirects` and `toolbar` options are both `false`, the `toolbar.xml` config file should not be loaded as the listener becomes useless.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8130
Commits
-------
17cbfc8 [WebProfilerBundle] made toolbar listener instantiation conditional
This reverts commit a2b15359d8.
Conflicts:
src/Symfony/Component/Form/Form.php
The commit is reverted because it introduces a bug demonstrated by a currently failing test.
This PR was merged into the master branch.
Discussion
----------
[FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times
| 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 fixes a regression introduced in #8242. Before this PR, the commands were always getting the current container registered in the kernel. But as the commands are now registered only once, if the container changes, the commands were not aware of this change. That happens quite frequently in functional tests where the Kernel is booted and shutdown several times in the same process.
Commits
-------
1bd45b3 [FrameworkBundle] fixed regression where the command might have the wrong container if the application is reused several times
This PR was merged into the master branch.
Discussion
----------
[Debug] Developer friendly Class Not Found and Undefined Function errors
This is a followup of #8156
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8156
| License | MIT
| Doc PR | n/a
Here is the original description from #8156:
Per a discussion with @weaverryan and others, I took a crack at enhancing the exception display for class not found errors and undefined function errors. It is not the cleanest solution but this is a work in progress to see whether or not following this path makes sense.
# Class Names
## Class Not Found: Unknown Class (Global Namespace)
```php
<?php
new WhizBangFactory();
```
> Attempted to load class 'WhizBangFactory' from the global namespace in foo.php line 12. Did you forget a use statement for this class?
## Class Not Found: Unknown Class (Full Namespace)
```php
<?php
namespace Foo\Bar;
new WhizBangFactory();
```
> Attempted to load class 'WhizBangFactory' from namespace 'Foo\Bar' in foo.php line 12. Do you need to 'use' it from another namespace?
## Class Not Found: Well Known Class (Global Namespace)
```php
<?php
new Request();
```
> Attempted to load class 'Request' from the global namespace in foo.php line 12. Did you forget a use statement for this class? Perhaps you need to add 'use Symfony\Component\HttpFoundation\Request' at the top of this file?
## Class Not Found: Well Known Class (Full Namespace)
```php
<?php
namespace Foo\Bar;
new Request();
```
> Attempted to load class 'Request' from namespace 'Foo\Bar' in foo.php line 12. Do you need to 'use' it from another namespace? Perhaps you need to add 'use Symfony\Component\HttpFoundation\Request' at the top of this file?
# Functions
## Undefined Function (Global Namespace)
```php
<?php
// example.php:
// namespace Acme\Example;
// function test_namespaced_function()
// {
// }
include "example.php";
test_namespaced_function()
```
> Attempted to call function 'test_namespaced_function' from the global namespace in foo.php line 12. Did you mean to call: '\acme\example\test_namespaced_function'?
## Undefined Function (Full Namespace)
```php
<?php
namespace Foo\Bar\Baz;
// example.php:
// namespace Acme\Example;
// function test_namespaced_function()
// {
// }
include "example.php";
test_namespaced_function()
```
> Attempted to call function 'test_namespaced_function' from namespace 'Foo\Bar\Baz' in foo.php line 12. Did you mean to call: '\acme\example\test_namespaced_function'?
## Undefined Function: Unknown Function (Global Namespace)
```php
<?php
test_namespaced_function()
```
> Attempted to call function 'test_namespaced_function' from the global namespace in foo.php line 12.
## Undefined Function: Unknown Function (Full Namespace)
```php
<?php
namespace Foo\Bar\Baz;
test_namespaced_function()
```
> Attempted to call function 'test_namespaced_function' from namespace 'Foo\Bar\Baz' in foo.php line 12.
Commits
-------
bde67f0 fixed an error message
80e19e2 [Debug] added some missing phpdocs
968764b [Debug] refactored unit tests
cefa1b5 [Debug] moved special fatal error handlers to their own classes
53ab284 [Debug] made Debug find FQCN automatically based on well-known autoloaders
208ca5f [Debug] made guessing of possible class names more flexible
a0b1585 [Debug] fixed CS
6671945 Developer friendly Class Not Found and Undefined Function errors.
This PR was merged into the 2.2 branch.
Discussion
----------
removed dead code and fixed CS
| 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
-------
7d58147 removed dead code and fixed CS
* 2.3:
[Form] fixes empty file-inputs get treated as extra field
return 0 if there is no valid data
[DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it
[DependencyInjection] fixed#8570
fixed file permission
The ignoreAttributes itself should be ignored, too.
[Tests] Tests on php 5.5 should pass
[Twig] fixed TwigEngine::exists() method when a template contains a syntax error (closes#88546)
* 2.2:
return 0 if there is no valid data
[Tests] Tests on php 5.5 should pass
[Twig] fixed TwigEngine::exists() method when a template contains a syntax error (closes#88546)
This PR was squashed before being merged into the 2.3 branch (closes#8575).
Discussion
----------
[Form] fixes empty file-inputs get treated as extra field
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8548, #8566
| License | MIT
Commits
-------
e5fba3c [Form] fixes empty file-inputs get treated as extra field
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] setLazy not work on DefinitionDecorator
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8570
| License | MIT
| Doc PR | n/a
Commits
-------
970ce2c [DependencyInjection] fixed#8570
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it (closes#8392)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8392
| License | MIT
| Doc PR | n/a
Commits
-------
50d0727 [DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it
* 2.3:
[Validator] fixed ConstraintViolation:: incorrect when nested
handle Optional and Required constraints from XML or YAML sources correctly
added missing comments to WebTestCase
Fixed#8455: PhpExecutableFinder::find() does not always return the correct binary
Added missing files .gitignore
[DependencyInjection] Fix Container::camelize to convert beginning and ending chars
[Validator] Fixed groups argument misplace for validateValue method from validator class
[Form] Fix of "PATCH'ed forms are never valid"
* 2.2:
[Validator] fixed ConstraintViolation:: incorrect when nested
handle Optional and Required constraints from XML or YAML sources correctly
added missing comments to WebTestCase
Fixed#8455: PhpExecutableFinder::find() does not always return the correct binary
[DependencyInjection] Fix Container::camelize to convert beginning and ending chars
[Validator] Fixed groups argument misplace for validateValue method from validator class
Conflicts:
src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php
src/Symfony/Component/Validator/Tests/GraphWalkerTest.php
This PR was squashed before being merged into the 2.2 branch (closes#8421).
Discussion
----------
[Validator] fixed ConstraintViolation::$propertyPath incorrect when nested
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8351
| License | MIT
In nested constraints, the property path will be overwritten in the context (as there would be a recursive call to CollectionValidotor when nested). Reason is, in ConstraintValidatorFactory object is loaded from memory if exists and context is initialized with the new context. So, other constraints after the nested constraints PropertyPath would be wrong.
So I think better create a new object for CollectionValidator always.
see this https://gist.github.com/alexkappa/5851274
It shows [name][email] even though the email is not under the name node.
Commits
-------
28e0709 [Validator] fixed ConstraintViolation:: incorrect when nested
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Fix of "PATCH'ed forms are never valid". Fixes#8111
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8111
| License | MIT
Commits
-------
a2b1535 [Form] Fix of "PATCH'ed forms are never valid"
This PR was squashed before being merged into the master branch (closes#8303).
Discussion
----------
[HttpFoundation] Add accessors methods to session handlers
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7683
| License | MIT
| Doc PR |
Commits
-------
460c696 [HttpFoundation] Add accessors methods to session handlers
This PR was squashed before being merged into the master branch (closes#8452).
Discussion
----------
[Console] Make DialogHelper respect interaction settings
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8079
| License | MIT
| Doc PR | -
This is based on @cordoval's #8366, but it tries to not break BC and to be a little more userfriendly.
@stof I can't seem to follow the infinite loop you talked about in #8366 . `DialogHelper::ask` will return the default, which is `null`, that breaks the while loop and it returns the default.
Commits
-------
1cde723 [Console] Make DialogHelper respect interaction settings
This PR was merged into the 2.2 branch.
Discussion
----------
[Validator] Fixed groups argument misplace for validateValue method from validator class
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
Signature of validateValue method in ExecutionContext Class is this.
```
public function validateValue($value, $constraints, $subPath = '', $groups = null)
```
But this was called wrongly in Validator Class.
Commits
-------
d3eb9b7 [Validator] Fixed groups argument misplace for validateValue method from validator class
This PR was squashed before being merged into the master branch (closes#8430).
Discussion
----------
[Form] Validation listener remove count()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Removing what looks a extra count not needed.
Commits
-------
23a71e5 [Form] Validation listener remove count()
* 2.3:
[PropertyAccess] added moves to pluralMap
[Security] fixed issue where authentication listeners clear unrelated tokens
added greek translation
[DependencyInjection] Add exception for service name not dumpable in PHP
bumped Symfony version to 2.3.3-DEV
fix issue #8499 modelChoiceList call getPrimaryKey on a non object
updated VERSION for 2.3.2
updated CHANGELOG for 2.3.2
[DependencyInjection] Add exception for service name not dumpable in PHP
fixed typo
bumped Symfony version to 2.2.5
updated VERSION for 2.2.4
update CONTRIBUTORS for 2.2.4
updated CHANGELOG for 2.2.4
Fixed NativeSessionStorage:regenerate when does not exists
removed extraneous whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
[PropertyAccess] added moves to pluralMap
[Security] fixed issue where authentication listeners clear unrelated tokens
fix issue #8499 modelChoiceList call getPrimaryKey on a non object
[DependencyInjection] Add exception for service name not dumpable in PHP
Conflicts:
src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
src/Symfony/Component/Security/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection][2.3] Add exception for service name not dumpable in PHP
Same as #8494 for branch 2.3 since the DI component has been refactored (bb797ee755, f1c2ab78af)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8485#8030
| License | MIT
| Doc PR | n/a
Throws an exception when the DIC is dumped to PHP, before generating invalid PHP.
The regex comes from the PHP doc: http://www.php.net/manual/en/language.oop5.basic.php
Commits
-------
9ac3556 [DependencyInjection] Add exception for service name not dumpable in PHP
This PR was merged into the 2.2 branch.
Discussion
----------
[DependencyInjection] Add exception for service name not dumpable in PHP
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8485#8030
| License | MIT
| Doc PR | n/a
Throws an exception when the DIC is dumped to PHP, before generating invalid PHP.
The regex comes from the PHP doc: http://www.php.net/manual/en/language.oop5.basic.php
Commits
-------
242b318 [DependencyInjection] Add exception for service name not dumpable in PHP
This PR was merged into the 2.2 branch.
Discussion
----------
[Security] fixed issue where x509 authentication clears unrelated tokens
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8226
| License | MIT
| Doc PR | symfony/symfony-docs#2825
| Notes | Replaces PR #8283
TODO:
- [x] Feedback on change to make sure security is not affected
- [x] Fix other authentication listeners (they suffer the same problem)
- [x] Write unit tests for bug and maybe a few listener classes as well
This pull request is the summary of the problem mentioned in the ticket above.
It only fixes the "disappearing token" problem for one authentication provider, not all. If acceptable, the change needs to be applied to all authentication listeners since they always clear all tokens from the security context.
Commits
-------
2317443 [Security] fixed issue where authentication listeners clear unrelated tokens
This commit fixes an issue where authentication listeners clear all security tokens in case of authentication failure.
This behavior makes it impossible to combine certain authentication mechanisms, notably x509 with form-based login.
This PR was merged into the master branch.
Discussion
----------
security acl dbal schema: inject the schema instead of the whole container
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
following a discussion with @Stof on https://github.com/doctrine/DoctrinePHPCRBundle/pull/78 i thought to clean up the code i used as template as well.
Commits
-------
b960004 security acl dbal schema: inject the schema instead of the whole container
This is a combination of 2 commits.
- [Serializer] Added encoding support for DomDocument in XmlEncoder
- [Serializer] Refactor code to allow setting <?xml standalone ?>
This commit refactors the createDomDocument(..) method in XmlEncoder
so
it can set the 'version', 'encoding' and 'standalone' attributes on
the
DOM document.
Code coverage of new code: 100%. Tests: pass.
* 2.2:
fixed typo
bumped Symfony version to 2.2.5
updated VERSION for 2.2.4
update CONTRIBUTORS for 2.2.4
updated CHANGELOG for 2.2.4
Fixed NativeSessionStorage:regenerate when does not exists
removed extraneous whitespaces
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the master branch.
Discussion
----------
[HttpKernel] changed the fragment handler to explicitely disallow non-scalar in generated URIs (refs #8263)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8263
| License | MIT
| Doc PR | n/a
When using the `render()` function in Twig with a `controller()` reference, the attributes can contain non-scalar. That's fine for the inline strategy, but it cannot work for other strategies as it then involves a proper HTTP request.
So, this PR properly throw an exception in such situations to avoid difficult to find bugs.
Commits
-------
43ce368 [HttpKernel] added a unit test to demonstrate that passing objects works for inline controllers
70f3399 [HttpKernel] changed the fragment handler to explicitely disallow non-scalar in generated URIs (refs #8263)
* 2.3:
Reverts JSON_NUMERIC_CHECK
Just a Typo
[Yaml] removed wrong comment removal inside a string block
Fixing configuration validation error messages.
[HtppKernel] fixed inline fragment renderer
fixed inline fragment renderer
ProgressHelper shows percentage complete.
Comment fixed: RedrawFrequency is measured in steps.
fix handling of a default 'template' as a string
Conflicts:
src/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php
* 2.2:
Reverts JSON_NUMERIC_CHECK
Just a Typo
[Yaml] removed wrong comment removal inside a string block
Fixing configuration validation error messages.
[HtppKernel] fixed inline fragment renderer
fixed inline fragment renderer
ProgressHelper shows percentage complete.
Comment fixed: RedrawFrequency is measured in steps.
fix handling of a default 'template' as a string
Conflicts:
src/Symfony/Component/Console/Helper/ProgressHelper.php
src/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
This PR was merged into the 2.2 branch.
Discussion
----------
[Console] Show completed percentage, not a rounded value.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This pull request has 2 minor changes:
- 199/200 => 99% instead of 100% (there was no test case and I added one, everything else passes) In the past the value was rounded, the progress bar ended up being 100% for 0.5% of the total execution time. That means 18 seconds on a 1 hour process.
- Fixed the comments to match the inner workings of RedrawFrequency.
First Symfony PR and second overall so hope I just did this the right way.
PR #8419 Rebased for 2.2
Commits
-------
91bb757 ProgressHelper shows percentage complete.
40591b9 Comment fixed: RedrawFrequency is measured in steps.
In the past the value was rounded, the progressbar ended up being 100% for 0.5%
of the total execution time. That means 18 seconds on a 1 hour process.
* 2.3:
Update JsonResponse.php
[HttpKernel] fixed the inline renderer when passing objects as attributes (closes#7124)
CookieJar remove unneeded var, Client remove unneeded else
[DI] Fixed bug requesting non existing service from dumped frozen container
Update validators.sk.xlf
[WebProfiler] fix content-type parameter
Replace romaji period characters with Japanese style zenkaku period characters
fixed CS
fixed CS
[Console] Avoided an unnecessary check.
Added missing French validator translations
typo first->second
Passed the config when building the Configuration in ConfigurableExtension
removed unused code
Fixed variable name used in translation cache
Conflicts:
src/Symfony/Component/Console/Event/ConsoleCommandEvent.php
* 2.2:
Update JsonResponse.php
[HttpKernel] fixed the inline renderer when passing objects as attributes (closes#7124)
[WebProfiler] fix content-type parameter
Replace romaji period characters with Japanese style zenkaku period characters
Passed the config when building the Configuration in ConfigurableExtension
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
This PR was merged into the master branch.
Discussion
----------
[Filesystem] create FilesystemTestCase from FilesystemTest
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
FilesystemTest methods are useful for testing any class are working with file system
Commits
-------
266df16 [Filesystem] create FilesystemTestCase from FilesystemTest
This PR was merged into the 2.2 branch.
Discussion
----------
Passed the config when building the Configuration in ConfigurableExtension
| 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 passes the config to ``getConfiguration`` instead of passing an empty array in ConfigurableExtension. This makes the class usable for bundle overwriting the ``getConfiguration`` method to use the config instead of using the default logic (which does not need the config).
Commits
-------
a830001 Passed the config when building the Configuration in ConfigurableExtension
It only makes sense to do the second check if the --no-interaction
option was not passed.
Running posix_isatty() raises a warning with some stream types (like MEMORY).
With this patch, warning could be avoided by passing the --no-interaction option.
* 2.3: (33 commits)
[Form] fixed INF usage which does not work on Solaris (closes#8246)
Fix grammar
Removed PHP 5.5 from the allowed failures.
[Intl] Fixed tests failing on PHP 5.5
bumped Symfony version to 2.2.4
updated VERSION for 2.2.3
update CONTRIBUTORS for 2.2.3
updated CHANGELOG for 2.2.3
[DependencyInjection] Replaced try/catch block with an @expectedException annotation in a test.
[CssSelector] tweaked README file (closes#8287)
added a node about HTML extension in readme
[Console] Fixed the table rendering with multi-byte strings.
Feature/fix unit tests
[Process] Disable exception on stream_select timeout
[HttpFoundation] fixed issue with session_regenerate_id (closes#7380)
[DomCrawler] added a note about the default charset
Throw exception if value is passed to VALUE_NONE input, long syntax
fixed date type format pattern regex
[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
[FrameworkBundle] tweaked previous merge (refs #8242)
...
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
[Form] fixed INF usage which does not work on Solaris (closes#8246)
Fix grammar
bumped Symfony version to 2.2.4
updated VERSION for 2.2.3
update CONTRIBUTORS for 2.2.3
updated CHANGELOG for 2.2.3
[Process] Disable exception on stream_select timeout
[HttpFoundation] fixed issue with session_regenerate_id (closes#7380)
[DomCrawler] added a note about the default charset
[Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes#8245)
force the Content-Type to html in the web profiler controllers
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was squashed before being merged into the master branch (closes#8304).
Discussion
----------
Sorting files while extracting translation messages from a twig templates
Hello
When we generate a translations via command:
```php
app\console translation:update
```
is nice if order of found items don't change over the time (inside the file).
So we need to sort the *.twig files to prevent changes in output lang files.
This very simple fix do this.
Please consider this in your code :)
Thanks
Commits
-------
ba0bcb1 Sorting files while extracting translation messages from a twig templates
This PR was merged into the master branch.
Discussion
----------
[Templating|FrameworkBundle] Made DelegatingEngine::getEngine() public
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #7254
| License | MIT
| Doc PR | -
As a bonus I've covered both classes with tests.
Commits
-------
a54cbff [FrameworkBundle] Made DelegatingEngine::getEngine() public.
3f84cd3 [Templating] Made DelegatingEngine::getEngine() public.
0a72a99 [FrameworkBundle] Added tests for the DelegatingEngine.
6c31ab2 [Templating] Added tests for the DelegatingEngine.
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8210
| License | MIT
| Doc PR | n/a
see #8210
Commits
-------
b5ded81 [Security] fixed usage of the salt for the bcrypt encoder (refs #8210)
This PR was merged into the master branch.
Discussion
----------
[Security] Add simpler customization options
The goal of this is to provide a simpler extension point for people that don't have the time to dive into the whole security factory + authentication provider + user provider + authentication listener + token mess. As it stands, it gives you a way to just create one class that is handling all the security stuff in one (by implementing SimpleFormAuthenticatorInterface and UserProviderInterface) + one or more token classes.
I would like feedback on whether people think this makes sense or not before continuing and doing a SimpleHttpAuthenticatorInterface for non-form based stuff.
Just FYI that's how it would look in security.yml:
```yaml
security:
providers:
simple:
id: simple_authenticator
firewalls:
foo:
pattern: ^/
simple_form:
provider: simple
authenticator: simple_authenticator
```
/cc @atrauzzi (who posted a long rant on the ML about how hard this all is, and I can't agree more - I hope it's the right account on github?)
Commits
-------
74cfc84 marked some classes as being experimental in 2.3
471e5bc [Security] allowed simple pre-auth to be optional if another auth mechanism already authenticated the user
01c913b moved the simple HTTP authenticator to a pre-auth one
887d9b8 fixed wrong Logger interface
65335ea [Security] Renamed simple_token to simple_http, added support for failure and success handler to both simple firewalls
f7a11a1 [Security] Add simple_token auth method
1fe2ed6 [Security] Add SimpleForm authentication
This PR was merged into the 2.2 branch.
Discussion
----------
[WebProfilerBundle] force the Content-Type to html in the web profiler controllers
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | [![Build Status](https://travis-ci.org/lsmith77/symfony.png?branch=force_content_type)](https://travis-ci.org/lsmith77/symfony)
| Fixed tickets | -
| License | MIT
| Doc PR | -
This just forces the Content-Type to match what will be returned, otherwise if the request format happens to be something else than HTML (which can be the case when building an app that only does JSON/XML with FOSRestBundle) it can happen that the Response class automatically sets a different Content-Type.
The approach taken here matches https://github.com/nelmio/NelmioApiDocBundle/blob/master/Controller/ApiDocController.php#L24
Commits
-------
6d2135b force the Content-Type to html in the web profiler controllers
* 2.2:
Throw exception if value is passed to VALUE_NONE input, long syntax
fixed date type format pattern regex
[FrameworkBundle] tweaked previous merge (refs #8242)
do not re-register commands each time a Console\Application is run
[Process] moved env check to the Process class (refs #8227)
fix issue where $_ENV contains array vals
[DomCrawler] Fix handling file:// without a host
[Form] corrected interface bind() method defined against in deprecation notice
[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
Conflicts:
src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php
src/Symfony/Component/DomCrawler/Link.php
src/Symfony/Component/Form/Form.php
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] Added Request::getEncodings() method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
We needed access to the Accept-Encoding information in Drupal, and I was surprised to see that there wasn't a method on the request object to access this.
This PR adds that method.
Commits
-------
28a8443 [HttpFoundation] Added Request::getEncodings() method
There are cases where $env or $_ENV can contain a value that is an array
This will cause Process to throw an Array to String conversion exception
Initially I submitted a patch of Process.php, however Fabien indicated
that it shouldn't be fixed there (see below pull request).
Before recently, a simple work around would be in php.ini to set:
register_argc_argv = On
However with recent changes, this seems to no longer work.
Original pull request: https://github.com/symfony/symfony/pull/7354
See ticket https://github.com/symfony/symfony/issues/7196
This PR was merged into the 2.2 branch.
Discussion
----------
[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
| Q | A
| -------------:| ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8219
| License | MIT
Commits
-------
849f3ed [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
* 2.3: (33 commits)
Revert "[Console] ensure exit code between 0-254"
Added missing galician (gl) translations
fix many-to-many Propel1 ModelChoiceList
[Console] ensure exit code between 0-254
Added Greek translation
[DomCrawler] Fixed a fatal error when setting a value in a malformed field name.
[FrameworkBundle] Fixed OutOfBoundException when session handler_id is null
[DependencyInjection] Add support for aliases of aliases + regression test
[Console] fix status code when Exception::getCode returns something like 0.1
Fixed doc block on Filesystem::rename
Fixed exit code for exceptions with error code 0
[DependencyInjection] Rename ContainerBuilder::$aliases to avoid conflicting with the parent class
[DependencyInjection] Remove get*Alias*Service methods from compiled containers
[DependencyInjection] Fix aliased access of shared services, fixes#8096
instantiate valid commands only
bumped Symfony version to -DEV
updated VERSION for 2.3.0
updated CHANGELOG for 2.3.0
[Config] Added tests for the FileResource and DirectoryResource.
[Config] Fixed @covers annotation which ignored some of the methods from the code coverage.
...
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 2.2:
Revert "[Console] ensure exit code between 0-254"
fix many-to-many Propel1 ModelChoiceList
[Console] ensure exit code between 0-254
[DomCrawler] Fixed a fatal error when setting a value in a malformed field name.
[Console] fix status code when Exception::getCode returns something like 0.1
Fixed exit code for exceptions with error code 0
instantiate valid commands only
Conflicts:
src/Symfony/Component/Console/Application.php
* 2.1:
Revert "[Console] ensure exit code between 0-254"
[Console] ensure exit code between 0-254
[Console] fix status code when Exception::getCode returns something like 0.1
Fixed exit code for exceptions with error code 0
When a null is provided for framework.session.handler_id the FrameworkExtension attempts to set the session storage to null for the 'session.storage.php_bridge' by altering the second argument. According to the session.xml service definition, there is no second argument, and it is in fact the first (read, 0 index) argument that should be changed.
This PR was merged into the 2.3 branch.
Discussion
----------
[DI] Fixes access of aliases shared services
Fixes#8096 and I noticed that the aliases methods weren't really needed anymore so I removed them. I think it's fine since they were protected, but did it in a separate commit in case you just want the bugfix.
Note that while the DI tests pass, I didn't run this patch as part of a real app. I'd appreciate if someone has the time to verify it still works given it's slightly critical code.
Commits
-------
81b122d [DependencyInjection] Add support for aliases of aliases + regression test
d8c0ef7 [DependencyInjection] Rename ContainerBuilder::$aliases to avoid conflicting with the parent class
bb797ee [DependencyInjection] Remove get*Alias*Service methods from compiled containers
379f5e0 [DependencyInjection] Fix aliased access of shared services, fixes#8096
This PR was squashed before being merged into the master branch (closes#7951).
Discussion
----------
[Templating] Allows "template" and "parameters" as parameter name (replaces #7908)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | n/a
Allows "template" and "parameters" as parameter name.
**BC break:** These variables were previously declared on every template with respectively the Templating\Storage instance and the array of parameters.
Commits
-------
6e8b918 [Templating] Allows "template" and "parameters" as parameter name (replaces #7908)
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation][NamespacedAttributeBag] Refactoring of resolveKey() method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Just code enhancement. Low priority.
1) We don't need to call strlen($name) as last argument of substr() function
2) We don't need to call strrpos (or strpos) two times.
Commits
-------
a644516 [HttpFoundation][NamespacedAttributeBag] Refactoring of resolveKey() method