Download the PHP package timefrontiers/php-sms without Composer

On this page you can find all versions of the php package timefrontiers/php-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sms

timefrontiers/php-sms

Multi-provider SMS dispatch for PHP 8.5 with durable idempotency, explicit database connections, authenticated delivery webhooks, exact fee storage, and automatic continent-based provider routing.

This worktree contains the unreleased v1.1 upgrade. It must complete the independent audit described in AUDIT.md before it is tagged or published.

Requirements

Installation and schema

Fresh installations use sql/install.sql. Existing 1.0 installations must follow UPGRADING.md and run the staged files under sql/migrations/.

Configuration

Call Sms::configure() exactly once during bootstrap. Pass the application’s resolved SQL Database facade; sends retain this connection and an immutable configuration snapshot.

All configured drivers and default senders are validated at bootstrap. A request-selected sender is accepted only when it appears in that driver’s allowed_senders list. Configuration cannot be replaced later in the process.

Driver SDK calls can be replaced in tests with send_callable; production credentials are never included in provider errors or database metadata.

Sending

The typed result API preserves ambiguous attempts:

The caller-supplied key is hashed before storage and is unique within its scope. Reusing a key with different provider, recipient, message, sender, owner, batch, parent, or direction returns SMS_IDEMPOTENCY_CONFLICT and does not call a provider.

When no key is supplied, the compatibility API generates a one-use random key. That prevents internal double-dispatch but cannot deduplicate a later caller retry, so production OTP and notification flows should always supply a stable key.

The state machine is:

delivered is terminal. A late authenticated delivery can correct failed to delivered. unknown is never automatically resent.

Sms::send() refuses to run while its SQL Database connection is already in a caller-owned transaction. Provider network I/O cannot be made atomic with the caller's SQL work, and a duplicate-key reconciliation must never poison an unrelated transaction. Commit application work before dispatching, or use an outbox worker after commit.

Compatibility API

These v1.0 calls remain available:

The wrappers return false for validation, rejection, infrastructure, and unknown outcomes. Use sendResult() when the associated entity or exact outcome is required. The deprecated process-global snapshot is reset around every compatibility operation:

Do not construct InstanceError from false.

Message rules and fees

Provider money is persisted as DECIMAL(18,8) and handled as a decimal string:

If a provider accepts a message but returns a fee outside the exact decimal grammar, the reference and accepted outcome are retained, the fee falls back to 0.00000000, and bounded metadata records fee_parse_failed. The raw fee is sent only to the configured trusted logger.

Delivery webhooks

Build webhook context at the trusted HTTP boundary. Do not reconstruct the public URL from untrusted Host, proxy, or server variables.

Twilio signatures are read from X-Twilio-Signature. URL identity is checked against the fixed configured URL after removing only Twilio's bodySHA256 parameter; the SDK then validates the signature against the real signed request URL. Any other query difference is rejected.

AfricasTalking delivery reports fail closed unless webhook_verifier is configured. The presence of id and status is parsing, not authentication.

Authenticated reports are looked up by (provider, reference), recorded in a deduplicated event table, and applied with a status/version predicate. Results distinguish updated, duplicate, ignored, not_found, invalid, and infrastructure_failed. Unknown statuses and terminal-state regressions do not merge metadata.

The legacy array-only processDeliveryReport() wrapper remains available but does not carry headers, raw body, URL, or remote-IP context. It therefore fails closed unless an application-controlled verifier explicitly authenticates that limited context.

Lookups

Calling findByReference('SM123') without a provider returns a row only when the reference is globally unambiguous.

Direct $sms->save() is disabled because state changes require conditional version checks. Use the service/facade operations.

Recovery and retention

The legacy public-code data repair is also available as a bounded dry-run CLI:

Dry-run stale-attempt reconciliation:

Drivers implementing SmsStatusLookupInterface can reconcile a known provider reference. Missing references and unsupported provider lookups are reported for manual review. The command never resends.

Recovery and retention comparisons use database-session time on both sides of the comparison, so PHP and database timezone differences do not move the staleness or expiry windows.

When content_retention_days is configured, each new record receives an expiry timestamp. Redact expired receiver/message content with:

Both commands default to dry-run and emit JSON progress. Deployments must also use encrypted database volumes/backups, restrict access to the SMS tables, and set retention appropriate to their jurisdiction. Provider event metadata is allowlisted and bounded; full raw webhook payloads and throwable text are not stored.

Custom drivers

Implement SmsDriverInterface using the typed contracts:

Register either the driver object or ['driver' => $driver, ...sender policy]. Return ProviderRejectedException only for a definite rejection. Throw ProviderOutcomeUnknownException whenever provider acceptance cannot be ruled out.

Development checks

Real MySQLi, PDO-MySQL, and concurrent-send suites require a disposable database whose name ends in _test:

No test makes a live billable provider call.

License

MIT


All versions of php-sms with dependencies

PHP Build Version
Package Version
Requires africastalking/africastalking Version ^3.0
ext-mbstring Version *
php Version ^8.5
timefrontiers/php-core Version ^1.0
timefrontiers/php-database-object Version ^1.1
timefrontiers/php-has-errors Version ^1.0
timefrontiers/php-pagination Version ^1.0
timefrontiers/php-sql-database Version ^1.1.1
timefrontiers/php-validator Version ^1.1
twilio/sdk Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package timefrontiers/php-sms contains the following files

Loading the files please wait ...