PHPackages                             rherb/php-odata-query-builder - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. rherb/php-odata-query-builder

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rherb/php-odata-query-builder
=============================

OData Query Builder for PHP

v1.0.1(3y ago)92.5k4MITPHPPHP ^7.0CI failing

Since Dec 15Pushed 11mo agoCompare

[ Source](https://github.com/rob893/PHP-OData-Query-Builder)[ Packagist](https://packagist.org/packages/rherb/php-odata-query-builder)[ Docs](https://github.com/rob893/PHP-OData-Query-Builder)[ RSS](/packages/rherb-php-odata-query-builder/feed)WikiDiscussions master Synced 1w ago

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

PHP-OData-Query-Builder
=======================

[](#php-odata-query-builder)

This library is used to fluently build OData Query strings. [View on Packagist.](https://packagist.org/packages/rherb/php-odata-query-builder)

Install the Library
-------------------

[](#install-the-library)

You can install the PHP Library with Composer.

```
composer require rherb/php-odata-query-builder

```

To create a builder, pass in the service URL and entity set into the constructor.

```
$builder = new ODataQueryBuilder('http://services.odata.org/V4/TripPinService/', 'People');
```

### Build the Query String

[](#build-the-query-string)

Use the various functions followed by the buildQuery() function to generate and return the query string.

```
$builder->from('People')->top(10)->buildQuery();
$builder->from('People')->find('bobjoe')->buildQuery();
$builder->from('Books')->filter('Cost')->lessThan(20)->buildQuery();
$builder->from('People')->filter('LastName')->equals('Smith')->buildQuery();
$builder->from('People')->filter('LastName')->equals('Smith')->andFilter('FirstName')->equals('Joe')->buildQuery();
```

Please view the test cases for more complex examples.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

1286d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20483475?v=4)[Robert Herber](/maintainers/rob893)[@rob893](https://github.com/rob893)

---

Top Contributors

[![rob893](https://avatars.githubusercontent.com/u/20483475?v=4)](https://github.com/rob893 "rob893 (24 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (6 commits)")[![dnkmdg](https://avatars.githubusercontent.com/u/6313551?v=4)](https://github.com/dnkmdg "dnkmdg (1 commits)")

---

Tags

phprestodata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rherb-php-odata-query-builder/health.svg)

```
[![Health](https://phpackages.com/badges/rherb-php-odata-query-builder/health.svg)](https://phpackages.com/packages/rherb-php-odata-query-builder)
```

###  Alternatives

[saintsystems/odata-client

Saint Systems OData Client for PHP

158536.1k2](/packages/saintsystems-odata-client)

PHPackages © 2026

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