Skip to content

Commit

Permalink
Update Readme + GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Jan 5, 2024
1 parent 40c1046 commit 7d5650d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 101 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
- "7.4"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: composer install
- run: ./vendor/bin/phpunit

# Documentation:
# runs-on: 'ubuntu-latest'
# needs: Build
# if: github.ref == 'refs/heads/main'
# env:
# DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
# steps:
# - uses: actions/checkout@v3
# - run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php sms-client
Documentation:
if: github.ref == 'refs/heads/master'
needs: Build
uses: byjg/byjg.github.io/.github/workflows/add-doc.yaml@master
with:
folder: php
project: ${{ github.event.repository.name }}
secrets: inherit

83 changes: 0 additions & 83 deletions .vscode/launch.json

This file was deleted.

35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# SMS Client

[![Build Status](https://github.com/byjg/php-sms-client/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-sms-client/actions/workflows/phpunit.yml)
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/php-sms-client/)
[![GitHub license](https://img.shields.io/github/license/byjg/php-sms-client.svg)](https://opensource.byjg.com/opensource/licensing.html)
[![GitHub release](https://img.shields.io/github/release/byjg/php-sms-client.svg)](https://github.com/byjg/php-sms-client/releases/)

This is a simple client to send SMS using different providers.

## Features
Expand Down Expand Up @@ -73,12 +79,29 @@ Use the method `getConnection()` only if you need to access the connection direc

## Implemented providers

| provider | URL / Documentation | Specifics |
|-------------------------------------------------|----------------------------------------------------------------------------|-----------------------------------------|
| twilio://accoundId:authToken@default | Send a message using the [Twilio messaging](https://www.twilio.com/en-us/messaging/channels/sms) provider. | Message object requires `withSender` to set. |
| twilio_verify://accoundId:authToken@serviceSid | Send a message using the [Twilio verify](https://www.twilio.com/en-us/trusted-activation/verify) verify provider. | Message with empty body send the SMS with the OTP code. To validate the received OTP, needs to pass it to the `Message::body` |
| byjg://username:password@default | Send a message using the [ByJG](https://www.byjg.com.br/) provider. | Only Brazil. |
| fakesender:// | Fake sender to be used on tests. | Only for tests. Do not send messages. |
| provider | URL / Documentation | Specifics |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| twilio://accoundId:authToken@default | Send a message using the [Twilio messaging](https://www.twilio.com/en-us/messaging/channels/sms) provider. | Message object requires `withSender` to set. |
| twilio_verify://accoundId:authToken@serviceSid | Send a message using the [Twilio verify](https://www.twilio.com/en-us/trusted-activation/verify) verify provider. | Message with empty body send the SMS with the OTP code. To validate the received OTP, needs to pass it to the `Message::body` |
| byjg://username:password@default | Send a message using the [ByJG](https://www.byjg.com.br/) provider. | Only Brazil. |
| fakesender:// | Fake sender to be used on tests. | Only for tests. Do not send messages. |

## Install

```shell
composer require "byjg/sms-client"
```

## Dependencies

```mermaid
flowchart TD
byjg/sms-client --> byjg/webrequest
byjg/sms-client --> ext-curl
```

----
[Open source ByJG](http://opensource.byjg.com)

----
[Open source ByJG](http://opensource.byjg.com)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=5.5.0",
"php": ">=7.4.0",
"ext-curl": "*",
"byjg/webrequest": "4.9.*"
},
Expand Down
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ and open the template in the editor.

<!-- see http://www.phpunit.de/wiki/Documentation -->
<phpunit bootstrap="./vendor/autoload.php"
colors="false"
colors="true"
testdox="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
Expand Down

0 comments on commit 7d5650d

Please sign in to comment.