PHPackages                             qbbr/pgsql-doctrine-random-function - 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. qbbr/pgsql-doctrine-random-function

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

qbbr/pgsql-doctrine-random-function
===================================

PostgreSQL RANDOM() function for Doctrine ORM

1.0.1(10y ago)4121.7k↓72.4%2[2 PRs](https://github.com/qbbr/PgsqlDoctrineRandomFunction/pulls)MITPHP

Since Mar 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/qbbr/PgsqlDoctrineRandomFunction)[ Packagist](https://packagist.org/packages/qbbr/pgsql-doctrine-random-function)[ Docs](https://github.com/qbbr/PgsqlDoctrineRandomFunction)[ RSS](/packages/qbbr-pgsql-doctrine-random-function/feed)WikiDiscussions master Synced yesterday

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

PgsqlDoctrineRandomFunction
===========================

[](#pgsqldoctrinerandomfunction)

PostgreSQL RANDOM() function for Doctrine ORM

[![Latest Stable Version](https://camo.githubusercontent.com/aef2ee2d837a19f78cdf34b1246339a31db7b150cf341207f4932eafa7e535d1/68747470733a2f2f706f7365722e707567782e6f72672f716262722f706773716c2d646f637472696e652d72616e646f6d2d66756e6374696f6e2f762f737461626c65)](https://packagist.org/packages/qbbr/pgsql-doctrine-random-function)[![Total Downloads](https://camo.githubusercontent.com/7c446cfa9ee9e3b579c007d35ef65e58e07ed98d053a538ea215b0f1f94467b7/68747470733a2f2f706f7365722e707567782e6f72672f716262722f706773716c2d646f637472696e652d72616e646f6d2d66756e6374696f6e2f646f776e6c6f616473)](https://packagist.org/packages/qbbr/pgsql-doctrine-random-function)[![License](https://camo.githubusercontent.com/562c16b27a42591f1bbc39566849c332af09a1b2549d1e91b124c45f7132bc7c/68747470733a2f2f706f7365722e707567782e6f72672f716262722f706773716c2d646f637472696e652d72616e646f6d2d66756e6374696f6e2f6c6963656e7365)](https://packagist.org/packages/qbbr/pgsql-doctrine-random-function)

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

[](#installation)

### Step 1: Download the package

[](#step-1-download-the-package)

```
$ composer require qbbr/pgsql-doctrine-random-function
```

### Step 2: Configuration

[](#step-2-configuration)

```
# app/config/config.yml

doctrine:
    orm:
        # ...
        dql:
            numeric_functions:
                Random: Qbbr\PgsqlDoctrineRandomFunction\DQL\RandomFunction
```

Usage
-----

[](#usage)

```
$em = $this->getDoctrine()->getManager();

$result = $em->createQueryBuilder()
    ->select('e')
    ->from('AppBundle:Entity', 'e')
    ->orderBy('RANDOM()')
    ->setMaxResults(10)
    ->getQuery()
    ->getResult();
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~1 days

Total

2

Last Release

3765d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/131593?v=4)[Innokenty](/maintainers/qbbr)[@qbbr](https://github.com/qbbr)

---

Top Contributors

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

---

Tags

doctrine-ormphppostgresqlsymfonyrandomsymfonydoctrinepostgresqlpgsqlfunctionqbbr

### Embed Badge

![Health badge](/badges/qbbr-pgsql-doctrine-random-function/health.svg)

```
[![Health](https://phpackages.com/badges/qbbr-pgsql-doctrine-random-function/health.svg)](https://phpackages.com/packages/qbbr-pgsql-doctrine-random-function)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4747.0M12](/packages/fresh-doctrine-enum-bundle)[oro/doctrine-extensions

Doctrine Extensions for MySQL and PostgreSQL.

34412.3M24](/packages/oro-doctrine-extensions)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[goodwix/doctrine-json-odm

JSON Object-Document Mapping bundle for Symfony and Doctrine

2226.9k](/packages/goodwix-doctrine-json-odm)

PHPackages © 2026

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