Repository navigation
feat(profiler): Rosanna が描画中に出す notice を dev のプロファイラに記録する - #139
Merged
Merged
Conversation
dev では描画中に Rosanna が出す E_USER_NOTICE / E_USER_WARNING を rosanna イベントとしてプロファイルに載せ、元のエラーハンドラに渡す。 README に style は文字列で渡すこと、key がそのまま出力されること、 生 HTML を差し込む手段が無いことを書いた。 Closes #133 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #133
Summary
Runtime/Renderer::renderAttributes())と実際の描画で、issue の挙動を確かめた。keyは特別扱いされずそのまま属性として出る。style配列とdangerouslySetInnerHTMLは「スカラーでない属性値」としてE_USER_NOTICEを出して捨てられる。Profiler\RosannaNoticeCollectorを追加した。Rosanna のsrc/から出たE_USER_NOTICE/E_USER_WARNINGをrosanna.notice/rosanna.warningイベントとしてプロファイルに載せ、そのあと元のエラーハンドラ(無ければ PHP 標準の処理)に渡す。RequestDispatchは、プロファイルを記録しているとき(dev のみ)だけディスパッチの間このハンドラを入れ、finallyで外す。本番(NullProfiler)では何も入れない。polidog/use-phpからの移行」節に、styleは文字列で渡す・keyは出力される・生 HTML の差し込みは無い、と書いた。プロファイラの節にはrosannaイベントを書き足した。Test
RosannaNoticeCollectorTest: 捨てられた属性が記録され前のハンドラにも渡ること、Rosanna 以外の notice は記録しないが渡すこと、restore()が冪等であることAppRouterProfilerTest: ディスパッチ中の notice が保存されたプロファイルに載ること🤖 Generated with Claude Code