PHPackages                             matatirosoln/doctrine-filemaker-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. matatirosoln/doctrine-filemaker-driver

ActiveLibrary[Database &amp; ORM](/categories/database)

matatirosoln/doctrine-filemaker-driver
======================================

Use FileMaker through CWP as your backend database

0.2.1(7y ago)1443MITPHPPHP &gt;=7.0.0

Since Oct 4Pushed 7y agoCompare

[ Source](https://github.com/matatirosolutions/doctrine-filemaker-driver)[ Packagist](https://packagist.org/packages/matatirosoln/doctrine-filemaker-driver)[ RSS](/packages/matatirosoln-doctrine-filemaker-driver/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (11)Versions (14)Used By (0)

Doctrine FileMaker driver
=========================

[](#doctrine-filemaker-driver)

A Doctrine driver to interact with FileMaker using the CWP API.

Installation
------------

[](#installation)

```
composer require matatirosoln/doctrine-filemaker-driver

```

Configuration
-------------

[](#configuration)

In your Doctrine configuration comment out

```
driver: xxxx

```

and replace it with

```
driver_class: MSDev\DoctrineFileMakerDriver\FMDriver

```

Conventions
-----------

[](#conventions)

1. Create a model to represent a FileMaker **layout**. Set the name of the layout as the model table.

    ```
     /**
      * Keyword
      *
      * @Table(name="Keyword")
      * @Entity(repositoryClass="Repository\KeywordRepository")
      */
      class Keyword

    ```
2. In your model create an id field which is mapped to the special rec\_id pseudo field

    ```
     /**
      * @var int
      *
      * @Column(name="rec_id", type="integer")
      */
     private $id;

    ```
3. Create your 'actual' ID field, as used for relationships, as a separate property of your model. Set its GeneratedValue strategy to be `Custom` which will mean that Doctrie will wait for FM to assign that value - the assumption being that this is an auto-enter calc field (probaby Get(UUID)). You then need to specifiy the CustomIdGenerator and set this to `MSDev\DoctrineFileMakerDriver\FMIdentityGenerator` so that the value is returned as a string.

    ```
    /**
     * @var string
     *
     * @Column(name="_pk_ClientID", type="string" length=255)
     * @Id
     * @GeneratedValue(strategy="CUSTOM")
     * @CustomIdGenerator(class="MSDev\DoctrineFileMakerDriver\FMIdentityGenerator")
     */
    private $uuid;

    ```

    Alternatively you could generate the UUIDs in your model constructor (using for example [ramsey/uuid](https://github.com/ramsey/uuid)). In this case you'd end up with something like

    ```
     /**
      * @var string
      *
      * @Column(name="__pk_CanvasID", type="string", length=255)
      * @Id
      */
      private $uuid;

      public function __construct()
      {
          $this->uuid = Uuid::uuid4()->toString();
      }

    ```
4. Add other properties as required. To access related fields on your layout enclose the field name in single quotes in the column mapping.

    ```
      /**
       * @var string
       *
       * @Column(name="'absCon::email'", type="string", length=255)
       */
      private $contactEmail;

    ```
5. If you need access to the record modification ID you can add the special mod\_id pseudo property

    ```
     /**
      * @var int
      *
      * @Column(name="mod_id", type="integer")
      */
     private $modId;

    ```
6. To access query metadata add a rec\_meta pseudo property of type json\_array

    ```
     /**
     * @var array
     *
     * @Column(name="rec_meta", type="json_array")
     */
     private $meta;

    ```

    This will be populated with an array containing

    ```
     [
          'found' => (int)$this->response->getFoundSetCount(),
          'fetch' => (int)$this->response->getFetchCount(),
          'total' => (int)$this->response->getTableRecordCount(),
     ]

    ```

    Which you can then access from any record in your returned set.

Considerations
--------------

[](#considerations)

1. Because of the way in which more 'conventional' databases handle relationships, there is no concept of a portal. To access related data create a corresponding model for that table (layout) and create standard Doctrine relationships (OneToOne, OneToMany, ManyToOne etc).
2. If your model contains caclulation fields you will run into issues when trying to create a new record, since Doctrine will try and set those fields to null. One 'solution' to this is to create a 'stub' of your model which contains only the fields which are necesary to create a new record and to instantiate that for record creation. If you head down this route you'll likely want to create an interface which both your stub and your real entity implement so that you can typehint appropriately.

See also
--------

[](#see-also)

This driver has been developed for use within Symfony applications (because that's what we do). The [Doctrine FileMaker bundle](https://github.com/matatirosolutions/doctrine-filemaker-driver-bundle "Doctrine FileMaker bundle") includes this driver as well as creating services to access scripts, containers, valuelists and more.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~54 days

Total

13

Last Release

2860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9a4e991a9ff25d75fa75c464cabedc606b6ec1dda536404593bca257bf2b3d2?d=identicon)[matatirosolutions](/maintainers/matatirosolutions)

---

Top Contributors

[![steveWinter](https://avatars.githubusercontent.com/u/1171712?v=4)](https://github.com/steveWinter "steveWinter (32 commits)")

---

Tags

doctrinedbalFileMaker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matatirosoln-doctrine-filemaker-driver/health.svg)

```
[![Health](https://phpackages.com/badges/matatirosoln-doctrine-filemaker-driver/health.svg)](https://phpackages.com/packages/matatirosoln-doctrine-filemaker-driver)
```

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M35](/packages/scienta-doctrine-json-functions)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[kdyby/doctrine

Doctrine integration into Nette Framework

1091.0M86](/packages/kdyby-doctrine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
