Commit Graph

28473 Commits

Author SHA1 Message Date
Fabien Potencier
fe15381a45 minor #20425 [Form] fixed "empty_value" option deprecation (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fixed "empty_value" option deprecation

| Q             | A
| ------------- | ---
| Branch?       | 2.x only
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/15945#r86547326
| License       | MIT
| Doc PR        | ~

I didn't make any profiling but a resolver instance is passed to `configureOptions()` creating locale variables including those exceptions for each field using one of the patched form types, so I guess the memory usage can grow really fast.

Commits
-------

7e84907 [Form] fixed "empty_value" option deprecation
2016-12-03 11:52:40 +01:00
Fabien Potencier
5f62f01943 fixed CS 2016-12-03 11:50:08 +01:00
Fabien Potencier
4a7fbdde5a bug #19902 [DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service. (antanas-arvasevicius)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] PhpDumper.php: hasReference() shouldn't search references in lazy service.

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

more info:
https://github.com/symfony/symfony/issues/19901

Commits
-------

595a978 [DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments.
2016-12-03 11:48:01 +01:00
Christian Flothmann
5269796448 fix the inline level for dumped multi-line strings 2016-12-03 11:04:08 +01:00
Nicolas Grekas
dcf9fbb18c [HttpKernel] Fix annotation cache warmer with failing or missing classes 2016-12-02 15:52:29 +01:00
Fabien Potencier
e8553a818e feature #20161 add toolbar & profiler SVG style classes (havvg)
This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #20161).

Discussion
----------

add toolbar & profiler SVG style classes

| Q | A |
| --- | --- |
| Bug fix? | no |
| New feature? | Technically, yes - but actually not |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| License | MIT |

This allows the usage of SVG not only containing `path` elements. I opted for a generic solution using the two classes to apply to any SVG, one would like to use within the toolbar (`sf-toolbar-path`) and/or profiler (`sf-profiler-path`).

Commits
-------

155a1fc add toolbar & profiler SVG style classes
2016-12-02 13:16:34 +01:00
Toni Uebernickel
155a1fc785 add toolbar & profiler SVG style classes 2016-12-02 13:16:33 +01:00
Fabien Potencier
122fae8757 feature #20467 [DomCrawler] Add support for formaction and formmethod attributes (stof)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DomCrawler] Add support for formaction and formmethod attributes

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

This adds supports for the ``formaction`` and ``formmethod`` of submit elements, which override the values defined on the ``<form>`` element.
This works only when you call ``$crawler->form()`` on a Crawler containing a button, not when it contains the ``<form>`` itself of course (as the button override is applied only when using this button to submit, not when using another way).

Other button-level overrides are not implemented:
- ``formtarget`` is useless as we don't implement ``target`` either (the Crawler does not deal with frame-based pages anyway)
- ``formnovalidate`` is ignored, as we don't automatically disable the form validation on ``novalidate`` either, but we require an explicit disabling instead (this might be subject to a separate PR though, as it could make sense)
- ``formenctype`` is ignored as we also ignore ``enctype`` (we always submit file fields, even when missing the proper enctype)

Commits
-------

717cf8a [DomCrawler] Add support for formaction and formmethod attributes
2016-12-02 13:07:28 +01:00
Fabien Potencier
20076b0d12 minor #20452 debug service with one line by tag (nykopol)
This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #20452).

Discussion
----------

debug service with one line by tag

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

Since the 2.8 branch, the `debug:container` command output service tags in one single line.
So if the debugged service have many tags, this print an unreadable large table.

This PR solve this issue by printing one line by tag.

Commits
-------

dbf4850 debug service with one line by tag
2016-12-02 13:03:41 +01:00
Johan DESMYTER
dbf4850268 debug service with one line by tag 2016-12-02 13:03:32 +01:00
Fabien Potencier
fe454e42e1 feature #20509 [Serializer] Allow to specify a single value in @Groups (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #20509).

Discussion
----------

[Serializer] Allow to specify a single value in @Groups

| 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/pull/19374#issuecomment-256688002
| License       | MIT
| Doc PR        | todo

Tiny DX improvement:

Before:

```php
use Symfony\Component\Serializer\Annotation\Groups;

class Product
{
    /**
     * @Groups({"admins"})
     */
    public $itemsSold;
}
```

Now allowed:

```php
use Symfony\Component\Serializer\Annotation\Groups;

class Product
{
    /**
     * @Groups("admins")
     */
    public $itemsSold;
}
```

Commits
-------

926aa48 [Serializer] Allow to specify a single value in @Groups
2016-12-02 12:58:15 +01:00
Kévin Dunglas
926aa480b2 [Serializer] Allow to specify a single value in @Groups 2016-12-02 12:58:14 +01:00
Fabien Potencier
5f4d8e9441 bug #20704 [Console] Fix wrong handling of multiline arg/opt descriptions (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix wrong handling of multiline arg/opt descriptions

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20237, https://github.com/symfony/symfony/pull/13220#discussion_r84281248
| License       | MIT
| Doc PR        | N/A

### Before

<img width="1072" alt="screenshot 2016-11-30 a 19 23 17" src="https://cloud.githubusercontent.com/assets/2211145/20765428/8b622304-b732-11e6-911b-b169e9aed5fd.PNG">

### After

<img width="1074" alt="screenshot 2016-11-30 a 19 23 46" src="https://cloud.githubusercontent.com/assets/2211145/20765432/9159a53e-b732-11e6-909f-ec8107c78fed.PNG">

@rquadling and @leofeyer deserve the credit for reporting the issue and suggesting the proper fix. I've only executed it.

---

<details>
<summary>Show code to reproduce:</summary>

```php
<?php

use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

require __DIR__.'/../vendor/autoload.php';

(new Application())
    ->add(new class extends Command {
        protected function configure()
        {
            $description = "One of:" . array_reduce(['purge', 'truncate', 'delete', 'insert', 'select'], function ($value, $previous = '') {
                    return "$value\n- $previous";
            });

            $this
                ->setName('execute')
                ->addArgument('action', InputArgument::REQUIRED, $description)
                ->addOption('another-one', 'a', InputOption::VALUE_OPTIONAL, $description)
            ;
        }
    })
    ->getApplication()
    ->run(new ArgvInput())
;
```
</details>

Commits
-------

18fc6b5 [Console] Fix wrong handling of multiline arg/opt descriptions
2016-12-02 12:53:31 +01:00
Fabien Potencier
8c22de44cd minor #20702 [WebProfilerBundle] Fix vertical alignment for profiler open action (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Fix vertical alignment for profiler open action

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

### Before

![capture d ecran 2016-11-30 a 16 27 14](https://cloud.githubusercontent.com/assets/2211145/20758585/9d9f73ea-b71a-11e6-90d1-75651c22dee6.png)
![capture d ecran 2016-11-30 a 16 27 34](https://cloud.githubusercontent.com/assets/2211145/20758586/9da03596-b71a-11e6-975c-470ef2ca89e5.png)

### After

![capture d ecran 2016-11-30 a 16 26 48](https://cloud.githubusercontent.com/assets/2211145/20758606/a83e4dbc-b71a-11e6-82ea-35b8347ccdef.png)
![capture d ecran 2016-11-30 a 16 27 54](https://cloud.githubusercontent.com/assets/2211145/20758605/a83b2470-b71a-11e6-986c-1ab593a989ea.png)

Commits
-------

44a0ef1 [WebProfilerBundle] Fix vertical alignment for profiler open action
2016-12-02 12:49:53 +01:00
Maxime Steinhausser
27de65aa14 [Serializer] Fix argument object denormalization 2016-12-02 12:48:35 +01:00
Fabien Potencier
2e780b6a17 minor #20691 [Serializer] Add deprecation missing from UPGRADE files (ogizanagi, javiereguiluz)
This PR was merged into the 3.2 branch.

Discussion
----------

[Serializer] Add deprecation missing from UPGRADE files

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no, simply mention one in upgrade files
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

d681c1a Lines length should be 80 or less characters
597bbdc Lines length should be 80 or less characters
4514c1b [Serializer] Add deprecation missing from UPGRADE files
2016-12-02 12:47:23 +01:00
Fabien Potencier
f8b2a18451 bug #20700 [WebProfilerBundle][Translator] Fix TranslationDataCollector should use cloneVar (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle][Translator] Fix TranslationDataCollector should use cloneVar

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

Was missed in #19614 ?

### Before

![capture d ecran 2016-11-30 a 15 45 33](https://cloud.githubusercontent.com/assets/2211145/20756865/9a416934-b714-11e6-9cb5-890a6222b6fa.png)

### After

![capture d ecran 2016-11-30 a 15 43 58](https://cloud.githubusercontent.com/assets/2211145/20756877/9efaccae-b714-11e6-9523-b3f8f2e4bd8c.png)

Commits
-------

07cdfd5 [WebProfiler][Translator] Fix TranslationDataCollector should use cloneVar
2016-12-02 12:45:34 +01:00
Fabien Potencier
0c1e9ab876 minor #20705 [Form] Remove unused var cloner property (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form] Remove unused var cloner property

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

Not used anymore after https://github.com/symfony/symfony/pull/19986

EDIT: add missing `use` too.

Commits
-------

0708003 [Form] Remove unused var cloner property
2016-12-02 12:43:27 +01:00
Fabien Potencier
9f9a52c4e0 minor #20708 Grouping FrameworkBundle upgrade notes (yceruto)
This PR was squashed before being merged into the 3.2 branch (closes #20708).

Discussion
----------

Grouping FrameworkBundle upgrade notes

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| License       | MIT

Commits
-------

b8e7779 Grouping FrameworkBundle upgrade notes
2016-12-02 12:42:27 +01:00
Yonel Ceruto
b8e77792bc Grouping FrameworkBundle upgrade notes 2016-12-02 12:42:26 +01:00
Fabien Potencier
6a0ee38c64 feature #20722 Updated the "Symfony Config" panel in the profiler (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #20722).

Discussion
----------

Updated the "Symfony Config" panel in the profiler

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

This adds more information about the status of your Symfony version:

![symfony_config](https://cloud.githubusercontent.com/assets/73419/20830798/8ad42a1c-b882-11e6-9c5f-fac392d3118f.png)

And here some screenshots of the different statuses:

![symfony-dev](https://cloud.githubusercontent.com/assets/73419/20830807/9757aa2a-b882-11e6-8049-c156d9b16c83.png)

![symfony-eom](https://cloud.githubusercontent.com/assets/73419/20830810/9973b330-b882-11e6-8d57-6da3baafc256.png)

![symfony-eol](https://cloud.githubusercontent.com/assets/73419/20830811/9b99c67c-b882-11e6-8ff4-c76c77266e0c.png)

Commits
-------

0e454f3 Updated the "Symfony Config" panel in the profiler
2016-12-02 12:40:48 +01:00
Javier Eguiluz
0e454f3021 Updated the "Symfony Config" panel in the profiler 2016-12-02 12:40:47 +01:00
Fabien Potencier
5d7f4e17c4 bug #20712 [TwigBundle] Fix twig loader registered twice (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix twig loader registered 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/symfony/issues/20665
| License       | MIT
| Doc PR        | N/A

Generated code:

### Before

```php
    protected function getTwig_LoaderService()
    {
        $a = new \Twig_Loader_Filesystem(array(), $this->targetDirs[3]);

        $a->addPath(...);
        // ...

        $this->services['twig.loader'] = $instance = new \Twig_Loader_Chain();

        $instance->addLoader($a);
        $instance->addLoader($a);

        return $instance;
    }
```

### After

```php
    protected function getTwig_LoaderService()
    {
        $this->services['twig.loader'] = $instance = new \Twig_Loader_Filesystem(array(), $this->targetDirs[3]);

        $instance->addPath(...);
        // ...

        return $instance;
    }
```

~~Another solution is to simply create a private alias. But I don't know if we should care or not about the case people may rely on the fact both services exist as definition, and not as an alias, in a compiler pass.~~ (Has been preferred over of using a child definition)

For reference, this issue was introduced in https://github.com/symfony/symfony/pull/13354.

Commits
-------

2c81819 [TwigBundle] Fix twig loader registered twice
2016-12-02 12:39:04 +01:00
Maxime STEINHAUSSER
2c818193c1 [TwigBundle] Fix twig loader registered twice 2016-12-02 12:00:53 +01:00
Javier Eguiluz
03c79bef70 bug #20716 [WebProfilerBundle] Fix dump block is unfairly restrained (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Fix dump block is unfairly restrained

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

The `display: table-row` rule does not suit well for such blocks and prevent from containing them properly in the parent container (thus the reason why the width was set to `200px` I guess).

### Before

<img width="539" alt="screenshot 2016-12-01 a 20 21 49" src="https://cloud.githubusercontent.com/assets/2211145/20808878/8af6faa2-b804-11e6-8656-8ebd710b4acb.PNG">

### After

<img width="524" alt="screenshot 2016-12-01 a 20 21 14" src="https://cloud.githubusercontent.com/assets/2211145/20808885/9106b0cc-b804-11e6-9ddc-0cc09a546274.PNG">

(max width is still fixed to `480px` by `.sf-toolbar-block:hover .sf-toolbar-info`)

Commits
-------

997beb2 [WebProfilerBundle] Fix dump block is unfairly restrained
2016-12-02 10:28:14 +01:00
Christophe Coevoet
5e77aac0e6 bug #20717 Fix hide button in toolbar (nicolasdewez)
This PR was merged into the 3.2 branch.

Discussion
----------

Fix hide button in toolbar

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

Commits
-------

22e5668 Fix hide button in toolbar
2016-12-02 09:56:57 +01:00
Maxime Steinhausser
070800359e [Form] Remove unused var cloner property 2016-12-02 09:52:50 +01:00
Nicolas Dewez
22e5668056 Fix hide button in toolbar 2016-12-01 22:26:29 +01:00
Maxime Steinhausser
997beb21bf [WebProfilerBundle] Fix dump block is unfairly restrained 2016-12-01 20:26:29 +01:00
Maxime Steinhausser
18fc6b54da [Console] Fix wrong handling of multiline arg/opt descriptions 2016-11-30 19:39:48 +01:00
Maxime STEINHAUSSER
44a0ef169c [WebProfilerBundle] Fix vertical alignment for profiler open action 2016-11-30 16:30:36 +01:00
Nicolas Grekas
695d10071b [FrameworkBundle] Resolve env params in debug:config command 2016-11-30 16:21:24 +01:00
Maxime STEINHAUSSER
07cdfd533d [WebProfiler][Translator] Fix TranslationDataCollector should use cloneVar 2016-11-30 15:40:17 +01:00
Fabien Potencier
b5520e92c9 bumped Symfony version to 3.2.1 2016-11-30 10:16:00 +01:00
Fabien Potencier
b96a144bc8 Merge pull request #20693 from fabpot/release-3.2.0
released v3.2.0
2016-11-30 09:46:24 +01:00
Fabien Potencier
df8b30b813 updated VERSION for 3.2.0 2016-11-30 09:46:02 +01:00
Fabien Potencier
7bfe723ba7 updated CHANGELOG for 3.2.0 2016-11-30 09:45:53 +01:00
Javier Eguiluz
d681c1abc4 Lines length should be 80 or less characters 2016-11-30 09:01:12 +01:00
Javier Eguiluz
597bbdc418 Lines length should be 80 or less characters 2016-11-30 09:00:20 +01:00
Fabien Potencier
c500a3eaa9 bug #20687 [FrameworkBundle] Forbid env parameters in routing configuration (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Forbid env parameters in routing configuration

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

Commits
-------

a931002 [FrameworkBundle] Forbid env parameters in routing configuration
2016-11-30 08:13:45 +01:00
Maxime Steinhausser
4514c1b0c4 [Serializer] Add deprecation missing from UPGRADE files 2016-11-29 21:22:35 +01:00
Nicolas Grekas
a931002ca2 [FrameworkBundle] Forbid env parameters in routing configuration 2016-11-29 18:09:44 +01:00
Nicolas Grekas
e765849215 Merge branch '3.2'
* 3.2:
  Switch to NoRFCWarningsValidation
2016-11-29 14:39:51 +01:00
Nicolas Grekas
0e12427838 bug #20607 [Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2 (Lctrs)
This PR was merged into the 3.2 branch.

Discussion
----------

[Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2

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

When using egulias/email-validator ~1.2, we make a strict check of the email, which means that emails with RFC warnings will fail validation.
Currently with egulias/email-validator ~2.0, emails with warnings are considerate valids.

This pull request make EmailValidator with egulias/email-validator ~2.0 behave as with egulias/email-validator ~1.2.

Commits
-------

01b2f66 Switch to NoRFCWarningsValidation
2016-11-29 14:39:34 +01:00
Nicolas Grekas
2cdc6d2a07 Merge branch '3.2'
* 3.2:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  [VarDumper] Use default color for ellipsed namespaces/paths
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:53 +01:00
Nicolas Grekas
bd5af67f08 Merge branch '3.1' into 3.2
* 3.1:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:32 +01:00
Nicolas Grekas
b9ed4bfacc Merge branch '2.8' into 3.1
* 2.8:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 12:09:13 +01:00
Nicolas Grekas
25fa4a0ddf Merge branch '2.7' into 2.8
* 2.7:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 12:08:50 +01:00
Nicolas Grekas
c360a222ef bug #20671 [Config] ConfigCache::isFresh() should return false when unserialize() fails (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] ConfigCache::isFresh() should return false when unserialize() fails

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

Removes some `Warning: Class __PHP_Incomplete_Class has no unserializer` failures when clearing the cache.

Commits
-------

609245e [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 11:51:46 +01:00
Nicolas Grekas
609245e953 [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class 2016-11-29 11:39:48 +01:00