Commit Graph

30723 Commits

Author SHA1 Message Date
Fabien Potencier
ac5cfee6f1 feature #22313 [Workflow] Move ValidateWorkflowsPass to the Workflow component (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Workflow] Move ValidateWorkflowsPass to the Workflow component

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

Continues #21284

Commits
-------

8fe122fc79 Move ValidateWorkflowsPass to the Workflow component
2017-04-14 16:49:57 -07:00
Robin Chalas
8fe122fc79 Move ValidateWorkflowsPass to the Workflow component 2017-04-14 12:36:38 +02:00
Fabien Potencier
bbe269f666 minor #22410 [FrameworkBundle] Don't create unused alias if the command is public (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Don't create unused alias if the command is public

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

Currently, a public alias is created for any `console.command` tagged service, but this alias is unused if the service is public (as it would be useless).

Commits
-------

cd4a01c247 Don't create unused aliases for public command
2017-04-13 10:38:04 -07:00
Robin Chalas
cd4a01c247 Don't create unused aliases for public command 2017-04-13 18:59:03 +02:00
Fabien Potencier
4f0daa740a feature #22420 [DI] Make tagged abstract services throw earlier (nicolas-grekas)
This PR was squashed before being merged into the 3.3-dev branch (closes #22420).

Discussion
----------

[DI] Make tagged abstract services throw earlier

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

As spotted by @stof in https://github.com/symfony/symfony/pull/22388#issuecomment-293565243, skipping abstract tagged services removes an opportunity to report config mistakes to users.

Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr).
I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic.
To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags.

Commits
-------

388e4b3389 [DI] Make tagged abstract services throw earlier
cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
2017-04-13 08:28:14 -07:00
Fabien Potencier
64b715bb25 bug #22386 [DI] Fix inheriting defaults with instanceof conditionals (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix inheriting defaults with instanceof conditionals

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

Commits
-------

168765da0f [DI] Fix inheriting defaults with instanceof conditionals
2017-04-13 08:01:38 -07:00
Nicolas Grekas
8596b19374 minor #22398 Enhancing integration test to show that "override" tags show up first (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Enhancing integration test to show that "override" tags show up first

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

Relates a bit to #22396, in that I'm clarifying and emphasizing the following types of situations:

```yml
services:
    _instanceof:
        Symfony\Component\Security\Core\Authorization\Voter\VoterInterface:
            tags:
                # you probably shouldn't set priority here, but let's pretend we did
                - { name: security.voter, priority: 100 }

    AppBundle\Security\CoolPersonVoter:
        tags:
            - { name: security.voter, priority: 50 }
```

In the final `Definition`, the tags will appear in this order:
* security.voter, priority 50
* security.voter, priority 100

It works the same for parent-child definitions.

tl;dr; If a service has the same tag multiple times, the one that should be used should appear *earlier* in the Definition. The code already works that way - this test emphasizes it.

Commits
-------

e9b96e5 Enhancing integration test to show that "override" tags always show up first
2017-04-13 16:15:41 +02:00
Nicolas Grekas
388e4b3389 [DI] Make tagged abstract services throw earlier 2017-04-13 15:45:25 +02:00
Nicolas Grekas
8e4e741a8f minor #22417 Add a note about the ServiceLocator class in the changelog (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a note about the ServiceLocator class in the changelog

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

In addition to have `container.service_locator` and `container.service_subscriber` based on, this class is useful on its own as it is the one avoiding the need for having the `Container` class filling this role.

Commits
-------

92994f3 Add a note about the ServiceLocator class in the changelog
2017-04-13 13:49:54 +02:00
Nicolas Grekas
3f8f6468f8 minor #22414 relax FormPass test assertions (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

relax FormPass test assertions

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

Relying on a precalculated hash makes the test very fragile as the hash
value changes with every change we make for some of the DI classes.

Commits
-------

9d73317 relax FormPass test assertions
2017-04-13 13:30:47 +02:00
Robin Chalas
92994f3f94 Add a note about the ServiceLocator class in the changelog 2017-04-13 11:59:51 +02:00
Nicolas Grekas
cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
This reverts commit 207d068a40, reversing
changes made to 4836007172.
2017-04-13 10:36:10 +02:00
Nicolas Grekas
168765da0f [DI] Fix inheriting defaults with instanceof conditionals 2017-04-13 09:57:57 +02:00
Christian Flothmann
9d733177a4 relax FormPass test assertions
Relying on a precalculated hash makes the test very fragile as the hash
value changes with every change we make for some of the DI classes.
2017-04-13 09:22:50 +02:00
Nicolas Grekas
46fc0b9363 Merge branch '3.2'
* 3.2:
  add changelog for the DUMP_OBJECT_AS_MAP flag
  Relax some mocks
2017-04-12 22:43:31 +02:00
Nicolas Grekas
3d9ad54015 minor #22405 [Yaml] add changelog for the DUMP_OBJECT_AS_MAP flag (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] add changelog for the DUMP_OBJECT_AS_MAP flag

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

Adds missing changelog entry for the `DUMP_OBJECT_AS_MAP` flag introduced in #17728.

Commits
-------

8fd3602 add changelog for the DUMP_OBJECT_AS_MAP flag
2017-04-12 22:33:42 +02:00
Fabien Potencier
6fe7b61372 minor #22404 fix remaining risky tests (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

fix remaining risky tests

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

Commits
-------

f6da5dde3e fix remaining risky tests
2017-04-12 12:07:46 -07:00
Christian Flothmann
8fd3602d83 add changelog for the DUMP_OBJECT_AS_MAP flag 2017-04-12 21:06:01 +02:00
Christian Flothmann
f6da5dde3e fix remaining risky tests 2017-04-12 20:55:56 +02:00
Fabien Potencier
5127d1d778 minor #22394 Relax some mocks (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

Relax some mocks

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

We should not use mocks when it's not required - they too often run assertions on internal behavior.
These changes will unlock #22388

Commits
-------

61be73394e Relax some mocks
2017-04-12 11:30:04 -07:00
Nicolas Grekas
61be73394e Relax some mocks 2017-04-12 20:12:51 +02:00
Nicolas Grekas
2c4e186339 fix merge 2017-04-12 19:09:14 +02:00
Nicolas Grekas
3deeb0cb73 Merge branch '3.2'
* 3.2:
  [2.8] Prevent double registrations related to tag priorities
  Prevent double registrations related to tag priorities
  [3.2] Prevent double registrations related to tag priorities
2017-04-12 18:56:48 +02:00
Fabien Potencier
766ae29f85 bug #22401 [3.2] Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[3.2] Prevent double registrations related to tag priorities

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

#22396 and #22399 on 3.2

Commits
-------

ec6a2f9eba [3.2] Prevent double registrations related to tag priorities
2017-04-12 09:53:37 -07:00
Fabien Potencier
79d2c0e2ca Merge branch '2.8' into 3.2
* 2.8:
  [2.8] Prevent double registrations related to tag priorities
  Prevent double registrations related to tag priorities
2017-04-12 09:52:46 -07:00
Fabien Potencier
d564c6ad7d bug #22399 [2.8] Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Prevent double registrations related to tag priorities

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

#22396 on 2.8

Commits
-------

2be5821743 [2.8] Prevent double registrations related to tag priorities
2017-04-12 09:50:09 -07:00
Fabien Potencier
c839532f5c Merge branch '2.7' into 2.8
* 2.7:
  Prevent double registrations related to tag priorities
2017-04-12 09:49:00 -07:00
Nicolas Grekas
2be5821743 [2.8] Prevent double registrations related to tag priorities 2017-04-12 18:45:59 +02:00
Fabien Potencier
92eb9e1616 bug #22396 Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Prevent double registrations related to tag priorities

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

The current logic is inconsistent, and allows the same id to be used several times. This makes the first explicit priority to always win.

Commits
-------

6764dcdf39 Prevent double registrations related to tag priorities
2017-04-12 09:30:10 -07:00
Nicolas Grekas
f24a1a89a0 Merge branch '3.2'
* 3.2:
  use risky tests free version of the Form component
2017-04-12 17:55:13 +02:00
Nicolas Grekas
81409e1d94 minor #22400 [TwigBridge] use risky tests free version of the Form component (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[TwigBridge] use risky tests free version of the Form component

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

Should make tests on the `3.2` branch pass again.

Commits
-------

e581fda use risky tests free version of the Form component
2017-04-12 17:54:51 +02:00
Nicolas Grekas
6764dcdf39 Prevent double registrations related to tag priorities 2017-04-12 17:35:56 +02:00
Nicolas Grekas
ec6a2f9eba [3.2] Prevent double registrations related to tag priorities 2017-04-12 17:25:29 +02:00
Christian Flothmann
e581fdadea use risky tests free version of the Form component 2017-04-12 17:22:35 +02:00
Ryan Weaver
e9b96e5f44 Enhancing integration test to show that "override" tags always show up first 2017-04-12 10:34:49 -04:00
Fabien Potencier
4e13eeecfb bug #22390 [FrameworkBundle] Fix serializer aliases (jvasseur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix serializer aliases

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

Fix serializer aliases introduced in #22098

Commits
-------

22e72d0a62 Fix serializer aliases
2017-04-12 07:20:30 -07:00
Fabien Potencier
9541264c2b bug #22393 [TwigBundle] Fix log message formatting in exception views (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] Fix log message formatting in exception views

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

| __Before__      |
| ------------- |
| ![before](http://image.prntscr.com/image/984005e787ea4418a75e76d968f3af14.png)   |

| __After__        |
| ------------- |
| ![after](http://image.prntscr.com/image/608331f67030455d9bb1eaeec2bc4eb8.png)   |

Commits
-------

0f9660b854 Fix log message formatting in exception views
2017-04-12 07:18:23 -07:00
Fabien Potencier
0c19ca8af9 feature #22384 [DI] Replace autowiring BC break by regular deprecation (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Replace autowiring BC break by regular deprecation

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

It happens that doing so is really easy now. And as discussed in #22295, this should be more friendly to our users.

Commits
-------

0ed087d972 [DI] Replace autowiring BC break by regular deprecation
2017-04-12 07:16:24 -07:00
Fabien Potencier
2f885ccc4c fail when detecting risky tests 2017-04-12 07:15:58 -07:00
Fabien Potencier
03acba5341 Merge branch '3.2'
* 3.2:
  fail when detecting risky tests
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:14:56 -07:00
Fabien Potencier
0834f133ec fail when detecting risky tests 2017-04-12 07:14:23 -07:00
Fabien Potencier
d7a0737d72 Merge branch '2.8' into 3.2
* 2.8:
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:13:17 -07:00
Fabien Potencier
6edd08d7c5 fail when detecting risky tests 2017-04-12 07:11:35 -07:00
Fabien Potencier
d362bb1936 Merge branch '2.7' into 2.8
* 2.7:
  fail when detecting risky tests
2017-04-12 07:07:15 -07:00
Fabien Potencier
cff1842786 minor #22387 fail when detecting risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fail when detecting risky tests

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

The `--fail-on-risky` option is available since sebastianbergmann/phpunit@7e06a82806 which was first released with PHPUnit 5.2.

Commits
-------

3792ee6c93 fail when detecting risky tests
2017-04-12 07:03:43 -07:00
Fabien Potencier
48b048d864 feature #22383 added a more specialized exception for a better error message (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

added a more specialized exception for a better error message

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

When trying to load a resource, it is very interesting to understand why a resource cannot be loaded. Especially when you get `Cannot load resource "../src/Controller/".`... when the real error is that annotation support is disabled. This PR adds more information in that case.

Commits
-------

aeb9bffa8f added a more specialized exception for a better error message
2017-04-12 06:59:41 -07:00
Robin Chalas
0f9660b854 Fix log message formatting in exception views 2017-04-12 13:47:16 +02:00
Jérôme Vasseur
22e72d0a62 Fix serializer aliases 2017-04-12 12:44:19 +02:00
Christian Flothmann
3792ee6c93 fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Nicolas Grekas
0ed087d972 [DI] Replace autowiring BC break by regular deprecation 2017-04-11 23:14:08 +02:00