Download the PHP package satag/doctrine-firebird-driver without Composer

On this page you can find all versions of the php package satag/doctrine-firebird-driver. 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 doctrine-firebird-driver

Doctrine Firebird driver

codecov

Firebird driver for the Doctrine DBAL

Requirements

To utilize this library in your application code, the following is required:

Version Compatibility Matrix

| Feature | FB 3.0 | FB 4.0 | FB 5.0 |

|---------|--------|--------|--------| | Basic DBAL (queries, transactions) | ✅ | ✅ | ✅ | | Schema introspection | ✅ | ✅ | ✅ | | Named parameters | ✅ | ✅ | ✅ | | BLOB support | ✅ | ✅ | ✅ | | Exception Mode (Firebird\Exception) | ✅ | ✅ | ✅ | | SQLSTATE Error Mapping | ✅ | ✅ | ✅ | | Standard Pagination (OFFSET/FETCH) | ✅ | ✅ | ✅ | | fbird_execute_auto() auto-commit | ✅ | ✅ | ✅ | | fbird_connection_info() / DbInfo | ✅ | ✅ | ✅ | | Savepoints (nested transactions) | ✅ | ✅ | ✅ | | IBatch API (bulk INSERT 10-12×) | ❌ | ✅ | ✅ | | RETURNING multi-row | ❌ | ✅ | ✅ | | SCROLL cursors | ❌ | ✅ | ✅ | | DECFLOAT type | ❌ | ✅ | ✅ | | TIME ZONE / TIMESTAMP TZ | ❌ | ✅ | ✅ |

Breaking change (php-firebird v7.2.0+): Firebird 2.5 support dropped. Minimum server version is 3.0.

Windows Support: Starting with v7.3.0, pre-built Windows DLLs are available for PHP 8.2, 8.3, 8.4, and 8.5 (NTS and TS).

Note: Firebird 3.0 is the primary production target (Amicron ERP). Features marked ❌ for FB3 are either absent on the server or require Firebird 4.0+. Feature detection is automatic — no manual configuration is needed.

License & Disclaimer

See LICENSE file. Basically: Use this library at your own risk.

Limitations of Schema Manager

This library does not fully support generation through the Schema Manager, i.e.:

  1. Generation of database tables, views, etc. from entities.
  2. Generation of entities from database tables, views, etc.

Reasons for not investing time in schema generation include that Firebird does not allow renaming of tables, which in turn makes automated schema updates annoying and over-complicated. Better results are probably achieved by writing manual migrations.

Installation

Via Composer (satag/doctrine-firebird-driver):

composer require satag/doctrine-firebird-driver

Via Github:

git clone https://github.com/satwareAG/doctrine-firebird-driver.git

Error Handling with SQLSTATE

With php-firebird v7.0.0+, the driver provides standardized SQLSTATE error codes for better error classification and handling. When Exception Mode is enabled (default), the driver maps these to specific Doctrine exceptions.

Doctrine Exception Mapping

SQLSTATE Class Doctrine Exception Description
08xxx ConnectionException Connection errors
23xxx ConstraintViolation Integrity constraints
23502 NotNullConstraintViolationException NOT NULL violation
23503 ForeignKeyConstraintViolationException FK violation
23505 UniqueConstraintViolationException Unique violation
40xxx DeadlockException Transaction rollback
42xxx SyntaxErrorException SQL syntax errors

Custom Exception Handling

Working with LIKE Expressions

Firebird has a known issue where LIKE parameters longer than a column’s VARCHAR length can cause silent query failures (zero rows returned instead of an error). This driver automatically wraps the left operand of LIKE/NOT LIKE with CAST(column AS VARCHAR(255)) to prevent this behavior.

Performance note: Casting disables index usage for that predicate and can trigger full table scans on large tables. To mitigate:

Validated across: Firebird 3.0, 4.0, 5.0 (24/24 tests passing)

Configuration

Recommended: Using FirebirdConnection Wrapper (DBAL 4.x Compatible)

For forward compatibility with Doctrine DBAL 4.x, we recommend using the FirebirdConnection wrapper class. This approach properly handles Firebird-specific configuration options and is the recommended way to configure Firebird-specific settings.

Why use FirebirdConnection?

PHP Configuration (Recommended)

Symfony Configuration (YAML)

Configurable LIKE CAST Length

The driver wraps LIKE column operands in CAST(column AS VARCHAR(length)) to prevent silent query failures when parameters exceed column lengths. The CAST length is configurable:

Default: 255 (backward compatible)
Range: 1 to 8191 (Firebird VARCHAR limit)
Parameter: firebird.like_cast_length

Legacy Configuration (Deprecated in DBAL 3.x, Removed in DBAL 4.x)

⚠️ Deprecation Warning: The following configuration approach works in DBAL 3.x but relies on the deprecated VersionAwarePlatformDriver interface, which is removed in DBAL 4.x. Use the FirebirdConnection wrapper above for forward compatibility.

Manual Configuration (Legacy)

Symfony Configuration (YAML)

This driver may be used like any other Doctrine DBAL driver in Symfony, e.g. with doctrine/doctrine-bundle. However, the driver_class option must be specified instead of simply driver. This is due to the driver not being part of the core Doctrine DBAL library.

Sample YAML configuration:

When to adjust like_cast_length:

Invalid configurations throw InvalidConfigurationException:

CharsetMiddleware - Transparent Charset Conversion

Many Firebird databases use a non-UTF-8 wire charset (e.g. ISO8859_1 / WIN1252). The CharsetMiddleware converts string values transparently between your PHP application encoding and the Firebird wire encoding at the DBAL driver level - no manual iconv/mb_convert_encoding calls needed in application code.

Defaults: databaseEncoding: 'Windows-1252' and phpEncoding: 'UTF-8' covers the most common case (Amicron ERP and other WIN1252 Firebird databases).

Symfony Configuration (DoctrineBundle service)

Standalone PHP Configuration

Custom Encoding Pair

How it works:

Requires: ext-mbstring (declared in composer.json)

Testing

The project includes comprehensive test coverage across Firebird 3.0, 4.0, and 5.0 with unit, functional, and integration tests.

Quick Test Commands

Test Coverage

Documentation

Test Requirements

All tests run in Docker containers to ensure consistent environments across Firebird versions. See TESTING.md for detailed setup instructions.

Credits

Authors

Acknowledgements

https://github.com/doctrine/dbal

Fundamental Doctrine DBAL implementation. The driver and platform logic in this library is based on other implementations in the core library, largely \Doctrine\DBAL\Driver\PDOOracle\Driver and \Doctrine\DBAL\Platforms\OraclePlatform, and their respective parent classes.

https://github.com/helicon-os/doctrine-dbal

Whilst a great inspiration for this library - and we very much appreciate the work done by the authors - the library has a few flaws and limitations regarding the Interbase Firebird driver logic:

https://github.com/ISTDK/doctrine-dbal

A fork of https://github.com/helicon-os/doctrine-dbal with a few improvements and fixes.

https://firebirdsql.org/

The main resource for Firebird documentation, syntax, downloads, etc.

AI Context-Setting Statement

As an AI specialized in coding, your task is to support me, Michael Wegener, to improve the PHP Doctrine DBAL driver for the Firebird SQL Server for which I am the current maintainer. The Driver is not based on Firebird PDO, it is based on the PHP Firebird Extension (fbird* functions; ibase* aliases removed in php-firebird v7.2.0). You can reference the following resources for guidance:

The PHP Driver is implemented for PHP 8.2+ and should be covered with PHP Unit and Integration Tests against all supported Firebird Server Versions (3.0+). Have an eye on modern development principles, performance and security.


All versions of doctrine-firebird-driver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-firebird Version ^13.4.0
ext-mbstring Version *
composer-runtime-api Version ^2
doctrine/dbal Version ^4.4 || ^4.5
symfony/polyfill-intl-grapheme Version ^1.33
symfony/polyfill-intl-normalizer Version ^1.33
symfony/polyfill-php83 Version ^1.33
symfony/polyfill-php84 Version ^1.33
symfony/polyfill-php85 Version ^1.33
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 satag/doctrine-firebird-driver contains the following files

Loading the files please wait ...