Commit Graph

43958 Commits

Author SHA1 Message Date
Yonel Ceruto
dc8d470752 feature #33217 [FrameworkBundle][DX] Improving the redirect config when using RedirectController (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][DX] Improving the redirect config when using RedirectController

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

follow-up https://github.com/symfony/symfony/pull/24637

**Before:**
```yaml
# config/routes.yaml
doc_shortcut:
    path: /doc
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
    defaults:
        route: 'doc_page'

legacy_doc:
    path: /legacy/doc
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction
    defaults:
        path: 'https://legacy.example.com/doc'
```

**After:**
```yaml
# config/routes.yaml
doc_shortcut:
    path: /doc
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController
    defaults:
        route: 'doc_page'

legacy_doc:
    path: /legacy/doc
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController
    defaults:
        path: 'https://legacy.example.com/doc'
```

See more before/after configs (XML, PHP) in doc PR https://github.com/symfony/symfony-docs/pull/12189

Commits
-------

0ebb469 Improving redirect config when using RedirectController
2019-08-23 17:47:48 -04:00
Yonel Ceruto
0ebb469269 Improving redirect config when using RedirectController 2019-08-23 17:44:26 -04:00
Nicolas Grekas
123418e125 feature #33015 [HttpClient] Added TraceableHttpClient and WebProfiler panel (jeremyFreeAgent)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Added TraceableHttpClient and WebProfiler panel

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Replace #30494

I added :
- tests
- move debug services declaration in dedicated `http_client_debug.xml` file
- rename stuff to follow messenger data collector stuff
- add CompilerPass to allow bundle to trace their own http client

I didn't add all @nicolas-grekas requests on UI profiler. I will continue to make more PR after this one.

IMO everything looks fine to make a first merge except one strange behavior that I am not sure to get :

When making a sub request :
- we still have the http_client parent data. (like messenger, but currently I did not see anything in code that could avoid that, so different topic I guess).
- The data collected are already "converted" to VarDumper data, so I have errors when trying to do all the unset stuff in the TraceableHttpClient.

Is it for this reason, some collector use `lateCollect` ? Should we also move to lateCollect in the `HttpClientDataCollector` ?

But I'm still new on this subject but glad to help, so feel free to request more changes !

Commits
-------

51640012f1 [HttpClient] Added TraceableHttpClient and WebProfiler panel
2019-08-23 19:17:53 +02:00
Jérémy Romey
51640012f1 [HttpClient] Added TraceableHttpClient and WebProfiler panel
Co-authored-by: Jérémy Romey <jeremy@free-agent.fr>
Co-authored-by: Timothée Barray <tim@amicalement-web.net>
2019-08-23 19:16:53 +02:00
Nicolas Grekas
0fa1246e30 minor #33302 Add more return types after fixing a typo in my script (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add more return types after fixing a typo in my script

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

Commits
-------

65d942010c Add more return types after fixing a typo in my script
2019-08-23 14:17:32 +02:00
Nicolas Grekas
65d942010c Add more return types after fixing a typo in my script 2019-08-23 14:16:45 +02:00
Nicolas Grekas
3456446de5 fix merge 2019-08-23 13:11:38 +02:00
Nicolas Grekas
50bdb42c1a Merge branch '4.3' into 4.4
* 4.3:
  Fix mocks for ImmutableEventDispatcher.
2019-08-23 13:09:49 +02:00
Nicolas Grekas
94bd4023eb Merge branch '3.4' into 4.3
* 3.4:
  Fix mocks for ImmutableEventDispatcher.
2019-08-23 13:09:44 +02:00
Nicolas Grekas
bee347c6f2 minor #33301 [Debug] Remove superfluous deprecation notice (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug] Remove superfluous deprecation notice

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

The whole class has been deprecated meanwhile

Commits
-------

5dd6468ec1 [Debug] Remove superfluous deprecation notice
2019-08-23 13:07:58 +02:00
Robin Chalas
5dd6468ec1 [Debug] Remove superfluous deprecation notice 2019-08-23 12:15:49 +02:00
Nicolas Grekas
1f7250139f minor #33299 [EventDispatcher] Fix mocks for ImmutableEventDispatcher (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Fix mocks for ImmutableEventDispatcher

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

Backport from #33248. This PR fixes mocks that return values that are incompatible with the annotated return type.

Commits
-------

874aaea75f Fix mocks for ImmutableEventDispatcher.
2019-08-23 12:00:53 +02:00
Nicolas Grekas
5255ab89d2 minor #33300 Add missing return annotations on magic methods (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add missing return annotations on magic methods

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

My script had a bug, spotted by reviewing #33267
These annotations express our intention to add real return types in a future major release (likely v6)

Commits
-------

10983fcb17 Add missing return annotations on magic methods
2019-08-23 11:57:17 +02:00
Nicolas Grekas
10983fcb17 Add missing return annotations on magic methods 2019-08-23 10:37:16 +02:00
Alexander M. Turek
874aaea75f Fix mocks for ImmutableEventDispatcher. 2019-08-23 10:05:57 +02:00
Nicolas Grekas
ba784bf430 Merge branch '4.3' into 4.4
* 4.3:
  Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
  [Form][PropertyPathMapper] Avoid extra call to get config
  [HttpKernel] remove unused fixtures
2019-08-22 18:30:04 +02:00
Nicolas Grekas
aeba22c4ad Merge branch '3.4' into 4.3
* 3.4:
  Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
  [Form][PropertyPathMapper] Avoid extra call to get config
2019-08-22 18:29:54 +02:00
Nicolas Grekas
1d7114957b Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
This reverts commit fea98a8473, reversing
changes made to bd498f2503.
2019-08-22 18:27:00 +02:00
Nicolas Grekas
e91ae8bdad minor #33287 [HttpKernel] remove unused fixtures (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] remove unused fixtures

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

those are remnants of bundle inheritance that has been removed in sf 4

Commits
-------

5ffec16396 [HttpKernel] remove unused fixtures
2019-08-22 18:25:57 +02:00
Nicolas Grekas
118dfa03b9 minor #33291 [Form][PropertyPathMapper] Avoid extra call to get config (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form][PropertyPathMapper] Avoid extra call to get config

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

Commits
-------

3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config
2019-08-22 18:22:06 +02:00
Nicolas Grekas
47322db110 minor #33294 Add return types to internal & magic methods when possible (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add return types to internal & magic methods when possible

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

Commits
-------

962dcfeed0 Add return types to internal & magic methods when possible
2019-08-22 15:37:25 +02:00
Nicolas Grekas
962dcfeed0 Add return types to internal & magic methods when possible 2019-08-22 15:18:41 +02:00
Fabien Potencier
3051c59eff fixed CSC 2019-08-22 11:15:28 +02:00
Fabien Potencier
8c2e128a1a feature #33091 [Mime] Add Address::fromString (gisostallenberg)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Add Address::fromString

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

This will allow to create a Address from a string such as 'Name <name@example.com>'
Example:
```php
$address = Address::fromString("Name <name@example.com>");
```

Commits
-------

75ea8d0d67 Add Address::fromString
2019-08-22 11:13:11 +02:00
Giso Stallenberg
75ea8d0d67 Add Address::fromString
This will allow to create an Address from a string such as 'Name <name@example.com>'
2019-08-22 11:10:30 +02:00
Fabien Potencier
a77e326a9c feature #33144 [DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml() (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml()

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

Commits
-------

9535f9e8d6 [DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml()
2019-08-22 11:04:18 +02:00
Grégoire Pineau
9535f9e8d6 [DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml() 2019-08-22 10:52:44 +02:00
Nicolas Grekas
1981f06c88 Merge branch '4.3' into 4.4
* 4.3:
  fix deps=low
  [VarExporter] fix support for PHP 7.4
  Use PHP 7.4 on deps=low
2019-08-22 10:37:03 +02:00
Nicolas Grekas
0a25ccab8e fix deps=low 2019-08-22 10:16:11 +02:00
Nicolas Grekas
3979caf6ab Merge branch '3.4' into 4.3
* 3.4:
  Use PHP 7.4 on deps=low
2019-08-22 09:51:06 +02:00
Nicolas Grekas
26be947a86 minor #33288 Use PHP 7.4 on deps=low (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHP 7.4 on deps=low

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

Having a job on PHP 7.4 will allow using return type covariance as described in #33236

Commits
-------

21b87024f0 Use PHP 7.4 on deps=low
2019-08-22 09:44:36 +02:00
Nicolas Grekas
35673b87e0 bug #33292 [VarExporter] fix support for PHP 7.4 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarExporter] fix support for PHP 7.4

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

Commits
-------

1a036dc9ff [VarExporter] fix support for PHP 7.4
2019-08-22 09:43:47 +02:00
Nicolas Grekas
1a036dc9ff [VarExporter] fix support for PHP 7.4 2019-08-22 09:33:08 +02:00
Thomas Calvet
3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config 2019-08-22 09:15:31 +02:00
Nicolas Grekas
21b87024f0 Use PHP 7.4 on deps=low 2019-08-22 08:53:14 +02:00
Tobias Schultze
5ffec16396 [HttpKernel] remove unused fixtures
those are remnants of bundle inheritance that has been removed in sf 4
2019-08-21 20:13:34 +02:00
Nicolas Grekas
153e081119 ws fix 2019-08-21 17:53:07 +02:00
Nicolas Grekas
f2e2df6a0c feature #33152 Mark all dispatched event classes as final (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

Mark all dispatched event classes as final

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

I think we should mark all our Event classes as final. There is no point in people extending them as the libraries that use the event, will only dispatch this event. So extending events in user-land achieves nothing as the subclasses won't be dispatched.
I'm not talking about the base events that are meant to be extended like KernelEvent, but the leaf events like ExceptionEvent, ResponseEvent etc.
Then we can also make them real final in 5.0 as the events are value objects that should not be mocked.

Commits
-------

4bb38eec89 Mark all dispatched event classes as final
2019-08-21 17:50:31 +02:00
Nicolas Grekas
2fff132cbb typo 2019-08-21 17:39:13 +02:00
Nicolas Grekas
55cd8d6f3e minor #33279 Add return types to tests and final|internal|private methods (nicolas-grekas, derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add return types to tests and final|internal|private methods

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33228 #33236
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

#33266 made me spot an issue with my logic to add return types with help from `DebugClassLoader`.
Here is a completing PR, with the logic expanded to test classes.

I need help to fix tests, /cc @derrabus :)

Commits
-------

c39fd9c973 Fixed tests on the Security and Form components
fc186bb78f Add return types to tests and final|internal|private methods
2019-08-21 17:22:48 +02:00
Tobias Schultze
4bb38eec89 Mark all dispatched event classes as final 2019-08-21 17:17:54 +02:00
Alexander M. Turek
c39fd9c973 Fixed tests on the Security and Form components 2019-08-21 17:17:31 +02:00
Nicolas Grekas
fc186bb78f Add return types to tests and final|internal|private methods 2019-08-21 17:14:41 +02:00
Nicolas Grekas
8d8d3d4d40 minor #33280 fix deprecated call to setLocale with null (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

fix deprecated call to setLocale with null

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

Fix a potentially invalid call since #33272

Commits
-------

26f9afe8d1 fix deprecated call to setLocale with null
2019-08-21 17:06:06 +02:00
Nicolas Grekas
f499083f78 feature #33258 [HttpKernel] deprecate global dir to load resources from (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] deprecate global dir to load resources from

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

Replaces #31958

Here two example deprecations by adding files in the deprecated locations:
```
Overwriting the resource "@AcmeBundle/Resources/config/routing.yaml" with "/vagrant/src/Resources/AcmeBundle/config/routing.yaml" is deprecated since Symfony 4.4 and will be removed in 5.0.
Loading the file "foobar.yaml" from the global resource directory "/vagrant/src" is deprecated since Symfony 4.4 and will be removed in 5.0.
```

Commits
-------

aa82566f76 [HttpKernel] deprecate global dir to load resources from
2019-08-21 17:04:54 +02:00
Nicolas Grekas
2984ab7e4e Merge branch '4.3' into 4.4
* 4.3:
  Do not extend the new SF 4.3 ControllerEvent so we can make it final
  Backported return type violation bugfixes.
  [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
2019-08-21 17:03:51 +02:00
Nicolas Grekas
dd153d8dce bug #33282 [HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | unlikely
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

See https://github.com/symfony/symfony/pull/33152#discussion_r313846346
Remember the ControllerEvent is new in SF 4.3 so we just go back to what it was before 4.3

Commits
-------

00140b6a7c Do not extend the new SF 4.3 ControllerEvent so we can make it final
2019-08-21 16:59:28 +02:00
Nicolas Grekas
72eaff8893 Merge branch '3.4' into 4.3
* 3.4:
  Backported return type violation bugfixes.
2019-08-21 16:58:38 +02:00
Nicolas Grekas
622ce1d0f4 minor #33281 Backported return type violation bugfixes (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Backported return type violation bugfixes

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

Fixed some doc blocks and broken return values discovered while working on #33279.

Commits
-------

8877a013d7 Backported return type violation bugfixes.
2019-08-21 16:56:53 +02:00
Fabien Potencier
46b944f9a7 bug #33278 [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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 (remove the line telling that these assertions aren't compatible with Panther)

Backport of essential fixes provided by https://github.com/symfony/symfony/pull/32207. It allows most assertions to work with Panther even when using Symfony 4.3.

Commits
-------

2316dc36fb [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
2019-08-21 16:44:34 +02:00