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

Maintainers

Package info

github.com/locky42/leopard-doctrine-pgvector-type

pkg:composer/locky42/leopard-doctrine-pgvector-type

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.3 2025-10-29 19:03 UTC

This package is auto-updated.

Last update: 2026-03-01 00:48:28 UTC


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

  1. Update your entity mapping to use the vector type:
#[ORM\Entity]
class ExampleEntity
{
    #[ORM\Column(type: "vector", options: ["dimension" => 1536], nullable: true)]
    private ?array $embedding = null;
}
  1. Run migrations to apply changes to your database schema. Use orm:schema-tool:update command

Contributing

Contributions are welcome! Please submit a pull request or open an issue for discussion.

License

This project is licensed under the UOS License.