This PR was merged into the 2.1 branch.
Commits
-------
eb93e66 [Console] Fix style escaping parsing
8ca1b80 [Console] Make style formatter matching less greedy to avoid having to escape when not needed
Discussion
----------
[Console] Fix output formatting issues
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
This was implemented in order to satisfy Drupal's requirements for a
singular and a plural message whenever a message is passed to their
implementation of transChoice().
This PR was merged into the master branch.
Commits
-------
4d7c895 Fix bug where backspacing to an empty string and using the arrow keys would fail. Added test to prevent in future
cd1def3 Fix bad unit test with undefined offset (spotted by @stloyd)
7f149ae [Console] Split tests for `DialogHelper` that tests `ask()` method
e6574de [Console] Fix `stty` reset when using `DialogHelper#ask()` with autocomplete functionality
Discussion
----------
[Console] Fix `DialogHelper#ask()` with autocomplete functionality
Bug fix: yes
Feature addition: no
BC break: no
Symfony2 tests pass: yes
This PR fixes failing test after: 9d94fc7 as well as correctly resets `stty` to prevent _strange_ data showing-up in console:
![console](https://f.cloud.github.com/assets/67402/47882/673a5dae-58ed-11e2-8bab-30a7c41733f5.png)
---------------------------------------------------------------------------
by fabpot at 2013-01-07T17:27:40Z
ping @lmcd
---------------------------------------------------------------------------
by lmcd at 2013-01-08T03:09:51Z
I'm using -1 as a neutral position when incrementing/decrementing the offset using arrow keys. If it started as zero, then it'd be incremented to 1 on down arrow and we'd miss the first (zero-index) match.
An easier fix for this is to replace all `if ($numMatches > 0)` with `if ($numMatches > 0 && -1 !== $ofs)`
Also, this:
if ($i === 0) {
$ofs = -1;
$matches = $autocomplete;
$numMatches = count($matches);
}
// Pop the last character off the end of our string
$ret = substr($ret, 0, $i);
$numMatches = 0;
Should be this:
if ($i === 0) {
$ofs = -1;
$matches = $autocomplete;
$numMatches = count($matches);
}
else {
$numMatches = 0;
}
// Pop the last character off the end of our string
$ret = substr($ret, 0, $i);
Edit: put these parts into a new pull request to avoid confusion https://github.com/symfony/symfony/pull/6614
---------------------------------------------------------------------------
by lmcd at 2013-01-08T03:11:20Z
Good catch on the stty issue 👍
---------------------------------------------------------------------------
by stloyd at 2013-01-08T12:14:01Z
@fabpot @lmcd I have "merged" fixes from: #6614 and removed those `env`s when used with `stty`.
---------------------------------------------------------------------------
by lmcd at 2013-01-08T12:16:05Z
@stloyd Awesome :)
This PR was merged into the 2.1 branch.
Commits
-------
55aa012 [Form] Fixed EntityChoiceList when loading objects with negative integer IDs
Discussion
----------
[Form] Fixed EntityChoiceList when loading objects with negative integer IDs
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6610
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by stof at 2013-01-08T10:21:57Z
wouldn't you need to do the opposite replacement when loading the result ? And shouldn't it be done in the propel bridge too ?
---------------------------------------------------------------------------
by bschussek at 2013-01-08T10:25:29Z
@stof No, indices aren't used for loading the result, just values. Yes this should be done for the propel bridge, but that bridge is missing even the tests for the ID-as-identifier usage. Do you want to create a PR?
This PR was merged into the 2.0 branch.
Commits
-------
8da2b41 [TwigBundle] There is no CSS visibility of display, should be visible instead
Discussion
----------
[TwigBundle] There is no CSS visibility of display, should be visible instead
This PR was merged into the 2.1 branch.
Commits
-------
ae3d454 [Form] corrected source node for a Danish translation
Discussion
----------
[Form] corrected source node for a Danish translation
This PR was merged into the master branch.
Commits
-------
5be0042 better regexp, more test cases, added comments about each credit card
cc278af [Validator] Fix `CardSchemeValidator` double violation when value is non-numeric. Making scheme option accept strings in addition to arrays.
Discussion
----------
[Validator] Improve regexp for Credit Cards and some more tests
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: Ensure these regexps are proper (credit card validation is always a pain)
License of the code: MIT
Documentation PR:
Regarding Cases excluded from new Regular Expressions:
- Credit card lengths should be respected, these regexp cover lengths in http://en.wikipedia.org/wiki/Bank_card_number
- Visa length can only be 16 and 13 (older ones)
- Diners Cards starting by 5 come from a joint venture between Diners Club and MasterCard, and should be processed like a MasterCard (according to http://www.regular-expressions.info/creditcard.html).
- There seems to be JCB cards starting by 2131 and 1800, I could find them is some places, also found these numbers being tested in Credit Card generators, but some people don't cover them. I don't know their story either
Any comments will be much appreciated!
---------------------------------------------------------------------------
by fabpot at 2013-01-06T19:33:27Z
Thanks for working on this. It would be very valuable if you can add information about these regexes as comments (with links to relevant sources -- like what you've done in the PR description). Thanks.
---------------------------------------------------------------------------
by ricardclau at 2013-01-06T21:01:52Z
Always glad to be able to contribute a little bit
@fabpot you mean @link / @see PHPDoc inside CardSchemeValidator.php? Or further comments in this discussion before adding them?
---------------------------------------------------------------------------
by fabpot at 2013-01-06T21:16:48Z
The more information we can add in the class, the better it is.
---------------------------------------------------------------------------
by ricardclau at 2013-01-07T20:56:05Z
I've added comments and included code from #6603 as I've said there. If you need something else, please let me know, once this is merged, #6603 can also be closed
---------------------------------------------------------------------------
by fabpot at 2013-01-07T21:41:40Z
Can you keep the commit from #6603 to keep ownership?
---------------------------------------------------------------------------
by ricardclau at 2013-01-07T21:44:16Z
I actually have thought about that... let me try my git skills :)
---------------------------------------------------------------------------
by ricardclau at 2013-01-07T21:59:16Z
There you go!
This PR was merged into the 2.0 branch.
Commits
-------
1d362b8 [DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)
Discussion
----------
[DependencyInjection] fixed a bug where the strict flag on references were lost (closes#6607)