Commit Graph

31028 Commits

Author SHA1 Message Date
Fabien Potencier
1bbc35a34a Merge branch '3.2'
* 3.2:
  removed unneeded annotation in tests
  [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU
  remove Security deps from the require section
  [Intl] Update ICU data to 59.1
2017-05-15 08:17:59 -07:00
Fabien Potencier
94871fac80 removed unneeded annotation in tests 2017-05-15 08:15:28 -07:00
Fabien Potencier
9fd95ca9ef Merge branch '2.8' into 3.2
* 2.8:
  [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU
  [Intl] Update ICU data to 59.1
2017-05-15 08:08:20 -07:00
Fabien Potencier
b8c95976c3 Merge branch '2.7' into 2.8
* 2.7:
  [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU
  [Intl] Update ICU data to 59.1
2017-05-15 08:02:37 -07:00
Fabien Potencier
c4abc1566d minor #22627 [Intl] Update ICU data to 59.1 (jakzal)
This PR was squashed before being merged into the 2.7 branch (closes #22627).

Discussion
----------

[Intl] Update ICU data to 59.1

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The [GMT timezone has been split from the UTC](http://site.icu-project.org/download/59) timezone [in CLDR](http://cldr.unicode.org/index/downloads/cldr-31) (which ICU is based on).

For example, the code blow:
* before ICU 59.1 would return "GMT" in all cases
* with ICU 59.1 it returns "UTC" for the first three ('z', 'zz', 'zzz')
  and "Coordinated Universal Time" for the last two ('zzzz', 'zzzzz').

```php
foreach (['z', 'zz', 'zzz', 'zzzz', 'zzzzz'] as $pattern) {
    $formatter = new \IntlDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('UTC'), IntlDateFormatter::GREGORIAN, $pattern);
    var_dump($formatter->format(new \DateTime('@0')));
}
```

Similarly Form's `DateTimeToLocalizedStringTransformer` is also affected:

```php
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
var_dump($transformer->transform(new \DateTime('2010-02-03 04:05:06 UTC')));
// ICU 58.2: '03.02.2010, 04:05:06 GMT'
// ICU 59.1: '03.02.2010, 04:05:06 Koordinierte Weltzeit'
```

Refer to added and modified test cases for more changes. I split this PR in two commits for easier review. First commit updates ICU data (generated files), the second updates code and test cases to be compatible with updated data.

Commits
-------

5d3d1b25e0 [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU
00acb37205 [Intl] Update ICU data to 59.1
2017-05-15 07:59:44 -07:00
Jakub Zalas
5d3d1b25e0
[Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU
The [GMT timezone has been split from the UTC](http://site.icu-project.org/download/59) timezone [in CLDR](http://cldr.unicode.org/index/downloads/cldr-31) (which ICU is based on).

For example, the code blow:
* before ICU 59.1 would return "GMT" in all cases
* with ICU 59.1 it returns "UTC" for the first three ('z', 'zz', 'zzz')
  and "Coordinated Universal Time" for the last two ('zzzz', 'zzzzz').

```php
foreach (['z', 'zz', 'zzz', 'zzzz', 'zzzzz'] as $pattern) {
    $formatter = new \IntlDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('UTC'), IntlDateFormatter::GREGORIAN, $pattern);
    var_dump($formatter->format(new \DateTime('@0')));
}
```

Similarly Form's `DateTimeToLocalizedStringTransformer` is also affected:

```php
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
var_dump($transformer->transform(new \DateTime('2010-02-03 04:05:06 UTC')));
// ICU 58.2: '03.02.2010, 04:05:06 GMT'
// ICU 59.1: '03.02.2010, 04:05:06 Koordinierte Weltzeit'
```

Refer to added and modified test cases for more changes. I split this PR in two commits for easier review. First commit updates ICU data (generated files), the second updates code and test cases to be compatible with updated data.
2017-05-15 15:46:23 +01:00
Fabien Potencier
401c55004b bug #22715 [FrameworkBundle] remove Security deps from the require section (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] remove Security deps from the require section

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

These requirements have been moved in #20075 before and are still
present in the `require-dev` section.

see symfony/flex#14

Commits
-------

c690256966 remove Security deps from the require section
2017-05-15 07:30:51 -07:00
Christian Flothmann
c690256966 remove Security deps from the require section
These requirements have been moved in #20075 before and are still
present in the `require-dev` section.
2017-05-15 15:20:33 +02:00
Nicolas Grekas
af4ec231b0 Merge branch '3.2'
* 3.2:
  Fix errors not rethrown even if not handled by console.error listeners
  [VarDumper] Fix dumping of non-nested stubs
  [Security] Avoid unnecessary route lookup for empty logout path
  respect inline level when dumping objects as maps
  Test case for not in-lined map-objects
2017-05-15 14:04:53 +02:00
Nicolas Grekas
5857e7c4e1 Merge branch '2.8' into 3.2
* 2.8:
  Fix errors not rethrown even if not handled by console.error listeners
  [VarDumper] Fix dumping of non-nested stubs
  [Security] Avoid unnecessary route lookup for empty logout path
2017-05-15 14:02:31 +02:00
Nicolas Grekas
6ef78ec553 Merge branch '2.7' into 2.8
* 2.7:
  Fix errors not rethrown even if not handled by console.error listeners
  [VarDumper] Fix dumping of non-nested stubs
  [Security] Avoid unnecessary route lookup for empty logout path
2017-05-15 13:59:37 +02:00
Nicolas Grekas
03914e9e9b bug #22613 [Process] Fix incorrectly calling PHP process when path contains space (maryo)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Process] Fix incorrectly calling PHP process when path contains space

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22556
| License       | MIT

I have PHP installed at "D:\Program Files\PHP" which contains a space. `PhpExecutableFinder` found it but then `PhpProcess` splitted the path by space. This PR fixes it. I wanted to write a test but I don't know ho to do it properly since it is dependent on the location where PHP is installed and I can't even mock `PhpExecutableFinder` because it is hardcoded dependency and an implementation detail.

Commits
-------

9c08109 Fix incorrectly calling PHP process on Windows when path contains space
2017-05-15 10:12:59 +02:00
Fabien Potencier
fb532bfc17 feature #22680 [DI] Fixing missing "exclude" functionality from PSR4 loader (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fixing missing "exclude" functionality from PSR4 loader

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | TODO

When the PSR4 loader was added in #21289, @nicolas-grekas said this:

> given that glob() is powerful enough to include/exclude dirs, I removed the Test special exclusion (source: https://github.com/symfony/symfony/pull/21289#issuecomment-272821106)

But, I don't believe that's true! [Glob is all about inclusion, not exclusion](https://en.wikipedia.org/wiki/Glob_(programming)#Syntax) - the maximum you can exclude is a single character. Thus, I've marked this as a bug.

My motivation came from upgrading KnpU to the new 3.3 DI stuff. We have many directories (40) in `src/`, and listing them all one-by-one in `resource:` is crazy - the `resource` line would be ~350 characters long and quite unreadable. What I really want to do is include *everything* and then exclude few directories. I tried to do this with `glob`, but it's not possible.

This PR allows for something like this:

```yml
services:
    _defaults:
        public: false

    # ...
    AppBundle\:
        resource: '../../src/AppBundle/*'
        exclude: '../../src/AppBundle/{AppBundle.php,Entity}'
```

This works *beautifully* in practice. And even if I forget to exclude a directory - since the services are private -  **they're ultimately removed from the container anyways**. In fact, the *only* reason I need to exclude *anything* is because of the new "service argument resolver", which causes entities to not be properly removed from the compiled container.

Thanks!

Commits
-------

7d07f19459 Allowing prototype/PSR4 service loading ability to exclude, because glob doesn't support this
2017-05-14 09:23:24 -07:00
Ryan Weaver
7d07f19459 Allowing prototype/PSR4 service loading ability to exclude, because glob doesn't support this 2017-05-13 13:10:49 -04:00
Fabien Potencier
76190ab8c2 minor #22709 [Security] Remove polyfill-util dependancy from security-core (BPScott)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Remove polyfill-util dependancy from security-core

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Security-core no longer directly depends upon polyfill-util since #16382.

This does not change the existing dependancy tree as polyfill-util is
transitivly depended on via polyfill-php56.

Commits
-------

fb140aa939 Remove polyfill-util dependancy from security-core
2017-05-13 07:15:20 -07:00
Fabien Potencier
d975419a6c bug #22699 [TwigBundle] service workflow.twig_extension should stay public (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] service workflow.twig_extension should stay public

| Q             | A
| ------------- | ---
| Branch?       | master (3.3)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

While it's not really required for this service to be public AFAIK, it was not made private when introducing it in 3.2. Which means it should stay public in upper branches. But [since we now default to `public: false`](https://github.com/symfony/symfony/pull/22615) in every service config file, it's currently private in 3.3.

I had a quick look on commits merged after this PR and didn't find any other similar case.

Commits
-------

5d07c6aa76 [TwigBundle] service workflow.twig_extension should stay public
2017-05-13 07:11:43 -07:00
Ben Scott
fb140aa939 Remove polyfill-util dependancy from security-core
Security-core no longer directly depends upon polyfill-util since #16382.

This does not change the existing dependancy tree as polyfill-util is
transitivly depended on via polyfill-php56.
2017-05-13 13:09:51 +01:00
Fabien Potencier
489fd0784b feature #22708 Adding autowire alias for AuthenticationUtils (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Adding autowire alias for AuthenticationUtils

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

AuthenticationUtils is a public service (used commonly in your `loginAction`), so it should be autowireable.

We might need to do a full audio of public services to add aliases. Since we're moving in the direction of type-based autowiring, these aliases are sort of the new "public" - it's the list of things you're "supposed" to use.

Commits
-------

fe40cb21d4 Adding autowire alias for AuthenticationUtils
2017-05-12 19:09:14 -07:00
Ryan Weaver
fe40cb21d4 Adding autowire alias for AuthenticationUtils 2017-05-12 11:05:58 -07:00
Maxime Steinhausser
5d07c6aa76 [TwigBundle] service workflow.twig_extension should stay public 2017-05-12 19:24:04 +02:00
Fabien Potencier
50729d54e6 bug #22695 [WebServerBundle] fix dependencies (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] fix dependencies

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

84bb34fa05 [WebServerBundle] fix dependencies
2017-05-12 07:03:29 -07:00
Christian Flothmann
84bb34fa05 [WebServerBundle] fix dependencies 2017-05-12 12:42:32 +02:00
Fabien Potencier
8d27128df8 minor #22694 [TwigBundle] Remove ClassExistenceResource usage (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] Remove ClassExistenceResource usage

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Usage of this class were removed in https://github.com/symfony/symfony/pull/21466

Commits
-------

85f6710424 [TwigBundle] Remove ClassExistenceResource usage
2017-05-11 11:24:35 -07:00
Maxime Steinhausser
85f6710424 [TwigBundle] Remove ClassExistenceResource usage 2017-05-11 20:00:39 +02:00
Fabien Potencier
1c2c3fc677 bug #22647 [VarDumper] Fix dumping of non-nested stubs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dumping of non-nested stubs

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

dd5b7a632b [VarDumper] Fix dumping of non-nested stubs
2017-05-11 10:53:06 -07:00
Fabien Potencier
8f4eb92b64 bug #22409 [Yaml] respect inline level when dumping objects as maps (goetas, xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] respect inline level when dumping objects as maps

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22392
| License       | MIT
| Doc PR        |

Commits
-------

3cca48c715 respect inline level when dumping objects as maps
4f5c149798 Test case for not in-lined map-objects
2017-05-11 10:37:16 -07:00
Fabien Potencier
1ccc3de17b removed duplicate use statement 2017-05-11 10:33:45 -07:00
Fabien Potencier
2a288dba78 bug #22584 [Security] Avoid unnecessary route lookup for empty logout path (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Avoid unnecessary route lookup for empty logout path

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no-ish
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

i first included this with #22572 where having `logout: { path: ~ }` makes more sense for disabling logout path matching/generation. But currently it's already allowed and causes an unneeded route lookup and url generation.

Commits
-------

2967807b14 [Security] Avoid unnecessary route lookup for empty logout path
2017-05-11 10:27:33 -07:00
Fabien Potencier
1503f3de40 bug #22642 [DX] Making the RegisterControllerArgumentLocatorsPass throw exception on bad types (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DX] Making the RegisterControllerArgumentLocatorsPass throw exception on bad types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | maybe
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | n/a

Suppose you type-hint a controller arg with a non-existent class:

```php
public function fooAction(FakeClass $foo)
```

Current error:

> Class AppBundle\Controller\FakeClass does not exist

(from `ParamConverterListener`, and only when you hit that route)

New error:

> Cannot determine controller argument for "AppBundle\Controller\BlogController::indexAction()
  ": the $foo argument is type-hinted with the non-existent class or interface: "AppBundle\Con
  troller\FakeClass". Did you forget to add a use statement?

(at build time)

The extra `Did you forget to add a use statement?` only shows up if it appears you likely forgot a `use` statement.

I think this will be a really common error (especially forgetting the `use` statement)... so let's make it a *really* nice error! An alternative would be to enhance the args resolver to throw a clearer exception when no arg can be wired and the type-hint is bad (we would also need to make the `ParamConverterListener` stop throwing the current error... so that the args resolver would have the opportunity to do that. Disadvantage would be that this error would only happen when you hit the route, not at build time.

Cheers!

Commits
-------

22b905226d Making the RegisterControllerArgumentLocatorsPass throw an exception on a bad type-hint
2017-05-11 10:20:43 -07:00
Fabien Potencier
83114ade04 bug #22664 [Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22657#issuecomment-299728726
| License       | MIT
| Doc PR        | N/A

Same as #22657 for the renaming of `DebugAccessDecisionManager` into `TraceableAccessDecisionManager`. Indeed, I think we also require to redeclare the old `DebugAccessDecisionManager` for composer `classmap-authoritative` autoloading strategy & classmap dumper.

AppVeyor failures unrelated.

Edit: Re-thinking about it, it's probably not very common to dump the classmap and use the `classmap-authoritative` strategy when using those classes... That's to say: in debug mode/dev env. So it may be the reason why the class wasn't redeclared on contrary of `DefinitionDecorator`.

Commits
-------

5b123b9674 [Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer
2017-05-11 10:16:35 -07:00
Fabien Potencier
05240ce60d bug #22690 [Console] Fix errors not rethrown even if not handled by console.error listeners (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix errors not rethrown even if not handled by console.error listeners

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/22678
| License       | MIT
| Doc PR        | n/a

https://github.com/symfony/symfony/pull/22261 has been squashed while revisiting error handling, this fixes it again while keeping latest changes intact.

__code__
```php
public function execute(InputInterface $input, OutputInterface $output) {
    $this->barr();
}

public function bar() { }
```

__before__
![before](http://image.prntscr.com/image/38aa3b46fed6439ead693908ab104fb3.png)

__after__
![after](http://image.prntscr.com/image/071322bfa52247c6a02eac6ef9d8284a.png)

Commits
-------

75f098fcb8 Fix errors not rethrown even if not handled by console.error listeners
2017-05-11 10:13:33 -07:00
Fabien Potencier
b33f1dfe07 bug #22681 Fixing a bug where abstract classes were wired with the prototype loader (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fixing a bug where abstract classes were wired with the prototype loader

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | n/a

The prototype/PSR-4 loader currently tries to wire abstract classes. The problem is if, for example, you have, for example:

```php
abstract class BaseCommand extends Command
{
}
```

If this is registered as a service, and you have `autoconfigure`, then the console `Application` will try to use this a command.

Was there some reason abstract classes were originally allowed to be registered as services with the PSR4/prototype loader? I don't know if there is a real use-case for registering abstract classes. If you wanted to use that service as a parent service... then you'll probably be configuring it yourself anyways. We could also fix this by changing all tags compiler passes to skip classes that are abstract... *if* there is a use-case for Abstract classes being auto-registered.

Cheers!

Commits
-------

5326bab10a Fixing a bug where abstract classes were wired
2017-05-11 10:11:08 -07:00
Fabien Potencier
a3f78608e8 feature #22665 [DI] Do not throw autowiring exceptions for a service that will be removed (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Do not throw autowiring exceptions for a service that will be removed

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no (arguable)
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Hi guys!

tl;dr Do no throw a "Cannot autowire service id foo_bar" if that service (`foo_bar`) is private and is ultimately removed from the container.

I ran into a problem with the new PSR-4 service loader: our existing projects often contains directories with a mixture of services and model classes. In reality, that's not a problem: since the services are private, if any "extra" classes are registered as service, they're removed from the container because they're not referenced. In other words, the system is great: model classes do *not* become services naturally... because nobody tries to inject them as services.

However, if your model classes have constructor args... then things blow up on compilation. This fixes that: it delays autowiring errors until after `RemoveUnusedDefinitionsPass` runs and then does *not* throw those exceptions if the service is gone.

Cheers!

Commits
-------

f4913feaa8 Fixing a bug where services that were eventually removed could cause autowire errors
2017-05-11 10:07:41 -07:00
Fabien Potencier
428b9bfa4f Merge branch '3.2'
* 3.2:
  [Console] Do not duplicate Helper::strlen() code
  [FrameworkBundle] Adding the extension XML
  [Form] Minor: Fix comment in ChoiceType
  [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice
  fixed CS
  fixed CS
  [DI] Fix PhpDumper blank lines around namespace
  fixed CS
  [Workflow] fix use directives
  [Workflow] Move twig extension registration to twig bundle
  Filesystem: annotate the one network test with a "network" group.
  [DependencyInjection] Don't store default deprecation template in every service definition instance
2017-05-11 09:47:52 -07:00
Fabien Potencier
329e96c583 Merge branch '2.8' into 3.2
* 2.8:
  [Console] Do not duplicate Helper::strlen() code
  [FrameworkBundle] Adding the extension XML
  [Form] Minor: Fix comment in ChoiceType
  [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice
2017-05-11 09:41:44 -07:00
Fabien Potencier
433dfd42a1 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Do not duplicate Helper::strlen() code
  [FrameworkBundle] Adding the extension XML
  [Form] Minor: Fix comment in ChoiceType
  [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice
2017-05-11 09:41:12 -07:00
Fabien Potencier
0ad2f2ef9f bug #22669 [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/recipes/issues/46
| License       | MIT
| Doc PR        | N/A

As spotted in https://github.com/symfony/recipes/issues/46, there is no reason to call `registerBundles` on the kernel instance, as it's already booted. So we just have to use `getBundles` instead and `registerBundles` can be implemented in a non-rewindable way, as done with flex.

Commits
-------

040edfec4a [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice
2017-05-11 09:38:53 -07:00
Robin Chalas
75f098fcb8 Fix errors not rethrown even if not handled by console.error listeners 2017-05-11 16:06:19 +02:00
Ryan Weaver
5326bab10a Fixing a bug where abstract classes were wired 2017-05-11 05:42:51 -04:00
Ryan Weaver
22b905226d Making the RegisterControllerArgumentLocatorsPass throw an exception on a bad type-hint 2017-05-10 15:41:43 -04:00
Fabien Potencier
2f1c28bbbc minor #22683 [Console] Do not duplicate Helper::strlen() code (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Do not duplicate Helper::strlen() code

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

01c2c099a4 [Console] Do not duplicate Helper::strlen() code
2017-05-10 11:24:43 -07:00
Ryan Weaver
f4913feaa8 Fixing a bug where services that were eventually removed could cause autowire errors 2017-05-10 09:32:00 -04:00
Maxime Steinhausser
01c2c099a4 [Console] Do not duplicate Helper::strlen() code 2017-05-09 20:54:25 +02:00
Fabien Potencier
2d72b0b8ce minor #22673 [Form] Minor: Fix comment in ChoiceType (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Minor: Fix comment in ChoiceType

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Forgotten to be updated in: #21957

Commits
-------

a49d79c856 [Form] Minor: Fix comment in ChoiceType
2017-05-09 07:57:36 -07:00
Fabien Potencier
71efe3f3de bug #22676 [FrameworkBundle] Adding the extension XML (flug)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22676).

Discussion
----------

[FrameworkBundle] Adding the extension XML

| Q             | A
| ------------- | ---
| Branch?       | <3.3
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->

![XmlUtils](https://cloud.githubusercontent.com/assets/1810304/25841740/9b655036-34a1-11e7-9d1e-a23928b8ed17.png)

This pull request is referenced on ![symfony/skeleton](https://github.com/symfony/skeleton/pull/7)
<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

6fe2ad0558 [FrameworkBundle] Adding the extension XML
2017-05-09 07:44:44 -07:00
Flug
6fe2ad0558 [FrameworkBundle] Adding the extension XML
required by XmlUtils and not installed by default
2017-05-09 07:43:21 -07:00
Fabien Potencier
ae9bda1ffc bug #22611 [FrameworkBundle] Fix "Locale class not found" in AboutCommand (rubenrua)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix "Locale class not found" in AboutCommand

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Found testing http://fabien.potencier.org/symfony4-demo.html with docker `php:7.1`

Commits
-------

0269f9d422 [FrameworkBundle] Fix "Locale class not found" in AboutCommand
2017-05-09 07:36:16 -07:00
Fabien Potencier
ca509ea6fe bug #22677 [DI] Fixed index args bug with ResolveNamedArgumentsPass (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fixed index args bug with ResolveNamedArgumentsPass

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | n/a

While upgrading a project, this code suddenly broke:

```yml
services:
    ice_cream_service:
        class: AppBundle\Service\IceCreamService
        autowire: true
        arguments:
            1: 'http://api.example.com'
```

```php
class IceCreamService
{
    public function __construct(EntityManager $em, $apiUrl)
    {
    }
}
```

Suddenly, the index `1` was not being mapped to `$apiUrl`. This was valid in 3.2, but broke when `ResolveNamedArgumentsPass` accidentally re-set the index. Simple fix :). Ping @dunglas

Cheers!

Commits
-------

7cc7c85919 Fixing bug where indexed args were set wrong in pass in some situations
2017-05-09 07:31:58 -07:00
Ryan Weaver
7cc7c85919 Fixing bug where indexed args were set wrong in pass in some situations 2017-05-09 05:53:08 -04:00
Issei.M
a49d79c856 [Form] Minor: Fix comment in ChoiceType 2017-05-09 13:05:50 +09:00