Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Mailer] Improve an exception when trying to send a RawMessage without an Envelope #33454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 4, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #33256
License MIT
Doc PR n/a

@fabpot fabpot changed the title [Mailer] Improve an exception when trying to send a RawMessage witho… [Mailer] Improve an exception when trying to send a RawMessage without an Envelope Sep 4, 2019
@fabpot fabpot force-pushed the mailer-better-exception branch from 74d35f4 to 94a54ca Compare September 4, 2019 06:16
@fabpot fabpot force-pushed the mailer-better-exception branch 4 times, most recently from c5d28c2 to 0879c48 Compare September 4, 2019 06:29
@fabpot fabpot force-pushed the mailer-better-exception branch from 0879c48 to c6d56de Compare September 4, 2019 06:33
fabpot added a commit that referenced this pull request Sep 4, 2019
…wMessage without an Envelope (fabpot)

This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Improve an exception when trying to send a RawMessage without an Envelope

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | yes
| 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 | #33256
| 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):
 - 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
-------

c6d56de [Mailer] Improve an exception when trying to send a RawMessage without an Envelope
@fabpot fabpot merged commit c6d56de into symfony:4.4 Sep 4, 2019
nicolas-grekas added a commit that referenced this pull request Sep 5, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Added messenger to dev dependencies

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

PR #33454 introduced a new test case that mocks the `MessageBusInterface` from the messenger component. This makes the tests suite fail on travis because PHPUnit refuses to create a mock for an interface that does not exist.

```
There was 1 failure:

1) Symfony\Component\Mailer\Tests\MailerTest::testSendingRawMessages

Failed asserting that exception of type "PHPUnit\Framework\MockObject\RuntimeException" matches expected exception "Symfony\Component\Mailer\Exception\LogicException". Message was: "Cannot stub or mock class or interface "Symfony\Component\Messenger\MessageBusInterface" which does not exist" at

/home/travis/build/symfony/symfony/src/Symfony/Component/Mailer/Tests/MailerTest.php:28
```

This PR fixes the test by adding the Messenger component to Mailer's dev dependencies.

Commits
-------

248f082 [Mailer] Added messenger to dev dependencies.
@fabpot fabpot deleted the mailer-better-exception branch September 6, 2019 10:41
This was referenced Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants