Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Notifier] Add SMSense bridge#53734

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:7.1fromjimiero:smsense-notifier
Feb 23, 2024
Merged

Conversation

@jimiero
Copy link
Contributor

@jimierojimiero commentedFeb 2, 2024
edited
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
Issuesnone
LicenseMIT

SMSense is a Romanian sms provider.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@OskarStarkOskarStark changed the titleAdded SMSense notifier bridge[Notifier] Add SMSense bridgeFeb 7, 2024
Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The class prefix should beSmsense to avoid having a package nameds-m-ense-notifier

@carsonbotcarsonbot changed the title[Notifier] Add SMSense bridgeAdd SMSense bridgeFeb 15, 2024
@jimiero
Copy link
ContributorAuthor

The class prefix should beSmsense to avoid having a package nameds-m-ense-notifier

Made the changes

@fabpot
Copy link
Member

@jimiero Can you have a look at the tests, some are broken for this new notifier.

@OskarStarkOskarStark changed the titleAdd SMSense bridge[Notifier] Add SMSense bridgeFeb 16, 2024
@jimiero
Copy link
ContributorAuthor

@jimiero Can you have a look at the tests, some are broken for this new notifier.

Changed them and now the tests are not failing anymore.

@fabpot
Copy link
Member

@jimiero
Copy link
ContributorAuthor

@jimiero Tests are still broken apparently, seehttps://github.com/symfony/symfony/actions/runs/7955729597/job/21715188628?pr=53734#step:8:126

Works just fine if I do this instead

`$response = $this->createMock(ResponseInterface::class);
$response->method('getStatusCode')->willReturn(200);
$response->method('getContent')->willReturn(file_get_contents(DIR.'/Fixtures/success-response.json'));
$client = new MockHttpClient($response);
$transport = $this->createTransport($client);
$sentMessage = $transport->send(new SmsMessage('+40701111111', 'Hello!'));

    $this->assertInstanceOf(SentMessage::class, $sentMessage);    $this->assertSame('63444830-5857-50da-d5f6-69f3719aa916', $sentMessage->getMessageId());`

if I do:

$response = new JsonMockResponse(file_get_contents(__DIR__.'/Fixtures/success-response.json'));

it fails seems, any suggestions?

@stloyd
Copy link
Contributor

My bad with suggestion to use that version of mock, you put encoded body into json mock which expects to get php array instead.

Either you can remove the fixture file and inject the php array into json mock or use again interface mock again.

@jimiero
Copy link
ContributorAuthor

My bad with suggestion to use that version of mock, you put encoded body into json mock which expects to get php array instead.

Either you can remove the fixture file and inject the php array into json mock or use again interface mock again.

Yep that was it, pushed changes by removing fixtures file and replaced JsonMockResponse input with a php array instead.

@fabpot
Copy link
Member

Thank you@jimiero.

@fabpotfabpot merged commit17c5508 intosymfony:7.1Feb 23, 2024
@fabpotfabpot mentioned this pull requestMay 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

@fabpotfabpotfabpot approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

+1 more reviewer

@stloydstloydstloyd left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

6 participants

@jimiero@carsonbot@fabpot@stloyd@OskarStark@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp