Skip to content

release: 5.0.0#41

Merged
turegjorup merged 16 commits into
mainfrom
release/5.0.0
Jun 2, 2026
Merged

release: 5.0.0#41
turegjorup merged 16 commits into
mainfrom
release/5.0.0

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Cuts 5.0.0 (MAJOR) — the marker-interface exception contract migration.

Rolls the [Unreleased] CHANGELOG section into 5.0.0 (dated 2026-06-02) and adds UPGRADE-5.0.md. All the implementation already landed on develop via #38, #39, #40; this is the release branch into main.

Headline (BREAKING)

  • Every exception thrown from a public method now implements OpenIdConnectBundleExceptionInterface, which extends the upstream \ItkDev\OpenIdConnect\Exception\OpenIdConnectExceptionInterface. One catch handles both packages.
  • Concrete exceptions re-parented onto SPL types; they no longer extend ItkOpenIdConnectBundleException (kept as a @deprecated alias through 5.x, removed in 6.0).
  • itk-dev/openid-connect requirement bumped to ^5.0.

Also in 5.0

  • Custom PHPStan rules lock the contract on every CI run.
  • Hardened static analysis (strict/deprecation/phpunit/symfony packs, tests/ analysed).
  • UPGRADE-5.0.md migration guide.

Migration

catch (ItkOpenIdConnectBundleException $e)catch (OpenIdConnectBundleExceptionInterface $e). SPL-level catches (\InvalidArgumentException, \RuntimeException) keep working. Full details in UPGRADE-5.0.md.

Release steps after merge

  1. Tag 5.0.0 on main (triggers the Create-Github-Release workflow).
  2. Merge the tag back into develop.

🤖 Generated with Claude Code

turegjorup and others added 16 commits May 11, 2026 14:11
Analyse tests/ alongside src/, add the strict, deprecation, PHPUnit and
Symfony PHPStan rule packs, and require a comment on every ignore via
reportIgnoresWithoutComments. Pin phpstan/phpstan to ^2.1.41.

Fixes the strict-rule findings this surfaces in src/ (empty() and
base64_decode() hygiene) and types the test stub properties and fixtures
so the analysis is trustworthy. No public-API or behavioural change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The composer-audit workflow job ran `composer audit` with no prior
install. Because this bundle does not commit composer.lock, the audit
had no resolved dependency set to scan. Add a `composer install` step
first (mirroring the composer-normalized job) so the audit runs against
the actually-resolved packages.

Note: .github/workflows/composer.yaml is generated from
itk-dev/devops_itkdev-docker; this fix should be upstreamed there too,
or it will be lost on the next workflow sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The strict base64_decode() fallback added to CliLoginHelper::decodeKey
needs a test for the false return path, restoring 100% line coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every exception thrown from a public method now implements
OpenIdConnectBundleExceptionInterface, which extends the upstream library
marker OpenIdConnectExceptionInterface. Concrete exceptions extend the SPL
type that best fits the failure category and no longer extend the abstract
ItkOpenIdConnectBundleException (kept as a deprecated alias for 5.x).

A consumer can now catch every OIDC failure from both packages with a
single catch (OpenIdConnectExceptionInterface), or scope to the bundle
with OpenIdConnectBundleExceptionInterface.

- Bump itk-dev/openid-connect to ^5.0 for the matching upstream contract.
- Widen @throws / catch types in the authenticator, manager, controller
  and CLI helper onto the marker interface; preserve the $previous chain.
- Add ExceptionHierarchyTest locking marker inheritance, SPL parents and
  cross-package catch.

BREAKING: catch (ItkOpenIdConnectBundleException) no longer matches any
concrete thrown by the bundle. Catch OpenIdConnectBundleExceptionInterface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add two project rules, registered via phpstan/exception-contract.neon and
analysed as part of the suite:

- ThrownExceptionImplementsBundleMarker: every exception thrown from src/
  must implement the bundle or library marker, with documented carve-outs
  for Symfony HttpException (controllers) and AuthenticationException
  (authenticators).
- WrappedExceptionChainsPrevious: an exception constructed inside a catch
  must chain the caught cause as $previous.

Both ship with a README documenting the carve-outs and escape hatches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CLAUDE.md is a local-only file (gitignored), so a committed test should
not point at it. Reference the committed
docs/adr/001-marker-interface-exception-hierarchy.md instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CLAUDE.md is local-only (gitignored); the committed rules, their README,
and the rule error message now point at
docs/adr/001-marker-interface-exception-hierarchy.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework exception hierarchy onto marker interfaces (5.0, BREAKING)
…n-rules

Lock the exception contract with custom PHPStan rules
Roll up the [Unreleased] section into 5.0.0 dated 2026-06-02. MAJOR per
SemVer — the bundle's exception hierarchy is reworked onto the marker
interface OpenIdConnectBundleExceptionInterface (extending the upstream
library marker), concrete exceptions re-parent onto SPL types and no
longer extend the now-deprecated ItkOpenIdConnectBundleException, and the
itk-dev/openid-connect requirement moves to ^5.0. Adds the marker, custom
contract-locking PHPStan rules, hardened static analysis, and an
UPGRADE-5.0.md consumer migration guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7964acb) to head (314b137).

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #41   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        60        62    +2     
===========================================
  Files              9         9           
  Lines            278       280    +2     
===========================================
+ Hits             278       280    +2     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@turegjorup turegjorup self-assigned this Jun 2, 2026
@turegjorup turegjorup merged commit af57823 into main Jun 2, 2026
15 checks passed
@turegjorup turegjorup deleted the release/5.0.0 branch June 2, 2026 11:16
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