PHPackages                             schababerle-digital/odata-client - 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. [API Development](/categories/api)
4. /
5. schababerle-digital/odata-client

ActiveLibrary[API Development](/categories/api)

schababerle-digital/odata-client
================================

A PHP client library for OData services.

0.1.3(1y ago)012MITPHPPHP &gt;=8.0

Since May 22Pushed 1y agoCompare

[ Source](https://github.com/Schababerle-Digital/php-odata-client)[ Packagist](https://packagist.org/packages/schababerle-digital/odata-client)[ RSS](/packages/schababerle-digital-odata-client/feed)WikiDiscussions main Synced today

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

OData Client for PHP
====================

[](#odata-client-for-php)

[![PHP Version Require](https://camo.githubusercontent.com/dfbabe12710c02db06dd595fdcd6bf7eba12c06475e8c6614e7df1e3b1b45c1b/687474703a2f2f706f7365722e707567782e6f72672f7363686162616265726c656469676974616c2f6f646174612d636c69656e742f726571756972652f706870)](https://packagist.org/packages/schababerle-digital/odata-client)

**⚠️ Important note: This is an early alpha release! ⚠️**

**This software is in an early development phase (alpha). The API may change without notice and there may be bugs or incomplete features. Use in production environments is currently not recommended**.

A modern, easy-to-use PHP client library for interacting with OData services (version 2 and version 4 are supported). This library was developed with best practices in mind, including clear responsibilities, use of interfaces and PSR compatibility.

Features
--------

[](#features)

- Support for OData version 2 and version 4.
- Fluid query builder for creating complex queries (`$select`, `$filter`, `$expand`, `$orderby`, `$top`, `$skip`, `$count`, `$search`).
- Advanced `FilterBuilder` for programmatic creation of `$filter` expressions.
- Automatic parsing of OData responses into `Entity` and `EntityCollection` objects.
- Serialization of entities for create (POST) and update operations (PUT/PATCH/MERGE).
- Support for CRUD operations (Create, Read, Update, Delete).
- Calling OData functions and actions.
- Batch requests for OData V4 (JSON format).
- Flexible HTTP client layer through `HttpClientInterface` (standard implementation with Guzzle).
- Structured exception handling.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- [Composer](https://getcomposer.org/)
- A PSR-18 compatible HTTP client implementation (e.g. `guzzlehttp/guzzle`)
- PSR-7 HTTP Message Interfaces (`psr/http-message`)

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

[](#installation)

You can install the library via Composer:

```
composer require schababerle-digital/odata-client
```

Quick start / basic usage
-------------------------

[](#quick-start--basic-usage)

Here is a simple example of how you can use the OData V4 client:

```
