Download the PHP package astral-php/astral-shipping without Composer

On this page you can find all versions of the php package astral-php/astral-shipping. 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 astral-shipping

astral-php/astral-shipping

Frais de port multi-options pour Astral : forfait, retrait boutique, barèmes pays × poids (Colissimo / Mondial Relay), API agrégateur (Sendcloud).

PHP astral-core

Statut : 0.1.0 — MVP. Publiable sur Packagist.
Philosophie Astral : explicite, sans magie, opt-in — tu déclares les méthodes actives, rien n’est découvert automatiquement.
Ce n’est pas une version 1.0 : voir Limites MVP.

Compatibilité

astral-core PHP astral-shipping
^1.2 8.1 → 8.4 0.x

Le domaine (calcul des offres) n’a aucune dépendance au core : seuls le ServiceProvider, les DAOs et la commande console en ont.

Limites MVP (0.1.0)

Sujet Réalité
Colissimo / Mondial Relay Barèmes contrat (shipping_rates / CSV) — pas d’API transporteur officielle
Grilles tarifaires Non incluses (dépendent de ton contrat ; CSV d’exemple fictif)
Points relais Le package exige pickup_point_id ; le widget navigateur reste à brancher (doc transporteur)
Sendcloud API v2 optionnelle (SENDCLOUD_*) — panne isolée, autres méthodes restent
Boutique Intégré dans Astral Shop (profil standard : forfait + retrait) ; profils avancés = backlog shop

Installation

Développement local (workspace components-astral) :

1. ServiceProvider — config/dependencies.php

2. Migrations

Copie stubs/database/migrations/* vers database/migrations/ du projet hôte, puis :

Table Rôle
shipping_rates Barèmes : méthode × pays × tranche de poids (centimes)
order_shipments Snapshot du mode de livraison de chaque commande

3. Variables d'environnement (si sendcloud est activé)

Copier stubs/.env.shipping.example dans ton .env.

4. Configuration — config/app.php

Modèle : stubs/config/shipping.example.php.

MVP boutique (recommandé pour démarrer) :

Méthodes avancées (à activer explicitement + barèmes / clés) :

Les méthodes disponibles

Code Classe Source du tarif Point relais
flat_rate FlatRateMethod Forfait (config) Non
store_pickup StorePickupMethod Gratuit Non
colissimo_home ColissimoMethod Barème shipping_rates Non
colissimo_pickup ColissimoMethod(pickup: true) Barème Oui
mondial_relay MondialRelayMethod Barème Oui
mondial_relay_home MondialRelayMethod(relay: false) Barème Non
sendcloud SendcloudMethod API Sendcloud (N offres, cache) Selon l'offre
(la tienne) ShippingMethodInterface À toi de voir —

Pourquoi des barèmes pour Colissimo et Mondial Relay ? Parce que tes tarifs dépendent de ton contrat : on les saisit (ou importe en CSV) une fois, le calcul reste instantané, hors-ligne et testable. Voir docs/colissimo-mondial-relay.md.

Utilisation

Vue : stubs/views/shipping/options.php → views/partials/. Exemple de contrôleur : docs/checkout-integration.md.

Barèmes

En base (recommandé)

Import CSV :

Colonnes : method_code,country,min_weight_g,max_weight_g,price_eur,estimated_days. Voir stubs/database/rates.example.csv (valeurs fictives).

Règles : poids en grammes, bornes inclusives (0–500 puis 501–1000), pays exact prioritaire sur *, à égalité le tarif le plus bas.

En config (sans base)

Ajouter un transporteur

Implémente ShippingMethodInterface (3 méthodes) et enregistre-la dans ton AppServiceProvider. Guide : docs/extending.md.

Principes de conception

Structure

Tests

La suite couvre le calcul (forfait, seuil de gratuité, barèmes, priorité pays), SendcloudMethod (client HTTP factice, cache, filtres), le calculateur (tri, doublons, isolation des pannes) et la sélection (point relais obligatoire, prix recalculé). 25 tests (2026-10).

Licence

MIT


All versions of astral-shipping with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
astral-php/astral-core Version ^1.2
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 astral-php/astral-shipping contains the following files

Loading the files please wait ...