Commit Graph

45032 Commits

Author SHA1 Message Date
Nicolas Grekas
b6fc90ced7 Merge branch '4.4'
* 4.4:
  cleanup
  fix tests
2019-09-20 13:25:39 +02:00
Nicolas Grekas
e11aead952 cleanup 2019-09-20 13:17:55 +02:00
Nicolas Grekas
fb6d5913e6 minor #33647 [Messenger] fix tests (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] fix tests

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

Commits
-------

cfd6d645ef fix tests
2019-09-20 13:15:00 +02:00
Christian Flothmann
cfd6d645ef fix tests 2019-09-20 12:40:48 +02:00
Nicolas Grekas
a0ff8c12e3 Merge branch '4.4'
* 4.4:
  fix merge
2019-09-20 12:14:07 +02:00
Nicolas Grekas
13640b9422 Merge branch '4.3' into 4.4
* 4.3:
  fix merge
2019-09-20 12:12:04 +02:00
Nicolas Grekas
b4e2ba2c04 fix merge 2019-09-20 12:11:58 +02:00
Nicolas Grekas
b320c44b4e Merge branch '4.4'
* 4.4:
  [HttpKernel] fix merge
  fix tests
  [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
2019-09-20 11:29:01 +02:00
Nicolas Grekas
bbf2ae576e Merge branch '4.3' into 4.4
* 4.3:
  [HttpKernel] fix merge
  fix tests
  [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
2019-09-20 11:28:18 +02:00
Nicolas Grekas
e323097dac [HttpKernel] fix merge 2019-09-20 11:25:35 +02:00
Nicolas Grekas
1575e27c31 bug #33643 [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted

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

Spotted while discussing the client with @Seldaek
The current behavior is transient: depending on the speed of the network/server, the exception can be thrown, or not.

This forces one do deal with 3/4/5xx when the first chunk is yielded.

Commits
-------

3c93764f10 [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
2019-09-20 09:51:43 +02:00
Nicolas Grekas
f550ca983e Merge branch '3.4' into 4.3
* 3.4:
  fix tests
2019-09-20 09:50:55 +02:00
Nicolas Grekas
1818445dbc minor #33644 [Validator] fix tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix tests

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

Commits
-------

04f79c5536 fix tests
2019-09-20 09:50:32 +02:00
Christian Flothmann
04f79c5536 fix tests 2019-09-20 09:04:12 +02:00
Nicolas Grekas
3c93764f10 [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted 2019-09-19 20:56:12 +02:00
Nicolas Grekas
3f911bb20e Merge branch '4.4'
* 4.4:
  [PhpUnitBridge] more fixes for PHP 5.5
2019-09-19 19:42:14 +02:00
Nicolas Grekas
dee76144e5 Merge branch '4.3' into 4.4
* 4.3:
  [PhpUnitBridge] more fixes for PHP 5.5
2019-09-19 19:42:09 +02:00
Nicolas Grekas
3a520f2813 [PhpUnitBridge] more fixes for PHP 5.5 2019-09-19 19:42:00 +02:00
Nicolas Grekas
a447c4cf09 Merge branch '4.4'
* 4.4:
  [PhpUnitBridge] fix undefined variables
2019-09-19 19:32:00 +02:00
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
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