Skip to content

Release v4#16

Merged
Surfoo merged 16 commits into
developfrom
feat-v4
Jun 28, 2026
Merged

Release v4#16
Surfoo merged 16 commits into
developfrom
feat-v4

Conversation

@Surfoo

@Surfoo Surfoo commented Jun 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR prepares the SDK for the v4.0.0 release by raising the minimum PHP version to 8.2, adding new observability/reliability capabilities (HTTP logging, retry strategies, circuit breaker), updating documentation, and expanding the PHPUnit test suite to cover new behavior and enums.

Changes:

  • Added HTTP request/response logging and reliability plugins (retry + circuit breaker), plus supporting docs.
  • Added/updated PHPUnit tests and test infrastructure (including PHPUnit attribute data providers).
  • Updated package/tooling metadata (composer constraints, CI workflow matrix, phpstan/rector config) and added v4 upgrade notes + changelog entry.

Reviewed changes

Copilot reviewed 71 out of 72 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
UPGRADE-4.0.md New v4 upgrade guide and breaking-change notes.
tests/UtilsTest.php Migrates data providers to PHPUnit attributes.
tests/TestCase.php Renames base test namespace for new autoload-dev mapping.
tests/StatisticsClientTest.php Adds existence/return-type test for statistics method.
tests/Plugin/StorageAwareAuthenticationPluginTest.php Adds tests for token-from-storage auth plugin.
tests/Plugin/GeocachingHttpLoggerPluginTest.php Adds detailed tests for logger plugin behavior.
tests/OptionsTest.php Adds tests around Options logging + base URI setup.
tests/OptionsHttpLoggingTest.php Smoke-test enableHttpLogging() doesn’t throw.
tests/OptionsCreateConfiguredLoggerTest.php Tests Options logging plugin insertion.
tests/OptionsCreateConfiguredLoggerEdgeCasesTest.php Tests logging with a custom Monolog logger.
tests/GeocachingSdkTest.php Adds SDK surface/return-type existence tests.
tests/GeocachingSdkIntegrationRealTest.php Adds “real” integration-ish assertions around SDK wiring.
tests/GeocachingHttpLoggerPluginTest.php Adds basic “returns same response” plugin test.
tests/GeocachingAdventureSdkTest.php Removes old adventure test fixture.
tests/Exception/UtilsExceptionTest.php Adds test coverage for UtilsException context.
tests/Enum/TrackableLogTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/MembershipTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/ListTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/GeocacheTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/GeocacheStatusTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/GeocacheSizeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/GeocacheLogUpvoteTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/GeocacheLogTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/EnvironmentTest.php Adds tests for Environment enum values.
tests/Enum/EnumTraitTest.php Adds tests for EnumTrait helpers across enums.
tests/Enum/BaseUriTest.php Adds tests for BaseUri enum values.
tests/Enum/AttributeTest.php Adds tests for new Attribute enum behavior.
tests/Enum/AdditionalWaypointVisibilityTypeTest.php Adds enum + EnumTrait behavior tests.
tests/Enum/AdditionalWaypointTypeTest.php Adds enum + EnumTrait behavior tests.
tests/ClientBuilderTest.php Adds tests for base URI storage behavior.
test.php Removes local/manual test script from repo root.
src/Reliability/RetryStrategy.php Introduces retry strategy interface.
src/Reliability/RetryHandler.php Adds retry execution helper.
src/Reliability/FixedDelayStrategy.php Adds fixed-delay retry strategy.
src/Reliability/ExponentialBackoffStrategy.php Adds exponential backoff retry strategy.
src/Reliability/CircuitBreaker.php Adds circuit breaker implementation.
src/Plugin/StorageAwareAuthenticationPlugin.php Adds auth plugin that prefers stored tokens.
src/Plugin/RetryPlugin.php Adds HTTPlug retry plugin wrapper.
src/Plugin/ReliabilityPlugin.php Adds combined reliability plugin (circuit + retry).
src/Plugin/GeocachingHttpLoggerPlugin.php Adds structured HTTP logger plugin with masking/truncation.
src/Plugin/CircuitBreakerPlugin.php Adds HTTPlug circuit breaker plugin wrapper.
src/Options.php Extends Options with logging, token refresh, and reliability helpers.
src/GeocachingSdkInterface.php Removes SDK interface per v4 breaking changes.
src/Exception/UtilsException.php Adds context payload support to UtilsException.
src/Exception/CircuitBreakerOpenException.php Adds dedicated exception for open circuit state.
src/Enum/TrackableLogType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/MembershipType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/ListType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/GeocacheType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/GeocacheStatus.php Applies EnumTrait consistently (minor cleanup).
src/Enum/GeocacheSize.php Applies EnumTrait consistently (minor cleanup).
src/Enum/GeocacheLogUpvoteType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/GeocacheLogType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/AdditionalWaypointVisibilityType.php Applies EnumTrait consistently (minor cleanup).
src/Enum/AdditionalWaypointType.php Applies EnumTrait consistently (minor cleanup).
src/ClientBuilderInterface.php Adds interface for mocking/swapping client builder.
src/ClientBuilder.php Makes builder non-final; returns HttpMethodsClientInterface; stores baseUri.
rector.php Updates Rector level set for PHP 8.2.
README.md Updates requirements and adds documentation/logging section.
phpstan.neon.dist Tweaks phpstan config (parallel + ignore pattern).
docs/reliability.md Adds reliability/observability documentation page.
docs/README.md Adds docs index/landing page.
docs/getting-started.md Adds install + first-call documentation.
docs/configuration.md Adds configuration + custom HTTP client docs.
docs/authentication.md Adds token refresh documentation and examples.
docs/api-usage.md Adds domain-by-domain API usage documentation.
composer.json Raises PHP min version and updates dev constraints/autoload-dev.
CLAUDE.md Adds repo-level documentation for contributors/agents.
CHANGELOG.md Adds v4.0.0 changelog entry and notes.
.gitignore Ignores test.php (removed from repo).
.github/workflows/ci.yml Updates CI matrix/actions versions; removes Codecov step.
Comments suppressed due to low confidence (1)

src/Options.php:89

  • Options currently hard-requires a concrete ClientBuilder (setAllowedTypes('client_builder', ClientBuilder::class) and getClientBuilder(): ClientBuilder). This prevents using the newly introduced ClientBuilderInterface for swapping/mocking, and conflicts with the UPGRADE/README guidance about ClientBuilderInterface being available for mocking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Options.php
Comment thread src/Options.php
Comment thread src/Plugin/RetryPlugin.php
Comment thread src/Plugin/ReliabilityPlugin.php
Comment thread src/Plugin/CircuitBreakerPlugin.php
Comment thread tests/OptionsCreateConfiguredLoggerTest.php
Comment thread tests/OptionsCreateConfiguredLoggerEdgeCasesTest.php
Comment thread tests/Plugin/GeocachingHttpLoggerPluginTest.php
Comment thread UPGRADE-4.0.md Outdated
Comment thread UPGRADE-4.0.md Outdated
  - static $successCount in CircuitBreaker → private property $successCount, reset properly in reset()
  - Raw level string passed to GeocachingHttpLoggerPlugin → normalized in enableHttpLoggingWithLogger() before use
  - UPGRADE-4.0.md token refresh section → corrected to distinguish token_storage+reference_code (storage-aware auth) from enableTokenRefresh() (actual 401 auto-refresh)
  - UPGRADE-4.0.md reliability examples → updated to use the real configureRetry() / configureFixedRetry() / enableCircuitBreaker() / enableReliability() array API
@Surfoo Surfoo merged commit 551744b into develop Jun 28, 2026
18 checks passed
@Surfoo Surfoo deleted the feat-v4 branch June 28, 2026 22:32
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.

2 participants