diff --git a/src/Binding/Binder/StoppableBinder.php b/src/Binding/Binder/StoppableBinder.php index e74c7e08218e6ea870772e7c519053ed1a9c5721..8917f7867e90c75ac1f20f2809cef78fb07149f9 100644 --- a/src/Binding/Binder/StoppableBinder.php +++ b/src/Binding/Binder/StoppableBinder.php @@ -8,6 +8,7 @@ use Psr\Container\ContainerInterface; use WPDesk\Init\Binding\ComposableBinder; use WPDesk\Init\Binding\StoppableBinder as Stop; use WPDesk\Init\Binding\Definition; +use WPDesk\Init\Binding\Binder as BinderInstance; use WPDesk\Init\Binding\Definition\HookableDefinition; class StoppableBinder implements ComposableBinder { @@ -20,7 +21,7 @@ class StoppableBinder implements ComposableBinder { private $should_stop = false; - public function __construct( Binder $b, ContainerInterface $c ) { + public function __construct( BinderInstance $b, ContainerInterface $c ) { $this->binder = $b; $this->container = $c; } diff --git a/src/Init.php b/src/Init.php index 5b0a8694404a3175b6c3c0c6da2d12d1f7ffb85c..7d8e37e7bdf59de3b0333988beae7df3e0fa0e97 100644 --- a/src/Init.php +++ b/src/Init.php @@ -11,6 +11,7 @@ use WPDesk\Init\Extension\ConfigExtension; use WPDesk\Init\Extension\ExtensionsSet; use WPDesk\Init\Util\PhpFileLoader; use WPDesk\Init\Configuration\Configuration; +use WPDesk\Init\Extension\ConditionalExtension; final class Init { @@ -51,7 +52,7 @@ final class Init { /** * @param string|null $filename Filename of the booted plugin. May be null, if called from plugin's main file. */ - public function boot( string? $filename = null ) { + public function boot( ?string $filename = null ) { if ( self::$bootable === false ) { return; } diff --git a/src/Kernel.php b/src/Kernel.php index 931db223c880a8da131a80c47dc9ac8e7cfc4c4f..7e9ed9ba405ce22d92a7c29463a38f18fba58248 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -108,9 +108,11 @@ final class Kernel { private function prepare_driver( ContainerInterface $container ): HookDriver { $loader = new CompositeBindingLoader(); - foreach ( $this->extensions->bindings( $container ) as $bindings ) { - $loader->add( $bindings ); - } + foreach ($this->extensions as $extension) { + foreach ($extension->bindings($container) as $bindings) { + $loader->add($bindings); + } + } $driver = new GenericDriver( $loader, diff --git a/src/platform_check.php b/src/platform_check.php index d03071102847c86188361701d9ced1dfb4dd53d6..c90ebb7b3fec272bba3d7b947c215216f527cf09 100644 --- a/src/platform_check.php +++ b/src/platform_check.php @@ -1,6 +1,5 @@ <?php - -if ( ! ( PHP_VERSION_ID >= 72000 ) ) { +if ( ! ( PHP_VERSION_ID >= 70200 ) ) { add_action( 'admin_notices', function () {