Commit Graph

25042 Commits

Author SHA1 Message Date
Robin Chalas
8fe122fc79 Move ValidateWorkflowsPass to the Workflow component 2017-04-14 12:36:38 +02:00
Fabien Potencier
5d83502ab5 bug #22424 [Debug] Set exit status to 255 on error (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Set exit status to 255 on error

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (no easily testable in fact)
| Fixed tickets | #20775
| License       | MIT
| Doc PR        | -

Commits
-------

67e249dc81 [Debug] Set exit status to 255 on error
2017-04-13 15:15:37 -07:00
Dany Maillard
28332afb38 Add trhows PHPDoc in Application::run 2017-04-13 23:07:15 +02:00
Nicolas Grekas
67e249dc81 [Debug] Set exit status to 255 on error 2017-04-13 22:03:51 +02:00
Fabien Potencier
f5609e809c minor #22427 [PropertyInfo] Remove a useless call to count() in SerializerExtractor (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Remove a useless call to count() in SerializerExtractor

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

Commits
-------

7a8a72ddbf [PropertyInfo] Remove a useless call to count() in SerializerExtractor
2017-04-13 13:03:47 -07:00
Kévin Dunglas
4d2c454fad
[HttpFoundation] Store IANA's RNG files in the repository 2017-04-13 21:16:53 +02:00
Kévin Dunglas
7a8a72ddbf
[PropertyInfo] Remove a useless call to count() in SerializerExtractor 2017-04-13 21:08:13 +02:00
Kévin Dunglas
b190ec241e
[PropertyInfo] Prevent returning int values in some cases. 2017-04-13 21:00:55 +02:00
Robin Chalas
cd4a01c247 Don't create unused aliases for public command 2017-04-13 18:59:03 +02:00
Grégoire Pineau
9960b7e1d4 [FrameworkBundle][Console][EventDispatcher] Fixed debug:event command 2017-04-13 18:24:39 +02:00
Fabien Potencier
5742958a49 minor #22418 [HttpFoundation] Fix getClientIp @return docblock (e-moe)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix getClientIp @return docblock

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

Commits
-------

af3424fb95 [HttpFoundation] Fix getClientIp @return docblock
2017-04-13 08:44:20 -07:00
Fabien Potencier
eff4feb7a1 minor #22411 [Console] Add @throws PHPDoc in Command::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add @throws PHPDoc in Command::run()

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

Commits
-------

7489a14656 Add @throws phpdoc
2017-04-13 08:31:13 -07: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
Grégoire Pineau
004751c5e8 [FrameworkBundle][Workflow] Deprecate the default type of a workflow
Before this patch, the default type is "workflow". Most of the time a
"state_machine" is better because it's simpler and it involves less
knowledge to be able to use it.

So this patch deprecate a missing type in Symfony 3.3. And In Symfony
4.0 the default value will become "state_machine".
2017-04-13 16:36:11 +02: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
Nikolay Labinskiy
af3424fb95 [HttpFoundation] Fix getClientIp @return docblock 2017-04-13 14:19:24 +03: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
Dany Maillard
7489a14656 Add @throws phpdoc 2017-04-13 00:55:15 +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
Christian Flothmann
53ad49b4ef unify PHPUnit config files
* add XML namespace attributes
* remove attributes using default values
* remove unknown `syntaxCheck` option
2017-04-12 21:20:43 +02: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
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
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
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
Fabien Potencier
aeb9bffa8f added a more specialized exception for a better error message 2017-04-11 13:45:43 -07:00
Nicolas Grekas
9fdd36f23d Merge branch '3.2'
* 3.2:
  Fix bad merge
2017-04-11 22:43:03 +02:00
Nicolas Grekas
e71807bc60 Fix bad merge 2017-04-11 22:42:49 +02:00
Nicolas Grekas
6491fd5854 Merge branch '3.2'
* 3.2:
  Allow terminal dimensions to be set to 0 (unbounded)
  [Cache] Remove exception false-positive from FilesystemAdapterTrait
  fix risky tests
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:40:10 +02:00
Fabien Potencier
5b4091ed7c bug #22372 [DI] Allow using parameters in "prototype" resource paths (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow using parameters in "prototype" resource paths

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

Commits
-------

d3fc86c709 [DI] Allow using parameters in "prototype" resource paths
2017-04-11 11:36:38 -07:00
Nicolas Grekas
a2bd375f60 Merge branch '2.8' into 3.2
* 2.8:
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:36:00 +02:00
Nicolas Grekas
0bc5eea71e Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:34:35 +02:00
Fabien Potencier
bca09e4933 bug #22374 [Cache] Remove exception false-positive from FilesystemAdapterTrait (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Remove exception false-positive from FilesystemAdapterTrait

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

As reported in the linked issue, there seem to be a race condition in FilesystemAdapterTrait (maybe related to realpath cache?).

Let's remove that exception: if the mkdir really fails, the error will be logged later on when a cache entry will be written (or succeed if the race is over.)

Commits
-------

a756db78d0 [Cache] Remove exception false-positive from FilesystemAdapterTrait
2017-04-11 11:23:14 -07:00
Nicolas Grekas
d3fc86c709 [DI] Allow using parameters in "prototype" resource paths 2017-04-11 20:16:57 +02:00
Fabien Potencier
8d34959fe9 minor #22380 fix risky tests (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

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

Commits
-------

9125911668 fix risky tests
2017-04-11 09:38:31 -07:00
Fabien Potencier
9950b90bb6 feature #22356 [DI] Rework config hierarchy: defaults > instanceof > service config (weaverryan, nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Rework config hierarchy: defaults > instanceof > service config

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

Replaces #22294.
The main change is that ChildDefinition does not have "instanceof" applied anymore. All the complexity of the pass came from the merging logic required to deal with them. But in fact, we'd better not have any such logic and just not apply "instanceof" to ChildDefinition (but have them inherit from their parents with the usual logic).

Commits
-------

6d6116b920 Adding an integration test for the hirarchy of defaults, instanceof, child, parent definitions
ab86457b12 [DI] Rework config hierarchy: defaults > instanceof > service config
cbaee55223 [DI] Track changes at the "Definition" level
2017-04-11 09:32:21 -07:00
Craig Duncan
4c1b001891 Allow terminal dimensions to be set to 0 (unbounded) 2017-04-11 16:41:42 +01:00
Fabien Potencier
44008e8a98 minor #22378 CS fixes (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

CS fixes

| 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

Commits
-------

e9ce2687de CS fixes
2017-04-11 08:25:15 -07:00
Fabien Potencier
e904ab8cbe bug #22376 [FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Use findDefinition() instead of getDefinition() on aliases

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

The services for which `has()` is called might be aliases at this point so `getDefinition()` gives an exception, I ran into by executing this pass but not the removing ones (skipping ReplaceAliasByActualDefinitionPass) while working on https://github.com/symfony/symfony/issues/16388. Let's make it safe to use independently.

Commits
-------

41f3d1f166 Use findDefinition() instead of getDefinition() after calling has()
2017-04-11 08:18:29 -07:00
Robin Chalas
e9ce2687de CS fixes 2017-04-11 17:15:30 +02:00
Ryan Weaver
6d6116b920 Adding an integration test for the hirarchy of defaults, instanceof, child, parent definitions 2017-04-11 16:40:02 +02:00
Fabien Potencier
a6dbc39112 bug #22364 [Dotenv] Throwing an error when loading nothing (sanpii)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Dotenv] Throwing an error when loading nothing

| 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

This is a quick fix to prevent anoying when you follow a tutorial using another dotenv component. For example, this code uses [vlucas/phpdotenv](https://packagist.org/packages/vlucas/phpdotenv):

```php
$dotenv = new Dotenv\Dotenv(__DIR__.'/../');
$dotenv->load();
```

Silently failed with symfony/dotenv.

Commits
-------

911bc68991 [Dotenv] Throwing an error when loading nothing
2017-04-11 07:29:46 -07:00
Robin Chalas
41f3d1f166 Use findDefinition() instead of getDefinition() after calling has() 2017-04-11 16:03:41 +02:00
Sanpi
911bc68991 [Dotenv] Throwing an error when loading nothing 2017-04-11 15:47:47 +02:00
Nicolas Grekas
a756db78d0 [Cache] Remove exception false-positive from FilesystemAdapterTrait 2017-04-11 15:28:15 +02:00
Christian Flothmann
9125911668 fix risky tests 2017-04-11 11:53:09 +02:00
Nicolas Grekas
35afac00a0 bug #22368 [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method (jordscream)
This PR was squashed before being merged into the 3.3-dev branch (closes #22368).

Discussion
----------

[Bridge] [Twig] get and flush only flash sessions you need in getFlashes method

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | #22359
| License       | MIT
| Doc PR        | symfony/symfony-docs

@xabbuh comments about empty array to return

Commits
-------

33b044a [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method
2017-04-11 11:36:34 +02:00
Jordan Samouh
33b044adb1 [Bridge] [Twig] get and flush only flash sessions you need in getFlashes method 2017-04-11 11:36:26 +02:00
Christian Flothmann
86b685f617 fix risky tests 2017-04-11 11:19:47 +02:00
Kévin Dunglas
b7ac772994
[FrameworkBundle] Fix web_link.add_link_header_listener definition 2017-04-11 11:15:03 +02:00
Kévin Dunglas
e31341a855
[WebLink] Fix tests 2017-04-11 10:27:21 +02:00
Christian Flothmann
c891413f6c [Yaml] release memory after parsing 2017-04-11 09:50:01 +02:00
Fabien Potencier
8807eaf30b feature #22362 [DI] Populate class of ChildDefinition when its id matches an existing FQCN (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Populate class of ChildDefinition when its id matches an existing FQCN

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

See linked issue for expected DX.
Instead of doing a "continue", let's throw to force the resolution of any ambiguities.
There is a minor potential BC Break, if one uses an ambiguous FQCN as child-definition id in 3.2 or below.
To me, this should be rare, and easy to fix (compile time only).
The DX enhancement this PR provides looks worth it.

> Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.

Commits
-------

3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN
2017-04-10 18:20:21 -07:00
Fabien Potencier
bbb0d5ed42 feature #22239 [Finder] Glob wildcard while using double-star without ending slash (sroze)
This PR was squashed before being merged into the 3.3-dev branch (closes #22239).

Discussion
----------

[Finder] Glob wildcard while using double-star without ending slash

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

This PR allows to use the `Glob::toRegex` method to dump a glob that will match "everything after" while using the double-star without leading slash. `/foo/**` will therefore match `/foo/a` or `/foo/a/b/c` or even `/foo/a/b/c/d.e`.

The use-case for this change is an application allowing its users to match a list of files/folders from such glob pattern.

Happy to add a line in the CHANGELOG and documentation if you feel that would make sense.

Commits
-------

170b0ace2c [Finder] Glob wildcard while using double-star without ending slash
2017-04-10 10:50:33 -07:00
Samuel ROZE
170b0ace2c [Finder] Glob wildcard while using double-star without ending slash 2017-04-10 10:50:31 -07:00
Fabien Potencier
f8e1098712 minor #22342 [Console] Inherit phpdoc from OutputFormatterInterface (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Inherit phpdoc from OutputFormatterInterface

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

Commits
-------

ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-10 10:33:28 -07:00
Fabien Potencier
f7debe8a30 bug #22343 [Dotenv] Throwing an exception when loading a directory (sanpii)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Dotenv] Throwing an exception when loading a directory

| 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

Commits
-------

8b83b58aa5 Throwing an exception when loading a directory
2017-04-10 10:15:08 -07:00
Fabien Potencier
eeb36eb65f bug #22344 [DX] [TwigBundle] Improve default expand states of exception template (curry684)
This PR was squashed before being merged into the 3.3-dev branch (closes #22344).

Discussion
----------

[DX] [TwigBundle] Improve default expand states of exception template

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22334
| License       | MIT

As discussed in #22334 this PR changes the default exception template to more intelligently decide which call stack to initially expand:
- All exceptions are scanned for user code, ignoring the front controller and callbacks
- Only exceptions containing user code are expanded
- If no user code is found the first exception is expanded

Commits
-------

df25691250 [DX] [TwigBundle] Improve default expand states of exception template
2017-04-10 10:12:04 -07:00
Niels Keurentjes
df25691250 [DX] [TwigBundle] Improve default expand states of exception template 2017-04-10 10:12:01 -07:00
Fabien Potencier
dbfea949fe bug #22361 [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect() (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22166
| 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 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
-------

f83f971c3f [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect()
2017-04-10 10:08:49 -07:00
Fabien Potencier
bf7d08d119 [WebLink] fixed composer keyword 2017-04-10 10:04:52 -07:00
Fabien Potencier
5a76834aea feature #22273 Add a new Link component (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #22273).

Discussion
----------

Add a new Link component

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

This a proposal to extract HTTP preloading features introduced in #21478 in their own component.

There are some good reasons to do it:

* HTTP preloading is not (only) about assets: this standalone component could be very useful to replace resources embedding in APIs by HTTP/2 pushes like described in [this article](https://evertpot.com/rest-embedding-hal-http2/) by @evert. In such case, there is no reason to carry the whole asset component for an API.
* There is no dependency nor relation at all between the code of the asset compnent and the one I've added for Preloading features
* It makes the code cleaner (no more optional dependency in the `Asset` Twig extension)

This component would also better fit in HttpFoundation than in Asset. But there is no dependency between it and HttpFoundation and it can easily be used with PSR-7 too, so IMO it better belongs in a standalone component.

Btw, ~~~I plan to add support for prefetching to this component. Except a PR soon.~~~ Prefetching and prerendering support added in this PR.

ping @symfony/deciders

Commits
-------

053de25edf Add a new Link component
2017-04-10 09:55:53 -07:00
Kévin Dunglas
053de25edf Add a new Link component 2017-04-10 09:55:52 -07:00
Nicolas Grekas
3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN 2017-04-10 18:46:19 +02:00
Nicolas Grekas
ab86457b12 [DI] Rework config hierarchy: defaults > instanceof > service config 2017-04-10 18:14:18 +02:00
Ryan Weaver
cbaee55223 [DI] Track changes at the "Definition" level 2017-04-10 18:14:17 +02:00
Nicolas Grekas
f83f971c3f [HttpKernel et al.] Move DataCollector::cloneVar() to lateCollect() 2017-04-10 18:00:26 +02:00
Fabien Potencier
aada1a14cc bug #22358 [DI] Fix named args overridding (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix named args overridding

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

(The exception check in ResolveDefinitionTemplatesPass is not done in ResolveNamedArgumentsPass.)

Commits
-------

0c030d92f9 [DI] Fix named args overridding
2017-04-10 08:25:06 -07:00
Fabien Potencier
6d8c53ee76 added a comment in a test 2017-04-10 08:21:06 -07:00
Fabien Potencier
63592a646c bug #22352 [HttpFoundation] Add use_strict_mode in validOptions for session (sstok)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add `use_strict_mode` in validOptions for session

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

PHP ini `session.use_strict_mode` was added in PHP 5.5.2 so I didn't target 2.8 as this still uses PHP 5.3. https://secure.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode

Commits
-------

130ee327d4 Add `use_strict_mode` in validOptions for session
2017-04-10 08:18:38 -07:00
Jordan Samouh
ff82cb29bb [Bridge] [Twig] AppVariable: get and flush only flash sessions you need in getFlashes method 2017-04-10 16:49:57 +02:00
Nicolas Grekas
0c030d92f9 [DI] Fix named args overridding 2017-04-10 16:38:35 +02:00
Kévin Dunglas
72d25ccca7
[HttpFoundation] Fix and test status codes according to IANA's data 2017-04-10 16:36:56 +02:00
Christian Flothmann
bc93526731 Merge branch '3.2'
* 3.2:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  Moved ->setDate() before the deprecation handling.
  [Debug] Fix php notice
  [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-10 08:31:22 +02:00
Christian Flothmann
d41a3a56c2 Merge branch '2.8' into 3.2
* 2.8:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  [Debug] Fix php notice
  [VarDumper] Relax tests to adapt for php 7.1rc4
2017-04-09 22:04:44 +02:00
Christian Flothmann
b89ed60442 Merge branch '2.7' into 2.8
* 2.7:
  don't keep internal state between parser runs
  Add \Traversable typehint to phpdoc
  [ExpressionLanguage] Avoid dependency on ctype
  [Debug] Fix php notice
2017-04-09 20:13:48 +02:00
Sebastiaan Stok
130ee327d4
Add use_strict_mode in validOptions for session 2017-04-09 18:30:35 +02:00
Fabien Potencier
34655e69dd bug #22351 [Yaml] don't keep internal state between parser runs (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] don't keep internal state between parser runs

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

Commits
-------

faf671db0f don't keep internal state between parser runs
2017-04-09 07:34:06 -07:00
Christian Flothmann
faf671db0f don't keep internal state between parser runs 2017-04-09 10:04:00 +02:00
Ben Scott
707f74b50f [FrameworkBundle] Add autowiring alias for Stopwatch 2017-04-08 13:34:08 +01:00
Sanpi
8b83b58aa5 Throwing an exception when loading a directory 2017-04-07 19:12:03 +02:00
MetalArend
5310f11418 Add \Traversable typehint to phpdoc 2017-04-07 10:05:02 -07:00
Fabien Potencier
7b8409ad37 feature #22315 Add Kernel::getProjectDir() (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add Kernel::getProjectDir()

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

`Kernel::getRootDir()` is misleading. It returns the path where `AppKernel.php` is stored, which is `app/` in Symfony 2/3, but `src/` in Symfony 4. But most of the time, we are using `getRootDir()` to get the project root dir, so `%kernel.root_dir%/../` is a common idiom.

Changing the value of `getRootDir()` would be a hard BC break, so I propose to create a new method, `getProjectDir()` to "replace" `getRootDir()` gradually.

Commits
-------

1f680ccb2d added Kernel::getProjectDir()
2017-04-07 09:56:33 -07:00
Fabien Potencier
49ae724e9c minor #22326 [DI] Enhance wording of autowiring exceptions (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance wording of autowiring exceptions

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

> Cannot autowire service "j": argument "$i" of method "Symfony\Component\DependencyInjection\Tests\Compiler\J::__construct()" references class "Symfony\Component\DependencyInjection\Tests\Compiler\I" but no such service exists. You should maybe alias this class to the existing "i" service; or type-hint against interface "Symfony\Component\DependencyInjection\Tests\Compiler\IInterface" instead.

Commits
-------

da792b2ff7 [DI] Enhance wording of autowiring exceptions
2017-04-07 09:43:12 -07:00
Michal Čihař
81de5fef4b [ExpressionLanguage] Avoid dependency on ctype
This avoids ExpressionLanguage library dependency on ctype.
2017-04-07 09:40:11 -07:00
Fabien Potencier
f04c0b5f04 bug #22340 [HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Skip ContainerAwareInterface::setContainer from service_arguments actions registration

| 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

As it would never be used

Commits
-------

ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration
2017-04-07 07:44:54 -07:00
Roland Franssen
ff3cb9cb27 [Console] Inherit phpdoc from OutputFormatterInterface 2017-04-07 16:02:07 +02:00
Robin Chalas
ad59e1804f Skip ContainerAwareInterface::setContainer from service_arguments actions registration 2017-04-07 15:58:30 +02:00
Nicolas Grekas
325e61dbbe bug #22304 Moved $this->setDate() before the deprecation handling. (mpdonadio)
This PR was squashed before being merged into the 3.2 branch (closes #22304).

Discussion
----------

Moved $this->setDate() before the deprecation handling.

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- 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 | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

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

https://github.com/symfony/symfony/pull/22036 merged the patch into the wrong place; the `$this->setDate()` happens after the deprecation handling, so it does not always get called.

See also https://www.drupal.org/node/2712647?page=1#comment-12025349

Commits
-------

b6df4e7 Moved ->setDate() before the deprecation handling.
2017-04-07 14:28:10 +02:00
Matthew Donadio
b6df4e7834 Moved ->setDate() before the deprecation handling. 2017-04-07 14:27:40 +02:00
Nicolas Grekas
d48fae7f8c bug #22307 [Debug] Fix php notice (enumag)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #22307).

Discussion
----------

[Debug] Fix php notice

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

Of course autoloading of an empty string should not actually happen (fixed that in https://github.com/twigphp/Twig/pull/2438) but if it does happen it should not throw a php notice.

```
Notice: Uninitialized string offset 0
```

Commits
-------

e333a1a [Debug] Fix php notice
2017-04-07 14:20:28 +02:00
Jáchym Toušek
e333a1a86e [Debug] Fix php notice 2017-04-07 14:16:45 +02:00
Nicolas Grekas
3672c01e3c [VarDumper] Relax tests to adapt for php 7.1rc4 2017-04-07 11:49:35 +02:00
Robin Chalas
717fa85b91 Resolve invokable controllers short notations using ServiceValueResolver 2017-04-07 11:28:11 +02:00
Nicolas Grekas
da792b2ff7 [DI] Enhance wording of autowiring exceptions 2017-04-07 10:22:28 +02:00
Nicolas Grekas
549af739af Merge branch '3.2'
* 3.2:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:15:11 +02:00
Nicolas Grekas
db31e80f0e Merge branch '2.8' into 3.2
* 2.8:
  [HttpFoundation] Fix transient tests
  [DI] Fix second auto-registration
2017-04-07 08:13:01 +02:00
Fabien Potencier
3f07e10183 feature #22314 [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors

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

Inspecting container failures without the logs is hard, let's have them at hand. This should not be the responsibility of a compiler pass.

Commits
-------

a8b83340bb [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors
2017-04-06 20:07:22 -07:00
Fabien Potencier
abb8d2bebb feature #22316 [WebServerBundle] added a way to dump current status host/port/address when getting the status (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] added a way to dump current status host/port/address when getting the status

| 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

Now that the web server can run on an automatically chosen port, it's more complex to integrate it into tests (I want to run some functional tests locally).

The `server:status` command gives this information, but not in a machine-readable way.

I propose to add a `--filter` flag to fix that:

`./bin/console server:status --filter=address`

Commits
-------

b417b62a92 [WebServerBundle] added a way to dump current status host/port/address when getting the status
2017-04-06 16:46:08 -07:00
Nicolas Grekas
9f7a6bb5e5 [HttpFoundation] Fix transient tests 2017-04-07 00:17:40 +02:00
Nicolas Grekas
6c0f5e3a6f [DI] Reporte cascades of autowiring error messages 2017-04-07 00:09:43 +02:00
Robin Chalas
97129fc611 Fix fatal error when logging console.error without a command 2017-04-06 21:41:52 +02:00
Nicolas Grekas
a8b83340bb [HttpKernel][FrameworkBundle] Dump container logs in Kernel, to have them also on errors 2017-04-06 19:59:10 +02:00
Robin Chalas
dc2fe604a2 [HttpKernel] Fix missing use statement in RegisterControllerArgumentLocatorsPass 2017-04-06 19:34:08 +02:00
Fabien Potencier
b417b62a92 [WebServerBundle] added a way to dump current status host/port/address when getting the status 2017-04-06 09:46:55 -07:00
Fabien Potencier
1f680ccb2d added Kernel::getProjectDir() 2017-04-06 09:25:05 -07:00
Nicolas Grekas
c02de845e7 [DI] Fix second auto-registration 2017-04-06 16:56:25 +02:00
Nicolas Grekas
9c53b3deb0 [DI] Restrict autowired registration to "same-vendor" namespaces 2017-04-06 11:28:30 +02:00
Fabien Potencier
ab93feae3f feature #22295 [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services

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

(patch best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/22295/files?w=1).)

"By-id" autowiring, as introduced in #22060 is free from all the issues that "by-type" autowiring has:
- it has no magic and requires explicit type<>id matching (*vs* using reflection on all services to cherry-pick *the* one that matches some type-hint *at that time*, which is fragile)
- it is free from any ambiguities (*vs* the Damocles' sword of breaking config just by enabling some unrelated bundle)
- it is easily introspected: just look at DI config files (*vs* inspecting the type-hierarchy of all services + their type-hints)
- ~~it is side-effect free, thus plain predictable (*vs* auto-registration of discovered types as services)~~
- it plays nice with deprecated services or classes (see #22282)
- *etc.*

Another consideration is that any "by-type" autowired configuration is either broken (because of future ambiguities) - or equivalent to a "by-id" configuration (because resolving ambiguities *means* adding explicit type<>id mappings.) For theoreticians, we could say that "by-id" autowiring is the asymptotic limit of "by-type" autowiring :-)

For all these reasons - and also because it reduces the complexity of the code base - I propose to change the behavior and only support "by-id" autowiring in 3.3. This will break some configurations relying on "by-type" autowiring. Yet the break will only happen at compile-time, which means this won't *silently* break any apps. For all core Symfony services, they will work out of the box thanks to #22098 *et al.* For the remaining services, fixing ones config should be pretty straightforward: just follow the suggestions provided by the exception messages. If they are fine to you, you'll end up with the exact same config in the end. And maybe you'll spot issues that were hidden previously.

Commits
-------

cc5e582dcf [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services
2017-04-05 16:31:59 -07:00
Fabien Potencier
d33c0ee4d1 feature #20951 Redesigned the exception pages (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #20951).

Discussion
----------

Redesigned the exception pages

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

Here are some before/after screenshots:

| Before | After
| --- | ---
| ![exception-before-1](https://cloud.githubusercontent.com/assets/73419/21258148/f8fd6482-c37b-11e6-9efe-1bcf7b323c0f.png) | ![exception-after-1](https://cloud.githubusercontent.com/assets/73419/21258156/016059cc-c37c-11e6-8bab-80456189d614.png)

| Before | After
| --- | ---
| ![exception-before-2](https://cloud.githubusercontent.com/assets/73419/21258171/11198a46-c37c-11e6-8a28-ae45e19e3eaf.png) | ![exception-after-2](https://cloud.githubusercontent.com/assets/73419/21258223/4cb9ac66-c37c-11e6-93db-0db2c204dc0b.png)

| Before | After
| --- | ---
| ![exception-before-3](https://cloud.githubusercontent.com/assets/73419/21258239/5a0747ac-c37c-11e6-923e-564322e862a6.png) | ![exception-after-3](https://cloud.githubusercontent.com/assets/73419/21258246/62ad8b00-c37c-11e6-8838-3c1824c18287.png)

---

And here is the new design in action because everything is very dynamic and you can click anywhere to reveal/collapse things:

![exception-in-action](https://cloud.githubusercontent.com/assets/73419/21258261/7445f140-c37c-11e6-9318-f3807fe38689.gif)

Commits
-------

9d0c26377f Redesigned the exception pages
2017-04-05 16:04:34 -07:00
Javier Eguiluz
9d0c26377f Redesigned the exception pages 2017-04-05 16:04:30 -07:00
Nicolas Grekas
cc5e582dcf [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services 2017-04-05 23:48:42 +02:00
Nicolas Grekas
12bb392a39 Merge branch '3.2'
* 3.2:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Prevent AutowirePass from triggering irrelevant deprecations
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:43:54 +02:00
Nicolas Grekas
32f264f3c8 Merge branch '2.8' into 3.2
* 2.8:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Prevent AutowirePass from triggering irrelevant deprecations
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:38:45 +02:00
Nicolas Grekas
8d0cfa444a Merge branch '2.7' into 2.8
* 2.7:
  move provider after test
  update dataProvider function name
  cast substr result to string and remove empty function use
  rename dataset provider
  Add a test to prevent future regressions
  Switch to `empty` native function to check emptiness
  remove non relevant test case
  Switch to `is_string` native method
  Remove unnecessary parentheses
  Add a test case to prevent future regressions
  Move empty condition in return statement
  Use LF line separator
  fix coding standard to comply with fabbot
  Remove malformed EmailValidatorTest + Update UrlValidator test
  Add empty check on host in other methods + add unit tests
  [Validator] Allow checkMX() to return false when $host is empty
  [DI] Fix the xml schema
  [Translation] avoid creating cache files for fallback locales.
2017-04-05 23:34:00 +02:00
Fabien Potencier
457174dad9 feature #21919 [Form] Deprecated usage of "choices" option in sub types (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] Deprecated usage of "choices" option in sub types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ~

Follows #21880 and the discussion in #20771.

Commits
-------

b5b56fcbac [Form] Deprecated usage of "choices" option in sub types
2017-04-05 11:14:26 -07:00
apetitpa
7104c4e849 move provider after test 2017-04-05 11:10:47 -07:00
apetitpa
c07fb416ff update dataProvider function name 2017-04-05 11:10:47 -07:00