* 2.7:
[RFC][Console] Added console style guide helpers (v2)
[Validator] Add missing pt_BR translations
[Translation][Profiler] Added a Translation profiler.
Add parsing of hexadecimal strings for PHP 7
[VarDumper] Add filters to casters
Trim final stop from deprecation message
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
[VarDumper] Add VarDumperTestCase and related trait
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php
src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php
* 2.6:
[Validator] Add missing pt_BR translations
Add parsing of hexadecimal strings for PHP 7
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Bridge/Propel1/Logger/PropelLogger.php
src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf
* 2.3:
[Validator] Add missing pt_BR translations
Add parsing of hexadecimal strings for PHP 7
[Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition
[Validator] Added missing Hungarian translation
[Validator] Fixed grammar in Hungarian translation
CS: Unary operators should be placed adjacent to their operands
CS: Binary operators should be arounded by at least one space
remove useless tests that fail in php 7
[Translator] fix test for php 7 compatibility
Update phpdoc of ProcessBuilder#setPrefix()
Conflicts:
src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf
src/Symfony/Component/Yaml/Parser.php
This PR was squashed before being merged into the 2.7 branch (closes#14057).
Discussion
----------
[RFC][Console] Added console style guide helpers (v2)
*(Rebased to 2.7)*
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12014, #12035, symfony/symfony-docs#4265
| License | MIT
| Doc PR | todo
## Proposed API
### Code
```php
// Symfony command
protected function execute(InputInterface $input, OutputInterface $output)
{
$output = new SymfonyStyle($output);
$output->title('Lorem Ipsum Dolor Sit Amet');
$output->text(array(
'Duis aute irure dolor in reprehenderit in voluptate velit esse',
'cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat'
));
$output->ln();
$output->table(array('Name', 'Method', 'Scheme', 'Host', 'Path'), array(
array('admin_post_new', 'ANY', 'ANY', 'ANY', '/admin/post/new'),
array('admin_post_show', 'GET', 'ANY', 'ANY', '/admin/post/{id}'),
array('admin_post_edit', 'ANY', 'ANY', 'ANY', '/admin/post/{id}/edit'),
array('admin_post_delete', 'DELETE', 'ANY', 'ANY', '/admin/post/{id}'),
));
$output->caution(array(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.',
'foo'
));
$output->section('Consectetur Adipisicing Elit Sed Do Eiusmod');
$output->listing(array(
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod, tempor incididunt ut labore et dolore magna aliqua.',
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.',
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
));
$customValidator = function ($value) {
if ($value == 'foo') {
throw new \Exception('cannot be foo');
}
return $value;
};
// hidden question
$output->note($output->askHidden('Hidden question'));
// choice questions
$output->note($output->choice('Choice question no default', array('choice1', 'choice2')));
$output->note($output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1'));
// confirmation questions
$output->note($output->confirm('Confirmation with yes default', true) ? 'yes' : 'no');
$output->note($output->confirm('Confirmation with no default', false) ? 'yes' : 'no');
// standard questions
$output->note($output->ask('Question no default'));
$output->note($output->ask('Question no default and custom validator', null, $customValidator));
$output->note($output->ask('Question with default', 'default'));
$output->note($output->ask('Question with default and custom validator', 'default', $customValidator));
$output->note('Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.');
$output->success('Lorem ipsum dolor sit amet, consectetur adipisicing elit');
$output->error('Duis aute irure dolor in reprehenderit in voluptate velit esse.');
$output->warning('Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.');
$output->progressStart(100);
for ($i = 0; $i < 100; $i++) {
usleep(10000);
$output->progressAdvance();
}
$output->progressFinish();
}
```
### Output
```
$ php app/console command
Lorem Ipsum Dolor Sit Amet
==========================
// Duis aute irure dolor in reprehenderit in voluptate velit esse
// cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
------------------- -------- -------- ------ -----------------------
Name Method Scheme Host Path
------------------- -------- -------- ------ -----------------------
admin_post_new ANY ANY ANY /admin/post/new
admin_post_show GET ANY ANY /admin/post/{id}
admin_post_edit ANY ANY ANY /admin/post/{id}/edit
admin_post_delete DELETE ANY ANY /admin/post/{id}
------------------- -------- -------- ------ -----------------------
! [CAUTION] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
! dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. Lorem ipsum dolor sit amet,
! consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
! veniam, quis nostrud exercitation ullamco laboris.
!
! foo
Consectetur Adipisicing Elit Sed Do Eiusmod
-------------------------------------------
* Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod, tempor incididunt ut labore et dolore magna aliqua.
* Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo.
* Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Hidden question:
> <f><o><o><enter>
! [NOTE] foo
Choice question no default:
[0] choice1
[1] choice2
> <enter>
[ERROR] Value "" is invalid
Choice question no default:
[0] choice1
[1] choice2
> 0<enter>
! [NOTE] choice1
Choice question with default [choice1]:
[0] choice1
[1] choice2
> 1<enter>
! [NOTE] choice2
Confirmation with yes default (yes/no) [yes]:
> <enter>
! [NOTE] yes
Confirmation with no default (yes/no) [no]:
> <enter>
! [NOTE] no
Question no default:
> <enter>
[ERROR] A value is required.
Question no default:
> foo<enter>
! [NOTE] foo
Question no default and custom validator:
> foo<enter>
[ERROR] cannot be foo
Question no default and custom validator:
> <enter>
[ERROR] A value is required.
Question no default and custom validator:
> foo<enter>
[ERROR] cannot be foo
Question no default and custom validator:
> bar<enter>
! [NOTE] bar
Question with default [default]:
> <enter>
! [NOTE] default
Question with default and custom validator [default]:
> <enter>
! [NOTE] default
! [NOTE] Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
! Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
! fugiat nulla pariatur. Excepteur sint occaecat cupidatat. Duis aute irure dolor in reprehenderit in voluptate velit
! esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.
[OK] Lorem ipsum dolor sit amet, consectetur adipisicing elit
[ERROR] Duis aute irure dolor in reprehenderit in voluptate velit esse.
[WARNING] Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.
100/100 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
```
### Screenshots
![screen1](https://cloud.githubusercontent.com/assets/127811/4507077/53bc009c-4b09-11e4-937c-44fe7fe30dc0.png)
![screen2](https://cloud.githubusercontent.com/assets/127811/4507078/53bf982e-4b09-11e4-8b5a-8c44c20ae4d9.png)
![screen](https://cloud.githubusercontent.com/assets/127811/6848451/b2e64848-d3a3-11e4-9916-43bd377684ca.png)
Commits
-------
96b4210 [RFC][Console] Added console style guide helpers (v2)
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Add VarDumperTestCase and related trait
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This allows writing assertions that use the dump of a variable for comparison.
Commits
-------
57da9ae [VarDumper] Add VarDumperTestCase and related trait
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Unary operators should be placed adjacent to their operands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Update before upcoming changes on PHP CS Fixer 1.7
To keep fabbot.io happy ;)
Commits
-------
2367f4a CS: Unary operators should be placed adjacent to their operands
This PR was merged into the 2.3 branch.
Discussion
----------
CS: Binary operators should be arounded by at least one space
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Update before upcoming changes on PHP CS Fixer 1.7
To keep fabbot.io happy ;)
Commits
-------
ec2cec6 CS: Binary operators should be arounded by at least one space
This PR was merged into the 3.0-dev branch.
Discussion
----------
[3.0] [FrameworkBundle] Drop backward compatibility for debug commands
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Remove the aliases set for backward compatibility. Currently theses commands are displayed twice in the bin/console list output (command:debug and debug:command)
Commits
-------
14bbd28 Drop backward compatibility for debug commands
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes#14092).
Discussion
----------
[Validator] Add missing pt_BR translations
| Q | A
| ------------- | ---
| Fixed tickets |
| License | MIT
Commits
-------
d748374 [Validator] Add missing pt_BR translations
This PR was merged into the 2.7 branch.
Discussion
----------
[PhpunitBridge] Trim final stop from deprecation message
**Before**
```
The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the
setMethods() method instead or the "methods" option in the route definition.: 18x
```
**After**
```
The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the
setMethods() method instead or the "methods" option in the route definition: 18x
```
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
98f3ba9 Trim final stop from deprecation message
* 2.7: (29 commits)
[Validator] Added missing Hungarian translation
remove usage of deprecated class
Fix merge
Fix merge
CS: fixes
[Translation][Extractor] Allow extracting an array of files besides extracting a directory
[VarDumper] Fix dumping ThrowingCasterException
[Console][Table] Add support for colspan/rowspan + multiple header lines
Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places
Displays friendly message if the event does not have any registered listeners
[VarDumper] Ctrl+click toggles-all and fix IE8 support
Implemented check on interface implementation
[Form] [TwigBridge] Bootstrap layout whitespace control
|Validator] Add PHPUnit hint in AbstractConstraintValidatorTest
[VarDumper] implement expand all on ALT+click
[WebProfilerBundle] Fixed collapsed profiler menu icons
[travis] Kill tests when a new commit has been pushed
fixed CS
Change behavior to mirror hash_equals() returning early if there is a length mismatch
CS fixing
...
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml
src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
This PR was merged into the 2.3 branch.
Discussion
----------
Add parsing of hexadecimal strings for PHP 7
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086
| License | MIT
| Doc PR | n/a
PHP 7 does not handle the hexadecimal notation in is_numeric checks anymore, so the detection needs to be implemented explicitly.
With this change, we should have a passing testsuite on PHP 7
Commits
-------
e848040 Add parsing of hexadecimal strings for PHP 7
This PR was merged into the 2.6 branch.
Discussion
----------
[TwigBridge] don't mock a deprecated class
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
24a9d66 remove usage of deprecated class
This PR was merged into the 2.3 branch.
Discussion
----------
[Translator] fix test for php 7 compatibility
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086 for Translation component
| License | MIT
| Doc PR | -
Commits
-------
02b829f [Translator] fix test for php 7 compatibility
This PR was merged into the 2.3 branch.
Discussion
----------
remove useless tests that fail in php 7
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086 for Security and Form component
| License | MIT
| Doc PR | -
`@expectedException \PHPUnit_Framework_Error` doesn't catch php fatal errors for wrong types in php 7. But these test are also pretty useless anyway. Then we would have to add a lot of tests for all arguments that are typehinted. Let's just remove these tests.
Commits
-------
59cab27 remove useless tests that fail in php 7
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] prefix should not be escaped
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12826
| License | MIT
| Doc PR | -
The phpdoc of `ProcessBuilder#setPrefix` says:
```
Adds an unescaped prefix to the command string.
```
But in the current implementation, the prefix is merged with arguments array and then is escaped which seems wrong.
Commits
-------
67f65c9 Update phpdoc of ProcessBuilder#setPrefix()
This PR was merged into the 2.6 branch.
Discussion
----------
[VarDumper] Fix dumping ThrowingCasterException
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This cleans up dumping ThrowingCasterException to what I really intended to dump since the beginning.
Commits
-------
9944589 [VarDumper] Fix dumping ThrowingCasterException
* 2.6:
CS: fixes
Translator component has default domain for null implemented no need to have default translation domain logic in 3 different places
[Form] [TwigBridge] Bootstrap layout whitespace control
[travis] Kill tests when a new commit has been pushed
fixed CS
Change behavior to mirror hash_equals() returning early if there is a length mismatch
CS fixing
Prevent modifying secrets as much as possible
Update StringUtils.php
Whitespace
Update StringUtils.php
StringUtils::equals() arguments in RememberMe Cookie based implementation are confused
CS: general fixes
[SecurityBundle] removed a duplicated service definition and simplified others.
Conflicts:
src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml