locky42 / leopard-doctrine-pgvector-type
There is no license information available for the latest version (1.0.3) of this package.
Doctrine custom type for pgvector
Package info
github.com/locky42/leopard-doctrine-pgvector-type
pkg:composer/locky42/leopard-doctrine-pgvector-type
1.0.3
2025-10-29 19:03 UTC
Requires
- php: ^8.3
- doctrine/dbal: ^4
- locky42/leopard-doctrine: ^1.0
- locky42/leopard-events: ^1.0
README
This project provides a custom Doctrine type for integrating PGVector, a PostgreSQL extension for vector similarity search, into your PHP applications.
Features
- Seamless integration of PGVector with Doctrine ORM.
- Support for storing and querying vector data.
- Easy configuration and usage.
Requirements
- PHP 8.3 or higher
- PostgreSQL with PGVector extension installed
- Doctrine ORM
Installation
Install the package via Composer:
composer require locky42/leopard-doctrine-pgvector-type
Usage
- Update your entity mapping to use the
vectortype:
#[ORM\Entity] class ExampleEntity { #[ORM\Column(type: "vector", options: ["dimension" => 1536], nullable: true)] private ?array $embedding = null; }
- Run migrations to apply changes to your database schema.
Use
orm:schema-tool:updatecommand
Contributing
Contributions are welcome! Please submit a pull request or open an issue for discussion.
License
This project is licensed under the UOS License.