Skip to content

[Messenger] Transport possible to have null #51236

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

Closed
wants to merge 1 commit into from
Closed

[Messenger] Transport possible to have null #51236

wants to merge 1 commit into from

Conversation

StaffNowa
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Technically we can have for our own testing purposes the tests

SMSBIURAS_DSN="null://null"

@StaffNowa StaffNowa requested a review from OskarStark as a code owner August 2, 2023 20:03
@carsonbot carsonbot added this to the 6.3 milestone Aug 2, 2023
@carsonbot carsonbot changed the title Bug. Transport possible to have null [Messenger] Bug. Transport possible to have null Aug 3, 2023
@OskarStark
Copy link
Contributor

If this code is already in 5.4 and it is considered a bugfix, please target 5.4. otherwise 6.4 as a feature. Thanks

@OskarStark OskarStark changed the title [Messenger] Bug. Transport possible to have null [Messenger] Transport possible to have null Aug 3, 2023
@StaffNowa StaffNowa deleted the branch symfony:6.3 August 3, 2023 15:30
@StaffNowa StaffNowa closed this Aug 3, 2023
@StaffNowa StaffNowa deleted the 6.3 branch August 3, 2023 15:30
fabpot added a commit that referenced this pull request Oct 2, 2023
This PR was merged into the 6.4 branch.

Discussion
----------

[Notifier] Transport possible to have null

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

My test example of why I need to have properly transport null

```php
public function testSmsSending(): void
{
    $date = (new \DateTimeImmutable())->format('Y-m-d');

    $stateta = new Stateta();
    $stateta->setDate(new \DateTimeImmutable($date));
    $stateta->setA95(0);
    $stateta->setDk(0);

    $this->entityManager->persist($stateta);
    $this->entityManager->flush();

    $this->commandTester->execute([], [
        'verbosity' => OutputInterface::VERBOSITY_DEBUG
    ]);

    $this->commandTester->assertCommandIsSuccessful();

    $notifierEvent = $this->getNotifierEvent();

    self::assertEquals(null, $notifierEvent->getMessage()->getTransport());
    self::assertEquals("+37061234567", $notifierEvent->getMessage()->getRecipientId());

    self::assertNotificationIsQueued($notifierEvent);
    self::assertNotificationSubjectContains($notifierEvent->getMessage(), 'Company name');
    self::assertNotificationTransportIsEqual($notifierEvent->getMessage(), null);
}
```

Commits
-------

6120c4b [Notifier] Transport possible to have null
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.

3 participants