Commit Graph

28602 Commits

Author SHA1 Message Date
Christian Flothmann
108ac9ef8e reorder upgrade entries alphabetically 2016-12-13 20:34:41 +01:00
Fabien Potencier
69dcf41a3c feature #20167 [DependencyInjection] Make method (setter) autowiring configurable (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Make method (setter) autowiring configurable

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | maybe? |
| Tests pass? | yes |
| Fixed tickets | #19631 |
| License | MIT |
| Doc PR | symfony/symfony-docs#7041 |

Follow up of #19631. Implements https://github.com/symfony/symfony/pull/19631#issuecomment-240646169:

Edit: the last supported format:

``` yaml
services:
    foo:
        class: Foo
        autowire: ['__construct', 'set*'] # Autowire constructor and all setters
        autowire: true # Converted by loaders in `autowire: ['__construct']` for BC
        autowire: ['foo', 'bar'] # Autowire only `foo` and `bar` methods
```

Outdated:

``` yaml
autowire: true # constructor autowiring
autowire: [__construct, setFoo, setBar] # autowire whitelisted methods only
autowire: '*' # autowire constructor + every setters (following existing rules for setters autowiring)
```
- [x] Allow to specify the list of methods in the XML loader
- [x] Add tests for the YAML loader

Commits
-------

6dd53c7 [DependencyInjection] Introduce method injection for autowiring
2016-12-13 16:48:43 +01:00
Fabien Potencier
a3577eb5b0 Merge branch '3.2'
* 3.2:
  [Console] Review Application docblocks
  [Cache] Improve performances into foreach (PhpFilesAdapter)
  bumped Symfony version to 3.2.2
  updated VERSION for 3.2.1
  updated CHANGELOG for 3.2.1
  bumped Symfony version to 3.1.9
  updated VERSION for 3.1.8
  updated CHANGELOG for 3.1.8
  Add support for REDIS_URL environment variables.
  bumped Symfony version to 2.8.16
  updated VERSION for 2.8.15
  updated CHANGELOG for 2.8.15
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:32:21 +01:00
Fabien Potencier
6f46d5d776 Merge branch '3.1' into 3.2
* 3.1:
  [Console] Review Application docblocks
  bumped Symfony version to 3.1.9
  updated VERSION for 3.1.8
  updated CHANGELOG for 3.1.8
  bumped Symfony version to 2.8.16
  updated VERSION for 2.8.15
  updated CHANGELOG for 2.8.15
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:32:03 +01:00
Fabien Potencier
298452da31 Merge branch '2.8' into 3.1
* 2.8:
  [Console] Review Application docblocks
  bumped Symfony version to 2.8.16
  updated VERSION for 2.8.15
  updated CHANGELOG for 2.8.15
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:31:15 +01:00
Fabien Potencier
e221ac9df7 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Review Application docblocks
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:30:11 +01:00
Fabien Potencier
79e68965c1 minor #20731 DX: Update PHP CS Fixer config file (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

DX: Update PHP CS Fixer config file

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

For a good start, updated config for php cs fixer v2.
I would guess that fabbot needs to be updated ;)

Commits
-------

a0e305b Update PHP CS Fixer config file
2016-12-13 16:29:10 +01:00
Fabien Potencier
7f85f6dc1e minor #20813 [Console] Review Application docblocks (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #20813).

Discussion
----------

[Console] Review Application docblocks

| 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

~I know there must be a lot of other places in the core where there is some repeated or useless informations in docblocks, but everytime I dig into the `Application` class, I see this, and I don't want to repeat things for consistency when adding new methods 😅  (for instance in #20808, the `setCatchThrowables / areThrowablesCaught ` methods do not need a docblock description IMHO).~

~This PR adapts docblocks where:~

- ~A docblock description is not required, as everything can be expressed in the `@return / @param` argument (the case mentioned above)~
- ~Information is redundant between description and tags, and the context does not have to be reminded again:~

```diff

    /**
     * Adds an array of command objects.
     *
     * If a Command is not enabled it will not be added.
     *
-     * @param Command[] $commands An array of commands
+     * @param Command[] $commands
     */
    public function addCommands(array $commands)
    {
        foreach ($commands as $command) {
            $this->add($command);
        }
    }
```

Commits
-------

d8c18cc [Console] Review Application docblocks
2016-12-13 16:27:53 +01:00
Maxime STEINHAUSSER
d8c18cc3cd [Console] Review Application docblocks 2016-12-13 16:27:52 +01:00
Nicolas Grekas
638533b532 minor #20902 [Cache] Improve performances into foreach (PhpFilesAdapter) (hadjedjvincent)
This PR was squashed before being merged into the 3.2 branch (closes #20902).

Discussion
----------

[Cache] Improve performances into foreach (PhpFilesAdapter)

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

Let's prevent some useless call to be made into this foreach (ini_get)

Commits
-------

7e4573b [Cache] Improve performances into foreach (PhpFilesAdapter)
2016-12-13 16:09:49 +01:00
Vincent HADJEDJ
7e4573bcfb [Cache] Improve performances into foreach (PhpFilesAdapter) 2016-12-13 16:09:48 +01:00
Fabien Potencier
d27d445959 feature #20663 [DependencyInjection] replace DefinitionDecorator by ChildDefinition (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] replace DefinitionDecorator by ChildDefinition

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

The DefinitionDecorator class does not deal with decorated services. It reflects a parent-child-relationship between definitions instead. To avoid confusion, this commit deprecates the existing DefinitionDecorator class and introduces a new DefinitionExtension class as replacement.

Commits
-------

184f7ff replace DefinitionDecorator with ChildDefinition
2016-12-13 15:10:41 +01:00
Nicolas Grekas
5b91ec8bf4 minor #20894 [HttpKernel] Fix missing psr/cache dev requirement (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Fix missing psr/cache dev requirement

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

Because #20810 added a test for the `Psr6CacheClearer` that mocks methods of the `CacheItemPoolInterface`. It should fix the travis build on master and deps=low

Commits
-------

bd59d75 [HttpKernel] Require psr/cache in dev
2016-12-13 14:47:56 +01:00
Fabien Potencier
c41cfcb897 bumped Symfony version to 3.2.2 2016-12-13 14:40:27 +01:00
Fabien Potencier
5824d42367 Merge pull request #20897 from fabpot/release-3.2.1
released v3.2.1
2016-12-13 14:20:15 +01:00
Fabien Potencier
d884a521f3 updated VERSION for 3.2.1 2016-12-13 14:19:46 +01:00
Fabien Potencier
cd99324c0e updated CHANGELOG for 3.2.1 2016-12-13 14:19:37 +01:00
Fabien Potencier
8bf83cc0b0 bumped Symfony version to 3.1.9 2016-12-13 14:18:12 +01:00
Fabien Potencier
ae37418e61 Merge pull request #20895 from fabpot/release-3.1.8
released v3.1.8
2016-12-13 13:52:30 +01:00
Fabien Potencier
25b40ff90c updated VERSION for 3.1.8 2016-12-13 13:52:10 +01:00
Fabien Potencier
67385a5583 updated CHANGELOG for 3.1.8 2016-12-13 13:52:03 +01:00
Fabien Potencier
2422f7da9b bug #20891 Add support for REDIS_URL environment variables. (robinvdvleuten)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #20891).

Discussion
----------

Add support for REDIS_URL environment variables.

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

In most PAAS solutions - Heroku for example - the Redis connection string is exposed as an environment variable like `REDIS_URL`. This PR adds support for those by allowing the following config;

```yml
framework:
    cache:
        default_redis_provider: "%env(REDIS_URL)%"
```

In the referenced issue there was some discussion about maybe a new config options like `default_redis_url`, but this makes it hard to check in the extension for the case that an user configured a custom _default_redis_provider_ and also has configured the default url.

Commits
-------

4e6086f Add support for REDIS_URL environment variables.
2016-12-13 13:50:45 +01:00
Robin van der Vleuten
4e6086f7db Add support for REDIS_URL environment variables. 2016-12-13 13:50:44 +01:00
Robin Chalas
bd59d75d8c [HttpKernel] Require psr/cache in dev 2016-12-13 13:46:54 +01:00
Fabien Potencier
a163a16554 bumped Symfony version to 2.8.16 2016-12-13 13:44:14 +01:00
Fabien Potencier
3ec15b9379 Merge pull request #20892 from fabpot/release-2.8.15
released v2.8.15
2016-12-13 13:16:34 +01:00
Fabien Potencier
5b5311c130 updated VERSION for 2.8.15 2016-12-13 13:16:15 +01:00
Fabien Potencier
42fbabd470 updated CHANGELOG for 2.8.15 2016-12-13 13:16:09 +01:00
Fabien Potencier
f22a505629 bumped Symfony version to 2.7.23 2016-12-13 13:12:22 +01:00
Christian Flothmann
184f7ff125 replace DefinitionDecorator with ChildDefinition
The DefinitionDecorator class does not deal with decorated services. It
reflects a parent-child-relationship between definitions instead. To
avoid confusion, this commit deprecates the existing DefinitionDecorator
class and introduces a new ChildDefinition class as replacement.
2016-12-13 12:26:14 +01:00
Fabien Potencier
4b0fd9881d Merge pull request #20890 from fabpot/release-2.7.22
released v2.7.22
2016-12-13 11:53:44 +01:00
Fabien Potencier
bdb6bf985f updated VERSION for 2.7.22 2016-12-13 11:53:27 +01:00
Fabien Potencier
c5ab208642 update CONTRIBUTORS for 2.7.22 2016-12-13 11:53:11 +01:00
Fabien Potencier
9cd884312f updated CHANGELOG for 2.7.22 2016-12-13 11:53:02 +01:00
Fabien Potencier
ad64c8a812 Merge branch '3.2'
* 3.2:
  Define a GitHub issue template to avoid support questions
2016-12-13 11:41:45 +01:00
Fabien Potencier
1e1a01804e Merge branch '3.1' into 3.2
* 3.1:
  Define a GitHub issue template to avoid support questions
2016-12-13 11:41:36 +01:00
Fabien Potencier
c9beeb7de8 Merge branch '2.8' into 3.1
* 2.8:
  Define a GitHub issue template to avoid support questions
2016-12-13 11:41:27 +01:00
Fabien Potencier
5af7f1afc1 Merge branch '2.7' into 2.8
* 2.7:
  Define a GitHub issue template to avoid support questions
2016-12-13 11:41:19 +01:00
Fabien Potencier
cf02e3cc3d minor #20295 Define a GitHub issue template to avoid support questions (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20295).

Discussion
----------

Define a GitHub issue template to avoid support questions

We're getting a lot of issues that are in fact support questions. Should we give a try at defining a GitHub Issue template to try to minimize this problem?

The text contents are temporary. This is how they'd look:

![issue_template](https://cloud.githubusercontent.com/assets/73419/19683472/9be02128-9ab2-11e6-90a7-987ddcb49d97.png)

Commits
-------

eeaca5c Define a GitHub issue template to avoid support questions
2016-12-13 11:28:06 +01:00
Javier Eguiluz
eeaca5c96b Define a GitHub issue template to avoid support questions 2016-12-13 11:28:04 +01:00
Fabien Potencier
40280f203c Merge branch '3.2'
* 3.2:
  [WebProfilerBundle] Fix AJAX panel with fetch requests
  Don’t compile when Opcache is not enabled on CLI
  DateIntervalType: 'invert' should not inherit the 'required' option
  [Form] DateIntervalType: Do not try to translate choices
  [TwigBridge] fix constructor args check
  Allow simple-phpunit to be used with an HTTP proxy
  Minor fixes for 3.2
  Fix a web profiler form issue with fields added to the form after the form was built
  do not trigger deprecations for valid YAML
  Write an exception message in a one heading line
  [Workflow] Added missing docblock
  [Finder] Refine phpdoc about argument for NumberComparator
  Fixed max width from ajax request url element (td)
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
  [Serializer] Optimize max depth checking
2016-12-13 10:39:51 +01:00
Fabien Potencier
1943c26d47 Merge branch '3.1' into 3.2
* 3.1:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fixed max width from ajax request url element (td)
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
  [Serializer] Optimize max depth checking
2016-12-13 10:39:43 +01:00
Fabien Potencier
ed73b0c629 Merge branch '2.8' into 3.1
* 2.8:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
2016-12-13 10:38:21 +01:00
Fabien Potencier
c9d08b61c3 Merge branch '2.7' into 2.8
* 2.7:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
2016-12-13 10:38:12 +01:00
Fabien Potencier
5126639f62 feature #20197 [WebProfilerBundle] Improve Ajax Profiling Performance (javascript) (patrick-mcdougle)
This PR was squashed before being merged into the 3.3-dev branch (closes #20197).

Discussion
----------

[WebProfilerBundle] Improve Ajax Profiling Performance (javascript)

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | kinda (is bad performance a bug?) |
| New feature? | kinda (is increased performance a feature?) |
| BC breaks? | no (unless performance is a BC break) |
| Deprecations? | no |
| Tests pass? | do we have JS tests? |
| Fixed tickets | #20155 |
| License | MIT |
| Doc PR | n/a |

The old version of this JS re-rendered the entire list of ajax calls which was causing some performance issues when people had high numbers of ajax requests (increasingly common as people create SPAs.

This PR changes the behavior of the ajax profiler to be more smart about the DOM manipulations it makes. Instead of re-rendering the entire list, on any AJAX requests/responses, it instead adds the row to the profiler when an AJAX request is made, adding the DOM node as a property of the request on the requestStack. When the AJAX response comes back, it updates the existing DOM node instead of re-creating it (and all of the others).

I've tested this on my machine using a modern version of chrome. I don't think I'm doing anything fancy, so I think the likelihood that I broke something is minimal.

I've left a couple of the commits separate, because they represent distinct ideas. The first commit is just some consistency/cleanup. The second commit is the meat of the work. Its diff is basically useless since I've added two new functions and modified one function heavily. I tried to make the diff as easy to read as possible, but it's still pretty rough. The third commit removes some functions/calls that I don't think need to be there now that this is re-written, but I wanted to leave them in a separate commit for ease of revert if they are indeed needed.

Commits
-------

65e391c Replace occurances of querySelectorAll with querySelector
fddff26 Put back the indentation
9942edd Remove unnecessary method calls/definitions
2c053ee Rewrite ajax profiling for performance
da621c9 Fix indentation & JS Cleanup
2016-12-13 10:27:18 +01:00
Fabien Potencier
3f04132b26 minor #20381 [github] Tweak PR template (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[github] Tweak PR template

| 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        | -

Related to #20295

Commits
-------

2acaf5f [github] Tweak PR template
2016-12-13 10:24:16 +01:00
Fabien Potencier
90df4793cf feature #20487 [Console] Disallow inheritance from ProgressBar (a-ast)
This PR was squashed before being merged into the 3.3-dev branch (closes #20487).

Discussion
----------

[Console] Disallow inheritance from ProgressBar

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

Changed `ProgressBar` to `final`, fixed tests.
As explained below, this modification doesn't break BC because inheritance from `ProgressBar` was not possible anyway.
See: https://github.com/symfony/symfony/issues/20427

Commits
-------

a2668f6 [Console] Disallow inheritance from ProgressBar
2016-12-13 10:20:34 +01:00
Andrey Astakhov
a2668f6abe [Console] Disallow inheritance from ProgressBar 2016-12-13 10:20:32 +01:00
Fabien Potencier
e55f79b5c6 minor #20529 [Serializer] Optimize max depth checking (dunglas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Serializer] Optimize max depth checking

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

Avoid to call the metadata factory for each attribute when max depth checking is enabled.
Prepare the code for the "serialized name" feature (that also requires metadata) in Symfony 3.3.

Commits
-------

bb3ee76 [Serializer] Optimize max depth checking
2016-12-13 10:15:55 +01:00
Fabien Potencier
902d9edacd feature #20651 [DependencyInjection] Added Yaml syntax shortcut for name-only tags (wouterj)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Added Yaml syntax shortcut for name-only tags

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

This PR adds a little shorcut for tags without any attributes. There are increasingly more name-only tags in Symfony and having to do `{ name: twig.extension }` for these seems way too verbose to me.

**Before**
```yaml
services:
    app.twig_extension:
        class: AppBundle\Twig\AppExtension
        tags:
            - { name: twig.extension }
```

**After**
```yaml
services:
    app.twig_extension:
        class: AppBundle\Twig\AppExtension
        tags: [twig.extension]
        # or
        #    - twig.extension
```

This of course means we introduce a new format to achieve the same goal. I believe this isn't a big problem as the decision is distinctive and simple: If you configure tag attributes, use the long format, otherwise use the short format.

Backwards compatibility
---

In this PR, an exception was removed to allow this new shortcut format. The BC promise doesn't cover exceptions and I think removing the exception here should cause anything to break:

 * Applications shouldn't rely on exceptions
 * If code was triggering this exception before, it would not cause any behaviour change after this PR: The service just retrieves an unused tag, which is simply ignored by the container.

Commits
-------

7fa8c8a Added Yaml syntax shortcut for name-only tags
2016-12-13 10:04:41 +01:00