PHPackages                             kspitfire/pgsql-doctrine-round-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. kspitfire/pgsql-doctrine-round-function

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

kspitfire/pgsql-doctrine-round-function
=======================================

PostgreSQL ROUND() function for Doctrine ORM

1.3(6y ago)04.6kMITPHP

Since Sep 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/kspitfire/pgsql-doctrine-round)[ Packagist](https://packagist.org/packages/kspitfire/pgsql-doctrine-round-function)[ Docs](https://github.com/kspitfire/PgSqlRoundFunction)[ RSS](/packages/kspitfire-pgsql-doctrine-round-function/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

PqSqlRoundFunction
==================

[](#pqsqlroundfunction)

ROUND() function implementation for Doctrine DQL

[![Latest Stable Version](https://camo.githubusercontent.com/61abbb3d4bb8052a178988b4e097f4330d0ac3770f0256c6f41302384a301e04/68747470733a2f2f706f7365722e707567782e6f72672f6b73706974666972652f706773716c2d646f637472696e652d726f756e642d66756e6374696f6e2f762f737461626c65)](https://packagist.org/packages/kspitfire/pgsql-doctrine-round-function)[![Total Downloads](https://camo.githubusercontent.com/a15d4672cd6ee4cfbfb285aa62220a62627dc42161724cbdbb4e80de395970dd/68747470733a2f2f706f7365722e707567782e6f72672f6b73706974666972652f706773716c2d646f637472696e652d726f756e642d66756e6374696f6e2f646f776e6c6f616473)](https://packagist.org/packages/kspitfire/pgsql-doctrine-round-function)[![License](https://camo.githubusercontent.com/f37418f953971bd06d8d6b577c329c0d685dfce0ca5cedebbe2fa865fb1b7320/68747470733a2f2f706f7365722e707567782e6f72672f6b73706974666972652f706773716c2d646f637472696e652d726f756e642d66756e6374696f6e2f6c6963656e7365)](https://packagist.org/packages/kspitfire/pgsql-doctrine-round-function)

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

[](#installation)

```
$ composer require kspitfire/pgsql-doctrine-round-function
```

Configuration
-------------

[](#configuration)

```
# app/config/config.yml

doctrine:
    orm:
        # ...
        dql:
            numeric_functions:
                Round: Kspitfire\PgSqlRoundFunction\DQL\RandomFunction
```

Usage
-----

[](#usage)

```
$em = $this->get('doctrine.orm.default_entity_manager');

// with precision
$resultWithPrecision = $em->getRepository(Entity::class)
    ->createQueryBuilder('e')
    ->select('ROUND(e.fieldName / 15, 2) as num')
    ->setMaxResults(1)
    ->getQuery()
    ->getSingleScalarResult();

// without precision
$resultWithoutPrecision = $em->getRepository(Entity::class)
    ->createQueryBuilder('e')
    ->select('ROUND(e.fieldName / 15) as num')
    ->setMaxResults(1)
    ->getQuery()
    ->getSingleScalarResult();
```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

2436d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47b843a2c8b3a5165aaacb8870c83423a9cd195ee00f16fc57d2530001a11a80?d=identicon)[kspitfire](/maintainers/kspitfire)

---

Top Contributors

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

---

Tags

symfonydoctrinepostgresqlpgsqlfunctionround

### Embed Badge

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

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

###  Alternatives

[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[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.9M35](/packages/scienta-doctrine-json-functions)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[boldtrn/jsonb-bundle

A library adding the support for JSONB columns of PostgreSQL to Doctrine.

57817.6k](/packages/boldtrn-jsonb-bundle)[goodwix/doctrine-json-odm

JSON Object-Document Mapping bundle for Symfony and Doctrine

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

PHPackages © 2026

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