Commit Graph

31152 Commits

Author SHA1 Message Date
Christopher Hertel
f50afad839 fixed missing autoconfigure in container debug 2017-05-07 00:45:28 +02:00
Maxime Steinhausser
08f4ad2275 [Workflow] fix use directives 2017-05-06 11:04:08 +02:00
Maxime Steinhausser
3fc80d10ef [Workflow] Move twig extension registration to twig bundle 2017-05-06 10:33:49 +02:00
Fabien Potencier
e5bb8fad3f minor #22648 Improving autowire exception when you type-hint a class & alias is available (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Improving autowire exception when you type-hint a class & alias is available

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| 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 class instead of the correct interface (which is aliased):

```php
public function __construct(Logger $logger)
```

Current error:

> Cannot autowire service "AppBundle\Security\PostVoter": argument "$logger" of method "__construct()" references class "Symfony\Bridge\Monolog\Logger" but no such service exists. You should maybe alias this class to one of these existing services: "monolog.logger", "monolog.logger.request", "monolog.logger.console", "monolog.logger.cache", "monolog.logger.templating", "monolog.logger.translation", "monolog.logger.profiler", "monolog.logger.php", "monolog.logger.event", "monolog.logger.router", "monolog.logger.security", "monolog.logger.doctrine"; or type-hint against interface "Psr\Log\LoggerInterface" instead.

New error:

> Cannot autowire service "AppBundle\Security\PostVoter": argument "$logger" of method "__construct()" references class "Symfony\Bridge\Monolog\Logger" but no such service exists. Try changing the type-hint to "Psr\Log\LoggerInterface" instead.

The correct "suggestion" was always  there (at the end). I think if there is already a definitive alias available for your type-hint, we can say that they are simply using the wrong type-hint and suggest *only* that.

Commits
-------

5a3c156798 Improving autowire exception when you type-hint a class and there is an interface alias available
2017-05-05 08:45:54 -07:00
Ryan Weaver
5a3c156798 Improving autowire exception when you type-hint a class and there is an interface alias available 2017-05-05 11:28:37 -04:00
Fabien Potencier
fb021404ba minor #22646 [FrameworkBundle] Add type hint for ContainerInterface on ControllerTrait (maff)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add type hint for ContainerInterface on ControllerTrait

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

When inspecting code using the `ControllerTrait`, IDE autocompletion and automatic type resolving of services does not work as the IDE (e.g. PHPStorm with the Symfony plugin) does not know what `$this->container` refers to:

![image](https://cloud.githubusercontent.com/assets/27403/25742248/eee5f280-318e-11e7-83df-c417bc7edb84.png)

This adds a type hint for the container property, making the IDE aware what `container` is.

![image](https://cloud.githubusercontent.com/assets/27403/25742238/dceda64a-318e-11e7-9f63-c92a82e75744.png)

Commits
-------

7f416ede17 [FrameworkBundle] Add type hint for ContainerInterface to ControllerTrait
2017-05-05 06:58:44 -07:00
Nicolas Grekas
dd5b7a632b [VarDumper] Fix dumping of non-nested stubs 2017-05-05 13:16:12 +02:00
Mathias Geat
7f416ede17 [FrameworkBundle] Add type hint for ContainerInterface to ControllerTrait 2017-05-05 12:24:11 +02:00
Fabien Potencier
51ad8cb9d6 minor #22640 [TwigBundle] Remove unecessary use to make fabbot happy (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] Remove unecessary use to make fabbot happy

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

044cbaf1e1 [TwigBundle] Remove unecessary use to make fabbot happy
2017-05-04 18:14:33 -07:00
Maxime Steinhausser
3d8a5646e7 [WebLink][TwigBundle] Fix registration of the twig extension 2017-05-04 23:41:34 +02:00
Maxime Steinhausser
044cbaf1e1 [TwigBundle] Remove unecessary use to make fabbot happy 2017-05-04 23:27:16 +02:00
Fabien Potencier
fd9459cdfd minor #22630 Filesystem: annotate the one network test with a "network" group. (orlitzky)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #22630).

Discussion
----------

Filesystem: annotate the one network test with a "network" group.

This is one tiny commit that lets us avoid hitting the network while running the test suite. We've packaged symfony-filesystem in Gentoo, and our users can run the test suite when they install it. However, network access is forbidden during the test phase (it causes spurious failures, privacy issues, etc.). By marking the one network test with `@group network`, we are able to skip it with `--exclude-group network`.

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

Commits
-------

fd0dd57e74 Filesystem: annotate the one network test with a "network" group.
2017-05-04 11:16:16 -07:00
Michael Orlitzky
fd0dd57e74 Filesystem: annotate the one network test with a "network" group.
Tests that require network access can be problematic, because they
depend on some external state not under your control. That can lead to
"random" failures when the code in question actually works fine. The
Filesystem component has one such test, and this commit adds it to the
"network" group (for PHPUnit).

Doing so lets the user skip that particular test, by running phpunit
with the --exclude-group flag. We take advantage of this in Gentoo,
where every user has the ability to run the test suite but network
access is forbidden.
2017-05-04 11:16:15 -07:00
Fabien Potencier
f6043bb8f1 feature #22624 debug:container --types (classes/interfaces) (weaverryan)
This PR was squashed before being merged into the 3.3-dev branch (closes #22624).

Discussion
----------

debug:container --types (classes/interfaces)

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none, but needed in symfony/symfony-docs#7807
| License       | MIT
| Doc PR        | n/a

In Symfony 3.3, the *type* (i.e. class/interface) is the most important thing about a service. But, we don't have a way for the user to know *what* types are available. This builds on top of `debug:container` to make `debug:container --types`:

<img width="1272" alt="screen shot 2017-05-03 at 3 42 37 pm" src="https://cloud.githubusercontent.com/assets/121003/25678671/8bebacaa-3018-11e7-9cf6-b7654e2cae88.png">

I think we need this for 3.3, so I've made the diff as *small* as possible. We could make improvements for 3.4, but just *having* this is the most important. I could even remove `format` support to make the diff smaller.

~~This depends on #22385, which fixes a "bug" where private services aren't really shown.~~

Thanks!

Commits
-------

25a39c2682 debug:container --types (classes/interfaces)
2017-05-04 11:13:14 -07:00
Ryan Weaver
25a39c2682 debug:container --types (classes/interfaces) 2017-05-04 11:13:13 -07:00
Fabien Potencier
0602fb53ab minor #22628 [DependencyInjection] Don't store default deprecation template in every service definition instance (fortis)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Don't store default deprecation template in every service definition instance

| Q             | A
| ------------- | ---
| Branch?       | 2.8+
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

While debugging I noticed that each service definition contains a default deprecation template, even if it was not marked as deprecated

Commits
-------

388ee467c5 [DependencyInjection] Don't store default deprecation template in every service definition instance
2017-05-04 11:12:20 -07:00
Alan Bondarchuk
388ee467c5 [DependencyInjection] Don't store default deprecation template in every service definition instance 2017-05-04 20:21:54 +03:00
Nicolas Grekas
eeafabbf15 Merge branch '3.2'
* 3.2:
  [appveyor] Run the test suite on PHP 7.1
  [appveyor][3.x] Run the test suite on PHP 7.1
  [EventDispatcher] fix merge of #22541 from 2.8
  bumped Symfony version to 3.2.9
  updated VERSION for 3.2.8
  updated CHANGELOG for 3.2.8
  bumped Symfony version to 2.8.21
  updated VERSION for 2.8.20
  updated CHANGELOG for 2.8.20
  bumped Symfony version to 2.7.28
  updated VERSION for 2.7.27
  update CONTRIBUTORS for 2.7.27
  updated CHANGELOG for 2.7.27
2017-05-04 14:23:07 +02:00
Nicolas Grekas
b8714d34a1 Merge branch '2.8' into 3.2
* 2.8:
  [appveyor] Run the test suite on PHP 7.1
  bumped Symfony version to 2.8.21
  updated VERSION for 2.8.20
  updated CHANGELOG for 2.8.20
  bumped Symfony version to 2.7.28
  updated VERSION for 2.7.27
  update CONTRIBUTORS for 2.7.27
  updated CHANGELOG for 2.7.27
2017-05-04 14:22:25 +02:00
Nicolas Grekas
dfae2ab6be Merge branch '2.7' into 2.8
* 2.7:
  [appveyor] Run the test suite on PHP 7.1
  bumped Symfony version to 2.7.28
  updated VERSION for 2.7.27
  update CONTRIBUTORS for 2.7.27
  updated CHANGELOG for 2.7.27
2017-05-04 14:19:31 +02:00
Fabien Potencier
243e4162ee bug #22626 Fix missing parenthesis (yceruto)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix missing parenthesis

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

Commits
-------

7916ea9e47 Fix missing parenthesis
2017-05-03 15:13:49 -07:00
Yonel Ceruto
7916ea9e47 Fix missing parenthesis 2017-05-03 17:49:07 -04:00
Fabien Potencier
0f526c9236 minor #22625 [WebServerBundle] Flag commands as private (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] Flag commands as private

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

No need for having them public.

Commits
-------

73c51987af Flag webserver commands as private
2017-05-03 13:31:37 -07:00
Robin Chalas
73c51987af Flag webserver commands as private 2017-05-03 21:56:11 +02:00
Fabien Potencier
f583291cea bug #22621 [Config] Fix resource tracking with new GlobResource (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config] Fix resource tracking with new GlobResource

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

Right now, resource tracking is done via tracking of directories mtimes, which means a container is rebuilt each time a file is either removed or added, but not when an existing file is modified.
This looks nice on the surface.
BUT.
Most code editors do create a temporary file when you open your code, thus change the parent dir mtime, thus trigger a container rebuild.
When working with PSR-4 loaders, this means each time you just open a file, most of you will trigger a container rebuild.
This is bad :(

Here is a new GlobResource to fix this issue.

Commits
-------

9190e108c1 [Config] Fix resource tracking with new GlobResource
2017-05-03 12:38:16 -07:00
Fabien Potencier
deda9eac03 minor #22607 Add some missing docs for the web server bundle (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add some missing docs for the web server bundle

| 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

This is an alternative to #22471

Commits
-------

987a6819d2 added some missing docs for the web server bundle
2017-05-03 12:32:29 -07:00
Fabien Potencier
987a6819d2 added some missing docs for the web server bundle 2017-05-03 12:30:25 -07:00
Fabien Potencier
09f22f43e8 feature #22385 [DX][FrameworkBundle] Show private aliases in debug:container (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DX][FrameworkBundle] Show private aliases in debug:container

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/16388 https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/618
| License       | MIT
| Doc PR        | n/a

By building and compiling the container without `TYPE_REMOVING` passes, private aliases are available (shown when `--show-private` is passed). The ContainerBuilderDebugDumpPass now makes use of the ConfigCache component, removing the need for clearing the cache to get the debug:container output up to date (in sync with latest config).

Config
-------

```yaml
services:
    AppBundle\Foo:
        public: false

    foo_consumer1:
        class: AppBundle\Foo
        arguments: [ '@AppBundle\Foo' ]

    foo_consumer2:
        class: AppBundle\Foo
        arguments: [ '@AppBundle\Foo' ]

    foo_alias:
        alias: AppBundle\Foo

    foo_private_alias:
        public: false
        alias: AppBundle\Foo
```

Before
-------

![before](http://image.prntscr.com/image/2a69485a4a764316a90260b4e3dfc2a2.png)

After
------

![after](http://image.prntscr.com/image/ea42daa0e5c94841a28dd256450dc8ef.png)

Commits
-------

883723ef53 Show private aliases in debug:container
2017-05-03 12:26:38 -07:00
Fabien Potencier
c89d2f96e2 bug #22615 [DI] Defaults to public=false in all service config files (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Defaults to public=false in all service config files

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

This is what we call "eating your own dog food" :)
Made me realize that we need a tweak to the defaults<>ChildDefinition conflict we have now:
tags should be applied, and there should be *no* conflict when everything is set *explicitly* on the child definition.

Commits
-------

0656284f7f [DI] Defaults to public=false in all service config files
2017-05-03 12:16:37 -07:00
Jakub Zalas
00acb37205
[Intl] Update ICU data to 59.1 2017-05-03 19:20:02 +01:00
Nicolas Grekas
0656284f7f [DI] Defaults to public=false in all service config files 2017-05-03 19:24:51 +02:00
Nicolas Grekas
9190e108c1 [Config] Fix resource tracking with new GlobResource 2017-05-03 15:21:08 +02:00
Fabien Potencier
f2f9aa6168 minor #22612 [Validator] Update Galician (gl) translations (rubenrua)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Validator] Update Galician (gl) translations

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

Commits
-------

49ea93a23c [Validator] Update Galician (gl) translations
2017-05-02 17:46:31 -07:00
maryo
9c08109739 Fix incorrectly calling PHP process on Windows when path contains space 2017-05-03 02:32:32 +02:00
rubenrua
49ea93a23c [Validator] Update Galician (gl) translations 2017-05-02 18:40:49 +02:00
rubenrua
0269f9d422 [FrameworkBundle] Fix "Locale class not found" in AboutCommand 2017-05-02 18:27:29 +02:00
Nicolas Grekas
0c704cf76a minor #22602 [EventDispatcher] fix merge of #22541 from 2.8 (dmaicher)
This PR was merged into the 3.2 branch.

Discussion
----------

[EventDispatcher] fix merge of #22541 from 2.8

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

This cleans up a test case that was merged from 2.8 into 3.2 here: 824dc8ba5f

@fabpot due to different implementations I created 2 PR's:

2.8: https://github.com/symfony/symfony/pull/22541
3.2: https://github.com/symfony/symfony/pull/22568

So the 2.8 merge into 3.2 of my change-set introduced some unused variable `$isWrapped` here: 824dc8ba5f (diff-af3c4fbca8bb77957c00087543ae5a4dR113)

This PR just cleans it up and also removes the data provider 😉

Commits
-------

f67eba8 [EventDispatcher] fix merge of #22541 from 2.8
2017-05-02 11:20:19 +02:00
Nicolas Grekas
0c4e549fa1 minor #22560 [appveyor] Run the test suite on PHP 7.1 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[appveyor] Run the test suite on PHP 7.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        | -

Commits
-------

a537d6c [appveyor] Run the test suite on PHP 7.1
2017-05-02 11:17:38 +02:00
Nicolas Grekas
8342cd7c1c minor #22562 [appveyor][3.x] Run the test suite on PHP 7.1 (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[appveyor][3.x] Run the test suite on PHP 7.1

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | let's see
| Fixed tickets | #22556
| License       | MIT
| Doc PR        | -

Commits
-------

51b82f5 [appveyor][3.x] Run the test suite on PHP 7.1
2017-05-02 11:16:43 +02:00
Nicolas Grekas
a537d6c11e [appveyor] Run the test suite on PHP 7.1 2017-05-02 10:48:05 +02:00
Nicolas Grekas
51b82f5469 [appveyor][3.x] Run the test suite on PHP 7.1 2017-05-02 10:05:20 +02:00
Fabien Potencier
85e2d2f91d bumped Symfony version to 3.3.0 2017-05-01 11:49:34 -07:00
David Maicher
f67eba863c [EventDispatcher] fix merge of #22541 from 2.8 2017-05-01 20:34:19 +02:00
Fabien Potencier
0fa394005c Merge pull request #22603 from fabpot/release-3.3.0-BETA1
released v3.3.0-BETA1
2017-05-01 11:30:51 -07:00
Fabien Potencier
b3937618a6 updated VERSION for 3.3.0-BETA1 2017-05-01 11:30:25 -07:00
Fabien Potencier
20b19b0650 updated CHANGELOG for 3.3.0-BETA1 2017-05-01 11:30:10 -07:00
Fabien Potencier
da26b3f32f bumped Symfony version to 3.2.9 2017-05-01 11:00:12 -07:00
Fabien Potencier
85959c2abb Merge pull request #22601 from fabpot/release-3.2.8
released v3.2.8
2017-05-01 10:47:03 -07:00
Fabien Potencier
e3133489bc updated VERSION for 3.2.8 2017-05-01 10:46:48 -07:00
Fabien Potencier
4bb25dc938 updated CHANGELOG for 3.2.8 2017-05-01 10:46:41 -07:00