Skip to content

Commit

Permalink
Keep Polyfills service unonditional
Browse files Browse the repository at this point in the history
  • Loading branch information
thelovekesh committed Mar 16, 2023
1 parent dcba57e commit 4e324d8
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions src/Admin/Polyfills.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@

namespace AmpProject\AmpWP\Admin;

use AmpProject\AmpWP\Infrastructure\Conditional;
use AmpProject\AmpWP\Infrastructure\Delayed;
use AmpProject\AmpWP\Infrastructure\HasRequirements;
use AmpProject\AmpWP\Infrastructure\Registerable;
use AmpProject\AmpWP\Infrastructure\Service;
use AmpProject\AmpWP\Services;
use WP_Scripts;
use WP_Styles;

Expand All @@ -24,7 +21,7 @@
* @since 2.0
* @internal
*/
final class Polyfills implements Conditional, Delayed, Service, Registerable, HasRequirements {
final class Polyfills implements Delayed, Service, Registerable {

/**
* Get the action to use for registering the service.
Expand All @@ -35,26 +32,6 @@ public static function get_registration_action() {
return 'amp_register_polyfills';
}

/**
* Check whether the conditional object is currently needed.
*
* @return bool Whether the conditional object is needed.
*/
public static function is_needed() {
return ! Services::get( 'dependency_support' )->has_support();
}

/**
* Get the list of service IDs required for this service to be registered.
*
* @return string[] List of required services.
*/
public static function get_requirements() {
return [
'dependency_support',
];
}

/**
* Runs on instantiation.
*/
Expand Down

0 comments on commit 4e324d8

Please sign in to comment.