Fix Http::withTraceable() facade-call TypeError by registering macro on PendingRequest#4
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/nordkit/wiretap/sessions/04028f73-df69-4258-a44a-59577af29761 Co-authored-by: mjarestad <5223785+mjarestad@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Http::withTraceable() TypeError by updating macro registration
Fix Apr 20, 2026
Http::withTraceable() facade-call TypeError by registering macro on PendingRequest
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.
Http::withTraceable($model)could throw aTypeErrorwhen used directly from the facade because the macro was registered on the HTTP factory and returned the wrong bound$this. This change aligns macro registration with Laravel's forwarding behavior so direct facade usage resolves toPendingRequestcorrectly.Macro registration scope
withTraceablemacro registration fromHttp(Factory) toIlluminate\Http\Client\PendingRequest.Httpfacade import from the service provider.Regression coverage
Http::withTraceable($model)->post(...)does not throwTypeError.traceable_type/traceable_id.Changelog
[Unreleased] > Fixedentry documenting theHttp::withTraceable()TypeErrorfix and thePendingRequestmacro registration change.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ad1b7b9092976d6c948b8a187cec9faaea9ec1df/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/process/zipball/60f19cd3badc8de688421e21e4305eba50f8089a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)https://api.github.com/repos/symfony/string/zipball/114ac57257d75df748eda23dd003878080b8e688/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Iu5hpN /usr/bin/composer install(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt