Edm namespace cleanup
Note: this release is technically API-breaking (enum rename + interface relocations). It ships as a patch because all three current consumers (
laravelui5/core,laravelui5/sdk,pragmatiqu/timesheet.biz) are in-house and patched in lock-step with the release. SemVer credit is spent here deliberately; a future release that crosses the public funnel boundary should bump the major.
Changed (breaking)
- Renamed
LaravelUi5\OData\Edm\Contracts\Container\PrimitiveTypeEnum→LaravelUi5\OData\Edm\EdmPrimitiveType. The new name describes what the type is (the EDM primitive type) rather than what PHP shape it happens to take (an enum). Drops the deadEnumsuffix; gains theEdmprefix shared withEdm.String,Edm.EnumType, etc. Lives flat underEdm\because vocabulary enums are PHP vehicles, not contracts. - Relocated three type-level contracts misfiled under
Edm\Contracts\Container\. CSDL §13 reservesEntityContainerfor
EntitySet,Singleton,ActionImport,FunctionImportonly; type-level constructs are Schema-level peers ofEntityContainer, not children of it. Moved:Contracts\Container\PrimitiveTypeInterface→Contracts\Type\PrimitiveTypeInterfaceContracts\Container\EnumTypeInterface→Contracts\Type\EnumTypeInterfaceContracts\Container\EnumMemberInterface→Contracts\Type\EnumMemberInterface
After this move Edm\Contracts\Container\ is aligned with the CSDL §13 surface (Container children only) — symmetric with Edm\Container\ on the implementation side.
- No deprecation alias is shipped. Consumers update
usestatements andPrimitiveTypeEnum::*references in the same release dance.
Migration
find <consumer-source-roots> -name '*.php' -exec sed -i '' \
-e 's|LaravelUi5\\OData\\Edm\\Contracts\\Container\\PrimitiveTypeEnum|LaravelUi5\\OData\\Edm\\EdmPrimitiveType|g' \
-e 's|LaravelUi5\\OData\\Edm\\Contracts\\Container\\PrimitiveTypeInterface|LaravelUi5\\OData\\Edm\\Contracts\\Type\\Primi
tiveTypeInterface|g' \
-e 's|LaravelUi5\\OData\\Edm\\Contracts\\Container\\EnumTypeInterface|LaravelUi5\\OData\\Edm\\Contracts\\Type\\EnumTypeIn
terface|g' \
-e 's|LaravelUi5\\OData\\Edm\\Contracts\\Container\\EnumMemberInterface|LaravelUi5\\OData\\Edm\\Contracts\\Type\\EnumMemb
erInterface|g' \
-e 's|PrimitiveTypeEnum|EdmPrimitiveType|g' \
{} \; Afterwards grep for PHP-escaped class-string literals — sed's single-backslash pattern misses 'LaravelUi5\OData\…' (double-backslash in source). The pattern that catches them:
grep -rn 'Contracts\\\\Container\\\\\(EdmPrimitiveType\|PrimitiveTypeInterface\|EnumTypeInterface\|EnumMemberInterface\)' <consumer-source-roots>