Skip to content

Commit cfee902

Browse files
X-Coder264taylorotwell
authored andcommitted
[5.7] Fix event dispatcher contract violations (#26379)
1 parent 39237e5 commit cfee902

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Illuminate/Cache/Console/ClearCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(CacheManager $cache, Filesystem $files)
6060
*/
6161
public function handle()
6262
{
63-
$this->laravel['events']->fire(
63+
$this->laravel['events']->dispatch(
6464
'cache:clearing', [$this->argument('store'), $this->tags()]
6565
);
6666

@@ -72,7 +72,7 @@ public function handle()
7272
return $this->error('Failed to clear cache. Make sure you have the appropriate permissions.');
7373
}
7474

75-
$this->laravel['events']->fire(
75+
$this->laravel['events']->dispatch(
7676
'cache:cleared', [$this->argument('store'), $this->tags()]
7777
);
7878

src/Illuminate/Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ public function run(InputInterface $input = null, OutputInterface $output = null
8080
$input = $input ?: new ArgvInput
8181
);
8282

83-
$this->events->fire(
83+
$this->events->dispatch(
8484
new Events\CommandStarting(
8585
$commandName, $input, $output = $output ?: new ConsoleOutput
8686
)
8787
);
8888

8989
$exitCode = parent::run($input, $output);
9090

91-
$this->events->fire(
91+
$this->events->dispatch(
9292
new Events\CommandFinished($commandName, $input, $output, $exitCode)
9393
);
9494

src/Illuminate/Foundation/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ public function bootstrapWith(array $bootstrappers)
201201
$this->hasBeenBootstrapped = true;
202202

203203
foreach ($bootstrappers as $bootstrapper) {
204-
$this['events']->fire('bootstrapping: '.$bootstrapper, [$this]);
204+
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
205205

206206
$this->make($bootstrapper)->bootstrap($this);
207207

208-
$this['events']->fire('bootstrapped: '.$bootstrapper, [$this]);
208+
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
209209
}
210210
}
211211

0 commit comments

Comments
 (0)