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

[9.x] Mailable : fixes strict comparison with int value #45138

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

MikeElghali
Copy link
Contributor

This PR fixes the case when we set metadata with an integer value :

    // ExampleMail.php
    public function envelope(): Envelope
    {
        return new Envelope(
            from: '[email protected]',
            subject: 'Laravel',
            metadata: [
                'mailable_id' => 1,
            ],
        );
    }

    // ExampleMailTest.php
    public function test_mail_is_correct(): void
    {
        $mailable = new Mail();

        $mailable->assertHasMetadata('mailable_id', 1); // With this fix, it returns true
    }

@MikeElghali MikeElghali changed the title Mailable : fixes strict comparison with int value [9.x] Mailable : fixes strict comparison with int value Nov 29, 2022
@taylorotwell taylorotwell merged commit 26941b0 into laravel:9.x Nov 29, 2022
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.

2 participants