From 03bcf515c18eb04b83fd5979c930ead95f7a550c Mon Sep 17 00:00:00 2001 From: Nestor Soriano Date: Mon, 22 Jun 2020 12:20:12 +0200 Subject: [PATCH] `DependencyManagement` and `Proxies` directories moved. They have been moved out of the `Tools` directory to the root `src` directory, `Tools` doesn't exist anymore. --- src/Container.php | 2 +- .../AbstractServiceProvider.php | 2 +- .../ServiceProviders/ProxiesServiceProvider.php | 15 ++++++++------- src/{Tools => }/Proxies/ActionsProxy.php | 2 +- src/{Tools => }/Proxies/LegacyProxy.php | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) rename src/{Tools => }/DependencyManagement/AbstractServiceProvider.php (98%) rename src/{Tools => }/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php (54%) rename src/{Tools => }/Proxies/ActionsProxy.php (96%) rename src/{Tools => }/Proxies/LegacyProxy.php (98%) diff --git a/src/Container.php b/src/Container.php index 28155e11fd5..46abd2daefc 100644 --- a/src/Container.php +++ b/src/Container.php @@ -7,7 +7,7 @@ namespace Automattic\WooCommerce; -use Automattic\WooCommerce\Tools\DependencyManagement\ServiceProviders\ProxiesServiceProvider; +use Automattic\WooCommerce\DependencyManagement\ServiceProviders\ProxiesServiceProvider; /** * PSR11 compliant dependency injection container for WooCommerce. diff --git a/src/Tools/DependencyManagement/AbstractServiceProvider.php b/src/DependencyManagement/AbstractServiceProvider.php similarity index 98% rename from src/Tools/DependencyManagement/AbstractServiceProvider.php rename to src/DependencyManagement/AbstractServiceProvider.php index a14bdf0b19a..15d29155385 100644 --- a/src/Tools/DependencyManagement/AbstractServiceProvider.php +++ b/src/DependencyManagement/AbstractServiceProvider.php @@ -5,7 +5,7 @@ * @package Automattic/WooCommerce/Tools/DependencyManagement */ -namespace Automattic\WooCommerce\Tools\DependencyManagement; +namespace Automattic\WooCommerce\DependencyManagement; use League\Container\Argument\RawArgument; use League\Container\Definition\DefinitionInterface; diff --git a/src/Tools/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php b/src/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php similarity index 54% rename from src/Tools/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php rename to src/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php index 4bfd847cb14..47b00440714 100644 --- a/src/Tools/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php +++ b/src/DependencyManagement/ServiceProviders/ProxiesServiceProvider.php @@ -5,10 +5,11 @@ * @package Automattic/WooCommerce/Tools/DependencyManagement/ServiceProviders */ -namespace Automattic\WooCommerce\Tools\DependencyManagement\ServiceProviders; +namespace Automattic\WooCommerce\DependencyManagement\ServiceProviders; -use Automattic\WooCommerce\Tools\DependencyManagement\AbstractServiceProvider; -use Automattic\WooCommerce\Tools\Proxies as ProxyClasses; +use Automattic\WooCommerce\DependencyManagement\AbstractServiceProvider; +use Automattic\WooCommerce\Proxies\LegacyProxy; +use Automattic\WooCommerce\Proxies\ActionsProxy; /** * Service provider for the classes in the Automattic\WooCommerce\Tools\Proxies namespace. @@ -21,15 +22,15 @@ class ProxiesServiceProvider extends AbstractServiceProvider { * @var array */ protected $provides = array( - ProxyClasses\LegacyProxy::class, - ProxyClasses\ActionsProxy::class, + LegacyProxy::class, + ActionsProxy::class, ); /** * Register the classes. */ public function register() { - $this->share( ProxyClasses\ActionsProxy::class ); - $this->shareWithAutoArguments( ProxyClasses\LegacyProxy::class ); + $this->share( ActionsProxy::class ); + $this->shareWithAutoArguments( LegacyProxy::class ); } } diff --git a/src/Tools/Proxies/ActionsProxy.php b/src/Proxies/ActionsProxy.php similarity index 96% rename from src/Tools/Proxies/ActionsProxy.php rename to src/Proxies/ActionsProxy.php index acef9264613..4e5f5609a64 100644 --- a/src/Tools/Proxies/ActionsProxy.php +++ b/src/Proxies/ActionsProxy.php @@ -5,7 +5,7 @@ * @package Automattic/WooCommerce/Tools/Proxies */ -namespace Automattic\WooCommerce\Tools\Proxies; +namespace Automattic\WooCommerce\Proxies; /** * Proxy for interacting with WordPress actions and filters. diff --git a/src/Tools/Proxies/LegacyProxy.php b/src/Proxies/LegacyProxy.php similarity index 98% rename from src/Tools/Proxies/LegacyProxy.php rename to src/Proxies/LegacyProxy.php index 8d28b68a7a3..143736399e1 100644 --- a/src/Tools/Proxies/LegacyProxy.php +++ b/src/Proxies/LegacyProxy.php @@ -5,7 +5,7 @@ * @package Automattic/WooCommerce/Tools/Proxies */ -namespace Automattic\WooCommerce\Tools\Proxies; +namespace Automattic\WooCommerce\Proxies; use \Psr\Container\ContainerInterface as Container;