Skip to content

Allow koriym/semantic-logger 0.9 - #78

Merged
koriym merged 1 commit into
0.xfrom
semantic-logger-0.9
Sep 19, 2026
Merged

koriym merged 1 commit into
0.xfrom
semantic-logger-0.9

Conversation

@koriym

@koriym koriym commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

^0.8 reads as <0.9, so an application cannot install this framework beside a package that requires semantic-logger 0.9. BEAR.QueryRepository 1.x now does, and the two conflict at resolution time — found while installing it into BeMart.

Nothing here needs the old contract:

  • this framework only calls open() and close(), whose signatures are identical in 0.8 and 0.9
  • it references three symbols, all present in 0.9: AbstractContext, SemanticLogger, SemanticLoggerInterface
  • the exception hierarchy 0.9 removed was never caught here, and flush() is never called from this package

One test needed a change. 0.9 freezes a recorded context, so a map comes back from toArray() as an object where 0.8 handed back an array. LoggerTest::testOpenChainLogsInputProps was the only place that looked; the cast it now does reads the same under both versions.

Verified: 252 tests green on 0.9.0, then again after pinning 0.8.0 — both branches of the constraint hold.

Summary by CodeRabbit

  • Bug Fixes

    • Improved compatibility with frozen logging context objects while preserving expected logged data.
  • Chores

    • Expanded support for newer compatible versions of the semantic logging component.

`^0.8` reads as `<0.9`, so an application cannot install this framework beside a
package that requires 0.9 — BEAR.QueryRepository 1.x now does, and the two
conflict at resolution time.

Nothing here needs the old contract. This framework only calls `open()` and
`close()`, whose signatures are identical in both versions, and references three
symbols that all exist in 0.9 (`AbstractContext`, `SemanticLogger`,
`SemanticLoggerInterface`). The exception hierarchy 0.9 removed was never caught,
and `flush()` is never called from here.

0.9 freezes a recorded context, so a map arrives from `toArray()` as an object
where 0.8 handed back an array. Only the log-shape test looked; the cast it now
does reads the same under both versions.

Verified: 252 tests green on 0.9.0 and again on 0.8.0.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b4697a18-a589-4019-af9d-add60d149837

📥 Commits

Reviewing files that changed from the base of the PR and between b8dad69 and d6ca6d2.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • composer.json
  • tests/SemanticLog/LoggerTest.php

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The dependency constraint now permits koriym/semantic-logger versions ^0.8 and ^0.9. The chain logging test normalizes frozen-context objects before checking logged properties.

Changes

Semantic logger compatibility

Layer / File(s) Summary
Dependency and test compatibility
composer.json, tests/SemanticLog/LoggerTest.php
The Composer constraint supports semantic logger ^0.8 or ^0.9. The chain input-property test casts the logged context property to an array before assertion.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to d6ca6

The PR broadens semantic-logger compatibility to 0.9 while preserving 0.8 behavior and updates the affected test expectation; both supported versions pass the test suite, so no actionable merge-blocking risk remains after normal checks.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: allowing koriym/semantic-logger version 0.9.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch semantic-logger-0.9

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 PHPStan (2.2.7)

PHP Parse error: syntax error, unexpected token "->", expecting ";" in /vendor/php-standard-library/php-standard-library/packages/class/src/Psl/Class/has_constant.php on line 16
Parse error: syntax error, unexpected token "->", expecting ";" in /vendor/php-standard-library/php-standard-library/packages/class/src/Psl/Class/has_constant.php on line 16


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

koriym added a commit to be-framework/BeMart that referenced this pull request Sep 5, 2026
Bootstrap が使う UriScopedHttpCacheInterface は 1.16.2 に未収録。
1.x-dev は koriym/semantic-logger ^0.9 を要求するため、be-framework/be は
それを許す dev-semantic-logger-0.9 (be-framework/Be.Framework#78) に合わせる。
@koriym
koriym merged commit a1fdac0 into 0.x Sep 19, 2026
1 check passed
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.

1 participant