Laravel-Firebird (Benson Fork)

TL;DR

We started from an already working, mature Firebird driver for Laravel and brought it to real parity with the first-party drivers (MySQL, PostgreSQL, SQL Server). The result: from an estimated ~51% to ~96% functional parity, 216 tests running against Firebird 3, 4 and 5 (dialects 1 and 3), ~87% line coverage, and a green CI across the whole matrix (PHP 8.3/8.4 × Firebird 3/4/5).

This write-up is for people who live and breathe Firebird — the details below are engine-specific.

The codebase it builds on

benson/laravel-firebird is a fork of harrygulliford/laravel-firebird, which itself descends from the pioneering jacquestvanzuydam/laravel-firebird. Much of the foundation (query grammar, schema grammar, Eloquent integration, FIRST/SKIP pagination, INSERT ... RETURNING, MERGE-based upsert, join mutations via RDB$DB_KEY) already came from that prior work. What we describe here is the refinement and parity layer we built on top of that base.

Why it matters

Firebird has quirks no generic ORM handles on its own: case-sensitive identifiers when quoted, DATE with no time part in dialect 3, NUMERIC/DECIMAL stored as a scaled integer, no lastInsertId(), dialect 1 without delimited identifiers… each one can become a silent production bug. We tackled them head-on.

Real, Firebird-specific bug fixes

1. Scale loss on DECIMAL/NUMERIC (the nastiest one).
Inserting the PHP integer 40 into a DECIMAL(5,2) column stored 0.40 — off by 100×. Cause: Laravel binds integers with PDO::PARAM_INT, and pdo_firebird treats them as the column’s raw scaled value. We now bind integers as PARAM_STR, and Firebird converts the literal to the column type with the correct scale. Strings, floats, where clauses and booleans stay untouched.

2. dropAllTables() with legacy uppercase names.
Tables created without quotes live in UPPERCASE in the catalog (AUDITORIA). Introspection returned the name lowercased, and DROP TABLE "auditoria" failed with -607 Table does not exist. Dropping now uses the real catalog name, working for lowercase (quoted), UPPERCASE (legacy) and mixed-case tables in the same database.

3. date cast triggering conversion errors.
In dialect 3, DATE has no time. Laravel formats every date as Y-m-d H:i:s, and Firebird rejected it with -413 conversion error from string. We ship a SerializesFirebirdDates trait (and a base model) that stores date columns without the time component while keeping datetime intact — using the cast you already declare.

4. exists() over UNION queries.
FIRST 1 was applied only to the first union branch. We now wrap the query in a derived table before limiting.

Server-version aware features

Read more

Jaybird 6.0.5 and Jaybird 5.0.12 released

We are happy to announce the release of Jaybird 6.0.5 and Jaybird 5.0.12, providing bug fixes. Jaybird is the Firebird JDBC driver.

Changes

The following was fixed or changed in Jaybird 6.0.5:

  • JDBC 4.5 support: JaybirdTypeCodes.DECFLOAT and JaybirdType.DECFLOAT now use type code 2015 instead of -6001 (#906)
  • JDBC 4.5 support: implemented methods enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, and isSimpleIdentifier on FBConnection, and added them to interface FirebirdConnection for access in older Java versions (#908)
  • JDBC 4.5 support: implemented “disable escape processing” JDBC escape ({\…\}) (#909)
  • JDBC 4.5 support: FBDatabaseMetaData.getJDBCMinorVersion() should report 5 (for JDBC 4.5) on Java 26 and higher (#915)
  • Fixed: JDBC escapes should not be parsed inside dialect 3 delimited identifiers or dialect 1 string literals (#921)
  • Fixed: IndexOutOfBoundsException in FBCachedBlob.getBytes(long, int) for position or length beyond end of data (#923)
  • Fixed: Using native client, password is limited to 255 bytes (#925)
  • Fixed: Infinite loop in FBPooledConnection#fireConnectionError(SQLException) if the exception has a chained exception and neither is fatal (#927)

The following was fixed or changed in Jaybird 5.0.12:

  • JDBC 4.5 support: JaybirdTypeCodes.DECFLOAT and JaybirdType.DECFLOAT now use type code 2015 instead of -6001 (#917)
  • JDBC 4.5 support: implemented methods enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, and isSimpleIdentifier on FBConnection, and added them to interface FirebirdConnection for access in older Java versions (#918)
  • JDBC 4.5 support: implemented “disable escape processing” JDBC escape ({\…\}) (#920)
  • Fixed: JDBC escapes should not be parsed inside dialect 3 delimited identifiers or dialect 1 string literals (#922)
  • Fixed: IndexOutOfBoundsException in FBCachedBlob.getBytes(long, int) for position or length beyond end of data (#924)
  • Fixed: Using native client, password is limited to 255 bytes (#926)
  • Fixed: Infinite loop in FBPooledConnection#fireConnectionError(SQLException) if the exception has a chained exception and neither is fatal (#928)
  • JDBC 4.5 support: FBDatabaseMetaData.getJDBCMinorVersion() should report 5 (for JDBC 4.5) on Java 26 and higher (#929)

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

Jaybird 6.0.5

Jaybird 6 supports Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 17, Java 21, Java 25, and Java 26.

See also:

Jaybird 5.0.12

Jaybird 5 supports Firebird 2.5, Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 8, Java 11, Java 17, Java 21, Java 25, and Java 26 (support for Java 11 and higher using the Java 11 version of the driver). 

See also:

Jaybird 6.0.4 and Jaybird 5.0.11 released

We are happy to announce the release of Jaybird 6.0.4 and Jaybird 5.0.11, providing bug fixes. Jaybird is the Firebird JDBC driver.

Changes

The following was fixed or changed in Jaybird 6.0.4:

  • Fixed: Statement close of a leaked statement by the cleaner did not detect fatal connection errors (#879)
  • Fixed: Statement.cancel() causes lockup (#892)
  • Fixed: Negative buffer size on Firebird 2.5 if information response is 32KiB or greater (#895)
  • Fixed: FBServiceManager.getAuthPlugins() reported the dbCryptConfig value (#901)
  • Dependency update: updated net.java.dev.jna:jna-jpms from 5.17.0 to 5.18.1 (used by jaybird-native) (#910)
  • Dependency update: updated org.bouncycastle:bcprov-jdk18on from 1.81 to 1.83 (used by chacha64-plugin) (#912)
  • Fixed: FBDatabaseMetaData.getJDBCMinorVersion() should report 4 (for JDBC 4.4) on Java 24 and higher (#913)

The following was fixed or changed in Jaybird 5.0.11:

  • Backported fatal error detection improvements for FBPooledConnection from Jaybird 6 (#899)
  • Fixed: FBServiceManager.getAuthPlugins() reported the dbCryptConfig value (#902)
  • Fixed: Statement.cancel() causes lockup (#904)
  • Fixed: Incomplete detection of fatal connection errors for deferred actions (#905)
  • Dependency update: updated net.java.dev.jna:jna from 5.17.0 to 5.18.1 (used by native and embedded protocols) (#911)
  • Fixed: FBDatabaseMetaData.getJDBCMinorVersion() should report 4 (for JDBC 4.4) on Java 24 and higher (#914)

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

Jaybird 6.0.4

Jaybird 6 supports Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 17, Java 21, and Java 25.

See also:

Jaybird 5.0.11

Jaybird 5 supports Firebird 2.5, Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 8, Java 11, Java 17, Java 21, and Java 25 (support for Java 11 and higher using the Java 11 version of the driver). 

See also:

Jaybird 5.0.10 released

We are happy to announce the release of Jaybird 5.0.10, providing a bug fix. Jaybird is the Firebird JDBC driver.

The following was fixed or changed since Jaybird 5.0.9:

  • Fixed: Negative buffer size on Firebird 2.5 if information response is 32KiB or greater (#894)

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

Jaybird 5 supports Firebird 2.5, Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 8, Java 11, Java 17, Java 21, and Java 24 (support for Java 11 and higher using the Java 11 version of the driver). 

See also:

Jaybird 6.0.3 and Jaybird 5.0.9 released

We are happy to announce the release of Jaybird 6.0.3 and Jaybird 5.0.9, providing bug fixes. Jaybird is the Firebird JDBC driver.

Changes

The following was fixed or changed in Jaybird 6.0.3:

  • Fixed: statement close could cause a hang of the connection (#876)
  • Fixed: ResultSet move incorrectly closes input Clob (#880)
  • Fixed: Batch execution with multiple empty strings resulted in error “Repeated blob id 0:0 in registerBlob()” (#888)
  • Dependency update: updated org.bouncycastle:bcprov-jdk18on from 1.80 to 1.81 (used by chacha64-plugin) (#889)
  • Fixed: On Java 24, Connection.abort, Connection.setNetworkTimeout, and OperationMonitor.initOperationAware always throw “java.lang.SecurityException: checking permissions is not supported” (#890)

The following was fixed or changed in Jaybird 5.0.9:

  • Fixed: ResultSet move incorrectly closes input Clob (#881)

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

Jaybird 6.0.3

Jaybird 6 supports Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 17, Java 21, and Java 24.

See also:

Jaybird 5.0.9

Jaybird 5 supports Firebird 2.5, Firebird 3.0, Firebird 4.0, and Firebird 5.0, on Java 8, Java 11, Java 17, Java 21, and Java 24 (support for Java 11 and higher using the Java 11 version of the driver). 

See also:

Jaybird 6.0.2 and Jaybird 5.0.8 released

We are happy to announce the release of Jaybird 6.0.2 and Jaybird 5.0.8. Both releases provide support for upcoming Firebird 5.0.3 inline blobs, and some other improvements.

For more information on inline blobs, for Firebird 5.0.3 and higher, see also New Article: Data access methods used in Firebird.

Changes

The following was fixed or changed since Jaybird 6.0.1 / Jaybird 5.0.7:

  • Improvement: added authPlugins property on FBManager (#866 / #865)
  • Improvement: increased default and maximum SQL info sizes used for retrieving statement information like columns, parameters and plan information (#869 / #868)
  • Improvement: backported inline blob support (Firebird 5.0.3 and higher) from Jaybird 7 (#870 / #871)
  • Improvement: The time zone mapping was updated (#874 / #875)

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

Jaybird 6.0.2

Jaybird 6 supports Firebird 3.0 and higher, on Java 17, Java 21, and Java 24.

See also:

Jaybird 5.0.8

Jaybird 5 supports Firebird 2.5 and higher, on Java 8, Java 11, Java 17, Java 21, and Java 24 (support for Java 11 and higher using the Java 11 version of the driver). 

See also:

Jaybird 6.0.1 and Jaybird 5.0.7 released

We are happy to announce the release of Jaybird 6.0.1 and Jaybird 5.0.7. Both releases provide a number of performance improvements to blob handling, and some bug fixes.

We plan to offer more blob performance improvements in upcoming releases of Jaybird 5 and 6, for Firebird 5.0.3 and higher (see also New Article: Data access methods used in Firebird).

Jaybird 6.0.1

The following was fixed or changed since Jaybird 6.0.0:

  • Improvement: backported deferred blob open optimization from Jaybird 7 (#842)
  • Fixed: NullPointerException in getGeneratedKeys() with blob columns after (auto)commit (#846)
  • Fixed: Fetch response with status=0 (FETCH_OK) and count=0 was logged on DEBUG as an unexpected response (#848)
  • Improvement: backported fetching all known blob info items on open from Jaybird 7 (#852)
  • Dependency update: updated net.java.dev.jna:jna-jpms from 5.16.0 to 5.17.0 (used by jaybird-native) (#854)
  • Dependency update: updated org.bouncycastle:bcprov-jdk18on from 1.79 to 1.80 (used by chacha64-plugin) (#856)

Jaybird 6 supports Firebird 3.0 and higher, on Java 17, Java 21, and Java 24.

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

See also:

Jaybird 5.0.7

The following has been changed or fixed since Jaybird 5.0.6:

  • Improvement: backported deferred blob open optimization from Jaybird 7 (#841)
  • Fixed: NullPointerException in getGeneratedKeys() with blob columns after (auto)commit (#846)
  • Fixed: Fetch response with status=0 (FETCH_OK) and count=0 was logged on DEBUG as an unexpected response (#848)
  • Improvement: backported performance improvements for blob reading and writing from Jaybird 6 (#850)
  • Improvement: backported fetching all known blob info items on open from Jaybird 7 (#852)
  • Dependency update: updated net.java.dev.jna:jna-jpms from 5.15.0 to 5.17.0 (used by native and embedded protocols) (#855)

Jaybird 5 supports Firebird 2.5 and higher, on Java 8, Java 11, Java 17, Java 21, and Java 24 (support for Java 11 and higher using the Java 11 version of the driver).

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to Firebird-java or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

See also:

Jaybird 6.0.0 released

We’re happy to announce the first release of Jaybird 6, Jaybird 6.0.0.

What’s new

The major changes and new features in Jaybird 6 are:

Upgrading from Jaybird 5 should be straightforward, but please make sure to read Compatibility changes before using Jaybird 6. If you’re using Jaybird with the native or embedded connections, you will need to make some additional changes. See also Upgrading from Jaybird 5 to Jaybird 6.

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to the Firebird-java mailing list or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

See also the full Jaybird 6.0.0 release notes.

Maven

The release is also available on Maven:

groupId: org.firebirdsql.jdbc
artifactId: jaybird
version: 6.0.0

If you use the native or embedded protocol, you need to add the jaybird-native dependency:

groupId: org.firebirdsql.jdbc
artifactId: jaybird-native
version: 6.0.0

For ChaCha64 wire encryption support, add the chacha64-plugin dependency:

groupId: org.firebirdsql.jdbc
artifactId: chacha64-plugin
version: 6.0.0

Jaybird 6.0.0-beta-1 available for testing

Jaybird 6.0.0-beta-1 is now available for testing. You can download the distribution zip from Jaybird 6.0.0-beta-1 (GitHub).

IMPORTANT

This version is provided for testing purposes only. We’d appreciate your feedback, but we’d like to emphasize that this version is not intended for production.

What’s new

The major changes and new features in Jaybird 6 are:

Upgrading from Jaybird 5 should be straightforward, but please make sure to read Compatibility changes before using Jaybird 6. If you’re using Jaybird with the native or embedded connections, you will need to make some additional changes. See also Upgrading from Jaybird 5 to Jaybird 6.

Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to the Firebird-java mailing list or reported on the issue tracker https://github.com/FirebirdSQL/jaybird/issues.

See also the full Jaybird 6.0.0-beta-1 release notes.

Maven

The release is also available on Maven:

groupId: org.firebirdsql.jdbc
artifactId: jaybird
version: 6.0.0-beta-1

If you use the native or embedded protocol, you need to add the jaybird-native dependency:

groupId: org.firebirdsql.jdbc
artifactId: jaybird-native
version: 6.0.0-beta-1

For ChaCha64 wire encryption support, add the chacha64-plugin dependency:

groupId: org.firebirdsql.jdbc
artifactId: chacha64-plugin
version: 6.0.0-beta-1

Jaybird 5.0.6 released

We are happy to announce the release of Jaybird 5.0.6.

The following has been fixed since Jaybird 5.0.5:

  • Fixed: Exceptions during statement execution did not always complete the statement, which could delay transaction commit in auto-commit mode (#806)
  • Fixed: Closing a connection when the database was shutdown, or the connection was otherwise broken, could result in a NullPointerException (#812)
  • Fixed: Error “Column unknown; IND.RDB$CONDITION_SOURCE” when calling DatabaseMetaData.getIndexInfo on Firebird 5.0 with a Firebird 4.0 (ODS 13.0) database (#813)
  • Fixed: Calling ResultSet.wasNull() when on the insert-row throws a SQLException instead of reporting the null-state of the last retrieved column (#816)
  • Fixed: Inserting a row into a result set backed by a server-side scrollable cursor could include the inserted row twice (#819)
  • Improvement: Updated JNA dependency to version 5.15.0 (#823)

Jaybird 5 supports Firebird 2.5 and higher, on Java 8, 11, 17, 21, and 23 (support for Java 11 and higher using the Java 11 version of the driver).

See also:

1 2 3 58