Commit Graph

45114 Commits

Author SHA1 Message Date
Nicolas Grekas
de346f1fe3 Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] fix undefined variables
2019-09-19 19:31:55 +02:00
Nicolas Grekas
5274edaa86 [PhpUnitBridge] fix undefined variables 2019-09-19 19:31:51 +02:00
Nicolas Grekas
47f1934899 Merge branch '4.4'
* 4.4:
  [Process] fix typo in tests
2019-09-19 19:12:13 +02:00
Nicolas Grekas
86ffecb556 Merge branch '4.3' into 4.4
* 4.3:
  [Process] fix typo in tests
2019-09-19 19:12:09 +02:00
Nicolas Grekas
a23c3ef42a Merge branch '3.4' into 4.3
* 3.4:
  [Process] fix typo in tests
2019-09-19 19:12:04 +02:00
Nicolas Grekas
20ab3b75fd [Process] fix typo in tests 2019-09-19 19:10:56 +02:00
Terje Bråten
3817a8b036 Make legacy "wrong" RFC2047 encoding apply only to one header 2019-09-19 18:00:15 +01:00
Nicolas Grekas
5e8f047a62 Merge branch '4.4'
* 4.4:
  [PhpUnitBridge] bump cache id
2019-09-19 18:15:10 +02:00
Nicolas Grekas
bc24be6ab4 Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] bump cache id
2019-09-19 18:15:04 +02:00
Nicolas Grekas
bd7b44a08c Merge branch '3.4' into 4.3
* 3.4:
  [PhpUnitBridge] bump cache id
2019-09-19 18:14:31 +02:00
Nicolas Grekas
76d4ef83e9 [PhpUnitBridge] bump cache id 2019-09-19 18:13:23 +02:00
Nicolas Grekas
4442a3f2ac Merge branch '4.4'
* 4.4:
  Re-enable previously failing PHP 7.4 test cases
  [PhpUnitBridge] fix uninitialized variable
  [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631
  [Twig] Add missing check
  Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
  install from source to include components tests
  Fix undefined constant and other minor issues
  [Twig] Add NotificationEmail
  ensure compatibility with type resolver 0.5
  Call AssertEquals with proper parameters
  [DependencyInjection] Allow binding iterable and tagged services
  [Twig] Fix Twig config extra keys
  fix tests depending on other components' tests
  Fix lint commands frozen on empty stdin
2019-09-19 18:03:37 +02:00
Nicolas Grekas
4c69a26d82 Merge branch '4.3' into 4.4
* 4.3:
  Re-enable previously failing PHP 7.4 test cases
  [PhpUnitBridge] fix uninitialized variable
  Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
  install from source to include components tests
2019-09-19 17:56:27 +02:00
Nicolas Grekas
627833b5e6 Merge branch '3.4' into 4.3
* 3.4:
  Re-enable previously failing PHP 7.4 test cases
  Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
  install from source to include components tests
2019-09-19 17:51:53 +02:00
Nicolas Grekas
1ab8fff4f2 minor #33567 Re-enable previously failing PHP 7.4 test cases (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Re-enable previously failing PHP 7.4 test cases

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #32995
| License       | MIT
| Doc PR        | -

The remaining PHP 7.4 issue has been fixed by Nikita in https://github.com/php/php-src/pull/4697
This should be green once Travis updates their php7.4snapshot

Commits
-------

9e4e191535 Re-enable previously failing PHP 7.4 test cases
2019-09-19 17:34:53 +02:00
Nicolas Grekas
9e4e191535 Re-enable previously failing PHP 7.4 test cases 2019-09-19 17:32:51 +02:00
Nicolas Grekas
2f6dc5eed1 [PhpUnitBridge] fix uninitialized variable 2019-09-19 16:48:53 +02:00
Fabien Potencier
b5ff9966fe bug #33632 [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631 (k0d3r1s)
This PR was squashed before being merged into the 4.4 branch (closes #33632).

Discussion
----------

[ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631

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

This fixes exception thrown when trying to render ErrorException as an array

Commits
-------

063dc78b49 [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631
2019-09-19 16:05:18 +02:00
k0d3r1s
063dc78b49 [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631 2019-09-19 16:05:07 +02:00
Fabien Potencier
5b5b7de660 [Twig] Add missing check 2019-09-19 14:48:09 +02:00
Fabien Potencier
7a70f73d49 feature #33635 [FrameworkBundle] Cleanup (yceruto)
This PR was merged into the 5.0-dev branch.

Discussion
----------

[FrameworkBundle] Cleanup

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

These PHP templates are no longer used after removing the PHP Templating layer.

Commits
-------

f1ebb04cb4 Cleanup
2019-09-19 11:11:23 +02:00
Nicolas Grekas
6bf2dd9ee8 minor #33637 install from source to include components tests (xabbuh)
This PR was squashed before being merged into the 3.4 branch (closes #33637).

Discussion
----------

install from source to include components tests

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

Commits
-------

5aa4328b08 Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
c792908217 install from source to include components tests
2019-09-19 10:05:35 +02:00
Christian Flothmann
5aa4328b08 Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
This reverts commit 47fb0900fb, reversing
changes made to 6fad4f1215.
2019-09-19 09:17:54 +02:00
Christian Flothmann
c792908217 install from source to include components tests 2019-09-19 09:02:46 +02:00
Yonel Ceruto
f1ebb04cb4 Cleanup 2019-09-18 17:49:21 -04:00
Yonel Ceruto
85d10114e0 minor #33633 [TwigBridge] Fix undefined constant and other minor issues (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] Fix undefined constant and other minor issues

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

/cc @fabpot

Commits
-------

e9e004e Fix undefined constant and other minor issues
2019-09-18 15:23:15 -04:00
Christian Flothmann
672a544e8e Merge branch '4.3' into 4.4
* 4.3:
  ensure compatibility with type resolver 0.5
  Call AssertEquals with proper parameters
  [Twig] Fix Twig config extra keys
  fix tests depending on other components' tests
2019-09-18 20:25:57 +02:00
Yonel Ceruto
e9e004ea07 Fix undefined constant and other minor issues 2019-09-18 14:21:39 -04:00
Christian Flothmann
9d882e8ce2 Merge branch '3.4' into 4.3
* 3.4:
  ensure compatibility with type resolver 0.5
  Call AssertEquals with proper parameters
  [Twig] Fix Twig config extra keys
  fix tests depending on other components' tests
2019-09-18 18:13:55 +02:00
Fabien Potencier
6230465838 feature #33605 [Twig] Add NotificationEmail (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Twig] Add NotificationEmail

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

This PR is an extract of the new Notifier component. It's a default template to send standardized emails with the Mailer component, which can be used independently of the Notifier component.

Such emails look like the following:

<img width="618" alt="image" src="https://user-images.githubusercontent.com/47313/65018883-694cb780-d92a-11e9-940a-875ea68f9e5d.png">

More info on SpeakerDeck (be warned that names have change since my presentation): https://speakerdeck.com/fabpot/symfony-notifier?slide=7

It requires Twig 1.12 which should be released later this week.

Usage example:

```php
$email = (new NotificationEmail())
    ->from('fabien@example.com')
    ->to('fabien@example.org')
    ->subject('My first notification email via Symfony')
    ->markdown(<<<EOF
There is a **problem** on your website, you should investigate it right now.
Or just wait, the problem might solves itself automatically, we never know.
EOF
    )
    ->action('More info?', 'https://example.com/')
    ->importance('high')
    //->exception(new \LogicException('That does not work at all...'))
;
```

Instead of `markdown()`, you can also use `content()` for simple emails.

Note that you can use Inky tags in the content:

```php
$email = (new NotificationEmail())
    ->from('fabien@example.com')
    ->to('fabien@example.org')
    ->subject('My first notification email via Symfony')
    ->markdown(<<<EOF
There is a **problem** on your website, you should investigate it right now.
Or just wait, the problem might solves itself automatically, we never know.

Some Title
==========

<center>
    <button href="https://example.com/">Go?</button>
</center>

EOF
);
```

There is also the concept of a theme. By default, it uses the `default` theme,  which is an alias for the `zurb_2` theme.

You can use `setTheme()` to override the theme for a given instance, or override the themes globally via the following config in `twig.yaml`:

```yaml
twig:
    paths:
        templates/email: email
```

Then, create `templates/email/default/notification/body.html.twig` and `templates/email/default/notification/body.txt.twig`. Extends the existing template via `{% extends "@!email/default/notification/body.html.twig" %}` (note  the `!`).

Commits
-------

f6c6cf7dc9 [Twig] Add NotificationEmail
2019-09-18 17:30:43 +02:00
Fabien Potencier
f6c6cf7dc9 [Twig] Add NotificationEmail 2019-09-18 17:08:12 +02:00
Fabien Potencier
47fb0900fb bug #33618 fix tests depending on other components' tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

fix tests depending on other components' tests

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

Commits
-------

cd2f3a6056 fix tests depending on other components' tests
2019-09-18 16:58:24 +02:00
Fabien Potencier
6fad4f1215 bug #33626 [PropertyInfo] ensure compatibility with type resolver 0.5 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] ensure compatibility with type resolver 0.5

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

same as #33588 but for the `3.4` branch

Commits
-------

2d708b3e60 ensure compatibility with type resolver 0.5
2019-09-18 16:55:47 +02:00
Christian Flothmann
2d708b3e60 ensure compatibility with type resolver 0.5 2019-09-18 15:36:31 +02:00
Nicolas Grekas
41a450b727 minor #33523 Fix lint commands frozen on empty stdin (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix lint commands frozen on empty stdin

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

Running e.g. `lint:yaml -` with no piped content makes the command hangs currently, this makes it fail instead. Also fixes the command help which we forgot to update

Commits
-------

b60e0c1454 Fix lint commands frozen on empty stdin
2019-09-18 14:09:11 +02:00
Nicolas Grekas
ac7b2b4611 minor #33550 [HttpFoundation] Call AssertEquals with proper parameters (mmokhi)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #33550).

Discussion
----------

[HttpFoundation] Call AssertEquals with proper parameters

Since `$response->getContent()` returns string and our first parameter is already string as well, in some cases (with different precisions) it may "compare strings" as "strings" and this is not what the test wants.
By changing the first parameter to actual number we force `AssertEquals` to compare them numerically rather than literally by string content.

| Q             | A
| ------------- | ---
| Branch?       | 3.4, 4.3, master <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This is yet another catch of this type: https://github.com/symfony/symfony/pull/31612

Commits
-------

6a8ab6cb73 Call AssertEquals with proper parameters
2019-09-18 13:43:50 +02:00
mmokhi
6a8ab6cb73 Call AssertEquals with proper parameters
Since `$response->getContent()` returns string and our first parameter is already string as well, in some cases (with different precisions) it may "compare strings" as "strings" and this is not what the test wants.
By changing the first parameter to actual number we force `AssertEquals` to compare them numerically rather than literally by string content.
2019-09-18 13:43:43 +02:00
Nicolas Grekas
92ef476487 feature #33623 [DependencyInjection] Allow binding iterable and tagged services (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Allow binding iterable and tagged services

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

This will allow:
```yaml
services:
    _defaults:
        bind:
            iterable $rules: !tagged_iterator app.foo.rule
    _instanceof:
        App\Foo\Rule\RuleInterface:
            tags: ['app.foo.rule']
```

Commits
-------

2055a558fe [DependencyInjection] Allow binding iterable and tagged services
2019-09-18 13:27:34 +02:00
Grégoire Pineau
2055a558fe [DependencyInjection] Allow binding iterable and tagged services 2019-09-18 13:00:14 +02:00
Fabien Potencier
212f66827b bug #33620 [Twig] Fix Twig config extra keys (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Twig] Fix Twig config extra keys

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Instead of `unsetting` keys, I know pass explicitly which key we need (right now, as we don't unset everything, there are a bunch of info passed to Environment that should not be there).

Commits
-------

e2043ff53e [Twig] Fix Twig config extra keys
2019-09-18 10:30:21 +02:00
Fabien Potencier
e2043ff53e [Twig] Fix Twig config extra keys 2019-09-18 10:28:50 +02:00
Christian Flothmann
cd2f3a6056 fix tests depending on other components' tests 2019-09-17 17:53:02 +02:00
Fabien Potencier
bc5590a95a Merge branch '4.4'
* 4.4:
  [Console] Fix tests
  Fix wrong namespace
2019-09-17 17:04:37 +02:00
Fabien Potencier
1efae63e64 bug #33617 [Console] Fix tests (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a
<!--
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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

abe11a3024 [Console] Fix tests
2019-09-17 17:01:44 +02:00
Fabien Potencier
abe11a3024 [Console] Fix tests 2019-09-17 16:59:18 +02:00
Fabien Potencier
e6eadae95e bug #33616 Fix wrong namespace (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix wrong namespace

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a
<!--
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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

0b1946e5fe Fix wrong namespace
2019-09-17 16:48:21 +02:00
Fabien Potencier
0b1946e5fe Fix wrong namespace 2019-09-17 16:46:41 +02:00
Fabien Potencier
396b7c32db Merge branch '4.4'
* 4.4:
  New tweaks to the Welcome Page
  fix tests
2019-09-17 13:21:26 +02:00
Fabien Potencier
e004102756 minor #33586 [Cache][FrameworkBundle] fix tests (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache][FrameworkBundle] fix tests

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

Commits
-------

b468776b44 fix tests
2019-09-17 13:20:26 +02:00
Fabien Potencier
8ccacab443 minor #33614 New tweaks to the Welcome Page (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

New tweaks to the Welcome Page

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

Sorry for the noise! This is hopefully the last pull request related to the Welcome Page design tweaks. This one tweaks some margins, makes it look better on ultra-wide screens and prevents some unwanted horizontal/vertical scrollbars on some browsers.

Commits
-------

2737a00233 New tweaks to the Welcome Page
2019-09-17 13:14:50 +02:00