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

Release v3.18.2 #7307

Merged
merged 31 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a6c3052
Translate languages/rocket.pot in fr_FR
transifex-integration[bot] Jan 29, 2025
1218936
Fix #7265 fatal error with 3.18.1.2 (#7267)
Khadreal Jan 31, 2025
5b018e4
Change version to 3.18.1.3
Khadreal Jan 31, 2025
54ae33a
Translate languages/rocket.pot in fa_IR
transifex-integration[bot] Feb 3, 2025
a994c11
Translate languages/rocket.pot in fa_IR
transifex-integration[bot] Feb 3, 2025
9b206de
Update delay JS script (#7273)
MathieuLamiot Feb 4, 2025
551a3ec
update dynamic lists
Khadreal Feb 4, 2025
16483ae
Merge branch 'trunk' into develop
Khadreal Feb 4, 2025
ae926b0
Update version to 3.18.1.4
Khadreal Feb 4, 2025
5fb67a8
Merge branch 'trunk' into develop
wordpressfan Feb 5, 2025
8a64712
Closes #6993: Add a condition to bailout (#7251)
Miraeld Feb 10, 2025
11744a1
Closes #7258: Add self hosted font to metatag generator (#7269)
Miraeld Feb 10, 2025
b3c6752
Merge branch 'trunk' into develop
Khadreal Feb 11, 2025
0ee63da
Closes #6661: safeguard exclusions for non valid path (#7254)
Miraeld Feb 14, 2025
a0ceecd
Closes #7187: Add filter to disable Homepage cache clearing in rocket…
Miraeld Feb 14, 2025
0c2d6c5
Translate languages/rocket.pot in ko_KR
transifex-integration[bot] Feb 14, 2025
780eba1
Translate languages/rocket.pot in ko_KR
transifex-integration[bot] Feb 14, 2025
9b04243
Translate languages/rocket.pot in ko_KR
transifex-integration[bot] Feb 14, 2025
c1d566f
Translate languages/rocket.pot in ko_KR
transifex-integration[bot] Feb 14, 2025
b9f27d3
Translate languages/rocket.pot in pt_PT
transifex-integration[bot] Feb 15, 2025
28eecc3
Translate languages/rocket.pot in fi
transifex-integration[bot] Feb 17, 2025
6dbc31c
Clear CPT custom cache files correctly (#7277)
wordpressfan Feb 17, 2025
10a00a8
Closes #6550 Delegate creation of the dependencies to the container (…
remyperona Feb 17, 2025
951143f
Fix #7061 Exclude attachment post type from some features (#7073)
wordpressfan Feb 17, 2025
b2dbb44
update dynamic lists
wordpressfan Feb 17, 2025
0cd6b43
updater version to 3.18.2-alpha
wordpressfan Feb 17, 2025
6737277
Merge develop into transifex
wordpressfan Feb 17, 2025
b64fc47
Prepare transifex before alpha release
Feb 17, 2025
af7e84c
Merge transifex into develop
wordpressfan Feb 17, 2025
f629604
Change version to 3.18.2
Khadreal Feb 18, 2025
5dd73e7
update dynamic lists
Khadreal Feb 18, 2025
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 dynamic-lists-delayjs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dynamic-lists.json

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions inc/Addon/Cloudflare/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ServiceProvider extends AbstractServiceProvider {
* @var array
*/
protected $provides = [
'cloudflare_api_key_factory',
'cloudflare_client',
'cloudflare_endpoints',
'cloudflare',
Expand All @@ -42,26 +43,29 @@ public function provides( string $id ): bool {
* Registers items with the container
*/
public function register(): void {
$options = $this->getContainer()->get( 'options' );

$this->getContainer()->add( 'cloudflare_auth_factory', APIKeyFactory::class )->addArgument( $options );
$this->getContainer()->add( 'cloudflare_api_key_factory', APIKeyFactory::class )->addArgument( 'options' );

$this->getContainer()->add( 'cloudflare_client', Client::class )
->addArgument( $this->getContainer()->get( 'cloudflare_auth_factory' )->create() );
->addArgument( $this->getContainer()->get( 'cloudflare_api_key_factory' )->create() );
$this->getContainer()->add( 'cloudflare_endpoints', Endpoints::class )
->addArgument( $this->getContainer()->get( 'cloudflare_client' ) );
->addArgument( 'cloudflare_client' );

$this->getContainer()->add( 'cloudflare', Cloudflare::class )
->addArgument( $options )
->addArgument( $this->getContainer()->get( 'cloudflare_endpoints' ) );
->addArguments(
[
'options',
'cloudflare_endpoints',
]
);
$this->getContainer()->addShared( 'cloudflare_subscriber', CloudflareSubscriber::class )
->addArgument( $this->getContainer()->get( 'cloudflare' ) )
->addArgument( $options )
->addArgument( $this->getContainer()->get( 'options_api' ) )
->addArgument( $this->getContainer()->get( 'cloudflare_auth_factory' ) );
$this->getContainer()->addShared(
'cloudflare_admin_subscriber',
CloudflareAdminSubscriber::class
);
->addArguments(
[
'cloudflare',
'options',
'options_api',
'cloudflare_api_key_factory',
]
);
$this->getContainer()->addShared( 'cloudflare_admin_subscriber', CloudflareAdminSubscriber::class );
}
}
27 changes: 17 additions & 10 deletions inc/Addon/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Addon;

use WP_Rocket\Addon\Sucuri\Subscriber as SucuriSubscriber;
Expand Down Expand Up @@ -36,20 +38,25 @@ public function provides( string $id ): bool {
* Registers items with the container
*/
public function register(): void {
$options = $this->getContainer()->get( 'options' );

// Sucuri Addon.
$this->getContainer()->addShared( 'sucuri_subscriber', SucuriSubscriber::class )
->addArgument( $options );
->addArgument( 'options' );

$this->getContainer()->addShared( 'webp_admin_subscriber', WebPAdminSubscriber::class )
->addArgument( $options )
->addArgument( $this->getContainer()->get( 'cdn_subscriber' ) )
->addArgument( $this->getContainer()->get( 'beacon' ) );
->addArguments(
[
'options',
'cdn_subscriber',
'beacon',
]
);

$this->getContainer()->addShared( 'webp_subscriber', WebPSubscriber::class )
->addArgument( $options )
->addArgument( $this->getContainer()->get( 'options_api' ) )
->addArgument( $this->getContainer()->get( 'cdn_subscriber' ) );
->addArguments(
[
'options',
'options_api',
'cdn_subscriber',
]
);
}
}
10 changes: 8 additions & 2 deletions inc/Addon/Varnish/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Addon\Varnish;

use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
Expand Down Expand Up @@ -36,7 +38,11 @@ public function provides( string $id ): bool {
public function register(): void {
$this->getContainer()->add( 'varnish', Varnish::class );
$this->getContainer()->addShared( 'varnish_subscriber', Subscriber::class )
->addArgument( $this->getContainer()->get( 'varnish' ) )
->addArgument( $this->getContainer()->get( 'options' ) );
->addArguments(
[
'varnish',
'options',
]
);
}
}
3 changes: 2 additions & 1 deletion inc/Engine/Activation/Activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace WP_Rocket\Engine\Activation;

use WP_Rocket\Admin\Options;
use WP_Rocket\Dependencies\League\Container\Argument\Literal\StringArgument;
use WP_Rocket\Dependencies\League\Container\Container;
use WP_Rocket\Engine\Common\PerformanceHints\Activation\ServiceProvider as PerformanceHintsActivationServiceProvider;
use WP_Rocket\Engine\License\ServiceProvider as LicenseServiceProvider;
Expand Down Expand Up @@ -44,7 +45,7 @@ public static function activate_plugin() {
$container = new Container();
$event_manager = new Event_Manager();

$container->add( 'template_path', WP_ROCKET_PATH . 'views' );
$container->add( 'template_path', new StringArgument( rocket_get_constant( 'WP_ROCKET_PATH', '' ) . 'views' ) );
$options_api = new Options( 'wp_rocket_' );
$container->add( 'options_api', $options_api );
$container->addServiceProvider( new OptionsServiceProvider() );
Expand Down
11 changes: 9 additions & 2 deletions inc/Engine/Activation/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Activation;

use WP_Rocket\Dependencies\League\Container\Argument\Literal\StringArgument;
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Dependencies\League\Container\ServiceProvider\BootableServiceProviderInterface;
use WP_Rocket\Engine\Cache\AdvancedCache;
Expand Down Expand Up @@ -53,8 +56,12 @@ public function register(): void {
$filesystem = rocket_direct_filesystem();

$this->getContainer()->add( 'advanced_cache', AdvancedCache::class )
->addArgument( $this->getContainer()->get( 'template_path' ) . '/cache/' )
->addArgument( $filesystem );
->addArguments(
[
new StringArgument( $this->getContainer()->get( 'template_path' ) . '/cache/' ),
$filesystem,
]
);
$this->getContainer()->add( 'capabilities_manager', Manager::class );
$this->getContainer()->add( 'wp_cache', WPCache::class )
->addArgument( $filesystem );
Expand Down
1 change: 1 addition & 0 deletions inc/Engine/Admin/API/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin\API;

Expand Down
13 changes: 10 additions & 3 deletions inc/Engine/Admin/Beacon/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin\Beacon;

use WP_Rocket\Dependencies\League\Container\Argument\Literal\StringArgument;
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;

/**
Expand Down Expand Up @@ -34,8 +37,12 @@ public function provides( string $id ): bool {
*/
public function register(): void {
$this->getContainer()->addShared( 'beacon', Beacon::class )
->addArgument( $this->getContainer()->get( 'options' ) )
->addArgument( $this->getContainer()->get( 'template_path' ) . '/settings' )
->addArgument( $this->getContainer()->get( 'support_data' ) );
->addArguments(
[
'options',
new StringArgument( $this->getContainer()->get( 'template_path' ) . '/settings' ),
'support_data',
]
);
}
}
13 changes: 10 additions & 3 deletions inc/Engine/Admin/Database/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin\Database;

use WP_Rocket\Admin\Options_Data;
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;

/**
Expand Down Expand Up @@ -37,9 +40,13 @@ public function provides( string $id ): bool {
public function register(): void {
$this->getContainer()->add( 'db_optimization_process', OptimizationProcess::class );
$this->getContainer()->add( 'db_optimization', Optimization::class )
->addArgument( $this->getContainer()->get( 'db_optimization_process' ) );
->addArgument( 'db_optimization_process' );
$this->getContainer()->addShared( 'db_optimization_subscriber', Subscriber::class )
->addArgument( $this->getContainer()->get( 'db_optimization' ) )
->addArgument( $this->getContainer()->get( 'options' ) );
->addArguments(
[
'db_optimization',
'options',
]
);
}
}
12 changes: 9 additions & 3 deletions inc/Engine/Admin/DomainChange/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin\DomainChange;

use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;

use WP_Rocket\Engine\Common\Ajax\AjaxHandler;

class ServiceProvider extends AbstractServiceProvider {
Expand Down Expand Up @@ -34,8 +36,12 @@ public function provides( string $id ): bool {
*/
public function register(): void {
$this->getContainer()->add( 'ajax_handler', AjaxHandler::class );
$this->getContainer()->add( 'domain_change_subscriber', Subscriber::class )
->addArgument( $this->getContainer()->get( 'ajax_handler' ) )
->addArgument( $this->getContainer()->get( 'beacon' ) );
$this->getContainer()->addShared( 'domain_change_subscriber', Subscriber::class )
->addArguments(
[
'ajax_handler',
'beacon',
]
);
}
}
25 changes: 17 additions & 8 deletions inc/Engine/Admin/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin;

use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Dependencies\League\Container\Argument\Literal\StringArgument;
use WP_Rocket\Engine\Admin\Deactivation\{DeactivationIntent, Subscriber};
use WP_Rocket\Engine\Admin\Metaboxes\PostEditOptionsSubscriber;
use WP_Rocket\ThirdParty\Plugins\Optimization\Hummingbird;
Expand Down Expand Up @@ -40,19 +43,25 @@ public function provides( string $id ): bool {
* @return void
*/
public function register(): void {
$options = $this->getContainer()->get( 'options' );

$this->getContainer()->add( 'deactivation_intent', DeactivationIntent::class )
->addArgument( $this->getContainer()->get( 'template_path' ) . '/deactivation-intent' )
->addArgument( $this->getContainer()->get( 'options_api' ) )
->addArgument( $options );
->addArguments(
[
new StringArgument( $this->getContainer()->get( 'template_path' ) . '/deactivation-intent' ),
'options_api',
'options',
]
);
$this->getContainer()->addShared( 'deactivation_intent_subscriber', Subscriber::class )
->addArgument( $this->getContainer()->get( 'deactivation_intent' ) );
$this->getContainer()->addShared( 'hummingbird_subscriber', Hummingbird::class )
->addArgument( $options );
->addArgument( 'options' );
$this->getContainer()->addShared( 'actionscheduler_admin_subscriber', ActionSchedulerSubscriber::class );
$this->getContainer()->addShared( 'post_edit_options_subscriber', PostEditOptionsSubscriber::class )
->addArgument( $options )
->addArgument( $this->getContainer()->get( 'template_path' ) . '/metaboxes' );
->addArguments(
[
'options',
new StringArgument( $this->getContainer()->get( 'template_path' ) . '/metaboxes' ),
]
);
}
}
39 changes: 27 additions & 12 deletions inc/Engine/Admin/Settings/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\Admin\Settings;

use WP_Rocket\Dependencies\League\Container\Argument\Literal\{ArrayArgument, StringArgument};
use WP_Rocket\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use WP_Rocket\Dependencies\WPMedia\PluginFamily\Model\PluginFamily as PluginFamilyModel;
use WP_Rocket\Dependencies\WPMedia\PluginFamily\Controller\PluginFamily as PluginFamilyController;
Expand All @@ -15,6 +18,8 @@ class ServiceProvider extends AbstractServiceProvider {
* @var array
*/
protected $provides = [
'plugin_family_model',
'plugin_family_controller',
'settings',
'settings_render',
'settings_page',
Expand Down Expand Up @@ -42,28 +47,38 @@ public function register(): void {
$this->getContainer()->add( 'plugin_family_controller', PluginFamilyController::class );

$this->getContainer()->add( 'settings', Settings::class )
->addArgument( $this->getContainer()->get( 'options' ) );
->addArgument( 'options' );
$this->getContainer()->add( 'settings_render', Render::class )
->addArguments(
[
$this->getContainer()->get( 'template_path' ) . '/settings',
new StringArgument( $this->getContainer()->get( 'template_path' ) . '/settings' ),
'plugin_family_model',
]
);
$this->getContainer()->add( 'settings_page', Page::class )
->addArgument( $this->getContainer()->get( 'settings_page_config' ) )
->addArgument( $this->getContainer()->get( 'settings' ) )
->addArgument( $this->getContainer()->get( 'settings_render' ) )
->addArgument( $this->getContainer()->get( 'beacon' ) )
->addArgument( $this->getContainer()->get( 'db_optimization' ) )
->addArgument( $this->getContainer()->get( 'user_client' ) )
->addArgument( $this->getContainer()->get( 'delay_js_sitelist' ) )
->addArgument( $this->getContainer()->get( 'template_path' ) )
->addArgument( $this->getContainer()->get( 'options' ) );
->addArguments(
[
new ArrayArgument(
[
'slug' => WP_ROCKET_PLUGIN_SLUG,
'title' => WP_ROCKET_PLUGIN_NAME,
'capability' => 'rocket_manage_options',
]
),
'settings',
'settings_render',
'beacon',
'db_optimization',
'user_client',
'delay_js_sitelist',
'template_path',
'options',
]
);
$this->getContainer()->addShared( 'settings_page_subscriber', Subscriber::class )
->addArguments(
[
$this->getContainer()->get( 'settings_page' ),
'settings_page',
'plugin_family_controller',
]
);
Expand Down
Loading
Loading