Skip to content

#156 - Trigger a deprecation at runtime in LogRecord::contextIsEmpty() with trigger_deprecation() - #157

Merged
njoubert-cleverage merged 1 commit into
mainfrom
156
Oct 14, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
156

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #156: LogRecord::contextIsEmpty() (deprecated since v3.1 by #84, use hasContextInfo()) was only deprecated in its PHPDoc. It now triggers a deprecation at runtime:

Since cleverage/ui-process-bundle 3.1: The "…::contextIsEmpty()" method is deprecated, use "hasContextInfo()" instead.

Same convention as cleverage/process-bundle#273 (PR cleverage/process-bundle#286) and the Symfony packages.

Changes

  • Require symfony/deprecation-contracts ^2.5 || ^3 (already installed through the Symfony components).
  • LogRecord::contextIsEmpty(): trigger_deprecation('cleverage/ui-process-bundle', '3.1', ...), behaviour unchanged.
  • Nothing in the bundle (code, templates) calls contextIsEmpty(): the UI pages do not trigger the deprecation.
  • CHANGELOG (Latest).

Tests

  • The test of the deprecated method collects the deprecations: exact message, same return value.
  • After composer update: 397 tests OK, PHPStan, PHP-CS-Fixer, Rector OK.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: same behaviour, one more E_USER_DEPRECATED notice when the deprecated method is called.

🤖 Generated with Claude Code

…) with trigger_deprecation()

LogRecord::contextIsEmpty() was only deprecated in its PHPDoc (since v3.1, use hasContextInfo()): it now
triggers trigger_deprecation('cleverage/ui-process-bundle', '3.1', ...). Require
symfony/deprecation-contracts. Same convention as cleverage/process-bundle#273.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 769c966 into main Oct 14, 2026
24 checks 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.

LogRecord::contextIsEmpty(): trigger a deprecation at runtime with trigger_deprecation()

1 participant