PHPackages                             glauberkyves/mysql-functions-doctrine2 - 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. glauberkyves/mysql-functions-doctrine2

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

glauberkyves/mysql-functions-doctrine2
======================================

MySQL Function for Doctrine : CONCAT\_WS

0.1.0(11y ago)019.8k↑50%1MITPHP

Since Feb 7Pushed 10y ago2 watchersCompare

[ Source](https://github.com/glauberkyves/mysql-functions-doctrine2)[ Packagist](https://packagist.org/packages/glauberkyves/mysql-functions-doctrine2)[ RSS](/packages/glauberkyves-mysql-functions-doctrine2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

MySQL functions Doctrine2
=========================

[](#mysql-functions-doctrine2)

This library provides you MySQL functions for Doctrine2.

At the moment are supported

- CONCAT\_WS
- GEO
- DATE
- YEAR
- MONTH
- DAY

Feel free to fork and add other functions.

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

[](#installation)

### Get the bundle

[](#get-the-bundle)

Add this in your composer.json

```
{
	"require": {
		"glauberkyves/mysql-functions-doctrine2": "1.*"
	}
}
```

and then run

```
php composer.phar update
```

or

```
composer update
```

if you installed composer globally.

### Add the classes to your configuration

[](#add-the-classes-to-your-configuration)

```
$config = new \Doctrine\ORM\Configuration();
$config->addCustomStringFunction('concat_ws', 'GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlRand');

$em = EntityManager::create($dbParams, $config);
```

You can of course pick just the functions you need.

### Use with Symfony2

[](#use-with-symfony2)

If you install the library in a Symfony2 application, you can add this in your config.yml

```
# app/config/config.yml
doctrine:
    orm:
        # ...
        entity_managers:
            default:
                # ...
                dql:
                    string_functions:
                        concat_ws: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlConcatWs
                        month: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlMonth
                    numeric_functions:
                        geo: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlGeo
                    datetime_functions:
                        date: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlDate
                        day: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlDay
                        year: GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlYear
```

### Usage

[](#usage)

You can now use the functions in your DQL Query

```
$query = 'SELECT CONCAT_WS('string', 'string') FROM ...';
$em->createQuery($query);

$query = 'SELECT GEO(-15.5656, -47.5656, t.latitude, t.longitude) FROM tb_address t ...';
$em->createQuery($query);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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

Unknown

Total

1

Last Release

4112d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/01d8655e9362b0201e8101938cd7730bbd032d4723b9d33b9751854e184861af?d=identicon)[glauberkyves](/maintainers/glauberkyves)

---

Top Contributors

[![fellps](https://avatars.githubusercontent.com/u/2119725?v=4)](https://github.com/fellps "fellps (3 commits)")[![glauberkyves](https://avatars.githubusercontent.com/u/3825094?v=4)](https://github.com/glauberkyves "glauberkyves (2 commits)")

---

Tags

mysqldoctrinefunctionglauberkyves

### Embed Badge

![Health badge](/badges/glauberkyves-mysql-functions-doctrine2/health.svg)

```
[![Health](https://phpackages.com/badges/glauberkyves-mysql-functions-doctrine2/health.svg)](https://phpackages.com/packages/glauberkyves-mysql-functions-doctrine2)
```

###  Alternatives

[oro/doctrine-extensions

Doctrine Extensions for MySQL and PostgreSQL.

34411.8M19](/packages/oro-doctrine-extensions)[scienta/doctrine-json-functions

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

58523.9M36](/packages/scienta-doctrine-json-functions)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[mapado/mysql-doctrine-functions

MySQL Function for Doctrine : RAND(), ROUND() DATE(), DATE\_FORMAT()...

44271.5k1](/packages/mapado-mysql-doctrine-functions)[fza/mysql-doctrine-levenshtein-function

Provides the `LEVENSHTEIN()` and `LEVENSHTEIN\_RATIO()` MySQL functions for Doctrine2.

47115.8k1](/packages/fza-mysql-doctrine-levenshtein-function)[okapon/doctrine-set-type-bundle

Provides support of MySQL SET type for Doctrine2 in Symfony2 applications.

11159.0k](/packages/okapon-doctrine-set-type-bundle)

PHPackages © 2026

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