Firebird driver for the Doctrine DBAL.
This library is completely separate (i.e. abstracted away) from the core Doctrine DBAL library. I.e. it is fully a plug-in.
To utilize this library in your application code, the following is required:
1 Only needed on remote/guest OS, e.g. a remote Ubuntu server or a VM installed through Docker, Vagrant, or XAMPP.
See LICENSE file. Basically: Use this library at your own risk.
This library does not fully support generation through the Schema Manager, i.e.:
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.
Via Composer (kafoso/doctrine-firebird-driver
):
composer install kafoso/doctrine-firebird-driver
Via Github:
git clone git@github.com:kafoso/doctrine-firebird-driver.git
For example of configuration in PHP, see tests/tests/Test/Integration/AbstractIntegrationTest.php
(in the method setUp
).
Additional help may be found at: https://www.doctrine-project.org/projects/doctrine-orm/en/2.5/reference/advanced-configuration.html
This driver may be used like any other Doctrine DBAL driver in Symfony. 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:
doctrine:
dbal:
default_connection: default
connections:
default:
driver_class: Kafoso\DoctrineFirebirdDriver\Driver\FirebirdInterbase\Driver
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: "UTF-8"
To run tests, fix bugs, provide features, etc. the following is required:
You may of course install everything manually using your own VM setup. For help and a stack list (required apt-get packages), see the Vagrantfile.
A few steps are required to run all tests. Unit tests (tests/tests/Test/Unit) will run on all environments. However, integration tests (tests/tests/Test/Integration) require the following because they test against a running Firebird database in the VM:
vagrant up
vagrant ssh
sudo su
apt-get -y install firebird2.5-superclassic
88fb9f307125cc397f70e59c749715e1
. It is re-used when connecting through the DBAL later on.dpkg-reconfigure firebird2.5-superclassic
Reference: https://firebirdsql.org/manual/ubusetup.html
Due to the database being created by the PHP bootstrap script on the fly, root
is needed to run the tests on the VM.
vagrant ssh
sudo su
apt-get install zip -y
(for when installing composer packages)mv composer.phar /usr/bin/composer
cd /var/git/kafoso/doctrine-firebird-driver
composer install
1cd /var/git/kafoso/doctrine-firebird-driver/tests
php ../bin/phpunit tests
1 Composer will say you shouldn't run it as root/super user. This is techically true, but it's fine in the VM.
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.
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:
A fork of https://github.com/helicon-os/doctrine-dbal with a few improvements and fixes.
The main resource for Firebird documentation, syntax, downloads, etc.