Commit Graph

37120 Commits

Author SHA1 Message Date
Christophe Coevoet
d8fb1b97c9 Remove reference to the test container after kernel shutdown
This reference is not working anymore, as the main container was reset and
cleaned. Keeping a reference to the test container will prevent collecting
the object graph.
2018-05-23 12:38:43 +02:00
Jérôme
3e0a0f4cb5
Fix missing use in UserInterface
Fix missing Role use used for getRoles return type.
2018-05-23 12:02:33 +02:00
Alessandro Chitolina
0ecaefe179
[HttpKernel] fix deprecation in AbstractTestSessionListener 2018-05-23 10:30:03 +02:00
Peter Kokot
a7a1325eab [Validator] Update sl translation 2018-05-23 08:22:59 +02:00
Sergey Rabochiy
e36099503f [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING 2018-05-23 12:02:55 +07:00
Maxime Steinhausser
c2f15afdc2 bug #27341 [WebProfilerBundle] Fixed validator/dump trace CSS (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fixed validator/dump trace CSS

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

**Before**
![validator_profiler_before](https://user-images.githubusercontent.com/2028198/40375748-77184ba0-5dba-11e8-8cb6-9a9acdadf34a.png)

**After**
![validator_after](https://user-images.githubusercontent.com/2028198/40375759-803f2046-5dba-11e8-9434-c3e4c6842d3a.png)

Commits
-------

607529202d Fixed content trace CSS in profiler
2018-05-22 19:17:49 +02:00
Yonel Ceruto
607529202d Fixed content trace CSS in profiler 2018-05-22 13:11:26 -04:00
Nicolas Grekas
388737232b Merge branch '3.4' into 4.0
* 3.4:
  [Form] fix tests on old phpunit versions
  [FrameworkBundle] fix typo in CacheClearCommand
  bumped Symfony version to 3.4.11
  updated VERSION for 3.4.10
  updated CHANGELOG for 3.4.10
  fixed test
2018-05-22 15:00:37 +02:00
Nicolas Grekas
614ffde9e5 minor #27338 [Form] fix tests on old phpunit versions (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix tests on old phpunit versions

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

Should make appveyor green.

Commits
-------

208d1d1306 [Form] fix tests on old phpunit versions
2018-05-22 14:58:23 +02:00
Nicolas Grekas
208d1d1306 [Form] fix tests on old phpunit versions 2018-05-22 14:52:11 +02:00
Nicolas Grekas
8e20ab5dd0 bug #27337 [FrameworkBundle] fix typo in CacheClearCommand (emilielorenzo)
This PR was merged into the 3.4 branch.

Discussion
----------

 [FrameworkBundle] fix typo in CacheClearCommand

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

vboxsf is the correct name, see e.g. https://help.ubuntu.com/community/VirtualBox/SharedFolders

Commits
-------

b1ec831cce  [FrameworkBundle] fix typo in CacheClearCommand
2018-05-22 14:27:57 +02:00
Emilie Lorenzo
b1ec831cce
[FrameworkBundle] fix typo in CacheClearCommand 2018-05-22 12:57:49 +02:00
Fabien Potencier
7fb7cf26ad bug #27292 [Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance (dunglas)
This PR was squashed before being merged into the 4.1 branch (closes #27292).

Discussion
----------

[Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/22150#discussion_r188674031
| License       | MIT
| Doc PR        | todo

This PR fixes and improves [RFC 7807](https://tools.ietf.org/html/rfc7807#section-3.2) compliance of `ConstraintViolationListNormalizer` (introduced in 4.1):

* As recommended, use a specific namespace for Symfony validation error (`http://symfony.com/doc/current/validation.html`, because it already exists and gives information about the error.
* Allow to set all properties defined in the RFC using the serialization context
* Remove the `detail` key if no detail is provided (according to the spec)
* Change the Symfony specific extension to use the same terminology than the RFC itself (type and title)
* Use the proper `urn:uuid` scheme (RFC 4122) for the UUID code (more standard, and improve hypermedia capabilities).

ping @teohhanhui

Commits
-------

3c789c610a [Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance
2018-05-21 17:32:37 +02:00
Kévin Dunglas
3c789c610a [Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance 2018-05-21 17:32:31 +02:00
Fabien Potencier
72fb10057f bumped Symfony version to 4.1.0 2018-05-21 16:30:52 +02:00
Fabien Potencier
b5608f4bd8
Merge pull request #27331 from fabpot/release-4.1.0-BETA2
released v4.1.0-BETA2
2018-05-21 16:28:07 +02:00
Fabien Potencier
ae8513b01c updated VERSION for 4.1.0-BETA2 2018-05-21 16:27:45 +02:00
Fabien Potencier
c577609a66 updated CHANGELOG for 4.1.0-BETA2 2018-05-21 16:27:36 +02:00
Fabien Potencier
47529b51e4 bumped Symfony version to 4.0.11 2018-05-21 16:04:59 +02:00
Fabien Potencier
bcb589c901
Merge pull request #27330 from fabpot/release-4.0.10
released v4.0.10
2018-05-21 16:02:48 +02:00
Fabien Potencier
1313ba3f46 updated VERSION for 4.0.10 2018-05-21 16:02:31 +02:00
Fabien Potencier
c5dc846806 updated CHANGELOG for 4.0.10 2018-05-21 16:02:26 +02:00
Fabien Potencier
52270d1e5a bumped Symfony version to 3.4.11 2018-05-21 16:00:59 +02:00
Fabien Potencier
816bf5030e
Merge pull request #27329 from fabpot/release-3.4.10
released v3.4.10
2018-05-21 15:44:23 +02:00
Fabien Potencier
7be0b084a5 updated VERSION for 3.4.10 2018-05-21 15:44:03 +02:00
Fabien Potencier
56c711fd6e updated CHANGELOG for 3.4.10 2018-05-21 15:43:55 +02:00
Fabien Potencier
6d4de55666 bumped Symfony version to 2.8.41 2018-05-21 15:43:22 +02:00
Fabien Potencier
901a4fb385
Merge pull request #27328 from fabpot/release-2.8.40
released v2.8.40
2018-05-21 15:17:42 +02:00
Fabien Potencier
ca80b59dc1 updated VERSION for 2.8.40 2018-05-21 15:17:29 +02:00
Fabien Potencier
b9ff0b0124 updated CHANGELOG for 2.8.40 2018-05-21 15:17:24 +02:00
Fabien Potencier
84bba75ad1 bumped Symfony version to 2.7.48 2018-05-21 13:56:57 +02:00
Fabien Potencier
f629de3af2
Merge pull request #27327 from fabpot/release-2.7.47
released v2.7.47
2018-05-21 13:48:51 +02:00
Fabien Potencier
e55c38be00 updated VERSION for 2.7.47 2018-05-21 13:48:33 +02:00
Fabien Potencier
fb1aea810e update CONTRIBUTORS for 2.7.47 2018-05-21 13:48:28 +02:00
Fabien Potencier
e559215fcf updated CHANGELOG for 2.7.47 2018-05-21 13:47:41 +02:00
Fabien Potencier
440bd7ea50 fixed test 2018-05-21 13:44:24 +02:00
Fabien Potencier
7cb6e61f77 Merge branch '4.0' into 4.1
* 4.0:
  fixed bad merge
2018-05-21 13:08:00 +02:00
Fabien Potencier
dff61b82ff fixed bad merge 2018-05-21 13:07:53 +02:00
Fabien Potencier
389092a6a9 Merge branch '4.0' into 4.1
* 4.0:
  removed obsolete tests
2018-05-21 12:59:05 +02:00
Fabien Potencier
2ce15f9179 removed obsolete tests 2018-05-21 12:58:57 +02:00
Fabien Potencier
f9183db863 Merge branch '4.0' into 4.1
* 4.0:
  fixed bad merge
2018-05-21 12:48:43 +02:00
Fabien Potencier
f2419ddda6 fixed bad merge 2018-05-21 12:48:24 +02:00
Fabien Potencier
af4372220c Merge branch '4.0' into 4.1
* 4.0:
  do not mock the session in token storage tests
  [DependencyInjection] resolve array env vars
  Add Occitan plural rule
  Fix security/* cross-dependencies
  [Lock] Skip test if posix extension is not installed
  [DI] Allow defining bindings on ChildDefinition
  use strict compare in url validator
  Disallow illegal characters like "." in session.name
  [HttpKernel] do file_exists() check instead of silent notice
  fix rounding from string
2018-05-21 12:10:11 +02:00
Fabien Potencier
4d8a71d321 Merge branch '3.4' into 4.0
* 3.4:
  do not mock the session in token storage tests
  [DependencyInjection] resolve array env vars
  Add Occitan plural rule
  Fix security/* cross-dependencies
  [Lock] Skip test if posix extension is not installed
  [DI] Allow defining bindings on ChildDefinition
  use strict compare in url validator
  Disallow illegal characters like "." in session.name
  [HttpKernel] do file_exists() check instead of silent notice
  fix rounding from string
2018-05-21 12:09:47 +02:00
Fabien Potencier
793d1fe71a Merge branch '2.8' into 3.4
* 2.8:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Fix security/* cross-dependencies
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 12:06:52 +02:00
Fabien Potencier
e336711cd9 Merge branch '2.7' into 2.8
* 2.7:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 11:59:10 +02:00
Nicolas Grekas
70c70e2d9f bug #27312 Supress deprecation notices thrown when getting private servies from container in tests (arderyp)
This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes #27312).

Discussion
----------

Supress deprecation notices thrown when getting private servies from container in tests

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

This is my first attempt at fixing #27037.

This approach works for me, and I believe it will work globally, but I am not entirely sure if it is the "right" way to do this.  Its not that I think it's the "wrong" way to do it, its just that the `phpunit-bridge` code structure is not the type of code structure that I'm used to, and I'm still new to this project, so I don't know all of the ins and outs, or if there might be a more ideal place to inject the logic we want.

Also, I think my code may be a bit redundant, and I was hoping to get feedback on that.  @nicolas-grekas  (or anyone else), do you think it is safe to simply check if the deprecation message contains the substring ` service is private, getting it from the container...`? if so, then I think we can simply get rid of my `$isNoticeForContainerGetUsage` bit altogether.  If I am understanding things properly, `$isNoticeForContainerGetUsage` will always be true if `$isPrivateServiceNotice` is true, thus we can safely remove the former (as the later is more intuitive, IMO).

The last thing I wanted to confirm was my interpretation of the stack trace, as detailed in my code comment. If the bit after `NOTE` is not correct, this code might not be a proper solution.  I tested various contexts where the error should be suppressed (from within tests) and also where it should not (from within controllers, etc), which is what I based my `NOTE` comment on.

Commits
-------

00603bf010 Supress deprecation notices thrown when getting private servies from container in tests
2018-05-21 11:19:02 +02:00
Philip Ardery
00603bf010 Supress deprecation notices thrown when getting private servies from container in tests 2018-05-21 11:18:50 +02:00
Samuel ROZE
7497ad4a68 feature #27275 [Messenger] Allow to scope handlers per bus (ogizanagi, sroze)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Allow to scope handlers per bus

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo

<img width="970" alt="screenshot 2018-05-15 a 18 34 11" src="https://user-images.githubusercontent.com/2211145/40070551-b36d1f50-586e-11e8-8a44-c6a1503312dd.PNG">

This prevents from dispatching a message in the wrong bus. It works especially great with PSR-4 discovery in DI:

```yaml
command_handlers:
    namespace: App\Message\
    resource: '%kernel.project_dir%/src/Message/*CommandHandler.php'
    tags:
        - { name: messenger.message_handler, bus: command_bus }

query_handlers:
    namespace: App\Message\
    resource: '%kernel.project_dir%/src/Message/*QueryHandler.php'
    tags:
        - { name: messenger.message_handler, bus: query_bus }
```

<details>

<summary>(or in some layered architecture)</summary>

```yaml
command_handlers:
    namespace: App\Application\
    resource: '%kernel.project_dir%/src/Application/**/Handler/*CommandHandler.php'
    tags:
        - { name: messenger.message_handler, bus: command_bus }

query_handlers:
    namespace: App\Application\
    resource: '%kernel.project_dir%/src/Application/**/Handler/*QueryHandler.php'
    tags:
        - { name: messenger.message_handler, bus: query_bus }
```

</details>

---
It also updates (and add tests for) the `DebugCommand`, so we can inspect easily where is supposed to be handled each message.
It's totally optional, and if the bus isn't provided, then it stays available in every bus.

Commits
-------

fd810cdee0 Uses `protected` for test functions
9d658e915e [Messenger] Allow to scope handlers per bus
2018-05-20 10:49:44 +01:00
Samuel ROZE
fd810cdee0 Uses protected for test functions 2018-05-20 10:26:34 +01:00