oihana/php-openedge

Composable PHP toolkit for the Progress OpenEdge SQL database via ODBC. Bundles a functional query builder (predicates, casts, string/numeric/date functions, CASE expressions), document/edge models composed by traits, PSR-7 CRUD controllers, and Symfony Console commands. Built for read-heavy ERP int

Maintainers

Package info

github.com/BcommeBois/oihana-php-openedge

pkg:composer/oihana/php-openedge

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-05-26 09:09 UTC

This package is auto-updated.

Last update: 2026-05-26 09:09:27 UTC


README

Oihana PHP OpenEdge

Composable PHP toolkit for the Progress OpenEdge SQL database, accessed via ODBC. Part of the Oihana PHP ecosystem, this package bundles a functional query builder (predicates, casts, string/numeric/date functions, CASE expressions), document/edge models composed by traits, PSR-7 CRUD controllers, and Symfony Console commands โ€” everything you need to build a read-heavy ERP integration end-to-end.

Latest Version Total Downloads License

๐Ÿ“š Documentation

Full API reference (generated with phpDocumentor): https://bcommebois.github.io/oihana-php-openedge

User guides (FR + EN) live under wiki/.

๐Ÿ“ฆ Installation

Requires PHP 8.4+ with the ext-pdo extension, and the Progress DataDirect OpenEdge ODBC driver installed on the host running the application. Install via Composer:

composer require oihana/php-openedge

โœจ What you can do

  • Build OpenEdge SQL queries with a fully functional API โ€” column expressions, value/literal expressions, ORDER BY / LIMIT / GROUP BY, search conditions, predicates (basic, between, exists, in, like, null, quantified) โ€” without ever concatenating strings.
  • Cover every OpenEdge SQL function โ€” string (concat, substring, lpad, proArrayEscape, ...), numeric (abs, round, power, mod, ...), date (now, sysTimestamp, ...), conditional (coalesce, ifNull, nvl, ...), conversion (toChar, toDate, toNumber, ...), and the full ODBC cast catalogue (castBIGINT, castVARCHAR, castTIMESTAMP, ...).
  • Compose CASE expressions declaratively โ€” whenThenExpression(...), elseExpression(...), no string templates.
  • Apply value mutators through the alters/ pipeline โ€” alterDate, alterKey, alterNumeric, alterString, alterConditional, alterConversion.
  • Persist and load documents through trait-composed models โ€” Documents, DocumentsList, DocumentsGet, DocumentsCount, DocumentsStream etc. โ€” with bindExpression placeholders and SORTABLE whitelisting baked in.
  • Plug controllers into any Slim-compatible PSR-15 stack via DocumentsController (list, get, count) โ€” read-only by default to match the typical ERP integration profile.

Under the hood

  • A consistent set of typed enums and constants โ€” OpenEdgeFunctionType, OpenEdgeOperator, etc. โ€” no magic strings anywhere.
  • Pure functional helpers, registered through Composer autoload.files so they are always available without use boilerplate.
  • PDO-based โ€” uses the standard ext-pdo + ODBC driver path, so it works the same way on Linux (DataDirect driver) and Windows (Progress ODBC driver) hosts.
  • Schema.org-friendly โ€” models extend org\schema\Thing from oihana/php-schema, so JSON-LD output is natural.

โœ… Running tests

Run all tests:

composer test

Run a specific test file:

composer test ./tests/oihana/openedge/db/helpers/functions/casts/CastVarCharTest.php

The unit tests cover the pure functional helpers โ€” they do not require an ODBC driver or a live OpenEdge server. End-to-end smoke tests against a real OpenEdge instance live in the consuming application.

๐Ÿ› ๏ธ Generate the documentation

We use phpDocumentor to generate documentation into the ./docs folder.

composer doc

๐Ÿงพ License

Licensed under the Mozilla Public License 2.0 (MPLโ€‘2.0).

๐Ÿ‘ค About the author

  • Author: Marc ALCARAZ (aka eKameleon)
  • Email: marc@ooop.fr
  • Website: https://www.ooop.fr

๐Ÿ”— Related packages

Package Description
oihana/php-arango Composable toolkit for ArangoDB โ€” document/edge models, AQL helpers, controllers.
oihana/php-auth Casbin RBAC + JWT/OIDC authorization toolkit.
oihana/php-commands Symfony Console kernel and reusable command traits.
oihana/php-core Core helpers and utilities shared across the ecosystem.
oihana/php-enums Typed constants and enums โ€” no more magic strings.
oihana/php-exceptions Framework exceptions with consistent semantics.
oihana/php-http HTTP helpers โ€” client IP, cookies, route patterns.
oihana/php-reflect Reflection and object hydration utilities.
oihana/php-schema Schema.org constants and vocabulary.
oihana/php-system Framework helpers โ€” controllers, models, request handling.