Commit Graph

32764 Commits

Author SHA1 Message Date
Alexander M. Turek
e46b366fc5 Reset the authentication token between requests. 2017-09-22 20:41:17 +02:00
Maxime Steinhausser
2e0cb6055f feature #24277 [Serializer] Getter for extra attributes in ExtraAttributesException (mdeboer)
This PR was squashed before being merged into the 3.4 branch (closes #24277).

Discussion
----------

[Serializer] Getter for extra attributes in ExtraAttributesException

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (failure unrelated)
| Fixed tickets |
| License       | MIT

This PR adds a public getter for the extra attributes in `ExtraAttributesException` and makes it easier to create custom exception messages (e.g. JSON formatted).

Commits
-------

cb935e7 [Serializer] Getter for extra attributes in ExtraAttributesException
2017-09-22 15:07:49 +02:00
Maarten de Boer
cb935e789e [Serializer] Getter for extra attributes in ExtraAttributesException 2017-09-22 15:07:13 +02:00
Nicolas Grekas
2e608f791c bug #24285 [DI] Dont use JSON_BIGINT_AS_STRING (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Dont use JSON_BIGINT_AS_STRING

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

Because it's incompatible with stringy keys, for unknown reason, see https://3v4l.org/IHSqv

Commits
-------

830f286 [DI] Dont use JSON_BIGINT_AS_STRING
2017-09-22 12:00:22 +01:00
Nicolas Grekas
830f286464 [DI] Dont use JSON_BIGINT_AS_STRING 2017-09-22 11:57:45 +01:00
Roland Franssen
02dcdca014 [TwigBundle] Remove profiler related scripting 2017-09-21 20:21:04 +02:00
Roland Franssen
1c595fcf48 [TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event 2017-09-21 19:21:40 +02:00
Roland Franssen
ea4b0966ab [WebProfilerBundle] Hide inactive tabs from CSS 2017-09-21 19:20:03 +02:00
Roland Franssen
0c10f97f98 [TwigBundle] Make deprecations scream in logs 2017-09-21 19:18:48 +02:00
Roland Franssen
03cd9e553b [TwigBundle] Hide logs if unavailable, i.e. webprofiler 2017-09-21 19:18:48 +02:00
Javier Eguiluz
b28dfe1cbc bug #24255 [TwigBundle] Break long lines in exceptions (kevin-verschaeve)
This PR was merged into the 3.3 branch.

Discussion
----------

[TwigBundle] Break long lines in exceptions

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

Break long lines in exception to stay in screen

Before:
![exception_before](https://user-images.githubusercontent.com/2345927/30586794-63b35b44-9d31-11e7-90ce-507af56934d0.png)

After:
![exception_after](https://user-images.githubusercontent.com/2345927/30586801-691c2548-9d31-11e7-9af4-54c01b4cc400.png)

Commits
-------

1db99f316d [TwigBundle] Break long lines in exceptions
2017-09-21 09:02:40 +02:00
Nicolas Grekas
701d41cc33 feature #24257 [HttpKernel][DI] Enable Kernel to implement CompilerPassInterface (nicolas-grekas)
This PR was squashed before being merged into the 3.4 branch (closes #24257).

Discussion
----------

[HttpKernel][DI] Enable Kernel to implement CompilerPassInterface

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

In the same spirit as #13761 that allowed DI exts to be also compiler passes, and as #23812 that allowed the kernel to listen to events, in our new bundle-less world, should we allow the kernel to register itself as a compiler pass? That would make some scenario possible (like having a `TestKernel` that turns some services public.)

Commits
-------

6973a1a [HttpKernel][DI] Enable Kernel to implement CompilerPassInterface
2017-09-20 15:13:22 +02:00
Nicolas Grekas
6973a1ae3b [HttpKernel][DI] Enable Kernel to implement CompilerPassInterface 2017-09-20 15:13:20 +02:00
Nicolas Grekas
2f86474267 feature #23834 [DI] Add "PHP fluent format" for configuring the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Add "PHP fluent format" for configuring the container

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

This PR allows one to write DI configuration using just PHP, with full IDE auto-completion.
Example:
```php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;

return function (ContainerConfigurator $c) {

    $c->import('basic.php');

    $s = $c->services()->defaults()
        ->public()
        ->private()
        ->autoconfigure()
        ->autowire()
        ->tag('t', array('a' => 'b'))
        ->bind(Foo::class, ref('bar'))
        ->private();

    $s->set(Foo::class)->args([ref('bar')])->public();
    $s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);

};
```

Commits
-------

814cc31 [DI] Add "PHP fluent format" for configuring the container
2017-09-20 15:06:57 +02:00
Nicolas Grekas
20ecf91d52 feature #24180 [Routing] Add PHP fluent DSL for configuring routes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Add PHP fluent DSL for configuring routes

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

If we add a PHP DSL for DI config (#23834), we must have a similar one for routing. Here it is. See fixtures.

So, you always start with a `RoutingConfigurator $routes`, which allows you to:
```php
$routes->add($name, $path); // adds a route
$routes->import($resource, $type = null, $ignoreErrors = false); // imports routes
$routes->collection($name = ''); // starts a collection, all *names* might be prefixed
```

then
- for "import" and "collection", you can `->prefix($path)`;
- for "add" and "collection", you can fluently "add" several times;
- for "collection" you add sub"`->collection()`";
- and on all, you can configure the route(s) with:
```php
->defaults(array $defaults)
->requirements(array $requirements)
->options(array $options)
->condition($condition)
->host($pattern)
->schemes(array $schemes)
->methods(array $methods)
->controller($controller)
```

Commits
-------

f433c9a [Routing] Add PHP fluent DSL for configuring routes
2017-09-20 15:01:12 +02:00
Nicolas Grekas
814cc31e57 [DI] Add "PHP fluent format" for configuring the container 2017-09-20 09:09:19 +02:00
Nicolas Grekas
f433c9a79d [Routing] Add PHP fluent DSL for configuring routes 2017-09-20 08:48:50 +02:00
Nicolas Grekas
aad62c427c minor #24228 [Serializer] Add local cache to normalizers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Add local cache to normalizers

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

Should help making the Serializer a bit faster.

Commits
-------

b0c5cf0 [Serializer] Add local cache to normalizers
2017-09-20 07:22:30 +02:00
Nicolas Grekas
779e8edf44 feature #24232 [Bridge\Doctrine] Add "DoctrineType::reset()" method (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge\Doctrine] Add "DoctrineType::reset()" method

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

Works with https://github.com/doctrine/DoctrineBundle/pull/695

Commits
-------

dce1eb9 [Bridge\Doctrine] Add "DoctrineType::reset()" method
2017-09-20 07:20:06 +02:00
Nicolas Grekas
0e73d7126e fixes 2017-09-19 23:53:27 +02:00
Nicolas Grekas
6f8336dcfa bug #24266 [DI] Fix private-by-default BC layer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix private-by-default BC layer

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

Spotted while merging 3.4 into master and by looking at the cross-versions CI.

Commits
-------

ff2ab58 [DI] Fix private-by-default BC layer
2017-09-19 23:31:54 +02:00
Nicolas Grekas
ff2ab5831a [DI] Fix private-by-default BC layer 2017-09-19 23:28:23 +02:00
Nicolas Grekas
ad4bc6b647 feature #24238 [DI] Turn services and aliases private by default, with BC layer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Turn services and aliases private by default, with BC layer

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

With this PR, all services and aliases are made private by default.
This is done in a BC way, thanks to the layer introduced in #24104.

We will require bundles to explicitly opt-in for "public", either using "defaults", or stating `public="true"` explicitly. Same in DI extension, where calling `->setPublic(true)` will be required in 4.0.

Commits
-------

9948b09 [DI] Turn services and aliases private by default, with BC layer
2017-09-19 18:13:26 +02:00
Kevin Verschaeve
1db99f316d [TwigBundle] Break long lines in exceptions 2017-09-19 12:46:10 +02:00
Nicolas Grekas
9948b09c6d [DI] Turn services and aliases private by default, with BC layer 2017-09-19 11:28:48 +02:00
Nicolas Grekas
949b17a2c7 bug #24192 [PhpUnitBridge] do not require an error context (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] do not require an error context

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

The error context argument of an error handler is deprecated as of PHP
7.2. Requiring it in the error handler of the SymfonyTestsListenerTrait
will make error handlers fail that are executed when running PHPUnit
tests and forward the error handling to the previously registered error
handler.

Commits
-------

10ce932 [PhpUnitBridge] do not require an error context
2017-09-19 11:20:34 +02:00
Nicolas Grekas
55a76911f4 bug #24241 [WebProfiler] Fix z-index for sticky ajax window (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfiler] Fix z-index for sticky ajax window

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Forgotten in #23154

Before
![image](https://user-images.githubusercontent.com/1047696/30522978-f49c3c5c-9bd8-11e7-8bac-e7a690d5c34d.png)

After
![image](https://user-images.githubusercontent.com/1047696/30522965-d000e6fe-9bd8-11e7-92a8-52699c6619f8.png)

In case you hover the time panel.

Commits
-------

081c1e4 [WebProfiler] Fix z-index for pinned AJAX block
2017-09-18 16:25:27 +02:00
Christian Flothmann
893df5804e deprecate relative paths in makePathRelative() 2017-09-18 10:06:42 +02:00
Nicolas Grekas
12bb22c4eb minor #24231 [DebugBundle] Fix the var-dumper requirement in composer.json (skalpa)
This PR was merged into the 3.4 branch.

Discussion
----------

[DebugBundle] Fix the var-dumper requirement in composer.json

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

The v3.4 of the debug bundle calls `VarCloner::setMinDepth()` and thus requires v3.4+ of the var-dumper component. However, the composer file has not been updated in 30cd70d.

I upped the var-dumper requirement to `~3.4|~4.0`.

Commits
-------

d761a76 Require v3.4+ of the var-dumper component
2017-09-18 09:44:12 +02:00
Roland Franssen
081c1e4f81 [WebProfiler] Fix z-index for pinned AJAX block 2017-09-17 18:42:13 +02:00
Fabien Potencier
857ae7a4f6 bug #24234 [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass (dunglas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | api-platform/api-platform#414, symfony/symfony#24229
| License       | MIT
| Doc PR        | n/a

Follows #24229. It's [the patch](https://github.com/symfony/symfony/pull/24229#issuecomment-329972812) proposed by @nicolas-grekas + a test.

Commits
-------

2a30908bcd [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass
2017-09-17 08:02:32 -07:00
Robin Chalas
f049dd0fba bug #24203 [Security] Preserve URI fragment in HttpUtils::generateUri() (chalasr)
This PR was merged into the 3.3 branch.

Discussion
----------

[Security] Preserve URI fragment in HttpUtils::generateUri()

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23675
| License       | MIT
| Doc PR        | n/a

Commits
-------

4dd2e3e Preserve URI fragment in HttpUtils::generateUri()
2017-09-17 15:45:14 +02:00
Nicolas Grekas
c4159b12c7 Merge branch '3.3' into 3.4
* 3.3:
  CS fixes
2017-09-17 12:10:45 +02:00
Nicolas Grekas
d94b9ac308 CS fixes 2017-09-17 12:10:12 +02:00
Vladimir Tsykun
c388b25cbb [WebProfilerBundle] Added missing link to profile token 2017-09-17 09:12:04 +03:00
Kévin Dunglas
2a30908bcd
[DI] Fix decorated service merge in ResolveInstanceofConditionalsPass 2017-09-16 20:21:20 +02:00
Nicolas Grekas
dce1eb95ff [Bridge\Doctrine] Add "DoctrineType::reset()" method 2017-09-16 18:00:00 +02:00
Pascal Luna
d761a7614a Require v3.4+ of the var-dumper component 2017-09-16 14:21:39 +01:00
Maxime Steinhausser
9208244e1f feature #23648 [Form] Add input + regions options to TimezoneType (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add input  + regions options to TimezoneType

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/8223

I want to use `\DateTimeZone` as a model format, with only european timezones in the form available. Hence the new options.

Commits
-------

183307b741 [Form] Add input  + regions options to TimezoneType
2017-09-16 12:26:42 +02:00
Nicolas Grekas
b0c5cf0d9d [Serializer] Add local cache to normalizers 2017-09-16 12:19:29 +02:00
Roland Franssen
183307b741 [Form] Add input + regions options to TimezoneType 2017-09-16 10:56:09 +02:00
Fabien Potencier
40a3466268 Merge branch '3.3' into 3.4
* 3.3:
  CS: recover no_break_comment
  [DI] Fix non-instantiables auto-discovery
2017-09-15 10:11:35 -07:00
Fabien Potencier
e48617b467 Merge branch '2.8' into 3.3
* 2.8:
  CS: recover no_break_comment
2017-09-15 10:08:21 -07:00
Fabien Potencier
6edfa4b2df Merge branch '2.7' into 2.8
* 2.7:
  CS: recover no_break_comment
2017-09-15 09:59:28 -07:00
Fabien Potencier
b973ecf8ee minor #24215 CS: recover no_break_comment (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: recover no_break_comment

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

rule was excluded in #24123, yet without any information about it
it was not excluded in original form of given PR, it's not part of any commitlog nor any comment, title claims to touch only other rules.

this rule shall not be excluded, it's part of PSR and is applied for most places.
I added missing ones.

Commits
-------

4e9d1600ee CS: recover no_break_comment
2017-09-15 09:58:02 -07:00
Maxime Steinhausser
b7492045f3 feature #24185 [Form] Display general forms information on debug:form (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Display general forms information on debug:form

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

![debug-form-defaults](https://user-images.githubusercontent.com/2028198/30436620-998103ca-993a-11e7-9873-31f042327374.png)

When we run `bin/console debug:form` (without argument) all possible Form Component information is displayed.

Commits
-------

12d1a7f810 Display form defaults on debug:form
2017-09-15 18:33:15 +02:00
Yonel Ceruto
12d1a7f810 Display form defaults on debug:form 2017-09-15 18:14:52 +02:00
Maxime Steinhausser
c7e84ccfee feature #23747 [Serializer][FrameworkBundle] Add a DateInterval normalizer (Lctrs)
This PR was squashed before being merged into the 3.4 branch (closes #23747).

Discussion
----------

[Serializer][FrameworkBundle] Add a DateInterval normalizer

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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/8267

Could be useful for API needing to submit a duration.

Most code have been adapted from @MisatoTremor's DateInterval form type. Credits to him.

Commits
-------

6185cb1991 [Serializer][FrameworkBundle] Add a DateInterval normalizer
2017-09-15 18:08:41 +02:00
Jérôme Parmentier
6185cb1991 [Serializer][FrameworkBundle] Add a DateInterval normalizer 2017-09-15 18:08:37 +02:00
Nicolas Grekas
46811fdd01 bug #24199 [DI] Fix non-instantiables auto-discovery (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix non-instantiables auto-discovery

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

Commits
-------

8b7c7c1 [DI] Fix non-instantiables auto-discovery
2017-09-15 15:18:29 +02:00