Skip to content

Commit 594b4b0

Browse files
authored
Merge pull request #1106 from hydephp/remove-internal-readyToBoot-handler
Remove internal readyToBoot handler
2 parents c927761 + e1f54ce commit 594b4b0

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

packages/framework/src/Foundation/Concerns/BootsHydeKernel.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
trait BootsHydeKernel
1717
{
18-
private bool $readyToBoot = false;
1918
private bool $booting = false;
2019

2120
/** @var array<callable> */
@@ -29,7 +28,7 @@ trait BootsHydeKernel
2928
*/
3029
public function boot(): void
3130
{
32-
if (! $this->readyToBoot || $this->booting) {
31+
if ($this->booting) {
3332
return;
3433
}
3534

@@ -82,13 +81,4 @@ public function booted(callable $callback): void
8281
{
8382
$this->bootedCallbacks[] = $callback;
8483
}
85-
86-
/** @internal */
87-
public function readyToBoot(): void
88-
{
89-
// To give package developers ample time to register their services,
90-
// don't want to boot the kernel until all providers have been registered.
91-
92-
$this->readyToBoot = true;
93-
}
9484
}

packages/framework/src/Framework/HydeServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ public function register(): void
5656

5757
public function boot(): void
5858
{
59-
$this->kernel->readyToBoot();
59+
//
6060
}
6161
}

packages/framework/tests/Feature/HydeKernelTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ public function test_can_register_booting_callback_closure()
414414
$this->assertTrue(true);
415415
});
416416

417-
$kernel->readyToBoot();
418417
$kernel->boot();
419418
}
420419

@@ -426,7 +425,6 @@ public function test_can_register_booted_callback_closure()
426425
$this->assertTrue(true);
427426
});
428427

429-
$kernel->readyToBoot();
430428
$kernel->boot();
431429
}
432430

@@ -436,7 +434,6 @@ public function test_can_register_booting_callback_callable()
436434

437435
$kernel->booting(new CallableClass($this));
438436

439-
$kernel->readyToBoot();
440437
$kernel->boot();
441438
}
442439

@@ -446,7 +443,6 @@ public function test_can_register_booted_callback_callable()
446443

447444
$kernel->booted(new CallableClass($this));
448445

449-
$kernel->readyToBoot();
450446
$kernel->boot();
451447
}
452448

@@ -458,7 +454,6 @@ public function test_booting_callback_receives_kernel_instance()
458454
$this->assertSame($kernel, $_kernel);
459455
});
460456

461-
$kernel->readyToBoot();
462457
$kernel->boot();
463458
}
464459

@@ -470,7 +465,6 @@ public function test_booted_callback_receives_kernel_instance()
470465
$this->assertSame($kernel, $_kernel);
471466
});
472467

473-
$kernel->readyToBoot();
474468
$kernel->boot();
475469
}
476470

@@ -483,7 +477,6 @@ public function test_can_use_booting_callbacks_to_inject_custom_pages()
483477
$kernel->pages()->addPage($page);
484478
});
485479

486-
$kernel->readyToBoot();
487480
$kernel->boot();
488481

489482
$this->assertSame($page, $kernel->pages()->getPage('foo'));

0 commit comments

Comments
 (0)