Skip to content
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

[8.x] Change Visibility of the Markdown property in Mailable #38320

Merged

Conversation

JamesFreeman
Copy link
Contributor

I wanted to compare the output of a mailable against a stub, after some searching I found this as a solution:

Mail::assertSent(SomeMail::class, function (SomeMail $mail) {
    $mail = $mail->build();

    $this->assertStringEqualsFile(
        $this->removeTabsFromString(base_path('tests/Unit/Stubs/SomeMail.txt')),
        view($mail->view, $mail->buildViewData())
    );

    return true;
});

I wanted to do something similar for a markdown email, but I can't get access to this property as it's protected.

@driesvints
Copy link
Member

This is a breaking change. You could maybe add a getter instead?

@JamesFreeman
Copy link
Contributor Author

Sorry, I didn't think loosening property visibility would be a breaking change.

I'm happy to add a getter to be on the safe side, do you think it would be worth adding one for the view for consistency?

@driesvints
Copy link
Member

@taylorotwell will need to decide on that

@taylorotwell taylorotwell merged commit ec405fc into laravel:8.x Aug 10, 2021
@taylorotwell
Copy link
Member

I think the likelihood of this breaking an application is pretty small.

@JamesFreeman JamesFreeman deleted the bugfix/change_markdown_visibility branch August 10, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants