Commit Graph

27526 Commits

Author SHA1 Message Date
Nicolas Grekas
788f7e84b0 [VarDumper] Add ClassStub for clickable & shorter PHP identifiers 2016-09-02 17:23:03 +02:00
Fabien Potencier
2511f2a191 bumped Symfony version to 2.7.18 2016-09-01 20:54:47 -07:00
Fabien Potencier
48bd1333da Merge pull request #19820 from fabpot/release-2.7.17
released v2.7.17
2016-09-02 05:05:47 +02:00
Fabien Potencier
68124f52fa updated VERSION for 2.7.17 2016-09-01 20:05:16 -07:00
Fabien Potencier
4050beb415 update CONTRIBUTORS for 2.7.17 2016-09-01 20:05:09 -07:00
Fabien Potencier
2d83c1c1e0 updated CHANGELOG for 2.7.17 2016-09-01 20:04:58 -07:00
Fabien Potencier
35211051fa Merge branch '3.1'
* 3.1:
  [WebProfilerBundle] Fix margin on toolbar route panel.
  Update profiler's layout to use flexbox
  [Yaml] Remove legacy code
2016-09-01 19:14:06 -07:00
Fabien Potencier
cc5a65b7f6 Merge branch '2.8' into 3.1
* 2.8:
  Update profiler's layout to use flexbox
  [Yaml] Remove legacy code
2016-09-01 19:12:52 -07:00
Fabien Potencier
59d6784b22 Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] Remove legacy code
2016-09-01 18:57:56 -07:00
Fabien Potencier
4ac89bbb7a feature #19816 [VarDumper] Add LinkStub to create links in HTML dumps (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Add LinkStub to create links in HTML dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

This builds on top of #19797 & adds a new `LinkStub` to inform HtmlDumper about values that can be dumped as html links.

![capture du 2016-09-01 16-37-56](https://cloud.githubusercontent.com/assets/243674/18171810/8a786518-7063-11e6-9719-1eca295087e7.png)

Note in the screenshot:
- the "file" item has ellipsis,
- the browser displays the target at the bottom

Commits
-------

2b5d642 [VarDumper] Add LinkStub to create links in HTML dumps
2016-09-01 10:44:22 -07:00
Fabien Potencier
13161d5cdc feature #19768 [VarDumper] Enhance dumping arguments in stack traces (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Enhance dumping arguments in stack traces

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Commits
-------

58816bd [VarDumper] Enhance dumping arguments in stack traces
2016-09-01 10:41:41 -07:00
Fabien Potencier
15cb83bfa0 bug #19708 [DI] Dont use Container::get() when fetching private services internally (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DI] Dont use Container::get() when fetching private services internally

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19683, #19682, #19680
| License       | MIT

As spotted by @wouterj, we forgot to remove the deprecation notice when doing internal calls to get private services.

Yet, we don't need to get through this `get()` method, because we can already resolve many things at compile time for private services. This will provide another small performance optim, and fix the issue.

Commits
-------

a9c79fb [DI] Dont use Container::get() when fetching private services internally
2016-09-01 10:39:44 -07:00
Fabien Potencier
dfd1d2d256 bug #19812 [WebProfilerBundle] Fix margin on toolbar route panel when no route is found in the request (jameshalsall)
This PR was merged into the 3.1 branch.

Discussion
----------

[WebProfilerBundle] Fix margin on toolbar route panel when no route is found in the request

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

Just to clarify, this bug was introduced in the 3.1 release when some of the toolbar was re-structured

Commits
-------

7fdffd1 [WebProfilerBundle] Fix margin on toolbar route panel.
2016-09-01 10:35:07 -07:00
Nicolas Grekas
2b5d642efd [VarDumper] Add LinkStub to create links in HTML dumps 2016-09-01 17:11:16 +02:00
James Halsall
7fdffd1c15
[WebProfilerBundle] Fix margin on toolbar route panel.
When no route was found (404) then the route panel margin would cause
unnecessary space between the status panel and the response time panel.
2016-09-01 14:31:36 +01:00
Nicolas Grekas
03a824a117 bug #19803 [WebProfilerBundle] Fix infinite loop in JS (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[WebProfilerBundle] Fix infinite loop in JS

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes (master only)
| Tests pass?   | yes
| License       | MIT

For some reason, I ended up having this while loop infinitely.

Commits
-------

68b6c32 [WebProfilerBundle] Fix infinite loop in JS
2016-09-01 12:01:16 +02:00
Teoh Han Hui
72b6c9e0b9 Update misleading comment about RFC4627
RFC 4627 does not dictate escaping of HTML special characters
2016-09-01 12:16:03 +08:00
Nicolas Grekas
58816bd163 [VarDumper] Enhance dumping arguments in stack traces 2016-08-31 20:37:17 +02:00
Fabien Potencier
16c5c76052 feature #19796 [VarDumper] Make the line clickable to toggle dumps (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Make the line clickable to toggle dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

The arrow to toggle dumps is too small. Let's make the text before it clickable.

Commits
-------

2697dd5 [VarDumper] Make the line clickable to toggle dumps
2016-08-31 11:32:07 -07:00
Fabien Potencier
4fbf80d50b feature #19764 [Config] Add ExprBuilder::ifEmpty() (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Config] Add ExprBuilder::ifEmpty()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6922

Useful for instance when you don't expect to have a key set in the resolved config if its content is empty:

```php
$builder = new TreeBuilder();
$tree = $builder
    ->root('matcher')
        ->children()
            ->arrayNode('references_to_exclude')
                ->validate()
                    ->ifEmpty()
                    ->thenUnset()
                ->end()
                ->prototype('scalar')->end()
            ->end()
        ->end()
    ->end()
    ->buildTree()
;

$tree->finalize(['references_to_exclude' => ['foo', 'bar']]);
>>> ['references_to_exclude' => ['foo', 'bar']]

$tree->finalize(['references_to_exclude' => []]);
>>> []
```

Commits
-------

4e46f64 [Config] Add ExprBuilder::ifEmpty()
2016-08-31 11:30:14 -07:00
Fabien Potencier
020990184a bug #19786 Update profiler's layout to use flexbox (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #19786).

Discussion
----------

Update profiler's layout to use flexbox

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

### Problem

The layout of the profiler uses some old CSS tricks to make the sidebar look like a same-height sidebar (`margin-bottom: -99999px;` and `padding-bottom: 99999px;`, a large `min-height` in the content, etc.)

This works most of the time ... but there are some edge cases where the sidebar looks ugly (it doesn't have the same height as the main content).

### Solution

This proposal updates the profiler layout to use CSS flexbox.

* It looks and behaves exactly like before ... but it also fixes all the edge cases.
* flexbox has ~90% of global browser support --> so it should be 100% of Symfony developers

---

~~Sadly **there is one issue that I cannot solve**:~~

~~* The "Performance" panel doesn't work on Chrome and Firefox (but it works on Safari!!)~~
~~* The problem is that the `getContainerWidth()` function in `time.html.twig` template doesn't return the right value and the generated canvas has a wrong width.~~

~~Any clues?~~ It's fixed now!

Commits
-------

d986ac0 Update profiler's layout to use flexbox
2016-08-31 11:24:22 -07:00
Javier Eguiluz
d986ac055c Update profiler's layout to use flexbox 2016-08-31 11:24:21 -07:00
Fabien Potencier
2cd6c63a95 feature #19797 [VarDumper] Handle attributes in Data clones for more semantic dumps (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Handle attributes in Data clones for more semantic dumps

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| License       | MIT

Casters can now add attributes to the stub they create and to virtual properties so that e.g. the HtmlDumper knows more about the structure it is dumping. This allow for fine tuned HTML representations.

The ExceptionCaster uses this feature to make traces more useful, by telling the HtmlDumper that a which keys/values are files, lines or code excerpt (and which language). Thus, code excerpts can now be opened directly in the IDE.

Commits
-------

2937ffa [VarDumper] Handle attributes in Data clones for more semantic dumps
2016-08-31 11:22:01 -07:00
Fabien Potencier
09e4e49b2a minor #19802 [Yaml] Remove legacy code (Ener-Getick)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Remove legacy code

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

It looks like these lines were forgotten during the transition to 2.0 as references are already [managed in `Inline`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L542-L559).

Commits
-------

a88dff3 [Yaml] Remove legacy code
2016-08-31 11:04:35 -07:00
Nicolas Grekas
68b6c32458 [WebProfilerBundle] Fix infinite loop in JS 2016-08-31 17:02:18 +02:00
Ener-Getick
a88dff3981
[Yaml] Remove legacy code 2016-08-31 15:10:08 +02:00
Nicolas Grekas
2937ffa125 [VarDumper] Handle attributes in Data clones for more semantic dumps 2016-08-31 13:39:45 +02:00
Nicolas Grekas
ec9cbab6e9 minor #19798 [DomCrawler] Fixed typo in doc comment (aboks)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DomCrawler] Fixed typo in doc comment

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

98d2c9d [DomCrawler] Fixed typo in doc comment
2016-08-31 13:35:23 +02:00
Arnout Boks
98d2c9d9dd [DomCrawler] Fixed typo in doc comment 2016-08-31 13:20:00 +02:00
Nicolas Grekas
2697dd5466 [VarDumper] Make the line clickable to toggle dumps 2016-08-31 11:10:35 +02:00
Nicolas Grekas
b835ab1d39 Merge branch '3.1'
* 3.1:
  Fix merge
2016-08-31 11:05:56 +02:00
Nicolas Grekas
0cd5f13615 Merge branch '2.8' into 3.1
* 2.8:
  Fix merge
2016-08-31 11:05:42 +02:00
Nicolas Grekas
23bc357ca7 Fix merge 2016-08-31 11:05:30 +02:00
Nicolas Grekas
731b62534c Merge branch '3.1'
* 3.1:
  [VarDumper] Various minor fixes & cleanups
  Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
  [Config] Fix DirectoryResourceTest for symlinks
  [HttpKernel] Add missing SsiFragmentRendererTest
  [DoctrineBridge] Fix exception message and tests after misresolved merge
  Fixes the calendar in constructor to handle null
2016-08-31 10:09:20 +02:00
Nicolas Grekas
46843d318b Merge branch '2.8' into 3.1
* 2.8:
  [VarDumper] Various minor fixes & cleanups
  Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
  [HttpKernel] Add missing SsiFragmentRendererTest
  [DoctrineBridge] Fix exception message and tests after misresolved merge
  Fixes the calendar in constructor to handle null
2016-08-31 10:07:33 +02:00
Nicolas Grekas
808333e5d0 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Various minor fixes & cleanups
  Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
  [HttpKernel] Add missing SsiFragmentRendererTest
  Fixes the calendar in constructor to handle null
2016-08-31 10:02:58 +02:00
Nicolas Grekas
ac9ac8364e bug #19794 [VarDumper] Various minor fixes & cleanups (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Various minor fixes & cleanups

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| Tests pass?   | yes
| License       | MIT

Minor fixes & cleanups found while working on a few VarDumper enhancements.
I'm going to merge this one quickly to unlock the other PRs I'm preparing for master.

Commits
-------

a989491 [VarDumper] Various minor fixes & cleanups
2016-08-31 09:58:22 +02:00
Nicolas Grekas
a989491ade [VarDumper] Various minor fixes & cleanups 2016-08-31 09:12:09 +02:00
Fabien Potencier
2bc54e0863 minor #19779 [FrameworkBundle] Fix test scanning the full tmp directory (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Fix test scanning the full tmp directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes/no
| Fixed tickets | n/a
| License       | MIT

Next to #19777 (my bad for both ☺️ ).

@nicolas-grekas It seems there are [some similar ones](https://github.com/search?utf8=%E2%9C%93&q=tempnam%28sys_get_temp_dir%28%29%2C+repo%3Asymfony%2Fsymfony&type=Code&ref=searchresults) that need to be fixed

Commits
-------

bb9413b [FrameworkBundle] Fix test scanning the full tmp directory
2016-08-30 10:58:27 -07:00
Fabien Potencier
45c0c493e9 minor #19765 [Config] Fix DirectoryResourceTest for symlinks (ogizanagi)
This PR was merged into the 3.1 branch.

Discussion
----------

[Config] Fix DirectoryResourceTest for symlinks

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no (only tests, locally)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Tests were failing locally (on my macbook), because the `DirectoryResource` implementation now uses `realpath`.
Which means the path returned by `->getResource()` may differ from the given one in case it is a symlink:

```diff
There were 2 failures:

1) Symfony\Component\Config\Tests\Resource\DirectoryResourceTest::testGetResource
->getResource() returns the path to the resource
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
+/private/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator

src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php:56

2) Symfony\Component\Config\Tests\Resource\DirectoryResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
+/private/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator

src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php:169
```

Commits
-------

56f74eb [Config] Fix DirectoryResourceTest for symlinks
2016-08-30 10:56:24 -07:00
Fabien Potencier
0fd7cdb40c bug #19724 [Console] Register terminal env variables (ogizanagi)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Console] Register terminal env variables

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

Solves #19719 by setting `COLUMNS` & `LINES` env vars when running an Application.
Those env vars are then meant to be reused when using the Process component.

~~It creates a new `Terminal::registerEnv()` method allowing to register terminal related informations into environment variables. ~~It allows getting "consistent terminal informations" across processes.~~

Unless the env vars handling is backported from the 3.2 `Terminal` class to older branches in the `Application` class, the mentioned issue can't be solved this way.

Commits
-------

926bc51 [Console] Register terminal env variables
2016-08-30 10:54:44 -07:00
Fabien Potencier
816a3349ed minor #19774 [TwigBundle] Use vector images on the exception page (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBundle] Use vector images on the exception page

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | #19756
| License       | MIT

Before:
![capture du 2016-08-29 15-40-37](https://cloud.githubusercontent.com/assets/243674/18053289/f5ab33cc-6dfe-11e6-94cf-720098c214d8.png)

After:
![capture du 2016-08-29 21-00-36](https://cloud.githubusercontent.com/assets/243674/18063547/b274f520-6e2b-11e6-95cd-180ccb4cbf28.png)

Ghost SVG provided by  @patrick-mcdougle, thanks to him.

Commits
-------

1a3a4be [TwigBundle] Use vector images on the exception page
2016-08-30 10:02:24 -07:00
Nicolas Grekas
1a3a4be10d [TwigBundle] Use vector images on the exception page 2016-08-29 21:00:23 +02:00
Robin Chalas
bb9413b71b
[FrameworkBundle] Fix test scanning the full tmp directory 2016-08-29 20:58:41 +02:00
Fabien Potencier
9b39c7a091 minor #19777 [Yaml] Fix test scanning the full tmp directory (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Yaml] Fix test scanning the full tmp directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Commits
-------

d2d4b3c [Yaml] Fix test scanning the full tmp directory
2016-08-29 09:55:43 -07:00
Fabien Potencier
bcb1d8fd0c Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
This reverts commit f28eb9a617, reversing
changes made to bbb75faa15.
2016-08-29 09:54:06 -07:00
Nicolas Grekas
d2d4b3ca82 [Yaml] Fix test scanning the full tmp directory 2016-08-29 17:14:38 +02:00
SpacePossum
1430138b62 Allow multiple options to be set. 2016-08-29 13:13:33 +02:00
Nicolas Grekas
6f2ea672fe bug #19757 [PhpUnitBridge] allow to pass a message as string (xabbuh)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[PhpUnitBridge] allow to pass a message as string

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

Currently our tests for deprecation messages just pass "accidentally" (we never pass arrays but only strings).

Commits
-------

8ceed79 [PhpUnitBridge] allow to pass a message as string
2016-08-29 10:55:32 +02:00
Nicolas Grekas
29b6b9b83e Merge branch '3.1'
* 3.1:
  [HttpKernel] Fix assertion of deprecation in fragment renderer
  [Yaml] sync test and actually triggered message
2016-08-29 10:54:53 +02:00