Repository navigation
types: edit mutable polyhedral surfaces in place - #52
Merged
Merged
Conversation
21 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
============================================
+ Coverage 99.40% 99.45% +0.04%
- Complexity 703 933 +230
============================================
Files 132 170 +38
Lines 1525 2023 +498
============================================
+ Hits 1516 2012 +496
- Misses 9 11 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Closes #44
Summary
Consumers can now assemble and edit XYZ and XYZM polyhedral surfaces in place. Mutable
PolyhedralSurfaceclasses retain supplied polygon patches, rings and points by reference, support ordered patch and nested ring/point editing, and atomically replace complete coordinate content.The implementation follows Epic #38 and Story #44. Dependencies #39, #40, #41 and #43 are merged. Mutable surfaces expose no
with…methods or dimension setter. Immutable implementations remain separate.Acceptance criteria
falsechanges only the receiver. Coordinates, spatial type and layout remain unchanged.Validation
Commands run
composer test-local: 920 tests, 8,468 assertions. The final suite includes 59 new surface tests.composer qualitypassed PHP CS Fixer, PHPStan level 9, PHPMD and PHPCS. Existing PHPMD/PDepend dependencies emit PHP 8.5 deprecation notices but no quality violation. The documentation example was executed with assertions enabled.Standards
Normative references
ISO/IEC CD 13249-3:201x(E), Committee Draft dated 2009-01-16, clause 8.5.1 (ST_PolyhdrlSurface). The polygon-patch representation preserves the existing supported XYZ/XYZM layouts. Per the approved representation/validation boundary, face validity, adjacency, closure, manifold properties and context compatibility require explicit spatial-validator use; mutation performs no automatic validation, vertex synchronization or neighbouring-patch repair.
Architecture
Architecture decision
Epic #38 and Story #44: mutable and immutable implementations remain separate; mutable descendants are shared by reference, and coordinate arrays create mutable descendants. No new dependency or cross-library responsibility is introduced.
MutablePolygonInterface::toArray()explicitly redeclares its existing coordinate-array read contract to preserve its precise PHPDoc return type when consumed through the aggregate interface.Compatibility
The new classes and type-specific mutable interface operations implement the approved Story #44 contract. Immutable constructors and copy APIs retain their behavior. No XY/XYM polyhedral surface, conversion, reprojection or factory change is included.
Documentation
docs/instantiable-spatial-types.mddocuments constructors, editing operations, ownership, addressing, propagation and a shared-vertex example.docs/immutability.mdlinks the new contract;docs/type-class-hierarchy.mdincludes the mutable surface base and concrete classes.Developer handoff
Important implementation decisions
Nested ring/point editing delegates to the retained mutable polygon; patch adoption checks every ring and point for mutable component ownership. Complete coordinate replacement hydrates all patches before assigning the new sequence, so a late technical failure leaves existing shared descendants untouched.
Remaining risks or questions
No unresolved Gate or blocking finding. Independent review concluded
READY FOR MERGEfor final SHA04a02e3f3ae9807e9ff7d1a7d53ec0a7399a6ed4; PHP 8.4, PHP 8.5 and GitGuardian checks are successful for that revision. The final follow-up commit only clarifies the common indexing PHPDoc; immutable wrapping and mutable strict addressing remain unchanged. This PR is not merged and the Story remains In review.