Download the PHP package dschuppelius/php-common-toolkit without Composer

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

php-common-toolkit

General-purpose PHP utility toolkit providing platform-agnostic helpers, CSV processing, and executable wrappers.

PHP


Features


Architecture


Requirements

The following tools are required to successfully run dschuppelius/php-common-toolkit:

1. TIFF Tools

Required for processing and handling TIFF files.

2. Xpdf

Required for handling PDF files.

3. ImageMagick

For converting and processing image files.

4. muPDF Tools

For processing PDF and XPS documents.

5. QPDF

For advanced PDF manipulation and processing.

Install the Toolkit into your Project

The Toolkit requires a PHP version of 8.1 or higher. The recommended way to install the SDK is through Composer.


Usage Examples

Value Objects

Immutable, exakt rechnende Value Objects unter CommonToolkit\ValueObjects — Konstruktion über benannte Factories (of() wirft bei ungültiger Eingabe, tryFrom()/ofNullable() liefern null). Sensible Identifikatoren (Iban, EmailAddress, PhoneNumber, VatNumber, CreditorIdentifier, GermanTaxId, GermanTaxNumber) implementieren bewusst weder Stringable noch JsonSerializable — Klarwert nur über getValue(), Anzeige über masked().

CSV Processing

Bank Validation

Bankleitzahl-/BIC-Daten (BLZ/BIC data)

Die Bundesbank-Datendateien werden mit dem Paket ausgeliefert, daher funktionieren BankHelper::bicFromIBAN(), bicFromBLZ(), blzFromBIC() und checkBIC() out-of-the-box auch offline – ohne vorherigen Online-Lauf:

Bei Ablauf (expiry_days in config/helper.json, Default 365 Tage) werden die Daten beim nächsten Zugriff online von bundesbank.de aktualisiert. Schlägt die Aktualisierung fehl (z.B. offline), wird die vorhandene – ggf. veraltete, aber gültige – ausgelieferte Datei weiterverwendet (Stale-Fallback) statt leerer Ergebnisse.

Den Netzzugriff kannst du programmatisch steuern:

Manuelles Aktualisieren: Die beiden Dateien in data/ können jederzeit durch die aktuellen Versionen von bundesbank.de ersetzt werden (URLs in config/helper.json unter Bundesbank.resourceurl bzw. Zahlungsdienstleister.resourceurl). Nach dem Ersetzen BankHelper::clearCache() aufrufen, falls der Prozess weiterläuft.

MIME-Typ ohne Datei (Byte-basiert)

File::mimeType() braucht einen Pfad. Liegt der Inhalt nur im Speicher (Upload, HTTP-Antwort, entpackter Archiv-Eintrag), erkennt File::mimeTypeFromContent() den Typ direkt aus den Bytes – gleiche Rückgabe-Semantik (string|false):

Erkannt wird primär über finfo::buffer(). Fehlt ext-fileinfo oder liefert es kein belastbares Ergebnis (application/x-empty, application/octet-stream), greift File::mimeTypeFromMagicBytes() – eine deterministische Magic-Bytes-Tabelle (PDF, PNG, JPEG, GIF, ZIP, TIFF, GZIP, BMP, RIFF/WebP) plus Inhaltsheuristik für XML, HTML, JSON und Text. Unbekannter Binärinhalt ergibt application/octet-stream, ein leerer String false.

Currency Formatting

Enum Usage

Configured Helper mit CommandBuilder

Das Toolkit nutzt den CommandBuilder aus dem php-config-toolkit für elegantes Command-Building mit externen Tools:

Eigene Helper mit Executable-Konfiguration

Erstelle eigene Helper-Klassen die externe Tools nutzen:

Mit passender Konfigurationsdatei (config/image_executables.json):


Executable Configuration

Das Toolkit nutzt JSON-Konfigurationsdateien für externe Tools. Die Konfiguration ermöglicht:

Verfügbare Methoden in ConfiguredHelperAbstract

Methode Beschreibung
getConfiguredCommand($name, $params) Baut einen Shell-Befehl mit Platzhalter-Ersetzung
getConfiguredJavaCommand($name, $params) Baut einen Java-Befehl (java -jar ...)
isExecutableAvailable($name) Prüft ob ein Tool verfügbar ist
getExecutablePath($name) Gibt den konfigurierten Pfad zurück
getResolvedExecutableConfig($name, $params) Gibt die vollständige Tool-Konfiguration zurück

License

This project is licensed under the MIT License.

Daniel Joerg Schuppelius 📧 [email protected]


All versions of php-common-toolkit with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <8.6
ext-bcmath Version *
ext-dom Version *
ext-intl Version *
ext-zip Version *
dschuppelius/php-config-toolkit Version ^0.5
maxmind-db/reader Version ^1.11
symfony/process Version ^6.4 || ^7.0 || ^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 dschuppelius/php-common-toolkit contains the following files

Loading the files please wait ...