Now using modularity standard v0.3

This is the newest release, and is the first one that is compatible
with PHP 8. Other changes are BC-breaking, but very very minor.
This commit is contained in:
Anton Ukhanev 2021-02-18 09:46:26 +01:00
parent cabcb7d9e4
commit 69d9631a73
19 changed files with 29 additions and 67 deletions

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -20,9 +20,7 @@ use Psr\Container\ContainerInterface;
class AdminNotices implements ModuleInterface {
/**
* Sets up the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -32,9 +30,7 @@ class AdminNotices implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
add_action(

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -20,9 +20,7 @@ use Psr\Container\ContainerInterface;
class ApiModule implements ModuleInterface {
/**
* Sets up the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -32,9 +30,7 @@ class ApiModule implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
add_action(

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -27,9 +27,7 @@ class ButtonModule implements ModuleInterface {
/**
* Sets up the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -39,9 +37,7 @@ class ButtonModule implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface|null $container The Container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -24,9 +24,7 @@ use Psr\Container\ContainerInterface;
class OnboardingModule implements ModuleInterface {
/**
* Sets up the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -36,9 +34,7 @@ class OnboardingModule implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface|null $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -21,9 +21,7 @@ use Psr\Container\ContainerInterface;
class SessionModule implements ModuleInterface {
/**
* Sets up the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -33,9 +31,7 @@ class SessionModule implements ModuleInterface {
}
/**
* Run the module.
*
* @param ContainerInterface|null $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
add_action(

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -28,9 +28,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
class SubscriptionModule implements ModuleInterface {
/**
* Setup the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -40,9 +38,7 @@ class SubscriptionModule implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface|null $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
add_action(

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -37,9 +37,7 @@ use Psr\Container\ContainerInterface;
class WcGatewayModule implements ModuleInterface {
/**
* Setup the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -49,9 +47,7 @@ class WcGatewayModule implements ModuleInterface {
}
/**
* Runs the module.
*
* @param ContainerInterface|null $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
$this->register_payment_gateways( $container );

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -20,9 +20,7 @@ use Psr\Container\ContainerInterface;
class WebhookModule implements ModuleInterface {
/**
* Setup the Webhook module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -32,9 +30,7 @@ class WebhookModule implements ModuleInterface {
}
/**
* Run the Webhook module.
*
* @param ContainerInterface|null $container The Container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
add_action(

View file

@ -5,7 +5,7 @@
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"dhii/module-interface": "^0.2.0-alpha1"
"dhii/module-interface": "^0.3.0-alpha1"
},
"autoload": {
"psr-4": {

View file

@ -20,9 +20,7 @@ use Psr\Container\ContainerInterface;
class WooCommerceLoggingModule implements ModuleInterface {
/**
* Setup the module.
*
* @return ServiceProviderInterface
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
@ -32,9 +30,7 @@ class WooCommerceLoggingModule implements ModuleInterface {
}
/**
* Run the module.
*
* @param ContainerInterface $container The container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
}

View file

@ -20,16 +20,14 @@ use Psr\Container\ContainerInterface;
class PluginModule implements ModuleInterface {
/**
* Sets the module up.
* {@inheritDoc}
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider( array(), array() );
}
/**
* Runs the module.
*
* @param ContainerInterface|null $container The Container.
* {@inheritDoc}
*/
public function run( ContainerInterface $container ): void {
}