adrotec/odataphpprod
Unmaintained PHP OData (v2) producer/server library for exposing read-only data sources. Supports Atom and JSON, $metadata, feeds/entries/properties, paging and query options ($filter, $select, $expand, $orderby, $top, $skip), plus optional media streaming.
String to StringType in the ODataProducer\Providers\Metadata\Type namespace) to address PHP 7+ reserved keyword conflicts. This suggests the package is attempting to modernize but still lags behind Laravel’s REST/GraphQL ecosystem.StringType rename may expose hidden dependencies in custom middleware (e.g., if using String as a type alias). Requires auditing existing OData entity providers.// Before (may break)
$entity->property('name', String::class);
// After (required)
$entity->property('name', StringType::class);
String may need updates. Low risk unless heavily customized.rector/rector or isolate in a micro-service.String.$metadata endpoint output.String type usages exist in the codebase? Are there third-party integrations relying on the old class?odata-php/odata-v4-server (more active) be evaluated?$metadata schema changes due to the rename?StringType rename is a small win, but the package still requires:
--ignore-platform-reqs in Composer.// Updated example with StringType
class ODataRepository {
public function defineEntity(EntityMetadata $metadata) {
$metadata->entity('User')
->property('name', StringType::class); // Updated
}
}
String references remain.String usages in:
grep or IDE refactoring tools.String → StringType references in non-critical endpoints.$metadata endpoint and client tooling (e.g., Power BI)./api/v1/odata (old) → /api/v2/odata (new).$metadata schema.$metadata caching.String as a type alias (e.g., use ODataProducer\Providers\Metadata\Type\String). Isolate dependencies or fork the package.--dry-run first).String with StringType in all entity definitions.$metadata endpoint and validate schema changes.StringType usages.$filter, $expand, and $metadata endpoints.$expand).StringType usages.Class 'String' not found → now Class 'StringType' not found).StringType logic may become proprietary knowledge.$metadata) is critical.| Failure Scenario | Impact | Mitigation |
|---|---|---|
String → StringType migration errors |
Broken OData endpoints | Pre-migration audit, phased rollout |
Malformed $metadata schema |
Client tool failures (e.g., Power BI) | Validate schema with OData Playground |
| OData query injection | Data leakage, DoS | Whitelist operators, rate limiting |
| PHP 8+ compatibility issues | Runtime errors | Isolate package, use rector/rector |
Circular $expand references |
Infinite loops, crashes |
How can I help you explore Laravel packages today?