PHPackages                             tourze/doctrine-function-collection - 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. tourze/doctrine-function-collection

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

tourze/doctrine-function-collection
===================================

Doctrine Function Collection

1.0.1(4mo ago)01691MITPHPCI passing

Since Apr 12Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/doctrine-function-collection)[ Packagist](https://packagist.org/packages/tourze/doctrine-function-collection)[ RSS](/packages/tourze-doctrine-function-collection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (1)

Doctrine Function Collection
============================

[](#doctrine-function-collection)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/b200aced8e3f1d8976da3d68646fb9c6254e14b19c0786206d2eff77a252ffbe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-function-collection)[![PHP Version Require](https://camo.githubusercontent.com/9dda4c4b097032b73146f5697e7a414993fc963c10909dad824a169eb9feb3cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-function-collection)[![License](https://camo.githubusercontent.com/4bd96a8333d9e914aff371f819e89d778b73e3c8eb60dfa97c8c895ecf80f7b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-function-collection)[![Build Status](https://camo.githubusercontent.com/cfc02f99d37ed8ec956eb4a37b244f92d9253d3d1b80058d39f5095c350c5fe5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tourze/doctrine-function-collection)[![Quality Score](https://camo.githubusercontent.com/da913433d1914e1bcadff748ffd4f28cc39ba816651f2074f6abdbad79bb85b7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/doctrine-function-collection)[![Code Coverage](https://camo.githubusercontent.com/61758e9c925d53f0f76808d8d956e85f5a7b19d132279c8cca75da3cff45550e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/doctrine-function-collection)[![Total Downloads](https://camo.githubusercontent.com/f65d792cbffc783c6d3e6ed2ab3c42750e8928624d67ecef0dd1477661659fa1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f646f637472696e652d66756e6374696f6e2d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-function-collection)

A collection of Doctrine ORM SQL functions that can be used in DQL queries, providing a unified interface for various database functions through a chain function pattern.

Features
--------

[](#features)

- **Unified Interface**: Provides a consistent ChainFunction abstraction for SQL functions
- **Date/Time Functions**: Complete set of date and time manipulation functions
- **String Functions**: Various string manipulation and conditional functions
- **JSON Functions**: Full JSON document processing capabilities
- **Easy Integration**: Simple registration with Doctrine ORM configuration
- **Type Safety**: PHP 8.2+ with strict typing support
- **Comprehensive Testing**: Full test coverage with PHPUnit

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Doctrine ORM 3.0 or higher
- beberlei/doctrineextensions 1.5.0 or higher
- scienta/doctrine-json-functions 6.3.0 or higher

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

[](#installation)

```
composer require tourze/doctrine-function-collection
```

Quick Start
-----------

[](#quick-start)

### 1. Register Functions with Doctrine

[](#1-register-functions-with-doctrine)

Register the functions with your Doctrine Configuration:

```
