Commit Graph

32032 Commits

Author SHA1 Message Date
Fabien Potencier
0d72e822ee minor #23523 [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer (ro0NL)
This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer

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

@ogizanagi in 4.0 it will simply extend `Command` right.. wdyt?

Also we dont deprecate `setContainer` is that intentional?

Commits
-------

7ea2d0437a [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer
2017-07-17 12:07:08 +02:00
Alessandro Chitolina
6ab8ca0d36
disable inlining deprecated services 2017-07-17 11:57:18 +02:00
Nicolas Grekas
73c11a7986 bug #23539 [Stopwatch] Fix precision for root section (gharlan)
This PR was squashed before being merged into the 3.4 branch (closes #23539).

Discussion
----------

[Stopwatch] Fix precision for root section

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

Commits
-------

b2c0dc3 [Stopwatch] Fix precision for root section
2017-07-17 09:33:46 +02:00
Gregor Harlan
b2c0dc3901 [Stopwatch] Fix precision for root section 2017-07-17 09:33:44 +02:00
Christian Flothmann
d1ce5322a6 [Cache] add constructor docblocks for clarity 2017-07-17 08:54:27 +02:00
Fabien Potencier
34c8566be1 [WebServerBundle] allowed public/ root directory to be auto-discovered along side web/ 2017-07-16 14:41:56 +02:00
Fabien Potencier
bc6b57c208 [WebServerBundle] remove duplicate code 2017-07-16 14:41:56 +02:00
Roland Franssen
7ea2d0437a [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer 2017-07-15 19:48:19 +02:00
Maxime Steinhausser
c725a700cf [Profiler][Validator] ValidatorDataCollector: use new DataCollector::getCasters() method 2017-07-15 10:55:31 +02:00
Nicolas Grekas
b24a338f71 Merge branch '3.3' into 3.4
* 3.3:
  [Profiler] Fix data collector getCasters() call
  remove symfony/process suggestion
  [DI] Remove unused dynamic property
  [Process] Fixed issue between process builder and exec
  non-conflicting anonymous service ids across files
2017-07-15 10:52:56 +02:00
Nicolas Grekas
de1143ba28 minor #23516 [Profiler] Fix data collector getCasters() call (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[Profiler] Fix data collector getCasters() call

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

Relates to https://github.com/symfony/symfony/pull/23465. Calling `DataCollector::getCasters()` using self results into overridden methods in child classes never been called.

Also removes an unused property.

Commits
-------

34e7094 [Profiler] Fix data collector getCasters() call
2017-07-15 10:52:36 +02:00
Maxime Steinhausser
9b40b4af65 [Console] Add a factory command loader for standalone application with lazy-loading needs 2017-07-15 10:43:17 +02:00
Fabien Potencier
3444d8d88d minor #23514 [FrameworkBundle] remove symfony/process suggestion (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] remove symfony/process suggestion

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

Commits
-------

101b6815eb remove symfony/process suggestion
2017-07-15 10:00:09 +02:00
Fabien Potencier
8dd172b02f minor #23512 [DI] Remove unused dynamic property (dunglas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Remove unused dynamic property

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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
| License       | MIT
| Doc PR        | n/a

Commits
-------

6de81a7756 [DI] Remove unused dynamic property
2017-07-15 09:58:26 +02:00
Maxime Steinhausser
34e7094d3d [Profiler] Fix data collector getCasters() call 2017-07-15 09:52:13 +02:00
James Johnston
d6534f5cfc [VarDumper] Added setMinDepth to VarCloner
This new function allows VarCloner users to specify a minimum tree
depth that must be fully explored before we start limiting the number of
cloned items via the existing setMaxItems functionality.

It’s useful for dumping arguments from a backtrace to ensure some
minimum level of detail, while keeping a very low setMaxItems value to
ensure fast performance.
2017-07-15 00:44:49 -07:00
Christian Flothmann
101b6815eb remove symfony/process suggestion 2017-07-15 08:24:25 +02:00
Kévin Dunglas
6de81a7756
[DI] Remove unused dynamic property 2017-07-14 23:11:01 +02:00
Christian Flothmann
813a5377e1 [Cache] add constructor docblocks for clarity 2017-07-14 16:39:18 +02:00
Christian Flothmann
878198cefa [Security] validate empty passwords again 2017-07-14 16:25:02 +02:00
Nicolas Grekas
62fdf9c72b minor #23435 [TwigBridge] cleaner implementation of the TwigRenderer (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] cleaner implementation of the TwigRenderer

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23432#discussion_r125880092
| License       | MIT
| Doc PR        |

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

c7c5ba8 [TwigBridge] cleaner implementation of the TwigRenderer
2017-07-13 15:48:31 +02:00
Nicolas Grekas
54435997ee bug #23498 [Process] Fixed issue between process builder and exec (lyrixx)
This PR was merged into the 3.3 branch.

Discussion
----------

[Process] Fixed issue between process builder and exec

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

Commits
-------

8cd1a2d [Process] Fixed issue between process builder and exec
2017-07-13 15:17:20 +02:00
Grégoire Pineau
8cd1a2d527 [Process] Fixed issue between process builder and exec
refs #23495
2017-07-13 15:05:09 +02:00
Nicolas Grekas
de5c60de0e minor #23492 [DI] Check privates before resolving alias in Container::initialized (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Check privates before resolving alias in Container::initialized

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

Continuation of #22803, so it's consistent with logic in `has()` etc.

Commits
-------

c4b6066 [DI] Check privates before resolving alias in Container::initialized
2017-07-13 10:47:41 +02:00
Fabien Potencier
e8b9e253e8 bug #23490 [DependencyInjection] non-conflicting anonymous service ids across files (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] non-conflicting anonymous service ids across files

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

Commits
-------

8289ca6d1a non-conflicting anonymous service ids across files
2017-07-13 00:39:22 +02:00
Christian Flothmann
8289ca6d1a non-conflicting anonymous service ids across files 2017-07-12 20:52:55 +02:00
Roland Franssen
c4b6066c9f [DI] Check privates before resolving alias in Container::initialized 2017-07-12 20:41:02 +02:00
Dany Maillard
a73522c0de Add interval caster 2017-07-12 20:00:22 +02:00
Nicolas Grekas
2ed4cfb41c Merge branch '3.3' into 3.4
* 3.3:
  [FrameworkBundle] Fix tests
2017-07-12 17:05:00 +02:00
Nicolas Grekas
d1cfec11c3 Merge branch '3.2' into 3.3
* 3.2:
  [FrameworkBundle] Fix tests
2017-07-12 17:03:57 +02:00
Nicolas Grekas
6304938548 minor #23489 [FrameworkBundle] Fix tests (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix tests

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

Related to the changes introduced in #23440.

Commits
-------

2e0c6bc [FrameworkBundle] Fix tests
2017-07-12 17:03:40 +02:00
Nicolas Grekas
2e0c6bc855 [FrameworkBundle] Fix tests 2017-07-12 16:53:35 +02:00
Nicolas Grekas
c9371808f6 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  fix merge
2017-07-12 16:42:11 +02:00
Nicolas Grekas
8e6accc4d0 fix merge 2017-07-12 16:41:59 +02:00
Nicolas Grekas
d09aeaf0fd Merge branch '3.2' into 3.3
* 3.2:
  fix merge
2017-07-12 16:40:39 +02:00
Nicolas Grekas
2b2c0b7c97 fix merge 2017-07-12 16:37:06 +02:00
Nicolas Grekas
5f91f74f4d feature #23404 [Serializer] AbstractObjectNormalizer: Allow to disable type enforcement (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] AbstractObjectNormalizer: Allow to disable type enforcement

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

This allows to denormalize simple DTOs with public properties using the property-info component and the `ObjectNormalizer`. The raised exception is not really useful in such cases, as it cannot be easily handled gracefully to build a proper violation response (too generic and no real hint on the complete attribute path for instance).
Instead, I use the validator component to validate my DTOs and the properties' types, get a proper violation list, and build a response from it.

I wasn't really inspired for the `DISABLE_TYPE_ENFORCEMENT` name.

Commits
-------

959ac2a [Serializer] AbstractObjectNormalizer: Allow to disable type enforcement
2017-07-12 16:21:35 +02:00
Nicolas Grekas
21b7fd45f7 feature #21086 [MonologBridge] Add TokenProcessor (maidmaid)
This PR was merged into the 3.4 branch.

Discussion
----------

[MonologBridge] Add TokenProcessor

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

``TokenProcessor`` is an out-of-the-box class that adds token in extra info log, like this:

```
[2016-12-29 14:48:09] app.INFO: admin connected! [] {"token":{
    "username":"admin",
    "authenticated":true,
    "roles":["ROLE_ADMIN"]}
}
```

Commits
-------

3763515 Add TokenProcessor
2017-07-12 15:11:45 +02:00
Dany Maillard
3763515cae Add TokenProcessor 2017-07-12 15:09:25 +02:00
Nicolas Grekas
4324804357 Merge branch '3.3' into 3.4
* 3.3:
  [DI] Handle root namespace in service definitions
  Use rawurlencode() to transform the Cookie into a string
  [Process] Fix parsing args on Windows
  [HttpKernel][VarDumper] Truncate profiler data & optim perf
  [Security] Fix authentication.failure event not dispatched on AccountStatusException
2017-07-12 15:09:21 +02:00
Nicolas Grekas
6b5d35f058 Merge branch '3.2' into 3.3
* 3.2:
  [DI] Handle root namespace in service definitions
  Use rawurlencode() to transform the Cookie into a string
  [Security] Fix authentication.failure event not dispatched on AccountStatusException
2017-07-12 15:03:20 +02:00
Nicolas Grekas
e51c1a5658 Merge branch '2.8' into 3.2
* 2.8:
  [DI] Handle root namespace in service definitions
  Use rawurlencode() to transform the Cookie into a string
  [Security] Fix authentication.failure event not dispatched on AccountStatusException
2017-07-12 15:02:55 +02:00
Nicolas Grekas
0c6096fc32 Merge branch '2.7' into 2.8
* 2.7:
  [DI] Handle root namespace in service definitions
  Use rawurlencode() to transform the Cookie into a string
  [Security] Fix authentication.failure event not dispatched on AccountStatusException
2017-07-12 14:59:33 +02:00
Nicolas Grekas
ab8ac13dcf feature #22576 [Validator] Allow to use a property path to get value to compare in comparison constraints (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Allow to use a property path to get value to compare in comparison constraints

| 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

So we can simply declare something like:

```php
class Activity
{
    /**
     * @var \DateTime
     *
     * @Assert\DateTime()
     */
    private $startDate;

    /**
     * @var \DateTime
     *
     * @Assert\DateTime()
     * @Assert\GreaterThan(propertyPath="startDate")
     */
    private $endDate;

    // [...]

    public function getStartDate(): \DateTime
    {
        return $this->startDate;
    }

    public function getEndDate(): \DateTime
    {
        return $this->startDate;
    }
}
```

Of course, this is actually already possible by using an `Expression` constraint (or a callable), but it feels more natural to me to use proper comparison constraints for this.

Commits
-------

07c5aa6 [Validator] Allow to use a property path to get value to compare in comparison constraints
2017-07-12 14:11:37 +02:00
Nicolas Grekas
3b2f9fb89a feature #22689 [DoctrineBridge] Add support for doctrin/dbal v2.6 types (jvasseur)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Add support for doctrin/dbal v2.6 types

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

Add support for the following doctrine types in the property info extractor:
 - date_immutable
 - datetime_immutable
 - datetimetz_immutable
 - time_immutable
 - dateinterval

I didn't include the json type since it can be anything that can be stored in a json.

And add support for the dateinterval type for the form type guesser (the form component doesn't support using DateTimeImmutable instances).

Commits
-------

b30fd4f Add support for doctrin/dbal 2.6 types
2017-07-12 14:08:10 +02:00
Nicolas Grekas
c8f2c96318 feature #22734 [Console] Add support for command lazy-loading (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Add support for command lazy-loading

| 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/issues/12063 https://github.com/symfony/symfony/pull/16438 https://github.com/symfony/symfony/pull/13946 #21781
| License       | MIT
| Doc PR        | todo

This PR adds command lazy-loading support to the console, based on PSR-11 and DI tags.
(https://github.com/symfony/symfony/issues/12063#issuecomment-57173784)

Commands registered as services which set the `command` attribute on their `console.command` tag are now instantiated when calling `Application::get()` instead of all instantiated at `run()`.

__Usage__

```yaml
app.command.heavy:
    tags:
        - { name: console.command, command: app:heavy }
```

This way private command services can be inlined (no public aliases, remain really private).

With console+PSR11 implem only:

```php
$application = new Application();
$container = new ServiceLocator(['heavy' => function () { return new Heavy(); }]);
$application->setCommandLoader(new ContainerCommandLoader($container, ['app:heavy' => 'heavy']);
```

Implementation is widely inspired from Twig runtime loaders (without the definition/runtime separation which is not needed here).

Commits
-------

7f97519 Add support for command lazy-loading
2017-07-12 13:56:28 +02:00
Nicolas Grekas
87a6845b4d bug #23468 [DI] Handle root namespace in service definitions (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #23468).

Discussion
----------

[DI] Handle root namespace in service definitions

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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-->

Fixes

```
Cannot dump definition because of invalid class name ('\\stdClass')
```

for

```yaml
services:
    foo: {class: '\stdClass' }
```

`ContainerBuilder` allows it, so `PhpDumper` should as well.

Commits
-------

05170c8 [DI] Handle root namespace in service definitions
2017-07-12 13:53:19 +02:00
Roland Franssen
05170c84a2 [DI] Handle root namespace in service definitions 2017-07-12 13:53:12 +02:00
Nicolas Grekas
afaf29911f feature #19034 [Security] make it possible to configure a custom access decision manager service (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] make it possible to configure a custom access decision manager service

| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #942, #14049, #15295, #16828, #16843, |
| License | MIT |
| Doc PR | TODO |

These changes will make it possible to let users define their own voting strategies without the need for custom compiler passes that replace the built-in `AccessDecisionManager` (see linked issues in the PR table for some use cases).

Commits
-------

e0913a2 add option to define the access decision manager
2017-07-12 13:43:52 +02:00
Robin Chalas
7f97519624 Add support for command lazy-loading 2017-07-12 11:59:19 +02:00