Download the PHP package moko-github/api-si-satellite without Composer

On this page you can find all versions of the php package moko-github/api-si-satellite. 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 api-si-satellite

moko-github/api-si-satellite

Infrastructure générique pour satellites Laravel connectés à une API externe.

Fournit :


Prérequis


Installation

Publier les fichiers

Ou manuellement :

Variables d’environnement

Variable Défaut Rôle
SATELLITE_API_URL URL de base de l’API distante
SATELLITE_API_TOKEN Token Bearer pour l’authentification
SATELLITE_API_TIMEOUT 10 Timeout HTTP en secondes
SATELLITE_WEBHOOK_SECRET Secret HMAC SHA-256 pour vérifier les webhooks (généré automatiquement par satellite:install)
SATELLITE_LOG_LEVEL debug Niveau de log du canal satellite dans config/logging.php
SATELLITE_LOG_CHANNEL satellite Canal Laravel à utiliser pour les logs du client HTTP
SATELLITE_VERIFY_SSL true Vérification du certificat SSL. Mettre à false pour les environnements avec certificats auto-signés (ex : qualification)

SATELLITE_LOG_LEVEL contrôle à quel niveau on logue (debug, info, warning…). SATELLITE_LOG_CHANNEL contrôle dans quel canal on logue. Les deux sont complémentaires : le canal satellite est créé dans config/logging.php par satellite:install, avec SATELLITE_LOG_LEVEL comme niveau minimum.

Dépannage : le canal de log satellite n’a pas été créé

satellite:install insère le canal satellite dans config/logging.php en l’ajoutant au tableau 'channels'. Si votre fichier config/logging.php est fortement personnalisé (tableau 'channels' absent, par exemple), la commande ne modifie pas le fichier en silence : elle affiche un avertissement et le snippet à coller manuellement.

La commande est idempotente : vous pouvez la relancer sans risque.

Pour l’ajouter manuellement, collez ce bloc dans le tableau 'channels' de config/logging.php :

Si vous préférez réutiliser un canal existant plutôt que d’en créer un, pointez simplement SATELLITE_LOG_CHANNEL vers ce canal (ex : SATELLITE_LOG_CHANNEL=stack).

Vérifiez ensuite que tout est en place avec php artisan satellite:ping (voir Tester la connectivité).


Utilisation

1. Créer un client HTTP spécifique

Étendre SatelliteClient dans le package privé de l’application :

2. Protéger une route webhook

Le middleware lit l’en-tête X-Webhook-Signature et la compare via hash_equals (temps constant).

3. Utiliser les stubs publiés

Après satellite:install, deux stubs sont disponibles dans stubs/satellite/ :

Stub Usage
WebhookController.stub Contrôleur de réception des webhooks
SyncJob.stub Job de synchronisation cursor-based

Gérer les erreurs

SatelliteException expose statusCode, endpoint et errors :


Tester la connectivité

La commande satellite:ping vérifie que l'application peut joindre l'API distante.

Exemple de sortie en succès :

Exemple de sortie en erreur :


Structure


Licence

MIT


All versions of api-si-satellite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.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 moko-github/api-si-satellite contains the following files

Loading the files please wait ...