Skip to content

Commit

Permalink
update instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Dec 19, 2024
1 parent 9d413b0 commit 5a06cf9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion inc/Engine/Media/Fonts/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Engine\Media\Fonts\Context\OptimizationContext;
use WP_Rocket\Engine\Media\Fonts\Context\SaasContext;
use WP_Rocket\Engine\Media\Fonts\Admin\Data;
use WP_Rocket\Engine\Media\Fonts\Admin\Settings;
use WP_Rocket\Engine\Media\Fonts\Admin\Subscriber as AdminSubscriber;
use WP_Rocket\Engine\Media\Fonts\Clean\Clean;
Expand All @@ -29,6 +30,7 @@ class ServiceProvider extends AbstractServiceProvider {
protected $provides = [
'media_fonts_filesystem',
'media_fonts_settings',
'media_fonts_data',
'media_fonts_admin_subscriber',
'media_fonts_optimization_context',
'media_fonts_saas_context',
Expand Down Expand Up @@ -60,8 +62,15 @@ public function register(): void {
->addArgument( rocket_direct_filesystem() );

$this->getContainer()->add( 'media_fonts_settings', Settings::class );
$this->getContainer()->add( 'media_fonts_data', Data::class )
->addArgument( 'options' );
$this->getContainer()->addShared( 'media_fonts_admin_subscriber', AdminSubscriber::class )
->addArgument( 'media_fonts_settings' );
->addArguments(
[
'media_fonts_settings',
'media_fonts_data',
]
);

$this->getContainer()->add( 'media_fonts_clean', Clean::class )
->addArgument( 'media_fonts_filesystem' );
Expand Down

0 comments on commit 5a06cf9

Please sign in to comment.