This PR was merged into the 2.5-dev branch.
Discussion
----------
[3.0][Console] Added isVerbosity* to OutputInterface
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Now, only `Output` have theses methods. But in the `Command` class, `execute` receive an instance of `OutputInterface`. So, to avoid coding against an implementation, theses method should be added to the interface.
Commits
-------
816b295 [3.0][Console] Added isVerbosity* to OutputInterface
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.4 branch.
Discussion
----------
[ExpressionLanguage] added some tests for the built-in constant() function
| 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
Commits
-------
d8f55f5 [ExpressionLanguage] added some tests for the built-in constant() function
Now, only `Output` have theses methods. But in the `Command` class, `execute` receive an instance of `OutputInterface`. So, to avoid coding an implementation, theses method should be added to the interface.
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.3 branch.
Discussion
----------
[DomCrawler] Fixed filterXPath() chaining
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | debatable (see below)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10206
| License | MIT
| Doc PR |
As @stof mentions in #10206, each node in the Crawler can belong to a different \DOMDocument. Therefore, I've made each node do its own XPath, relative to itself, and add all the results to a new Crawler. This way, all resulting nodes are still part of their original \DOMDocument and thus can reach all of their parent nodes.
No current tests break on this change. I've added a new test for this case, by checking if the number of parents is correct after obtaining a node through chaining of `filterXPath()`.
Now for BC: I can think of a number of cases where this change would give a different result. However, it's debatable/unclear if:
- the old behavior was a bug in the first place (which would validate this change), or
- the old behavior was intended (which would make this a BC breaking change)
As an example, consider the following HTML:
```html
<div name="a"><div name="b"><div name="c"></div></div></div>
```
What would happen if we run this:
```php
echo $crawler->filterXPath('//div')->filterXPath('div')->filterXPath('div')->attr('name');
```
Aside from breaking reachability of the parent nodes by chaining, with the original code it would echo 'a'.
With this patch it would echo 'c', which, to me, makes more sense.
Commits
-------
43a7716 [DomCrawler] Fixed filterXPath() chaining
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fixed incorrect handling of image inputs
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10204
| License | MIT
| Doc PR |
A possible approach to fix#10204, but I'm open to suggestions to fix this another way, as this might not be the most 'elegant' way.
Initially, my thoughts were to create a new DomCrawler\Field\FormField subclass, especially for image inputs. However, this does not solve the problem, because such a FormField would still exist under 1 name in the FormFieldRegistry.
Instead, I've changed it to have 2 separate FormFields instead (which both reference the same input node), with different names (.x and .y) so that both values can be set separately and will both be submitted.
Commits
-------
816cf17 [DomCrawler] Fixed incorrect handling of image inputs
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
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10188).
Discussion
----------
[TwigBundle] added missing @deprecated tag
Commits
-------
ee08582 [TwigBundle] added missing @deprecated tag
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10195).
Discussion
----------
[Debug] Fixed recursion level incrementing in FlattenException::flattenArgs().
The internal `$level` variable for tracking the recursion level is pre-incremented on the parent level of the recursion already.
This causes later array elements in an array that has more than 10 elements to get obscured by `'*DEEP NESTED ARRAY*'`, even though the elements are on the first/top level of the array.
The incremented `$level` value needs to be passed to the recursive call to `FlattenException::flattenArgs()` only.
Discovered in debugging exceptions in Drupal (which happens to use very large multi-dimensional arrays for legacy reasons).
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
1b1501b Fixed recursion level incrementing in FlattenException::flattenArgs().
* 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 submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10184).
Discussion
----------
[Console] $default can be string
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
39ab7f3 [Console] $default can be string
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10177).
Discussion
----------
[Process] Fix wording for class documentation
| Q | A
| ------------- | ---
| Fixed tickets | ----
| License | MIT
"ease start" didn't make a lot of sense. This PR fixes this minor wording issue.
Commits
-------
51f5a57 Fix wording for Process class documentation
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
This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes#10174).
Discussion
----------
[Console] Option can be bool too (eg. --force)
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
aa87eeb Option can be bool too (eg. --force)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Translation] [Loader] Add INI_SCANNER_RAW to parse ini files
| 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
Commits
-------
5ef60f1 [Translation] [Loader] Add INI_SCANNER_RAW to parse ini files
| 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