PHPackages                             elshafey/doctrine-window-functions - 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. elshafey/doctrine-window-functions

ActivePackage

elshafey/doctrine-window-functions
==================================

PHP Doctrine Extension that add window functions functionality

0.0.2(5y ago)950.5k↓30.3%3[1 PRs](https://github.com/elshafey/doctrine-window-functions/pulls)PHP

Since Sep 19Pushed 2y ago2 watchersCompare

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

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

Window Functions Extension
==========================

[](#window-functions-extension)

Window functions extension is an extension that enable you to use SQL window functions easily inside doctrine.

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

[](#installation)

`composer require elshafey/doctrine-window-functions`

How To Use
----------

[](#how-to-use)

```
// configure the extension first
$entityManager->getConfiguration()->addCustomStringFunction(
    'WINDOW',
    \Elshafey\DoctrineExtensions\WindowFunctions\Query\Mysql\Window::class
);

// use your window function formula
$q=$entityManager->createQueryBuilder()
->select('p')
->addSelect('WINDOW(ROW_NUMBER()) OVER(PARTITION BY p.name) as rowNumber')
->from('\Entities\Product','p')->getQuery();
```

Important Hint
--------------

[](#important-hint)

Take care while using this extension and don't miss to wrap your **window function** by **WINDOW()**. Examples:

- `WINDOW(COUNT(*)) OVER(PARTITION BY e.columnNamw)`
- `WINDOW(ROW_NUMBER()) OVER(PARTITION BY e.columnNamw)`

Extension Compatibility
-----------------------

[](#extension-compatibility)

Currently this extension is tested and works fine with **MYSQL8**. Other platforms like Oracle, or MS-SQL Server is not tested.

Missed Functionalities
----------------------

[](#missed-functionalities)

The extension doesn't support yet `[frame_clause]`

TODO
----

[](#todo)

Add the capability of `[frame_clause]`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

2

Last Release

2068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/037f323af77df82587483c94a21d582b1a0a2565d002a0bbcf0492acc0543ab3?d=identicon)[elshafey](/maintainers/elshafey)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/elshafey-doctrine-window-functions/health.svg)

```
[![Health](https://phpackages.com/badges/elshafey-doctrine-window-functions/health.svg)](https://phpackages.com/packages/elshafey-doctrine-window-functions)
```

###  Alternatives

[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/doctrine-orm

Doctrine ORM bridge

243.1M39](/packages/api-platform-doctrine-orm)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[pixelfederation/doctrine-resettable-em-bundle

Symfony bundle for decorating default entity managers using a resettable decorator.

20113.5k](/packages/pixelfederation-doctrine-resettable-em-bundle)[leapt/core-bundle

Symfony LeaptCoreBundle

2529.1k4](/packages/leapt-core-bundle)

PHPackages © 2026

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