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

Change fire to dispatch as fire is deprecated #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Currency/CurrencyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function registerCurrency()
{
$this->app->singleton('currency', function ($app) {

$this->app['events']->fire('currency.beforeRegister', [$this]);
$this->app['events']->dispatch('currency.beforeRegister', [$this]);
Copy link
Member

@sampoyigi sampoyigi Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fire method was reinstated in Igniter\Flame\Events\Dispatcher for backward compatibility, so fire should still work here as long as the instance of the events within the container is the same one from the flame library.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, should have said this is coming from the composer package work. So app events wont be a flame app.


return new Currency(
$app->config->get('currency', []),
Expand Down