Commit Graph

47090 Commits

Author SHA1 Message Date
Maxime Steinhausser
5a83b07bf4 [FrameworkBundle] Add missing entry about framework.router.context 2020-01-10 21:40:24 +01:00
Fabien Potencier
37a886354a Fix CS 2020-01-10 13:09:39 +01:00
Fabien Potencier
22bebd805c feature #35257 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template (Benjamin RICHARD)
This PR was squashed before being merged into the 5.1-dev branch (closes #35257).

Discussion
----------

[FrameworkBundle] TemplateController should accept extra arguments to be sent to the template

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

In the official documentation (symfony.com/doc/master/templates.html#rendering-a-template-directly-from-a-route) it says that TemplateController should accept extra arguments. In fact it's not available for instance.
So i added the context argument as an array. Because of deprecation of templating, only the twig instance will apply the context argument.

It will need to be implemented in branch 5.

The following issue has been created in documentation project : https://github.com/symfony/symfony-docs/issues/12897

Commits
-------

e27b417817 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template
2020-01-10 13:08:49 +01:00
Benjamin RICHARD
e27b417817 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template 2020-01-10 13:08:42 +01:00
Fabien Potencier
74feb17927 feature #34980 [Messenger] remove several messages with command messenger:failed:remove (nikophil)
This PR was squashed before being merged into the 5.1-dev branch (closes #34980).

Discussion
----------

[Messenger] remove several messages with command messenger:failed:remove

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #34940
| License       | MIT

command `messenger:failed:remove` now accepts an array of ids. If several provided, they are not displayed unless option `--show-messages` is passed

Commits
-------

903455e463 [Messenger] remove several messages with command messenger:failed:remove
2020-01-10 12:59:02 +01:00
Nicolas PHILIPPE
903455e463 [Messenger] remove several messages with command messenger:failed:remove 2020-01-10 12:58:56 +01:00
Fabien Potencier
697bc2226d feature #35298 Make sure the UriSigner can be autowired (Toflar)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Make sure the UriSigner can be autowired

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

I wasn't able to find the correct spot where this is tested. Is it even tested and if so, can you point me as to where to add tests for that? Thanks 😄

Commits
-------

9ad1caa942 Make sure the UriSigner can be autowired
2020-01-10 12:22:30 +01:00
Yanick Witschi
9ad1caa942 Make sure the UriSigner can be autowired 2020-01-10 11:59:51 +01:00
Fabien Potencier
d8bb14ccff Fix CS 2020-01-10 10:42:21 +01:00
Fabien Potencier
7dae1cad64 feature #31518 [Validator] Added HostnameValidator (karser)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] Added HostnameValidator

| Q             | A
| ------------- | ---
| Branch?       | master
| 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    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #10088   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This PR adds HostnameValidator support. I encountered this need in my project and was surprised that this issue has been open for years.

Here is short example:
```
App\Entity\Acme:
    properties:
        domain:
            - Hostname: ~
        non_tld_domain:
            - Hostname: { requireTld: false }
```
The option `requireTld` is `true` by default and disallows domains like localhost and etc.

Commits
-------

8a08c2090a Added HostnameValidator
2020-01-10 10:41:53 +01:00
Fabien Potencier
d099bc395f feature #35284 Simplify UriSigner when working with HttpFoundation's Request (Toflar)
This PR was squashed before being merged into the 5.1-dev branch (closes #35284).

Discussion
----------

Simplify UriSigner when working with HttpFoundation's Request

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

I'm using the `UriSigner` in my own projects from time to time and I've always wondered why I have to manually generate the URI from the `Request` instance in such a way that it is correctly validated.
Let's add a new `checkRequest(Request $request)` method to provide better DX.

Commits
-------

4887b4bee1 Simplify UriSigner when working with HttpFoundation's Request
2020-01-10 10:29:03 +01:00
Yanick Witschi
4887b4bee1 Simplify UriSigner when working with HttpFoundation's Request 2020-01-10 10:28:57 +01:00
Fabien Potencier
f9949e3fe8 feature #35285 [FrameworkBundle] Adding better output to secrets:decrypt-to-local command (weaverryan)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Adding better output to secrets:decrypt-to-local command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | none
| License       | MIT
| Doc PR        | not needed

Hi!

The `secrets:decrypt-to-local` doesn't give any output. This adds some basic details:

<img width="1280" alt="Screen Shot 2020-01-09 at 11 53 54 AM" src="https://user-images.githubusercontent.com/121003/72087704-ebe0f480-32d6-11ea-950c-c698abde783d.png">

(note the `-vvv` wasn't necessary in the command to show the output). And the `<info>`part is fixed.

Cheers!

Commits
-------

a6aa9781eb Adding better output to secrets:decrypt-to-local command
2020-01-10 10:20:24 +01:00
Fabien Potencier
9edb1618d2 feature #35273 [HttpClient] Add LoggerAwareInterface to ScopingHttpClient and TraceableHttpClient (pierredup)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] Add LoggerAwareInterface to ScopingHttpClient and TraceableHttpClient

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

This allows changing the logger when using `ScopingHttpClient` (and `TraceableHttpClient` during dev)

Commits
-------

1137bdc3f7 Add LoggerAwareInterface to ScopingHttpClient and TraceableHttpClient
2020-01-10 10:17:03 +01:00
Fabien Potencier
af3c2059ca feature #34865 [FrameworkBundle][ContainerLintCommand] Style messages (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][ContainerLintCommand] Style messages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

It gives a better feedback.

Commits
-------

93aa5bcd0a [FrameworkBundle][ContainerLintCommand] Style messages
2020-01-10 09:17:37 +01:00
Fabien Potencier
20e8cb207b Fix CS 2020-01-10 09:15:23 +01:00
Fabien Potencier
ebf3885aca feature #34847 Add support for safe HTTP preference - RFC 8674 (pyrech)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Add support for safe HTTP preference - RFC 8674

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

[RFC 8674](https://tools.ietf.org/html/rfc8674) (not a IETF standard at the moment) defines a way for user agents to ask for "safe" content to a server. This PR add helper methods to :
- know if the user agent prefers a safe content
- mark the response as safe

Commits
-------

7f2cef759c Add support for safe preference - RFC8674
2020-01-10 09:14:56 +01:00
Fabien Potencier
c146de141b feature #34880 [Twig][Form] Twig theme for Foundation 6 (Lyssal)
This PR was squashed before being merged into the 5.1-dev branch (closes #34880).

Discussion
----------

[Twig][Form] Twig theme for Foundation 6

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | -

Hi,

I propose a form theme for Foundation 6. This layout stylizes buttons, percent / money widgets and permits switch inputs adding a 'switch-input' attribute (as for https://symfony.com/blog/new-in-symfony-4-4-bootstrap-custom-switches).

![Foundation_6](https://user-images.githubusercontent.com/10855303/70390292-184cdc80-19ca-11ea-8ad8-090358dd9e35.png)

```php
public function buildForm(FormBuilderInterface $builder, array $options): void
{
    $builder
        // ...
        ->add('checkbox-switch', Type\CheckboxType::class, [
            'attr' => [
                'class' => 'switch-input',
            ],
        ])
    ;
}
```

Commits
-------

e47a134db0 [Twig][Form] Twig theme for Foundation 6
2020-01-10 09:11:20 +01:00
Rémi Leclerc
e47a134db0 [Twig][Form] Twig theme for Foundation 6 2020-01-10 09:11:14 +01:00
Fabien Potencier
cc64b028b6 feature #35281 [FrameworkBundle] Configure RequestContext through router config (benji07)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Configure RequestContext through router config

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35229  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

- [ ] PR on symfony/symfony-docs

Commits
-------

6658900703 [FrameworkBundle] Configure RequestContext through router config
2020-01-10 09:06:12 +01:00
Benjamin Lévêque
6658900703 [FrameworkBundle] Configure RequestContext through router config 2020-01-10 08:44:52 +01:00
Ryan Weaver
a6aa9781eb Adding better output to secrets:decrypt-to-local command 2020-01-09 20:22:51 -05:00
Nicolas Grekas
5c37ab016c Merge branch '5.0'
* 5.0:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:39:49 +01:00
Nicolas Grekas
6d10f8891e Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:26 +01:00
Nicolas Grekas
415761ef4d Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:20 +01:00
Nicolas Grekas
68b96fa024 Merge branch '3.4' into 4.3
* 3.4:
  [PhpUnitBridge] fix compat with older versions of composer
2020-01-09 14:38:14 +01:00
Nicolas Grekas
416f0abf99 [PhpUnitBridge] fix compat with older versions of composer 2020-01-09 14:36:09 +01:00
Nicolas Grekas
1299336de5 fix tests 2020-01-09 14:25:29 +01:00
Nicolas Grekas
e7f2a1afaa Merge branch '5.0'
* 5.0:
  fix tests
2020-01-09 13:59:39 +01:00
Nicolas Grekas
85cf2ee0ca Merge branch '4.4' into 5.0
* 4.4:
  fix tests
2020-01-09 13:59:02 +01:00
Nicolas Grekas
29f5b180d9 Merge branch '4.3' into 4.4
* 4.3:
  fix tests
2020-01-09 13:57:53 +01:00
Nicolas Grekas
56877e7186 Merge branch '3.4' into 4.3
* 3.4:
  fix tests
2020-01-09 13:45:17 +01:00
Nicolas Grekas
d24df0d441 fix tests 2020-01-09 13:44:20 +01:00
Nicolas Grekas
9476574453 Merge branch '5.0'
* 5.0:
  fix deps
  Relax transient test
2020-01-09 13:39:32 +01:00
Nicolas Grekas
bf47b7d960 Merge branch '4.4' into 5.0
* 4.4:
  fix deps
  Relax transient test
2020-01-09 13:38:56 +01:00
Nicolas Grekas
f06e5ccb84 Merge branch '4.3' into 4.4
* 4.3:
  fix deps
  Relax transient test
2020-01-09 13:35:03 +01:00
Nicolas Grekas
4ee84b3915 fix deps 2020-01-09 13:29:25 +01:00
Nicolas Grekas
cc2246e916 Merge branch '3.4' into 4.3
* 3.4:
  Relax transient test
2020-01-09 13:15:56 +01:00
Nicolas Grekas
0497fd9d31 Relax transient test 2020-01-09 13:09:28 +01:00
Nicolas Grekas
80cc6bda60 Merge branch '5.0'
* 5.0:
  Added more tests for WebProfilerBundle
2020-01-09 13:01:00 +01:00
Nicolas Grekas
0c6f88e43a Merge branch '4.4' into 5.0
* 4.4:
  Added more tests for WebProfilerBundle
2020-01-09 13:00:51 +01:00
Nicolas Grekas
2a3de1a6d1 Merge branch '4.3' into 4.4
* 4.3:
  Added more tests for WebProfilerBundle
2020-01-09 12:59:40 +01:00
Nicolas Grekas
0c47116813 Merge branch '3.4' into 4.3
* 3.4:
  Added more tests for WebProfilerBundle
2020-01-09 12:56:22 +01:00
Nicolas Grekas
347f7cf3ef minor #31522 Added more tests for WebProfilerBundle (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

Added more tests for WebProfilerBundle

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

Thanks to @jpauli Code Coverage info about Symfony (http://cov.jpauli.tech/) I found that WebProfiler's controllers are pretty badly covered:

![image](https://user-images.githubusercontent.com/73419/57919817-ec390500-7899-11e9-81b7-763a0b35d0ec.png)

This PR focuses on testing the main controller class:

![image](https://user-images.githubusercontent.com/73419/57919877-04108900-789a-11e9-8a93-3466b672d873.png)

Commits
-------

2f7a820edd Added more tests for WebProfilerBundle
2020-01-09 12:44:37 +01:00
Javier Eguiluz
2f7a820edd Added more tests for WebProfilerBundle 2020-01-09 12:43:54 +01:00
Nicolas Grekas
e0c1f4da32 Merge branch '5.0'
* 5.0:
  [String] add test case for wordwrap method
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:56:45 +01:00
Nicolas Grekas
3b3cbb925c minor #35236 [String] add test case for wordwrap method (mgamal92)
This PR was submitted for the master branch but it was squashed and merged into the 5.0 branch instead.

Discussion
----------

[String] add test case for wordwrap method

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

Just test case for ```wordwrap``` method

Commits
-------

c314598df9 [String] add test case for wordwrap method
2020-01-09 10:55:35 +01:00
Mohamed Gamal
c314598df9 [String] add test case for wordwrap method 2020-01-09 10:55:26 +01:00
Nicolas Grekas
8031b864c3 Merge branch '4.4' into 5.0
* 4.4:
  [Process] - update @throws phpdoc
  [PHPUnitBridge] file_get_contents() expects parameter 3 to be resource
  [PHPUnit-Bridge] Fail-fast in simple-phpunit if one of the passthru() commands fails
  [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:53:06 +01:00
Nicolas Grekas
62c4608e17 bug #35269 [HttpKernel][FileLocator] Fix deprecation message (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel][FileLocator] Fix deprecation message

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Ref https://github.com/symfony/symfony/pull/34886

`$deprecatedPath` is the foreach value so it only works if the last element triggers the deprecation, otherwise the value is wrong.

Commits
-------

18ce8399d2 [HttpKernel][FileLocator] Fix deprecation message
2020-01-09 10:50:57 +01:00