Skip to content

Conversation

@dimitri-koenig
Copy link
Contributor

trace uses https://github.com/spatie/backtrace to properly output the current backtrace. Unfortunately the offset and limit features of backtrace are not implemented. This PR solves that.

You can then call ray()->backtrace(limit: 10, offset: 20) to send only a subset of frames.

@freekmurze
Copy link
Member

Very nice!

Could you like at the failing tests? We can't use named arguments (as we still support 7.4), and something around this functionality changed in PHP 8.4

Ideally we would have the same result for all PHP versions.

@dimitri-koenig dimitri-koenig force-pushed the feature/trace-offset-limit branch from 568a255 to a9e2ef5 Compare April 18, 2025 07:56
@dimitri-koenig dimitri-koenig force-pushed the feature/trace-offset-limit branch from a9e2ef5 to 7afc8a8 Compare April 18, 2025 08:01
@dimitri-koenig
Copy link
Contributor Author

@freekmurze Fixed it

@freekmurze freekmurze merged commit 152250c into spatie:main Apr 18, 2025
25 checks passed
@freekmurze
Copy link
Member

Perfect, thanks!

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