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

error handling when extending flarum from extensions fails #2740

Merged
merged 5 commits into from
Apr 29, 2021

Conversation

luceos
Copy link
Member

@luceos luceos commented Mar 26, 2021

Changes proposed in this pull request:

Captures any errors throw when trying to extend flarum from an extension. Right now when an extender misbehaves we get errors like these:

PHP Fatal error:  Uncaught Error: Call to undefined method Closure::extend() in /home/forge/nightly.flarum.site/nightly/vendor/flarum/core/src/Extension/Extension.php:137
Stack trace:

Which isn't really useful, the trace doesn't show what extension nor what extender is causing the issue.

Reviewers should focus on:

Please do a local test I haven't been able to do so.

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

@luceos luceos changed the title proposal to add handling to extending flarum from extensions error handling when extending flarum from extensions fails Mar 26, 2021
src/Extension/Exception/ExtendingFailedException.php Outdated Show resolved Hide resolved
src/Extension/Extension.php Show resolved Hide resolved
src/Extension/Exception/ExtendingFailedException.php Outdated Show resolved Hide resolved
@luceos luceos requested a review from askvortsov1 April 29, 2021 18:08
@askvortsov1 askvortsov1 merged commit e0258d2 into master Apr 29, 2021
@askvortsov1 askvortsov1 deleted the dk/extending-failed-exceptions branch April 29, 2021 20:17
@askvortsov1 askvortsov1 added this to the 1.0 milestone Apr 29, 2021
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.

3 participants