Commit Graph

985 Commits

Author SHA1 Message Date
Oskar Stark
5ee9043d8b removed useless PHPDoc 2017-09-30 07:00:23 -07:00
Christian Flothmann
5a3a24b0ac allow to configure custom formats in XML configs 2017-07-09 16:08:05 +02: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
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
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
Pierre du Plessis
232caad876 Remove deprecated each function 2017-06-10 07:57:48 -07:00
Nicolas Grekas
c3d1262208 Use namespaced Twig 2017-06-01 23:44:38 +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
Fabien Potencier
245eaa8fa2 fixed Composer constraints 2017-02-18 10:28:08 -08:00
Peter Rehm
ddd2dff9b2 Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Kévin Dunglas
2bc4d3b2c1
[TwigBundle] Fix the name of the cache warming test class 2017-01-28 17:26:00 +01:00
Christian Flothmann
cb1a4b778f [TwigBundle] do not lose already set method calls 2017-01-14 10:53:53 +01:00
Nicolas Grekas
49fb0c033c Remove dead code 2017-01-12 20:18:32 +01:00
Fabien Potencier
17ce5f55d1 bug #19586 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account (wesleylancel)
This PR was squashed before being merged into the 2.7 branch (closes #19586).

Discussion
----------

[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account

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

Currently namespaced paths for templates such as `{% extends '@App/Layout/layout.html.twig' %}` do not work with bundles that have overruled templates using the `getParent()` method in another bundle. See attached ticket. This change prepends the path of the bundle implementing `getParent()` to the paths of the namespace of bundle returned as a parent.

Commits
-------

0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
2017-01-11 10:19:59 -08:00
Wesley Lancel
0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account 2017-01-11 10:19:56 -08:00
Nicolas Grekas
f03073c103 bug #21179 [TwigBundle] Fixing regression in TwigEngine exception handling (Bertalan Attila)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fixing regression in TwigEngine exception handling

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

Fixing regression after #20831 in TwigEngine exception handling.

Commits
-------

390cb33 Fixing regression in TwigEngine exception handling.
2017-01-10 14:51:20 +01:00
Bertalan Attila
390cb335fa Fixing regression in TwigEngine exception handling. 2017-01-09 10:33:51 +01:00
Fabien Potencier
6aa98d163d [TwigBundle] fixed usage when Templating is not installed 2017-01-08 12:32:10 -08:00
Robin Chalas
fef3146b3b
Fix serializer/translations/validator resources loading for bundles overriding getPath() 2017-01-04 20:27:15 +01:00
Fabien Potencier
9879c8193f updated LICENSE year 2017-01-02 12:30:00 -08:00
Fabien Potencier
71d059cad1 fixed obsolete getMock() usage 2016-12-19 16:22:46 +01:00
Fabien Potencier
3e874dc878 bug #20799 [TwigBundle] do not try to register incomplete definitions (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] do not try to register incomplete definitions

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

Commits
-------

2c9dc66 do not try to register incomplete definitions
2016-12-17 18:59:13 +01:00
Christian Flothmann
2c9dc66665 do not try to register incomplete definitions 2016-12-15 08:06:17 +01:00
Victor Bocharsky
21925da88b Write an exception message in a one heading line 2016-12-09 17:28:59 +02:00
Nicolas Grekas
9218cacf31 [Twig] Fix deprecations with Twig 1.29 2016-12-08 15:02:33 +01:00
Maxime STEINHAUSSER
2c818193c1 [TwigBundle] Fix twig loader registered twice 2016-12-02 12:00:53 +01:00
Fabien Potencier
b8f7614388 bumped min version of Twig to 1.28 2016-11-12 09:04:32 -08:00
Christian Flothmann
adbc529b7b prefer getSourceContext() over getSource() 2016-11-07 19:42:43 +01:00
Nicolas Grekas
1b4963bd84 Remove trailing space 2016-11-03 08:46:56 +01:00
Nicolas Grekas
0aca495522 minor #20364 CS: apply rules (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #20364).

Discussion
----------

CS: apply rules

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

Commits
-------

22d4e15 CS: apply rules
2016-11-03 08:44:55 +01:00
Dariusz Ruminski
22d4e15634 CS: apply rules 2016-11-03 08:44:53 +01:00
Xavier HAUSHERR
77c5395a79 Compatibility with Twig 1.27 2016-10-27 07:46:29 -07:00
Fabien Potencier
317d46f249 [TwigBundle] fixed usage of getSource in tests 2016-10-22 08:04:15 -07:00
Fabien Potencier
ef48f5924a bug #20224 [Twig] removed deprecations added in Twig 1.27 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[Twig] removed deprecations added in Twig 1.27

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

Commits
-------

f0849d8 [TwigBridge] removed deprecations added in Twig 1.27
2016-10-17 21:24:28 -07:00
Fabien Potencier
f0849d8331 [TwigBridge] removed deprecations added in Twig 1.27 2016-10-17 18:02:36 -07:00
Dariusz Ruminski
b0df3a7eb9 PHP CS Fixer: use php_unit_dedicate_assert 2016-10-16 22:09:53 +02:00
Fabien Potencier
470dc3e36f [TwigBundle] added missing dependencies for tests 2016-10-01 07:16:30 -07:00
Tugdual Saunier
fcd6ec2a5e
[TwigBundle] Fix CacheWarmingTest are order dependent 2016-09-30 14:26:39 +01:00
Fabien Potencier
24e9cf2155 fixed Twig support for 1.26 and 2.0 2016-09-28 18:04:26 -07:00
Yonel Ceruto
325da3c0d8 Code enhancement and cleanup 2016-09-06 09:26:07 +02:00
Vyacheslav Pavlov
7f3145c606 [TwigBundle] Removed redundant return statement. 2016-07-27 23:41:42 +03:00
Fabien Potencier
554303e339 removed dots at the end of @param and @return 2016-06-28 08:24:06 +02:00
Nicolas Grekas
bf3a2c0abd @throws annotations should go after @return 2016-06-06 13:03:51 +02:00
Nicolas Grekas
81c50d628e Merge branch '2.3' into 2.7
* 2.3:
  [HttpFoundation] Fix transient test
  [HttpFoundation] Add a dependency on the mbstring polyfill
  add readme files where missing
  Don't use reflections when possible
  [Form] Update form tests after the ICU data update
  [Intl] Update tests and the number formatter to match behaviour of the intl extension
  [Intl] Update the ICU data to version 55
  [Intl] Fix the update-data.php script in preparation for ICU 5.5
  Use constant instead of function call.
  fixed test name
  automatically generate safe fallback filename

Conflicts:
	src/Symfony/Component/Debug/Debug.php
	src/Symfony/Component/HttpFoundation/composer.json
	src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
2016-03-07 14:45:47 +01:00