Skip to content

feat(types): edit mutable line strings and circular arcs - #49

Merged
Alexandre-T merged 2 commits into
mainfrom
41-story-edit-line-strings-and-circular-strings-in-place
Oct 29, 2026
Merged

Alexandre-T merged 2 commits into
mainfrom
41-story-edit-line-strings-and-circular-strings-in-place

Conversation

@Alexandre-T

@Alexandre-T Alexandre-T commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #41.

Summary

Add mutable LineString and CircularString in XY, XYZ, XYM and XYZM, with ordered point editing, coordinate replacement and circular-origin/arc operations that retain receiver and supplied-point identity.

Declared SRID/reference/family setters propagate to contained points by default; false updates only the path. Invalid addressing and rejected coordinate edits preserve membership and referenced points.

Acceptance criteria

  • Ordered point editing, strict zero-based indices and complete coordinate replacement.
  • Origin/arc helpers with shared endpoints and incomplete-sequence failures.
  • Shared mutable points, optional propagation for all three context setters.
  • Four layouts, both families, nullable/EMPTY/incomplete states.
  • Mutable interfaces without copy operations or a dimension setter.

Validation

  • composer test-local: 787 tests, 7,261 assertions.
  • composer quality: CS Fixer, PHPStan level 9, PHPMD and PHP_CodeSniffer passed.
  • git diff --check.

Tests: MutableLineStringTest, MutableCircularStringTest, MutablePointSequenceContextTest.
PHPMD/PDepend emit existing PHP 8.5 deprecation notices; the aggregate command succeeds.

Standards

  • No normative geometric validity behavior is changed.

Arc helpers enforce only sequence addressing. No automatic validation, repair, closing, transformation or dimension conversion is added.

Architecture

Mutable paths independently extend the read-only spatial base; internal storage and membership editing are shared. Factories remain unchanged.

Compatibility

Constructors reject immutable objects with InvalidValueException; typed mutators reject them with TypeError, without conversion. Point getters expose MutablePointInterface. Its inherited point-array return contract is redeclared explicitly to resolve inherited PHPDoc ambiguity, matching PointInterface.

Documentation

  • Updated supported types, hierarchy and ownership.
  • Added arc-index mapping and examples.

Developer handoff

Independent review concludes READY FOR MERGE on 27ac6d4378223724d52e178ff1195e0f1c3a813a. PHP 8.4, PHP 8.5 and GitGuardian checks are successful. The review finding on isLine() is resolved: exactly two points identify a line, independently of closure for longer paths. No blocking finding or unresolved gate remains. The PR is open and the Story remains In review; merge and final completion belong to the Product Owner workflow.

@Alexandre-T Alexandre-T linked an issue Oct 29, 2026 that may be closed by this pull request
19 tasks
@codecov-commenter

codecov-commenter commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.42%. Comparing base (d0d711d) to head (27ac6d4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #49      +/-   ##
============================================
+ Coverage     99.40%   99.42%   +0.01%     
- Complexity      703      801      +98     
============================================
  Files           132      153      +21     
  Lines          1525     1747     +222     
============================================
+ Hits           1516     1737     +221     
- Misses            9       10       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Alexandre-T Alexandre-T left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

READY FOR MERGE

Independent review of commit 27ac6d4378223724d52e178ff1195e0f1c3a813a against Story #41, Epic #38, the shared contracts from #39/#40, repository rules and the applicable pre-merge Definition of Done.

The implementation covers mutable LineString and CircularString in XY, XYZ, XYM and XYZM, ordered point editing, complete coordinate replacement, strict zero-based addressing, structural arc operations, shared mutable-point identity and optional propagation for all three declared-context setters. Immutable points are rejected without conversion, applying the Product Owner/Technical Architect's explicit decision. Mutable paths expose neither copy operations nor dimension mutation.

The review finding concerning isLine() is resolved: exactly two points identify a line, while closure remains independently observable for longer paths. The added three-point regression covers both open and closed cases. The available ISO/IEC CD 13249-3:201x(E), clauses 4.2.5 and 4.2.6, was checked for the line definition and shared circular-arc endpoints. The approved distinction between representation and explicit geometric validation is preserved; no automatic repair, closure, transformation or dimension conversion is introduced.

Independent validation on the reviewed revision:

  • composer test-local: 787 tests, 7,261 assertions passed.
  • composer quality: PHP CS Fixer, PHPStan level 9, PHPMD and PHP_CodeSniffer passed. Existing PHP 8.5 deprecation notices originate from PHPMD/PDepend dependencies; the aggregate exits successfully.
  • git diff --check: clean; the working tree remains unchanged.
  • Required CI for this commit: PHP 8.4, PHP 8.5 and GitGuardian all successful.

The public documentation explains ownership, propagation and arc indexing. Dependencies #39/#40 are merged. No remaining blocking finding or unresolved gate was identified. The PR remains open; merge and final post-merge completion verification remain outside this review.

@Alexandre-T
Alexandre-T merged commit b922141 into main Oct 29, 2026
3 checks passed
@Alexandre-T
Alexandre-T deleted the 41-story-edit-line-strings-and-circular-strings-in-place branch October 29, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Story: Edit line strings and circular strings in place

2 participants