phpinnacle / ferry
A plugin for Laravel Filament that manages data source connections.
Requires
- php: ^8.4
- ext-pdo: *
- filament/filament: ^4.0|^5.0
- phpinnacle/common: ^1.0
- phpinnacle/rosetta: ^1.0
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-02 21:39:54 UTC
README
Ferry adds a data source connections section to the admin panel: administrators can create, edit, test, enable/disable and delete connections to 1C databases, and Ferry keeps a local snapshot of each source structure that later drives synchronization setup. Creating synchronizations and field mapping are out of scope for this package.
Features
Connectionmodel with an encrypted password that is never returned to the interface.ConnectionTesterservice that opens a temporary connection with the current (possibly unsaved) form values, runs a lightweight query and reports a sanitized result.- Queued structure preparation built on
phpinnacle/rosetta, storing the semantic 1C metadata asConnectionMetadatarecords. - Filament
ConnectionResourcewith create/edit/list pages, "Test connection" and "Fetch structure" actions, a structure status badge and driver-based default port suggestion. - Policy-backed connection management (
ConnectionPolicy), custom database connection and optional tenancy.
Installation
composer require phpinnacle/ferry
php artisan vendor:publish --tag="phpinnacle-ferry-migrations"
php artisan migrate
Register FerryPlugin::make() in the target Filament panel. Publish phpinnacle-ferry-config when using a non-default database connection, tenant model or timeout. Structure preparation runs on the queue, so a worker must be running.
Source structure
Creating a connection, or changing any of its credentials, starts a new preparation run: the connection switches to StructureStatus::Preparing and PrepareStructureJob is dispatched after the database transaction commits. Only the connection id and the run id travel through the queue; credentials never do.
The run reads the source in bounded chunks and writes them into a draft revision. The published snapshot is replaced only once the whole draft is complete, so a failed refresh never damages the previous one. A source without Rosetta-supported objects is a valid empty snapshot.
use PHPinnacle\Ferry\Enums\StructureStatus; use PHPinnacle\Ferry\Models\Connection; $connection = Connection::query() ->where('is_active', true) ->where('status', StructureStatus::Ready) ->firstOrFail(); foreach ($connection->publishedMetadata()->get() as $object) { $object->kind; // PHPinnacle\Rosetta\Enums\MetadataKind $object->system; // array<string, PHPinnacle\Rosetta\Contracts\Field> $object->properties; // list<PHPinnacle\Rosetta\Data\MetadataProperty> $object->values; // list<PHPinnacle\Rosetta\Data\EnumerationValue> $object->children; // document tabular sections }
publishedMetadata() returns the root objects of the published revision; use the metadata() relation to reach every stored revision. is_active states whether the connection may be used at all, while status only reports whether its local structure is ready.
When a run fails for good, the connection switches to StructureStatus::Failed, keeps its previous snapshot, stores a sanitized description in last_error and reports the original exception through report(). An interrupted run that stops sending heartbeats is retired on the next preparation attempt.
Configuration
phpinnacle-ferry.structure tunes the preparation pipeline: chunk_size root objects per job, the job timeout, the retry backoff delays, and stale_after seconds before a silent run is considered interrupted.
Testing
composer test
Changelog and license
See CHANGELOG. Released under the MIT License.