Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove log warnings on Request macro registrations #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onlime
Copy link

@onlime onlime commented Dec 11, 2024

as discussed in #10, Laravel is sometimes bootstrapped twice during the same request cycle. This happens e.g. in php artisan config:cache or php artisan route:cache. We should not log any warnings when trying to re-register macros in CorrelationIdServiceProvider, just silently ignore.

…d be bootstrapped twice (e.g. on `php artisan config:cache`)
@onlime
Copy link
Author

onlime commented Dec 13, 2024

@bilfeldt please merge it. I've discussed it with @pascalbaljet. There doesn't seem to be a "clean" way of warning the user about macro naming conflicts, while the framework boots twice under normal conditions. Using macros in a package could be considered as "risky" anyway, but I understand you're doing it like this, as bilfeldt/laravel-correlation-id Request macros are used as helpers in multiple other packages.

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