Commit Graph

6324 Commits

Author SHA1 Message Date
Nicolas Grekas
fdf285b5c9 Fix 7.2 compat layer 2017-10-09 20:05:34 +02:00
Fabien Potencier
72cc5df5fc minor #24342 removed useless PHPDoc (OskarStark)
This PR was squashed before being merged into the 2.7 branch (closes #24342).

Discussion
----------

removed useless PHPDoc

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

Commits
-------

5ee9043d8b removed useless PHPDoc
2017-09-30 07:00:25 -07:00
Oskar Stark
5ee9043d8b removed useless PHPDoc 2017-09-30 07:00:23 -07:00
Nicolas Grekas
a69c1b2ae1 [FrameworkBundle] Fix Routing\DelegatingLoader 2017-09-24 15:55:14 +02:00
SpacePossum
3e90138214 [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction 2017-09-15 11:46:57 +02:00
Fabien Potencier
fc30d5b0cf bug #24162 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces

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

Commits
-------

10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-11 15:35:04 -07:00
Fabien Potencier
10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces 2017-09-11 13:58:31 -07:00
Dariusz
7a97b49436 [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
Yonel Ceruto
cf11fb9652 Get KERNEL_DIR through $_ENV too for KernelTestCase 2017-09-06 18:24:46 -04:00
Nicolas Grekas
cfc9346f66 [travis] update to trusty 2017-09-06 17:42:52 +02:00
Maxime Steinhausser
f876fd9253 [DebugBundle] Reword an outdated comment about var dumper wiring 2017-08-09 13:56:35 +02:00
Christian Flothmann
5a3a24b0ac allow to configure custom formats in XML configs 2017-07-09 16:08:05 +02:00
Christian Flothmann
032e654acb require the XML PHP extension 2017-07-06 10:51:23 +02:00
Dariusz
58ba4818a6 Fix indent of methods 2017-07-04 23:00:55 +02:00
Gábor Egyed
6ed9c8d8c5 [FrameworkBundle] Do not remove files from assets dir 2017-07-04 11:39:25 +02:00
Fabien Potencier
64ea580eae bug #23274 Display a better error design when the toolbar cannot be displayed (yceruto)
This PR was squashed before being merged into the 2.7 branch (closes #23274).

Discussion
----------

Display a better error design when the toolbar cannot be displayed

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

Fixing the left position of the bar (tested in app without style) and escaping the literal newline (ES5) as some IDEs fails with previous syntax (and Github diff too). Btw, I have added the Symfony icon to make clear that this message comes from Symfony ;)

**Before:**
![current_toolbar_error](https://user-images.githubusercontent.com/2028198/27466735-cd5f0da8-57aa-11e7-8431-3025c41557e6.png)

**After:**
![after_toolbar_27](https://user-images.githubusercontent.com/2028198/27467928-75e45d4e-57b4-11e7-9e1f-e252d9085596.png)

Commits
-------

ed3e403b4b Display a better error design when the toolbar cannot be displayed
2017-07-03 10:01:20 +03:00
Yonel Ceruto
ed3e403b4b Display a better error design when the toolbar cannot be displayed 2017-07-03 10:01:07 +03:00
Christian Flothmann
46c38df0fd [TwigBundle] add back exception check 2017-06-24 11:40:57 +02:00
George Mponos
a433ceca41 Show exception is checked twice in ExceptionController of twig 2017-06-22 16:15:38 -07:00
Fabien Potencier
f7de083cbd bug #23266 Display a better error message when the toolbar cannot be displayed (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Display a better error message when the toolbar cannot be displayed

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

In action:

![profiler-error](https://user-images.githubusercontent.com/73419/27444352-5d0a1d60-5776-11e7-89c3-430cd6f38454.png)

Commits
-------

cc7275bccc Display a better error message when the toolbar cannot be displayed
2017-06-22 16:02:01 -07:00
Christian Flothmann
99931a994b allow SSI fragments configuration in XML files 2017-06-22 22:44:44 +02:00
Javier Eguiluz
cc7275bccc Display a better error message when the toolbar cannot be displayed 2017-06-22 18:11:34 +02:00
Dawid Nowak
90e192e824 Sessions: configurable "use_strict_mode" option for NativeSessionStorage
https://github.com/symfony/symfony/pull/22352#issuecomment-302113533
2017-06-16 20:49:16 +02:00
Fabien Potencier
436d5e4e94 bug #23195 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177 (NicolasPion)
This PR was squashed before being merged into the 2.7 branch (closes #23195).

Discussion
----------

[FrameworkBundle] [Command] Clean bundle directory, fixes #23177

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| 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 -->
| Tests pass?   | no
| Fixed tickets | #23177
| License       | MIT

This PR fix #23177
when running an assets:install, it will remove directorys who do not have anymore a valid Bundle

Commits
-------

180f178f43 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177
2017-06-16 11:24:38 -07:00
Nicolas Pion
180f178f43 [FrameworkBundle] [Command] Clean bundle directory, fixes #23177 2017-06-16 11:24:36 -07:00
Fabien Potencier
c8884e7d9a bug #23052 [TwigBundle] Add Content-Type header for exception response (rchoquet)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Add Content-Type header for exception response

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

This PR comes after I was looking to customize the way exceptions are served for a JSON API (grabbed the info at http://symfony.com/doc/current/controller/error_pages.html#overriding-the-default-exceptioncontroller).

I noticed that even when changing the request format to 'json' so that the right json.twig template is served:
```php
// in my override of the ExceptionController
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)
{
    $request->setRequestFormat('json');
    return parent::showAction($request, $exception, $logger);
}
```
the response Content-Type header was still 'text/html'.

By now, the response Content-Type should be corresponding to the given request format.

I also feel there's some room for improvement with the general "displaying error for a JSON API" chapter as it feels strange that there's no configuration option to just say "serve me anything as json", but that's another issue.

Commits
-------

9e2b408f25 add content-type header on exception response
2017-06-16 08:39:36 -07:00
Maxime Steinhausser
6ac0de8c2f [TwigBundle] Remove template.xml services when templating is disabled 2017-06-15 13:54:31 +02:00
rchoquet
9e2b408f25 add content-type header on exception response 2017-06-15 11:47:56 +02:00
Fabien Potencier
baf988d3d8 bug #23057 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034 (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #23057).

Discussion
----------

[Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034

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

Fixes the bug reported in #23034:

When mixing `addResource()` calls and providing the `resource_files` option, the order in which resources are loaded depends on the `kernel.debug` setting and whether a cache is used.

In particular, when several loaders provide translations for the same message, the one that "wins" may change between development and production mode.

Commits
-------

2a9e65dea9 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
2017-06-14 13:10:55 -07:00
Matthias Pigulla
2a9e65dea9 [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034 2017-06-14 13:10:50 -07:00
Fabien Potencier
0dbba7bf4f minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #22931).

Discussion
----------

SCA with Php Inspections (EA Extended): 2.7

| 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

Static Code Analysis with Php Inspections (EA Extended): dead code and control flow tweaks.

Commits
-------

598ae56cc9 SCA with Php Inspections (EA Extended): 2.7
2017-06-10 17:25:34 -07:00
Vladimir Reznichenko
598ae56cc9 SCA with Php Inspections (EA Extended): 2.7 2017-06-10 17:25:31 -07:00
Fabien Potencier
9e2f394bf3 minor #23120 Remove deprecated each function (pierredup)
This PR was squashed before being merged into the 2.7 branch (closes #23120).

Discussion
----------

Remove deprecated each function

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

Replace the `each()` function which is deprecated in PHP 7.2 (https://wiki.php.net/rfc/deprecations_php_7_2#each)

Commits
-------

232caad876 Remove deprecated each function
2017-06-10 07:57:49 -07:00
Pierre du Plessis
232caad876 Remove deprecated each function 2017-06-10 07:57:48 -07:00
Fabien Potencier
0c17767dd5 bug #23086 [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()

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

On slow file systems (eg on Windows), I noticed that writing files without doing any changes just kills perf.
Limiting the depth also helps when the symfony/cache component is used (because it can store thousands of files in its cache pool directory structure, and iterating there is also a waste of *fs* time).
I choose the max depth by looking at where existing apps put their files and added one level more just in case.

Commits
-------

b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup()
2017-06-08 17:11:05 -07:00
Nicolas Grekas
b58f060fda [FrameworkBundle] Fix perf issue in CacheClearCommand::warmup() 2017-06-07 09:57:32 +02:00
Fabien Potencier
62cbfdd2e2 bug #23069 [SecurityBundle] Show unique Inherited roles in profile panel (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Show unique Inherited roles in profile panel

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

When more than one assigned role reaches the same inherited role then it's duplicated in the "Inherited roles" list.

The changes in the test case show the unexpected result before fix it:

```console
There was 1 failure:

1) Symfony\Bundle\SecurityBundle\Tests\DataCollector\SecurityDataCollectorTest::testCollectAuthenticationTokenAndRoles with data set #4 (array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_ADMIN', 'ROLE_OPERATOR'), array('ROLE_USER', 'ROLE_ALLOWED_TO_SWITCH'))
Failed asserting that Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
    2 => 'ROLE_USER'
) is identical to Array &0 (
    0 => 'ROLE_USER'
    1 => 'ROLE_ALLOWED_TO_SWITCH'
)
```

Commits
-------

7061bfbf3a show unique inherited roles
2017-06-06 07:50:26 -07:00
Yonel Ceruto
7061bfbf3a show unique inherited roles 2017-06-05 14:17:49 -04:00
Nicolas Grekas
1542925d8d minor #22986 CS: adjust chaining indentation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: adjust chaining indentation

| 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

Commits
-------

8c3c0fe CS: adjust chaining indentation
2017-06-02 16:34:38 +02:00
Nicolas Grekas
c3d1262208 Use namespaced Twig 2017-06-01 23:44:38 +02:00
Fabien Potencier
f91a020b84 Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Dariusz
8c3c0fe65e CS: adjust chaining indentation 2017-05-31 11:30:46 +02:00
adev
3e6643bd90 [FrameworkBundle][Console] Fix the override of a command registered by the kernel
Fix #18558
2017-05-24 23:07:05 +02: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
Flug
6fe2ad0558 [FrameworkBundle] Adding the extension XML
required by XmlUtils and not installed by default
2017-05-09 07:43:21 -07:00
Maxime Steinhausser
040edfec4a [FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice 2017-05-08 10:50:08 +02:00
Fabien Potencier
92eb9e1616 bug #22396 Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Prevent double registrations related to tag priorities

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

The current logic is inconsistent, and allows the same id to be used several times. This makes the first explicit priority to always win.

Commits
-------

6764dcdf39 Prevent double registrations related to tag priorities
2017-04-12 09:30:10 -07:00
Nicolas Grekas
6764dcdf39 Prevent double registrations related to tag priorities 2017-04-12 17:35:56 +02:00
Christian Flothmann
3792ee6c93 fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Nicolas Grekas
4951d3c962 Dont call sprintf() when no placeholders are used 2017-04-04 20:32:29 +02:00