Commit Graph

32764 Commits

Author SHA1 Message Date
Tobias Nyholm
eca2f8e587 Moved PhpExtractor and PhpStringTokenParser to Translation component 2017-09-29 01:37:07 +02:00
Fabien Potencier
a442e378e1 feature #24362 [HttpKernel] Deprecate some compiler passes in favor of tagged iterator args (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Deprecate some compiler passes in favor of tagged iterator args

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

More code that we can drop :)

Commits
-------

fa62e5068e [HttpKernel] Deprecate some compiler passes in favor of tagged iterator args
2017-09-28 16:21:02 -07:00
Fabien Potencier
537c496dfe minor #24366 [Lock] Use cache connection factories in lock (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Use cache connection factories in lock

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

An alternative to https://github.com/symfony/symfony/pull/24267 to share code between cache and lock.

Commits
-------

95358ac98f Share connection factories between cache and lock
2017-09-28 16:19:46 -07:00
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
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
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
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
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
Maxime Steinhausser
0a7e5b0d09 [DI] Fix missing use + minor tweaks 2017-09-28 09:59:26 +02:00
Maxime Steinhausser
7d749bfb77 [Routing] Enhance PHP DSL traits docblocks 2017-09-28 08:00:01 +02:00
Fabien Potencier
d7885ec3b2 minor #24352 Fix AclSchemaListener deprecation (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix AclSchemaListener deprecation

| 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

Commits
-------

eebe39e600 Fix AclSchemaListener deprecation
2017-09-27 14:49:24 -07:00
Robin Chalas
eebe39e600 Fix AclSchemaListener deprecation 2017-09-27 23:42:53 +02:00
Fabien Potencier
b46f9956c2 feature #24349 [SecurityBundle] Add missing AclSchemaListener deprecation (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Add missing AclSchemaListener deprecation

| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Missing from #24318

Commits
-------

d43c1f7b60 [SecurityBundle] Add missing AclSchemaListener deprecation
2017-09-27 14:28:13 -07: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