Commit Graph

26810 Commits

Author SHA1 Message Date
Fabien Potencier
c7f664c5e0 feature #21027 [Asset] Provide default context (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #21027).

Discussion
----------

[Asset] Provide default context

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19396
| License       | MIT
| Doc PR        | should be noted somewhere, ill create an issue

Allows configuring the default asset context to make things works on CLI for example. Same approach as the routing component.

Introduces
```yaml
# parameters.yml
asset.request_context.base_path: '/base/path'
asset.request_context.secure: false
```

Commits
-------

9137d57ecd [Asset] Provide default context
2017-09-28 15:56:48 -07:00
Roland Franssen
9137d57ecd [Asset] Provide default context 2017-09-28 15:56:45 -07:00
Nicolas Grekas
fa62e5068e [HttpKernel] Deprecate some compiler passes in favor of tagged iterator args 2017-09-29 00:01:08 +02:00
Yonel Ceruto
0a658c6eef Add exclusive Twig namespace for bundles path 2017-09-28 14:36:07 -04:00
Tobias Schultze
0f0a6e85e3 PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4 2017-09-28 20:22:10 +02:00
Jérémy Derussé
95358ac98f
Share connection factories between cache and lock 2017-09-28 19:35:07 +02:00
Nicolas Grekas
648a8953dd feature #22200 [DI] Reference tagged services in config (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Reference tagged services in config

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12269
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/8404

This is a proof of concept to reference a sequence of tagged services.

The problem bugs me for some time, and at first i thought the solution was to have some super generic compiler pass. If it could replace a lot of compilers in core.. perhaps worth it, but eventually each tag comes with it's own logic, including how to deal with tag attributes.

However, writing the passes over and over again becomes tedious for the most basic usecase. So given the recent developments, this idea came to mind.

```yml
services:
    a:
        class: stdClass
        properties: { a: true }
        tags: [foo]

    b:
        class: stdClass
        properties: { b: true }
        tags: [foo]

    c:
        class: stdClass
        properties:
            #stds: !tagged_services foo (see #22198)
            stds: !tagged_services
                foo
```

```
dump(iterator_to_array($this->get('c')->stds));
```

```
array:2 [▼
  0 => {#5052 ▼
    +"a": true
  }
  1 => {#4667 ▼
    +"b": true
  }
]
```

Given the _basic_ example at https://symfony.com/doc/current/service_container/tags.html, this could replace that.

Any thoughts?

Commits
-------

979e58f [DI] Reference tagged services in config
2017-09-28 17:24:12 +02:00
Robin Chalas
3b5742e6b5 feature #24337 Adding a shortcuts for the main security functionality (weaverryan, javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #24337).

Discussion
----------

Adding a shortcuts for the main security functionality

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

I'd like one class that I can inject (especially with autowiring) to get access to the User and `isGranted()` methods. This is *really* important... because to get the User currently, you need to type-hint `TokenStorageInterface`... and there are *two*! That's really bad DX!

Questions:

A) I hi-jacked the existing `Security` class... I wanted a simple class called Security
B) I called the service `security.helper`... for lack of a better id.
C) I did not make `Security` implement the 2 other interfaces (`TokenStorageInterface`, `AuthorizationCheckerInterface`... but I suppose we could?)

Cheers!

Commits
-------

0851189 Adding a shortcuts for the main security functionality
2017-09-28 17:13:14 +02:00
Ryan Weaver
0851189daa Adding a shortcuts for the main security functionality 2017-09-28 17:13:10 +02:00
Christian Flothmann
cf03552033 include file and line number in deprecation 2017-09-28 16:22:01 +02:00
Roland Franssen
979e58f370 [DI] Reference tagged services in config 2017-09-28 16:10:08 +02:00
Fabien Potencier
54135cb9ca feature #24358 [TwigBundle] register an identity translator as fallback (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] register an identity translator as fallback

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24303#issuecomment-331864529
| License       | MIT
| Doc PR        |

The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
TwigBridge you need to have the `trans` filter to be available.

This change ensure that there will always be a `trans` filter which as
a fallback will just return the message key if no translator is present.

Commits
-------

f0876e5927 register an identity translator as fallback
2017-09-28 06:27:55 -07:00
Fabien Potencier
112cca7e06 feature #24357 [Yaml] include file and line no in deprecation message (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] include file and line no in deprecation message

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

Now that we know the filename being parsed we can improve deprecation messages which is especially useful when trying to find the DI config file that triggers a particular deprecation.

Commits
-------

f618e43234 include file and line no in deprecation message
2017-09-28 06:23:13 -07:00
Fabien Potencier
e4d9bfd245 minor #24353 [Validator] minor translation text fix (darnel)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] minor translation text fix

Update validators.cs.xlf - Fix czech translation for "This field was not expected"

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

This commit fixes grammatical issue for czech translation only.

Commits
-------

fbe7148000 Fix translation for "This field was not expected"
2017-09-28 06:20:28 -07:00
Fabien Potencier
0cee91d3a7 feature #24330 [FrameworkBundle] register class metadata factory alias (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] register class metadata factory alias

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

Commits
-------

d0235a00cc register class metadata factory alias
2017-09-28 06:18:46 -07:00
Christian Flothmann
b7d0b09f31 Merge branch '3.3' into 3.4
* 3.3:
  Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI
  Minor reword
  [HttpKernel] Make array vs "::" controller definitions consistent
  Fix tests
  [TwigBundle] Remove profiler related scripting
  [TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event
  [WebProfilerBundle] Hide inactive tabs from CSS
  [TwigBundle] Make deprecations scream in logs
  [TwigBundle] Hide logs if unavailable, i.e. webprofiler
  [TwigBundle] Break long lines in exceptions
  [WebProfilerBundle] Added missing link to profile token
  [DI] Fix decorated service merge in ResolveInstanceofConditionalsPass
  Preserve URI fragment in HttpUtils::generateUri()
  [PhpUnitBridge] do not require an error context
2017-09-28 15:03:46 +02:00
Christian Flothmann
534eaed7ae parse merge keys with PARSE_OBJECT_FOR_MAP flag 2017-09-28 14:42:08 +02:00
Fabien Potencier
d178a9b2c5 bug #24243 HttpCache does not consider ESI resources in HEAD requests (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #24243).

Discussion
----------

HttpCache does not consider ESI resources in HEAD requests

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

Due to this shortcut:
3b42d8859e/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L634-L642)
... the `HttpCache` never looks at the response body for `HEAD` requests. This makes it completely miss ESI-related tweaks like computing the correct TTL, removing validation headers or updating the `Content-Length`.

From RFC2616 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4):

> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.

Although it says "SHOULD", I think it can be misleading at best when HEAD requests do, for example, return different (greater) `s-maxage` values than a corresponding GET request.

Commits
-------

4dd0e53171 HttpCache does not consider ESI resources in HEAD requests
2017-09-28 05:20:58 -07:00
Matthias Pigulla
4dd0e53171 HttpCache does not consider ESI resources in HEAD requests 2017-09-28 05:20:56 -07:00
Christian Flothmann
f0876e5927 register an identity translator as fallback
The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
TwigBridge you need to have the `trans` filter to be available.

This change ensure that there will always be a `trans` filter which as
a fallback will just return the message key if no translator is present.
2017-09-28 13:28:12 +02:00
Christian Flothmann
f618e43234 include file and line no in deprecation message 2017-09-28 12:55:42 +02:00
Nicolas Grekas
bd3bc69036 minor #24345 [Routing] Enhance PHP DSL traits docblocks (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Enhance PHP DSL traits docblocks

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

7d749bf [Routing] Enhance PHP DSL traits docblocks
2017-09-28 10:15:16 +02:00
Nicolas Grekas
890f25a6c9 bug #24346 [DI] Fix missing use + minor tweaks (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix missing use + minor tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (see added test)
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

0a7e5b0 [DI] Fix missing use + minor tweaks
2017-09-28 10:14:02 +02:00
Christophe Coevoet
9ed6dd4391 minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Enhance Route(Collection) docblocks

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

5b4308e9e1 [Routing] Enhance Route(Collection) docblocks
2017-09-28 10:05:10 +02:00
Maxime Steinhausser
0a7e5b0d09 [DI] Fix missing use + minor tweaks 2017-09-28 09:59:26 +02:00
darnel
fbe7148000 Fix translation for "This field was not expected"
Update validators.cs.xlf - Fix czech translation for "This field was not expected"
2017-09-28 08:55:08 +02:00
Maxime Steinhausser
7d749bfb77 [Routing] Enhance PHP DSL traits docblocks 2017-09-28 08:00:01 +02:00
Robin Chalas
eebe39e600 Fix AclSchemaListener deprecation 2017-09-27 23:42:53 +02:00
Maxime Steinhausser
5b4308e9e1 [Routing] Enhance Route(Collection) docblocks 2017-09-27 23:22:30 +02:00
Maxime Steinhausser
d43c1f7b60 [SecurityBundle] Add missing AclSchemaListener deprecation 2017-09-27 21:54:46 +02:00
Fabien Potencier
7269013ff3 feature #24202 [Filesystem] deprecate relative paths in makePathRelative() (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] deprecate relative paths in makePathRelative()

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

Commits
-------

893df5804e deprecate relative paths in makePathRelative()
2017-09-27 12:24:44 -07:00
Fabien Potencier
f7eb7972ff fixed CS 2017-09-27 10:32:40 -07:00
Fabien Potencier
94aef22fec feature #21716 [Serializer] Add Support for object_to_populate in CustomNormalizer (chrisguitarguy)
This PR was squashed before being merged into the 3.4 branch (closes #21716).

Discussion
----------

[Serializer] Add Support for `object_to_populate` in CustomNormalizer

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

This pulls a trait out of `AbstractNormalizer` with a method to extract the object to populate and adds some tests for it. Then uses that trait in both `AbstractNormalizer` and `CustomNormalizer` so both can support the `object_to_populate` key.

Commits
-------

ec9242d1ee [Serializer] Add Support for  in CustomNormalizer
2017-09-27 10:32:13 -07:00
Christopher Davis
ec9242d1ee [Serializer] Add Support for in CustomNormalizer 2017-09-27 10:32:12 -07:00
Fabien Potencier
f56f28b0f3 feature #21960 Remove Validator\TypeTestCase and add validator logic to base TypeTestCase (pierredup)
This PR was squashed before being merged into the 3.4 branch (closes #21960).

Discussion
----------

Remove Validator\TypeTestCase and add validator logic to base TypeTestCase

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no/possibly
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | symfony/symfony-docs#7587

Based on a discussion in the docs, users should not really extend classes in the `Tests` namespace. This means that if you want to unit test forms, you need to extend the `Test\TypeTestCase` class which doesn't have the validation logic (Not adding the validator extension gives an error if you use the `constraints` option in your forms).
So I propose to remove the `Validator\TypeTestCase` class (or it can possibly be deprecated if it is wrongly used by someone), and add the validator extension logic to the base `TypTestCase` class.

The benefit is that there is only one class to extend (both for internal or userland tests), and it makes it easy to add more core extensions if necessary.

The one part that I don't like too much at the moment, is keeping the extension in the `getExtensions` method. This means that you extend the class and need to register custom extensions, that you would need to do `return array_merge(parent::getExtensions(), ... ` (only in the case when you want core extensions enabled). So I don't know if we rather want to add a private method like `getCoreExtensions`?

Commits
-------

5ab50103ae Remove Validator\TypeTestCase and add validator logic to base TypeTestCase
2017-09-27 09:12:49 -07:00
Pierre du Plessis
5ab50103ae Remove Validator\TypeTestCase and add validator logic to base TypeTestCase 2017-09-27 09:12:32 -07:00
Fabien Potencier
e5ddd14b1d feature #22113 [Lock] Include lock component in framework bundle (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #22113).

Discussion
----------

[Lock] Include lock component in framework bundle

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

## Usage

use the best available "out of box" store (semaphore if available, filesyste otherwise)
```yml
framework:
    lock: ~
    # lock: true
```

```php
$this->get('lock')->acquire();
$this->get('lock.factory')->createLock('my resource')->acquire();
```

use a specific store
```yml
framework:
    lock: flock
    # lock: semaphore
    # lock: redis://localhost
    # lock: "%env(MEMCACHED_DSN)%"
    # lock: ["%env(REDIS_DSN_1)%", "%env(REDIS_DSN_2)%"]
```

```php
$this->get('lock')->acquire();
$this->get('lock.factory')->createLock('my resource')->acquire();
```

use a named lock
```yml
framework:
    lock:
        foo: flock
        bar: redis://localhost
```

```php
$this->get('lock.foo')->acquire();
$this->get('lock.bar.factory')->createLock('my resource')->acquire();
```

factory usage

```xml
        <service id="acme" class="AppBundle\Acme">
            <argument type="service">
                <service class="Symfony\Component\Lock\Lock">
                    <factory service="lock.foo.factory" method="createLock" />
                    <argument>my resource</argument>
                    <argument>30</argument> <!-- optional TTL -->
                </service>
            </argument>
        </service>
```

* [x] Tests

Commits
-------

b4b00c9c6f [Lock] Include lock component in framework bundle
2017-09-27 08:10:57 -07:00
Jérémy Derussé
b4b00c9c6f [Lock] Include lock component in framework bundle 2017-09-27 08:10:55 -07:00
Fabien Potencier
9ebe2185bd feature #24236 [WebProfilerBundle] Render file links for twig templates (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #24236).

Discussion
----------

[WebProfilerBundle] Render file links for twig templates

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #24218
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

![image](https://user-images.githubusercontent.com/1047696/30515418-8c4615c6-9b27-11e7-8e26-8caa30ff7cbb.png)

Also tweaked default code color a bit for yaml, twig and the like.

Before
![image](https://user-images.githubusercontent.com/1047696/30515499-2231d768-9b29-11e7-8cab-a61537e83343.png)

After
![image](https://user-images.githubusercontent.com/1047696/30515504-354ea218-9b29-11e7-9457-518e9413e6f9.png)

Commits
-------

860575a882 [WebProfilerBundle] Render file links for twig templates
2017-09-27 07:36:24 -07:00
Roland Franssen
860575a882 [WebProfilerBundle] Render file links for twig templates 2017-09-27 07:36:23 -07:00
Fabien Potencier
9f56a9efa7 feature #21239 [Serializer] throw more specific exceptions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] throw more specific exceptions

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

Commits
-------

aa30d04243 [Serializer] throw more specific exceptions
2017-09-27 07:28:41 -07:00
Fabien Potencier
65872e8c3a feature #24256 CsvEncoder handling variable structures and custom header order (Oliver Hoff)
This PR was squashed before being merged into the 3.4 branch (closes #24256).

Discussion
----------

CsvEncoder handling variable structures and custom header order

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

This PR improves the CsvEncoder to handle variable nesting structures and adds a context option that allows custom csv header order.

Commits
-------

d173494e48 CsvEncoder handling variable structures and custom header order
2017-09-27 07:20:06 -07:00
Oliver Hoff
d173494e48 CsvEncoder handling variable structures and custom header order 2017-09-27 07:19:39 -07:00
Christophe Coevoet
250d56b8d7 minor #21620 [Security] Saltless Encoder Interface (zanbaldwin)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Saltless Encoder Interface

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

A new interface for encoders that do not require a user-generated salt (generate their own built-in) as suggested by @stof ([comment](https://github.com/symfony/symfony/pull/21604/files#r101225470)), this will become useful as more password encoders are added in the future (such as symfony/symfony#21604).

Commits
-------

7c4aa0bccb Saltless Encoder Interface
2017-09-27 15:29:25 +02:00
Zan Baldwin
7c4aa0bccb Saltless Encoder Interface
A new interface for all encoders that do not require a user-generated salt.
2017-09-27 12:53:10 +01:00
Christian Flothmann
aa30d04243 [Serializer] throw more specific exceptions 2017-09-27 11:03:29 +02:00
Javier Eguiluz
cb2a1a3786 bug #24237 [WebProfilerBundle] Added missing link to profile token (vtsykun)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebProfilerBundle] Added missing link to profile token

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes, it was on 3.3.6 (before merge https://github.com/symfony/symfony/pull/23676)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

On v3.3.6 I can open profiles for sub-request on this link
![selection_188](https://user-images.githubusercontent.com/21358010/30518552-dc6a1f72-9b89-11e7-9d2f-d348846d7285.png)

But after 3.3.7 it was replaced by links to the controller. In this pull request was added missing link to the profile
![selection_186](https://user-images.githubusercontent.com/21358010/30518572-7a1420c4-9b8a-11e7-8514-098c4ec2c3d6.png)

Commits
-------

c388b25cbb [WebProfilerBundle] Added missing link to profile token
2017-09-27 09:00:36 +02:00
Fabien Potencier
8483b48de2 bug #24244 TwigBundle exception/deprecation tweaks (ro0NL)
This PR was squashed before being merged into the 3.3 branch (closes #24244).

Discussion
----------

TwigBundle exception/deprecation tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | yes
| 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-->

- 1st commit) if you view a exception in the profiler, there is no logger available. Making the tab useless, disabled state is now triggered at zero log messages. There's a specialized panel here.
- 2nd commit) when an exception occurs this highlights deprecations in the log table outside the profiler with a warning status. This follows the same signal colors in the profiler.
- 3rd commit) hide the default inactive tabs from CSS to avoid scrollbar flickering.
- 4th commit) favors document.DOMContentLoaded over window.load, we dont want to wait for images to be loaded

Further out-of-scope improvements could be;

- From https://github.com/symfony/symfony/pull/24191; i think the logs table should show a direct `View file` link for every error/deprecation/red or yellow line in here. Traversing with `Show context` is tedious.
  - links to file.php for your trigger_error() calls
  - links to config.yml for trigger_error() calls by SF
- From #24151; having the same tooling on both sides is nice
- Events/Translations logs is noise, we have specialized panels for those. To further reduce the overall page size container logs can be moved away too, linked from Configuration and/or Logs. Also see #23247

Commits
-------

1c595fcf48 [TwigBundle][WebProfilerBundle] Switch to DOMContentLoaded event
ea4b0966ab [WebProfilerBundle] Hide inactive tabs from CSS
0c10f97f98 [TwigBundle] Make deprecations scream in logs
03cd9e553b [TwigBundle] Hide logs if unavailable, i.e. webprofiler
2017-09-26 21:35:52 -07:00
Fabien Potencier
3c262bab75 minor #24172 [FrameworkBundle] Enable assets with templates only if the Asset component is installed (hason)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Enable assets with templates only if the Asset component is installed

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

Commits
-------

5bc0b0527e [FrameworkBundle] Enable assets with templates only if the Asset component is installed
2017-09-26 21:32:04 -07:00
Fabien Potencier
beb3fe1b2b bug #24281 [TwigBundle] Remove profiler related scripting (ro0NL, javiereguiluz)
This PR was merged into the 3.3 branch.

Discussion
----------

[TwigBundle] Remove profiler related scripting

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

For sanity.

Also in case of an exception page we conflict with the profiler scripting/css.

```
Uncaught TypeError: Cannot set property 'className' of null
```

Happens because `Sfjs.createTabs` from the profiler tries to process tabs again, which twig has already done. The code doesnt handle this gracefully.

In case of ajax request (edgy yes) we see the CSS conflicting;

![image](https://user-images.githubusercontent.com/1047696/30712781-7680c8d2-9f0d-11e7-8a6c-27f460c1e780.png)

Note the table borders. Not sure how and if we want to solve this nor what it might affect otherwise; open for now.

Commits
-------

eb520e1e5b Minor reword
02dcdca014 [TwigBundle] Remove profiler related scripting
2017-09-26 16:51:28 -07:00
Fabien Potencier
eb1183111a feature #23471 [Finder] Add a method to check if any results were found (duncan3dc)
This PR was merged into the 3.4 branch.

Discussion
----------

[Finder] Add a method to check if any results were found

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

If I want to know if any results were found, but I don't want to start trawling through them, I have to do the rather ugly:
```php
$found = false;
foreach ($finder as $thing) {
    $found = true;
    break;
}
if ($found) {
```
This PR enables the much more readable:
```php
if ($finder->found()) {
```

This seemed like an obvious thing to me, so I suspect there might be a reason this doesn't exist already, but I couldn't find any previous discussion. If it'll be accepted then I'll glady create a docs PR

Commits
-------

24dcb5202c Add a method to check if any results were found
2017-09-26 16:22:45 -07:00
Fabien Potencier
08825f8929 feature #23149 [PhpUnitBridge] Added a CoverageListener to enhance the code coverage report (lyrixx)
This PR was squashed before being merged into the 3.4 branch (closes #23149).

Discussion
----------

[PhpUnitBridge] Added a CoverageListener to enhance the code coverage report

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

---

The code coverage computed by PHPUnit is not very accurate by default as it marks a line as tested as soon as it has been executed.
For example, if you have two classes A and B where A is using B and you write test only for the class A then the class B will be marked as tested.

You can fix this issue by adding `@covers A` on top of the class ATest, but it's a bit boring.

This Listener add this annotation on each test if it's applicable:
* If an annotation already exists, we do nothing.
* We try to find the SUT thanks to the Test class name, if it does not exist, we do nothing

---

If you wan to see it in action: https://github.com/lyrixx/phpunit-auto-cover

---

The PR is not finished, I think we could add this listener to symfony itself.

What do you think?

Commits
-------

e17206debd [PhpUnitBridge] Added a CoverageListener to enhance the code coverage report
2017-09-26 16:19:20 -07:00
Grégoire Pineau
e17206debd [PhpUnitBridge] Added a CoverageListener to enhance the code coverage report 2017-09-26 16:19:19 -07:00
Fabien Potencier
8a752c33b9 feature #24318 [SecurityBundle] Deprecate ACL related code (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Deprecate ACL related code

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

Needs https://github.com/symfony/acl-bundle/pull/2

Commits
-------

e3b7dc5424 [SecurityBundle] Deprecate ACL related code
2017-09-26 16:03:19 -07:00
Fabien Potencier
efdba489d9 minor #24339 Forward compatibility for the removal of bundle inheritance in 4.0 (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Forward compatibility for the removal of bundle inheritance in 4.0

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

Compat layer so that 3.4 and master combinations of framework/twig bundles and http-kernel work together.

Commits
-------

fba7e543d1 added foward compatibility for the removal of bundle inheritance in 4.0
2017-09-26 15:58:28 -07:00
Fabien Potencier
b5103a261f feature #24335 [Security][SecurityBundle] Deprecate the HTTP digest auth (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security][SecurityBundle] Deprecate the HTTP digest auth

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24325  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

See https://github.com/symfony/symfony/pull/24336 for the removal PR on master.

Commits
-------

11fe79d77f [Security][SecurityBundle] Deprecate the HTTP digest auth
2017-09-26 15:51:56 -07:00
Robin Chalas
084e49f2ef feature #21951 [Security][Firewall] Passing the newly generated security token to the event during user switching (klandaika)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security][Firewall] Passing the newly generated security token to the event during user switching

Event allows listeners to easily switch out the token if custom token updates are required

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

Updated SwitchUserEvent to include the generated security Token. Allows the listeners to replace the token with their own (in case an application has some custom logic for token generation). The SwitchUserListener will now use the token returned by the event, so if token was not changed the self generated token will be used. If token was changed in the event then the new token would get used.

Reasons for this feature
--------------------------

In our current project users can have different Role sets depending on which organization they switch to. Our `User->getRoles()` always returns ["ROLE_USER"] and after login user is presented with choice of organizations they want to work in. Based on selected organization roles get updated with then stored token.

Without the change proposed in this PR. The only way we can setup the proper roles during user switch is by replacing `security.authentication.switchuser_listener` service with our own implementation of the listener.

With the proposed change, we can replace the security token with the one having all the roles we require directly inside our listener for `security.switch_user` event that gets thrown by Symfony's `SwitchUserListener`

Commits
-------

4205f1b Passing the newly generated security token to the event during user switching.
2017-09-26 22:15:35 +02:00
VJ
4205f1bc68 Passing the newly generated security token to the event during user switching.
Event allows listeners to easily switch out the token if custom token updates are required
2017-09-26 16:04:50 -04:00
Maxime Steinhausser
6fcb075683 Fix changelog and minor tweak for #23485 2017-09-26 22:01:10 +02:00
Ole Rößner
7473981c14 [Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse 2017-09-26 21:48:48 +02:00
Maxime Steinhausser
11fe79d77f [Security][SecurityBundle] Deprecate the HTTP digest auth 2017-09-26 20:29:06 +02:00
Fabien Potencier
fba7e543d1 added foward compatibility for the removal of bundle inheritance in 4.0 2017-09-26 19:25:46 +02:00
Maxime Steinhausser
ec8edeeb29 feature #22890 [HttpKernel] Add ability to configure catching exceptions for Client (kbond)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Add ability to configure catching exceptions for Client

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

Debugging exceptions in functional tests is difficult as you need to look at the logs to see which exception was thrown. Disabling catching of exceptions in the client would allow the exception to bubble up to phpunit  and make it easier to see what exception was thrown.

Commits
-------

4812e60 add ability to configure catching exceptions
2017-09-26 17:48:51 +02:00
Tim Jabs
ab47c7878e Added improvement for accuracy in MoneyToLocalizedStringTransformer. 2017-09-26 17:19:17 +02:00
Craig Duncan
24dcb5202c Add a method to check if any results were found 2017-09-26 15:59:44 +01:00
Kevin Bond
4812e6054c
add ability to configure catching exceptions 2017-09-26 10:46:55 -04:00
Nicolas Grekas
07f79737bc minor #22589 Extract method refactoring for ResourceCheckerConfigCache (mpdude)
This PR was squashed before being merged into the 3.4 branch (closes #22589).

Discussion
----------

Extract method refactoring for ResourceCheckerConfigCache

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

Improves code readability.

Commits
-------

685c353 Extract method refactoring for ResourceCheckerConfigCache
2017-09-26 16:36:06 +02:00
Matthias Pigulla
685c3538fb Extract method refactoring for ResourceCheckerConfigCache 2017-09-26 16:36:04 +02:00
Tobias Schultze
bc8430418b feature #24239 [HttpFoundation] Deprecate compatibility with PHP <5.4 sessions (afurculita)
This PR was squashed before being merged into the 3.4 branch (closes #24239).

Discussion
----------

[HttpFoundation] Deprecate compatibility with PHP <5.4 sessions

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

This PR removes functionality added in Symfony 2.1 as a compatibility layer with sessions from PHP <5.4.

- [x] Fix tests

Commits
-------

3deb3940ab [HttpFoundation] Deprecate compatibility with PHP <5.4 sessions
2017-09-26 14:23:54 +02:00
Alexandru Furculita
3deb3940ab [HttpFoundation] Deprecate compatibility with PHP <5.4 sessions 2017-09-26 14:23:43 +02:00
Robin Chalas
e3b7dc5424 [SecurityBundle] Deprecate ACL related code 2017-09-26 13:11:38 +02:00
Robin Chalas
477a24dff9 feature #23882 [Security] Deprecated not being logged out after user change (iltar)
This PR was squashed before being merged into the 3.4 branch (closes #23882).

Discussion
----------

[Security] Deprecated not being logged out after user change

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

This PR is an alternative approach to #19033. Due to a behavioral change that could break a lot of applications and websites, I've decided to trigger a deprecation instead of actually changing the behavior as that can be done for 4.0.

Whenever a user object is considered changed (`AbstractToken::hasUserChanged`) when setting a new user object after refreshing, it will now throw a deprecation, paving the way for a behavioral change in 4.0. The idea is that in 4.0 Symfony will simply trigger a logout when this case is encountered.

Commits
-------

22f525b [Security] Deprecated not being logged out after user change
2017-09-26 13:05:27 +02:00
Iltar van der Berg
22f525b01f [Security] Deprecated not being logged out after user change 2017-09-26 13:05:21 +02:00
Fabien Lucas
b6b6d31b71 Added an alias for FlashBagInterface in config 2017-09-26 12:34:51 +02:00
Christian Flothmann
d0235a00cc register class metadata factory alias 2017-09-26 12:29:00 +02:00
iamluc
4a01cd85bc Set a NullLogger in ApcuAdapter when Apcu is disabled in CLI
Same check as in https://github.com/symfony/symfony/pull/23390/files#diff-a5185cd58702e8e073786794a423cb27R112
2017-09-26 12:11:06 +02:00
Javier Eguiluz
eb520e1e5b Minor reword 2017-09-26 12:10:40 +02:00
Iltar van der Berg
6522c05876 Removed unused private property 2017-09-26 12:02:43 +02:00
Nicolas Grekas
b90ce05c24 minor #24316 Added null as explicit return type (?TokenInterface) (iltar)
This PR was merged into the 2.7 branch.

Discussion
----------

Added null as explicit return type (?TokenInterface)

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

This fixes the returntype in the `ContextListener` so it can be merged upwards.

/cc @chalasr

Commits
-------

1ba4dd9 Added null as explicit return type (?TokenInterface)
2017-09-26 12:00:14 +02:00
Nicolas Grekas
5dcd573ecf bug #24313 [DI] Fix tracking of bound arguments when using autoconfiguration (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix tracking of bound arguments when using autoconfiguration

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

An exception is currently thrown when using arguments bindings on an autoconfigured controller action.
This fixes the issue.

Commits
-------

091f943 [DI] Fix tracking of bound arguments when using autoconfiguration
2017-09-26 11:47:50 +02:00
Nicolas Grekas
091f943900 [DI] Fix tracking of bound arguments when using autoconfiguration 2017-09-26 11:38:39 +02:00
Qingshan Luo
7a475595e2 Use PHP_MAXPATHLEN in Filesystem. 2017-09-26 11:21:42 +02:00
Maxime Steinhausser
55aa662480 feature #24295 [DI][DX] Throw exception on some ContainerBuilder methods used from extensions (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][DX] Throw exception on some ContainerBuilder methods used from extensions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no (unlikely, that would mean there already was an issue in userland code)
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24282 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

88549fff5b [DI][DX] Throw exception on some ContainerBuilder methods used from extensions
2017-09-26 07:54:41 +02:00
Christian Flothmann
8bf465f48d use the parseFile() method of the YAML parser 2017-09-25 21:59:34 +02:00
Christian Flothmann
1b4d2b246d feature #24253 [Yaml] support parsing files (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] support parsing files

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24191#issuecomment-329975423
| License       | MIT
| Doc PR        | TODO

This PR adds a new flag `PARSE_FILE` which can be passed to the YAML parser. When given, the input will be interpreted as a filename whose contents will then be parsed. We already supported passing filenames in the past. Back then the features was not deterministic as it just relied on the string being an existing file or not. Now that we are able to control the behaviour of the parser by passing flags this can be done in a much cleaner way and allows to properly deal with errors (i.e. non existent or unreadable files).

This change will also allow to improve error/deprecation messages to include the filename being parsed and thus showing more descriptive error messages when people are using the YAML parser with a bunch of files (e.g. as part of the DependencyInjection or Routing component).

Commits
-------

9becb8a [Yaml] support parsing files
2017-09-25 21:34:08 +02:00
Christian Flothmann
9becb8ae34 [Yaml] support parsing files 2017-09-25 20:23:20 +01:00
Javier Eguiluz
f12e5887ff Removed unneeded wrapping quotes around a Twig key 2017-09-25 17:12:23 +02:00
Javier Eguiluz
709f134dc8 Removed unneeded wrapping quotes around a Twig key 2017-09-25 17:11:48 +02:00
Nicolas Grekas
8136fa5050 feature #24290 Adding Definition::addError() and a compiler pass to throw errors as exceptions (weaverryan)
This PR was squashed before being merged into the 3.4 branch (closes #24290).

Discussion
----------

Adding Definition::addError() and a compiler pass to throw errors as exceptions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes & no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (very minor)
| Tests pass?   | yes
| Fixed tickets | #23606
| License       | MIT
| Doc PR        | Not needed

Hi guys!

Very simple: when there is an error with a Definition, we can now call `Definition::addError()` instead of throwing an exception. Then, a new compiler pass (after removal) actually throws an exception. The advantage is that we can avoid throwing exceptions for services that are ultimately removed from the container. That's important for auto-registration, where we commonly register all services in `src/`... but then many of them are removed later.

A few interesting notes:
- We can probably convert more things from exceptions to `Definition::addError()`. I've only converted autowiring errors and things in `CheckArgumentsValidityPass` (that was necessary because it was throwing exceptions in some cases due to autowiring failing... which was the true error)
- `Definition` can hold multiple errors, but I'm only showing the first error in the exception message. The reason is clarity: I think usually the first error is the most (or only) important. But having `Definition::addError()` avoids the possibility of a later error overriding an earlier one

Cheers!

Commits
-------

a85b37a Adding Definition::addError() and a compiler pass to throw errors as exceptions
2017-09-25 11:29:01 +02:00
Ryan Weaver
a85b37a0e6 Adding Definition::addError() and a compiler pass to throw errors as exceptions 2017-09-25 11:28:57 +02:00
Nicolas Grekas
ec111877fa feature #24301 [DI] Add AutowireRequiredMethodsPass to fix bindings for @required methods (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods

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

Spotted while doing a SF4 workshop :)

Discovery of `@required` methods should be split from AutowirePass so that bindings can apply to these methods also when autowiring is enabled.

Commits
-------

dc55dd2 [DI] Add AutowireRequiredMethodsPass to fix bindings for `@required` methods
2017-09-25 11:24:50 +02:00
Nicolas Grekas
0c0a0525a1 feature #24226 [Cache] Add ResettableInterface to allow resetting any pool's local state (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Add ResettableInterface to allow resetting any pool's local state

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

To allow pools to leverage #24155 so that they can be used in multi-request loops.

Commits
-------

14c91f2 [Cache] Add ResettableInterface to allow resetting any pool's local state
2017-09-25 11:23:16 +02:00
Nicolas Grekas
dc55dd2c99 [DI] Add AutowireRequiredMethodsPass to fix bindings for @required methods 2017-09-25 10:48:11 +02:00
Nicolas Grekas
14c91f2bc9 [Cache] Add ResettableInterface to allow resetting any pool's local state 2017-09-25 10:20:08 +02:00
Iltar van der Berg
1ba4dd9b44 Added null as explicit return type (?TokenInterface) 2017-09-25 09:46:32 +02:00
Maxime Steinhausser
88549fff5b [DI][DX] Throw exception on some ContainerBuilder methods used from extensions 2017-09-24 17:28:40 +02:00
Nicolas Grekas
a69c1b2ae1 [FrameworkBundle] Fix Routing\DelegatingLoader 2017-09-24 15:55:14 +02:00
Oskar Stark
e17426c65c added missing @author tag for new class 2017-09-24 15:33:47 +02:00
Nicolas Grekas
f0f9a6691c [HttpKernel] Make array vs "::" controller definitions consistent 2017-09-24 15:32:05 +02:00
Nicolas Grekas
1ebc31aa9f Fix tests 2017-09-24 15:31:29 +02:00
Christian Flothmann
cb6ead1635 allow forms without translations and validator 2017-09-24 10:18:44 +01:00
Robin Chalas
4badda981e feature #24291 [SecurityBundle] Reset the authentication token between requests (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Reset the authentication token between requests

| 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        | N/A

Follow-up to #24155. This PR resets the token storage, making sure there's no user logged in at the beginning of a new request.

Commits
-------

e46b366 Reset the authentication token between requests.
2017-09-24 11:00:32 +02:00
Nicolas Grekas
e84d2d0943 feature #24280 [VarDumper] Make dump() a little bit more easier to use (freekmurze)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #24280).

Discussion
----------

[VarDumper] Make `dump()` a little bit more easier to use

| Q             | A
| ------------- | ---
| Branch?       |  3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes

Imagine you have this code:

```php
$object->method();
```

If you want to dump the object, this is currently the way to do that:

```php
dump($object);

$object->method();
```

This PR makes adding (and removing) the `dump` function easier. When using one argument is used, that argument is returned.

```php
dump($object)->method();
```

When dumping multiple things, they all get returned. So you can to this:

```php
$object->someMethod(...dump($arg1, $arg2, $arg3));
```

Commits
-------

42f0984 [VarDumper] Make `dump()` a little bit more easier to use
2017-09-23 16:36:46 +01:00
Freek Van der Herten
42f0984e71 [VarDumper] Make dump() a little bit more easier to use 2017-09-23 16:34:50 +01:00
Maxime Steinhausser
35f9c0ba2d [Form] Add ambiguous & exception debug:form tests 2017-09-23 00:36:11 +02:00
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
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
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
Robin Chalas
a40c94d8e3 bug #24219 [Console] Preserving line breaks between sentences according to the exception message (yceruto)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Preserving line breaks between sentences according to the exception message

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

Commits
-------

e2d4904 Render all line breaks according to the exception message
2017-09-20 15:00: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
ff2ab5831a [DI] Fix private-by-default BC layer 2017-09-19 23:28:23 +02:00
Yonel Ceruto
e2d4904a84 Render all line breaks according to the exception message 2017-09-19 16:27:25 -04: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
Martin Hasoň
f13081d12c [Form] Fix phpdoc 2017-09-19 13:52:15 +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
Maxime Steinhausser
a6f01a38eb minor #24249 [DI] remove confusing code (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] remove confusing code

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

This code is a no-op. I guess the intention was to resolve a parametrized alias target, yet this never worked and we don't want to make it work.

Commits
-------

3da645efed [DI] remove confusing code
2017-09-18 19:54:25 +02:00
Nicolas Grekas
3da645efed [DI] remove confusing code 2017-09-18 17:50:14 +02:00
HeahDude
e39e7a4fa9 [Form] Fixed GroupSequence with "constraints" option 2017-09-18 17:33:18 +02:00
Nicolas Grekas
2bf56296bf minor #24230 [Validator] Clarify UUID validator behavior (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #24230).

Discussion
----------

[Validator] Clarify UUID validator behavior

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24209
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

TLDR; after some investigation this is now a doc update.

This fixes the variant detection of a UUID, in strict validation, as described by https://tools.ietf.org/html/rfc4122#section-4.1.1

Tested variant UUID's taken from [ramsey/uuid](https://github.com/ramsey/uuid/blob/master/tests/UuidTest.php#L506). I cannot produce an invalid variant UUID anymore, as i believe by now anything would be variant 3 (future reserved).

/cc @backbone87

Commits
-------

cde5a47 [Validator] Clarify UUID validator behavior
2017-09-18 16:27:31 +02:00
Roland Franssen
cde5a47e8f [Validator] Clarify UUID validator behavior 2017-09-18 16:27:30 +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
3b42d8859e bug #22321 [Filesystem] Fixed makePathRelative (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22321).

Discussion
----------

[Filesystem] Fixed makePathRelative

| 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        | n/a

Updating to Symfony 3.2.7 @agoat noticed a bug with `Filesystem::makePathRelative()` in contao/core-bundle#751:

- In Symfony 3.2.6 `makePathRelative('aa/cc', 'bb/cc')` returned correctly `../../aa/cc`
- In Symfony 3.2.7 the same method call returns `./`

I think this issue was introduced with #22133.

While working on the fix I noticed some other issues too:

- An unnecessary if construct that did nothing, fc745f45949fdb8d5aa590618ec73537721f99b4
- Missing normalization of `./` path segments, 15982d4b083723555cfa149368eaaae9609d0e22
- `../` got ignored at the beginning of relative paths, 9586e880d69f613b10e23dd53cea877e622b221a
- The documentation of the method only allowed absolute paths, but there are already unit tests ([FilesystemTest.php:1097](ab93feae3f/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php (L1097))) that test the behavior of relative paths, cec473eeb099c074b5883e7187f74663402f9d87

This pull request fixes all these issues and adds tests for them.

Commits
-------

2bc11505f4 [Filesystem] Fixed makePathRelative
2017-09-17 08:14:54 -07:00
Martin Auswöger
2bc11505f4 [Filesystem] Fixed makePathRelative 2017-09-17 08:14:49 -07: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
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
GDIBass
15fd863112 Updated Test name and exception name to be more accurate 2017-09-15 09:32:24 -07: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
Robin Chalas
4dd2e3e837 Preserve URI fragment in HttpUtils::generateUri() 2017-09-15 15:18:09 +02:00
Nicolas Grekas
e3fa71c9f5 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-09-15 12:58:45 +02:00
Nicolas Grekas
cdb53266b3 fix merge 2017-09-15 12:58:39 +02:00
Dariusz
4e9d1600ee CS: recover no_break_comment 2017-09-15 12:36:22 +02:00
Nicolas Grekas
4b31b47f08 Merge branch '3.3' into 3.4
* 3.3:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
  [Filesystem] mirror - fix copying content with same name as source/target.
  Removed unnecessary getDefinition() call.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 12:12:22 +02:00
Nicolas Grekas
ebbcb7b1be Merge branch '2.8' into 3.3
* 2.8:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
  [Filesystem] mirror - fix copying content with same name as source/target.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 12:08:59 +02:00
Nicolas Grekas
6f924755a6 Merge branch '2.7' into 2.8
* 2.7:
  [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2017-09-15 11:59:38 +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
Nicolas Grekas
1e4d4ef888 Merge branch '2.7' into 2.8
* 2.7:
  [Filesystem] mirror - fix copying content with same name as source/target.
  .php_cs.dist - simplify config
  [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2017-09-15 11:26:12 +02:00
Nicolas Grekas
816ad889b1 feature #24193 [FrameworkBundle] Reset stopwatch between requests (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Reset stopwatch between requests

| 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        | N/A

Follow-up to #24155. This PR ensures that the stopwatch is reset between requests.

Commits
-------

7c3bdd9 Reset stopwatch.
2017-09-15 10:38:28 +02:00
Fabien Potencier
89893c1204 [HttpKernel] deprecated bundle inheritance 2017-09-14 20:39:22 -07:00
Fabien Potencier
ee9f4c3dad fixed CS 2017-09-14 19:10:51 -07:00
Alexander M. Turek
d9a6b76dbd A DI tag for resettable services. 2017-09-14 22:28:48 +02:00
Jáchym Toušek
d4f6039dcd
[HttpFoundation] Fix file upload multiple with no files 2017-09-14 14:29:10 +02:00
Alexander M. Turek
7c3bdd9139 Reset stopwatch. 2017-09-14 11:29:18 +02:00
Nicolas Grekas
8b7c7c179b [DI] Fix non-instantiables auto-discovery 2017-09-14 10:50:29 +02:00
Christian Flothmann
10ce932504 [PhpUnitBridge] do not require an error context
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.
2017-09-13 20:51:11 +02:00
Fabien Potencier
30e3b6d27e feature #23625 Feature #23583 Add current and fallback locales in WDT / Profiler (nemoneph)
This PR was merged into the 3.4 branch.

Discussion
----------

Feature #23583  Add current and fallback locales in WDT / Profiler

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

The goal of this PR is to add informations about the locale and the fallback locales in the translation WDT panel / and profiler

Commits
-------

98a8a6c735 Feature #23583  Add current and fallback locales in WDT / Profiler
2017-09-13 09:05:29 -07:00
Fabien Potencier
5bf241aa8e bug #23473 [Filesystem] mirror - fix copying content with same name as source/target. (gitlost)
This PR was squashed before being merged into the 2.7 branch (closes #23473).

Discussion
----------

[Filesystem] mirror - fix copying content with same name as source/target.

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

Uses `substr()` and lengths in `Filesystem::mirror()` rather than `str_replace()` to avoid multiple replacements.

Commits
-------

b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target.
2017-09-13 09:02:25 -07:00
gitlost
b524c84ce1 [Filesystem] mirror - fix copying content with same name as source/target. 2017-09-13 09:02:23 -07:00
Fabien Potencier
76ccce7464 feature #24179 [TwigBundle] Add default templates directory and option to configure it (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] Add default templates directory and option to configure it

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

Feature freeze is coming so this one should be important for the new structure. Moving forward and alternative of https://github.com/symfony/symfony/pull/23339 but I'm proposing `templates/bundles/<BundleName>` instead of `templates/bundles/<BundleTwigNamespace>` to override bundles templates and easy migration from current `app/Resources/<BundleName>/views` convention. Also this fix the pending comments.

Summary:
 * Added new option to configure default path for templates directory:
```yaml
twig:
    default_path: '%kernel.project_dir%/templates' # default
```
 * Added new path convention to override bundle templates  `<default_path>/bundles/<BundleName>`:
```
# Examples:
templates/bundles/TwigBundle/Exception/error.html.twig - @Twig/Exception/error.html.twig
templates/bundles/FOSUserBundle/layout.html.twig - @FOSUser/layout.html.twig
```

Current templates in `<kernel.root_dir>/Resources/<BundleName>/views` have priority over the new one, and both have priority over the bundle `views` path.

Commits
-------

a1b391fb00 Add default templates directory and option to configure it
2017-09-13 07:15:26 -07:00
Alexander M. Turek
d1f7024e14 Removed unnecessary getDefinition() call. 2017-09-13 15:44:19 +02:00
Yonel Ceruto
a1b391fb00 Add default templates directory and option to configure it 2017-09-13 09:15:32 -04:00
Nicolas Grekas
005cf6b463 Merge branch '3.3' into 3.4
* 3.3:
  Fix travis php7.0
  Add support to environment variables APP_ENV/DEBUG in KernelTestCase
  [Routing] Cleanup apache fixtures
2017-09-13 13:45:41 +02:00
Nicolas Grekas
30a13baef3 fix oups 2017-09-13 13:33:28 +02:00
Nicolas Grekas
8729f9fd6a [DI] Resolve nested refs to aliases 2017-09-13 13:21:02 +02:00
Grégoire Pineau
256055218e [Intl] Fixed support of Locale::getFallback 2017-09-13 12:20:09 +02:00
Nicolas Grekas
1936491f9b Make as many services private as possible 2017-09-13 09:59:43 +02:00
Yonel Ceruto
8d5674480f Add support to environment variables APP_ENV/DEBUG in KernelTestCase 2017-09-12 18:52:39 -04:00
Nicolas Grekas
f1ab3b28ac [Routing] Cleanup apache fixtures 2017-09-12 18:00:24 +02:00
Martin Hasoň
5bc0b0527e [FrameworkBundle] Enable assets with templates only if the Asset component is installed 2017-09-12 16:37:08 +02:00
Christian Flothmann
ade060e80e feature #18314 [Translation] added support for adding custom message formatter (aitboudad)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] added support for adding custom message formatter

| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | yes |
| Tests pass? | yes |
| Fixed tickets | #6009, #10152, one item in #11742, #11948 |
| License | MIT |
| Doc PR | ~ |

Commits
-------

42183b0 [Translation] Support adding custom message formatter
2017-09-12 14:37:35 +02:00
Abdellatif Ait boudad
42183b0213 [Translation] Support adding custom message formatter 2017-09-12 13:17:01 +01:00
Christian Flothmann
75a26bb801 [Debug] fix test assertion 2017-09-12 10:02:51 +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
7ab8efb74e fixed CS 2017-09-11 14:34:45 -07:00
Fabien Potencier
f46d324d63 Merge branch '3.3' into 3.4
* 3.3:
  fixed CS
  fixed CS
2017-09-11 14:23:16 -07:00
Fabien Potencier
ceae3bf16c fixed CS 2017-09-11 14:23:01 -07:00
Fabien Potencier
ebfb24070c Merge branch '2.8' into 3.3
* 2.8:
  fixed CS
2017-09-11 14:11:44 -07:00
Fabien Potencier
df07e73363 fixed CS 2017-09-11 14:10:59 -07:00
Fabien Potencier
10204ffe99 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces 2017-09-11 13:58:31 -07:00
Fabien Potencier
8cb614df9f Merge branch '3.3' into 3.4
* 3.3:
  [CS] Apply phpdoc_annotation_without_dot
  bumped Symfony version to 3.3.10
  updated VERSION for 3.3.9
  updated CHANGELOG for 3.3.9
  [DomCrawler] Fix conversion to int on GetPhpFiles
  Remove `protected_to_private` rule.
  Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 13:45:17 -07:00
Fabien Potencier
e844b640de Merge branch '2.8' into 3.3
* 2.8:
  [CS] Apply phpdoc_annotation_without_dot
2017-09-11 13:43:11 -07:00
Fabien Potencier
4e1c65c6f9 Merge branch '2.7' into 2.8
* 2.7:
  [CS] Apply phpdoc_annotation_without_dot
2017-09-11 13:39:16 -07:00
Fabien Potencier
687ad65d82 minor #24149 [CS] Apply phpdoc_annotation_without_dot (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #24149).

Discussion
----------

[CS] Apply phpdoc_annotation_without_dot

| 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

Rule was manually applied here : https://github.com/symfony/symfony/pull/19198
In same PR, fixer for this rule was requested, later implementation was approved by Symfony in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2020 .

Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word.
If there are multiple sentences, it doesn't make any changes.

Status quo is that some annotation are in the middle - having first word uppercased, but no final stop.
Let us fix grammar by finishing applying the rule.

If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset.

Info: I did manually reviewed every single change of this PR.

Commits
-------

7a97b49436 [CS] Apply phpdoc_annotation_without_dot
2017-09-11 13:37:54 -07:00
Dariusz
7a97b49436 [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
Fabien Potencier
6eff3e5b55 deprecated profiler.matcher configuration 2017-09-11 10:58:18 -07:00
Fabien Potencier
2c62ba8150 fixed CS 2017-09-11 10:58:18 -07:00
Clément LEFEBVRE
98a8a6c735 Feature #23583 Add current and fallback locales in WDT / Profiler 2017-09-11 19:07:47 +02:00
Fabien Potencier
9570a454ef bumped Symfony version to 3.3.10 2017-09-11 09:45:56 -07:00
Fabien Potencier
b9c93f1faa updated VERSION for 3.3.9 2017-09-11 09:13:23 -07:00
Fabien Potencier
51af90e042 Merge branch '2.8' into 3.3
* 2.8:
  [DomCrawler] Fix conversion to int on GetPhpFiles
  Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 08:55:22 -07:00
Fabien Potencier
400263a39d Merge branch '2.7' into 2.8
* 2.7:
  [DomCrawler] Fix conversion to int on GetPhpFiles
  Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 08:55:02 -07:00
Mara Blaga
122da5add5 [DomCrawler] Fix conversion to int on GetPhpFiles 2017-09-11 15:10:51 +01:00
Fabien Potencier
47871c995f bug #23853 Filtering empty uuids in ORMQueryBuilderLoader. (mlazovla)
This PR was merged into the 2.7 branch.

Discussion
----------

Filtering empty uuids in ORMQueryBuilderLoader.

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

Commits
-------

27e8cd289c Filtering empty uuids in ORMQueryBuilderLoader.
2017-09-11 05:33:33 -07:00
Nicolas Grekas
b1b686081b Merge branch '3.3' into 3.4
* 3.3:
  Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
  [Filesystem] skip tests if not applicable
  [Fabbot] Do not run php-cs-fixer if there are no change in src/
  [Security] Fix exception when use_referer option is true and referer is not set or empty
  [HttpKernel] "controller.service_arguments" services should be public
  Get KERNEL_DIR through $_ENV too for KernelTestCase
  Get KERNEL_CLASS through $_ENV too
  check permissions if dump target dir is missing
2017-09-11 08:29:22 +02:00
Nicolas Grekas
483a274994 Merge branch '2.8' into 3.3
* 2.8:
  Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
  [Filesystem] skip tests if not applicable
  [Fabbot] Do not run php-cs-fixer if there are no change in src/
  [Security] Fix exception when use_referer option is true and referer is not set or empty
  Get KERNEL_DIR through $_ENV too for KernelTestCase
  check permissions if dump target dir is missing
2017-09-11 07:57:23 +02:00
Fabien Potencier
565a1c4b48 minor #24007 [ExpressionLanguage] SyntaxError : make a proposal when no function or variable found (fmata)
This PR was merged into the 3.4 branch.

Discussion
----------

[ExpressionLanguage] SyntaxError : make a proposal when no function or variable found

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

Now when an Expression fails to be parsed, a SyntaxError is raised with an explicit message but it's impossible to extract the function, variable or the pair token  type/token value to parse.
When a functional user encounters a SyntaxError, by default there is no mechanism to understand why what he typed is incorrect.

This PR exposes when it's possible the subject of the violation and in case of function or variable undefined in the Expression, a proposal is made.

```php
<?php

require 'vendor/autoload.php';

use Symfony\Component\ExpressionLanguage\Lexer;
use Symfony\Component\ExpressionLanguage\Parser;
use Symfony\Component\ExpressionLanguage\SyntaxError;

$lexer = new Lexer();
$parser = new Parser(array());

try {
    $parser->parse($lexer->tokenize('user.city.departement in [departement, departement2]'), array('user', 'departement1', 'departement2'));
} catch (SyntaxError $e) {
    echo $e->getMessage();
}
```
Outputs :

> Variable "departement" is not valid around position 27 for expression `user.city.departement in [departement, departement2]`.
>
> Did you mean "departement1"?

Commits
-------

f19cf8a916 [ExpressionLanguage] make a proposal in SyntaxError message
2017-09-10 16:46:16 -07:00
Robin Chalas
efa4cb9a66 [SecurityBundle] Fix valid provider considered undefined 2017-09-09 12:20:30 +02:00
Nicolas Grekas
a5130b29c6 minor #24130 Fixed deprecations in WebProfiler tests (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed deprecations in WebProfiler tests

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

To avoid this error in tests:

```
The "web_profiler.position" configuration key has been deprecated in Symfony 3.4 and it will be removed in 4.0: 1x
    1x in ConfigurationTest::testConfigTree from Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection
```

Can anybody propose a better solution to fix this issue? Thanks!

Commits
-------

2a696d3 Fixed deprecations in WebProfiler tests
2017-09-09 08:11:27 +02:00
Javier Eguiluz
2a696d3a1e Fixed deprecations in WebProfiler tests 2017-09-09 08:10:24 +02:00
Fabien Potencier
d6dfb5b4e3 Merge branch '2.7' into 2.8
* 2.7:
  Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
  [Filesystem] skip tests if not applicable
  [Fabbot] Do not run php-cs-fixer if there are no change in src/
  [Security] Fix exception when use_referer option is true and referer is not set or empty
  Get KERNEL_DIR through $_ENV too for KernelTestCase
  check permissions if dump target dir is missing
2017-09-08 18:12:52 -07:00
Fabien Potencier
7793b797af Revert "bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)"
This reverts commit d74144fc0b, reversing
changes made to 2b79f48405.
2017-09-08 18:12:06 -07:00
Fabien Potencier
1677d9cddb minor #24073 [Console] Fix BC break in console.command.ids parameter (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix BC break in console.command.ids parameter

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

To make command services lazy loaded when their name is known, we need to exclude them from [runtime registration of other (non lazy-loadable) command services](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L176).
We also need to have them in the `console.command.ids` parameter in order to [not register them by convention](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/HttpKernel/Bundle/Bundle.php#L188).
It is managed using `false` as values instead of ids for the parameter, [excluding false values from runtime registration](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L177). Problem is that it makes FrameworkBundle's 3.3 Application incompatible with Console 3.4+ given the check for `false` is missing.

This PR fixes it using another parameter referencing ids of command services which can be lazy loaded.
I would be happy to not add the parameter if someone has a suggestion that allows to do so.

Commits
-------

99e95c3d2d Fix BC break in console.command.ids parameter
2017-09-08 09:59:15 -07:00
Christian Flothmann
1605ce1f07 [Filesystem] skip tests if not applicable 2017-09-08 16:43:09 +02:00
Yonel Ceruto
47b1106868 Do not display short exception trace for built-in console exceptions 2017-09-07 11:50:16 -04:00
Florent Mata
f19cf8a916 [ExpressionLanguage] make a proposal in SyntaxError message 2017-09-07 17:13:34 +02:00
Fabien Potencier
c97c6d48b3 feature #24080 Deprecated the web_profiler.position option (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #24080).

Discussion
----------

Deprecated the web_profiler.position option

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

Related to #23728, which removes the feature for Symfony 4.0.

Commits
-------

53387b4335 Deprecated the web_profiler.position option
2017-09-07 08:02:00 -07:00
Javier Eguiluz
53387b4335 Deprecated the web_profiler.position option 2017-09-07 08:01:45 -07:00
Sergey Linnik
a29e0694de [Security] Fix exception when use_referer option is true and referer is not set or empty 2017-09-07 07:52:52 -07:00
Fabien Potencier
22c00283bb feature #24114 [SecurityBundle] Throw a meaningful exception when an undefined user provider is used inside a firewall (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Throw a meaningful exception when an undefined user provider is used inside a firewall

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

Before

> The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.undefined_provider".

After

> Invalid firewall "main": user provider "undefined_provider" not found.

Commits
-------

b884c6612d Throw a meaningful exception when an undefined user provider is used inside a firewall
2017-09-07 07:47:43 -07:00
Fabien Potencier
7dfb5aa321 feature #24122 [DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass

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

Because that name makes things harder to understand now.
This uses exactly the same BC layer logic as the one we have for the renaming of DefinitionDecorator to ChildDefinition.

Commits
-------

a7f98c60d9 [DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass
2017-09-07 07:45:15 -07:00
Fabien Potencier
d74144fc0b bug #24105 [Filesystem] check permissions if dump target dir is missing (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] check permissions if dump target dir is missing

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

`is_dir()` returns `false` if the parent directory misses the executable
bit even when the directory itself is present.

Commits
-------

a0f9f2c537 check permissions if dump target dir is missing
2017-09-07 07:43:15 -07:00
Fabien Potencier
1c04cd563a bug #24126 [HttpKernel] "controller.service_arguments" services should be public (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] "controller.service_arguments" services should be public

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

Controller-as-services need to be public if they have constructor arguments (they don't need to if they have no arguments but that's for arcane reasons.)
Since services tagged "controller.service_arguments" *are* controllers, they need to be public to enhance DX and remove some WTFs that some ppl reported to me.

Commits
-------

b9c6928d7e [HttpKernel] "controller.service_arguments" services should be public
2017-09-07 07:05:07 -07:00
Nicolas Grekas
b9c6928d7e [HttpKernel] "controller.service_arguments" services should be public 2017-09-07 14:08:26 +02:00
Nicolas Grekas
a7f98c60d9 [DI] rename ResolveDefinitionTemplatesPass to ResolveChildDefinitionsPass 2017-09-07 10:45:01 +02:00
Robin Chalas
b884c6612d Throw a meaningful exception when an undefined user provider is used inside a firewall 2017-09-07 10:19:55 +02:00
Nicolas Grekas
1f92e459db [DI] Allow processing env vars 2017-09-07 08:08:52 +02:00
Yonel Ceruto
cf11fb9652 Get KERNEL_DIR through $_ENV too for KernelTestCase 2017-09-06 18:24:46 -04:00
Nicolas Grekas
2fde0942ac fix the fix 2017-09-06 23:01:01 +02:00
Nicolas Grekas
367c4d9810 Fix deps=low tests 2017-09-06 22:50:21 +02:00
Nicolas Grekas
8015ad60cc Fix merge 2017-09-06 21:47:44 +02:00
Yonel Ceruto
73cdb68308 Get KERNEL_CLASS through $_ENV too 2017-09-06 15:05:48 -04:00
Nicolas Grekas
e565c6de00 Merge branch '3.3' into 3.4
* 3.3:
  [travis] fix minor php7.0 version
  [travis] add ldap.so for php70
  [HttpFoundation] Fix logic when JsonSerializable is missing
  [travis] update to trusty
  Don't use return on Assert::markTestSkipped.
  Create directories recursively in the PHPUnit bridge
  [Dotenv] Add a BC break note
  Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
  [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-06 21:03:12 +02:00
Nicolas Grekas
9431a38cfc Merge branch '2.8' into 3.3
* 2.8:
  [travis] add ldap.so for php70
  [HttpFoundation] Fix logic when JsonSerializable is missing
2017-09-06 19:07:39 +02:00
Nicolas Grekas
9d240de539 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix logic when JsonSerializable is missing
2017-09-06 18:54:42 +02:00
Nicolas Grekas
d1fe4153a1 [HttpFoundation] Fix logic when JsonSerializable is missing 2017-09-06 18:53:48 +02:00
Nicolas Grekas
87b3b1a685 Merge branch '2.8' into 3.3
* 2.8:
  [travis] update to trusty
  Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
  [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-06 18:40:18 +02:00
Christian Flothmann
a0f9f2c537 check permissions if dump target dir is missing
`is_dir()` returns `false` if the parent directory misses the executable
bit even when the directory itself is present.
2017-09-06 18:35:18 +02:00
Nicolas Grekas
c3f14708f4 Merge branch '2.7' into 2.8
* 2.7:
  [travis] update to trusty
  Fix ArrayInput::toString() for VALUE_IS_ARRAY options/args
  [ExpressionLanguage] throws an exception on calling uncallable method
2017-09-06 18:32:38 +02:00