Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Df Firebird Laravel Package

dreamfactory/df-firebird

DreamFactory connector for Firebird databases, enabling Firebird tables and data to be exposed as REST APIs through DreamFactory. Adds database support with platform security, roles, and API management. Requires DreamFactory and a Firebird server.

View on GitHub
Deep Wiki
Context7

Getting Started

dreamfactory/df-firebird is a DreamFactory data-source connector — not a standalone Laravel database driver you'd add to a vanilla app. It plugs Firebird (version 2.5/3.0/4.0) into DreamFactory's auto-generated REST layer, so treat it like df-mysql / df-pgsql: a service provider + a BaseDbService subclass + a schema grammar over pdo_firebird.

Minimal path to first request:

# Inside the DreamFactory install root (a Laravel app)
php -m | grep -i firebird          # must show pdo_firebird
composer require dreamfactory/df-firebird

# If the provider isn't auto-discovered (check extra.laravel.providers in the package),
# register it in bootstrap/providers.php (L11) or config/app.php (older):
#   DreamFactory\Provider\Firebird\FirebirdServiceProvider::class

php artisan migrate                 # adds the `firebird` row to service_type
php artisan df:service:import      # optional: import packaged service definitions

Then in the admin UI (Services → Create → Firebird), configure:

  • API Namespace: fb (becomes the URL segment)
  • Host / Port: 127.0.0.1 / 3050
  • Database: either employee (aliased on server) or an absolute path like /var/lib/firebird/3.0/data/employee.fdb
  • Username / Password: Firebird creds (commonly SYSDBA / masterkey on dev)

First use case — prove the connection, then read a table:

# Validate the service is up and introspect
curl -s https://df.internal/api/v2/fb/_schema?refresh=true \
  -H "X-DreamFactory-Api-Key: $KEY"

# Read from a Firebird table
curl -s "https://df.internal/api/v2/fb/_table/CUSTOMERS?limit=5&fields=ID,NAME" \
  -H "X-DreamFactory-Api-Key: $KEY"

Where to look first in the repo:

  1. composer.json — require block tells you which DreamFactory/Laravel line it targets (the 2025 releases track DF 5.x / Laravel 10–11; older DF 4.x will not resolve).
  2. src/Providers/*ServiceProvider.php — how the service type, connection driver, and schema class are bound.
  3. src/Services/*.php — confirms it extends DreamFactory\Core\Services\BaseDbService and which schema / getSchema() you get.
  4. Mirror dreamfactory/df-pgsql in the same DF install as the reference implementation; the Firebird service is intentionally structured the same way.

Implementation Patterns

Expose Firebird CRUD as governed REST. The core pattern is: keep the Firebird schema untouched, put auth/roles/rate-limits in DreamFactory, and let consumers hit /api/v2/fb/_table/{table}. DreamFactory generates a full OpenAPI spec from the schema, so you get GET/POST/PUT/PATCH/DELETE and single-record-by-id endpoints for free. Attach API keys to roles rather than handing out Firebird credentials.

Push business logic into Firebird stored procedures. Firebird has a mature PSQL/EXECUTE BLOCK story; DreamFactory exposes them at /api/v2/fb/_proc/{PROC}?params.... This is usually cleaner than doing multi-statement transactions through the REST layer, and lets DBAs keep logic where it belongs.

Use server-side scripts for shaping. In a scripted service or a post-process event on the Firebird service, you can call the platform API to enrich/reduce payloads:

// post-process script (V8/PHP) on a _table response
$rows = $event['response']['content']['resource'];
foreach ($rows as &$r) {
    $r['name_upper'] = mb_strtoupper($r['NAME'] ?? '');
}
$event['response']['content']['resource'] = $rows;

Filter/order/paginate with DreamFactory's URL language, not raw SQL. ?filter=NAME like 'ACME%'&order=ID DESC&limit=25&offset=50; the connector translates these. For joins use related=ORDERS when FK relationships are introspected, rather than issuing N+1 calls.

Reuse the connection from Laravel code. The service registers a Laravel database connection named after the service, so inside custom code you can usually do DB::connection('fb')->select(...). If the package ships its own Connection/QueryGrammar, run an EXPLAIN-style smoke test before relying on the grammar for subqueries and whereIn.

LLM/MCP integration. DreamFactory generates an OpenAPI spec per service; point your MCP server or LLM tool-calling config at /api/v2/fb/_openapi. Because the spec is derived from _schema, schema quality (types, enums, nullability) directly drives tool-call reliability — see the gotchas.

Gotchas and Tips

  • pdo_firebird is not bundled by default. composer require succeeding means nothing if php -m doesn't list it. Install with apt install php8.2-firebird (distro naming varies) or compile PHP with --with-pdo-firebird; otherwise every request throws a PDO could not find driver.
  • Version mismatch is the #1 install failure. The 2025-02-19 release targets current DF 5.x. Check the package's composer.json require for dreamfactory/df-core and laravel/framework; a DF 4.x host uses Laravel 5 and will refuse to resolve. Pin the exact version and re-read the changelog before upgrading — with 0 stars/0 dependents there is no community safety net.
  • Firebird identifier case. Unquoted identifiers are folded to UPPERCASE. A table created as "Customers" must be queried as "Customers". Schema introspection may return uppercase names — match your filter= and fields= casing against what _schema actually returns before writing client code.
  • No LIMIT/OFFSET. Firebird uses ROWS m TO n. The connector's grammar should rewrite limit/offset; if you drop to raw SQL in a script, write SELECT ... FROM T ROWS 10 TO 20 and remember ROWS counts from 1.
  • No AUTO_INCREMENT. Use generators (NEXT VALUE FOR gen_...) or EXECUTE BLOCK ... RETURNING. The connector cannot synthesize this; inserts into tables with triggers are fine, inserts expecting DB autoincrement are not.
  • Case-insensitive search differs. No ILIKE; use LOWER(col) LIKE LOWER(?). Filters ported from MySQL/PG will silently return zero rows.
  • BLOB SUB_TYPE TEXT encoding. Older Firebird DBs are WIN1252; without a UTF-8 connection charset, text blobs come back mojibake. Firebird 4 defaults to UTF8, 2.5/3.0 often don't. Verify charset in the service config and, if needed, SET NAMES UTF8.
  • Auth plugins. Firebird 3+ uses SRP; if you're using a legacy SYSDBA/masterkey and it fails, check AuthServer/WireCrypt in firebird.conf on the server. This is server-side, not a DreamFactory bug.
  • _schema completeness. Firebird views, computed columns, and BOOLEAN (only 3.0+) may not map to DreamFactory's field types cleanly. If LLM tool-calling matters, extend the schema class in a subclass rather than post-editing the OpenAPI file, and re-run _schema?refresh=true.
  • Debugging. Set APP_DEBUG=true and tail storage/logs/laravel.log; the service logs the failing SQL. Use a throwaway firebirdsql/firebird:3 container with a small .fdb to reproduce schema/CRUD issues before touching production.
  • Extension points. The clean customization seams are: subclass the service (class Foo extends \DreamFactory\...\Firebird) and rebind it in your app's provider, or override the schema class if introspection is wrong. Avoid editing vendor code — composer update will wipe it, and with a single-maintainer, zero-star package you will be patching locally.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource