diff --git a/.idea/php.xml b/.idea/php.xml
index 4a0b8b3..df20e52 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -66,6 +66,7 @@
+
@@ -195,4 +196,4 @@
-
\ No newline at end of file
+
diff --git a/.idea/services.iml b/.idea/services.iml
index fac831f..f7dc3cc 100644
--- a/.idea/services.iml
+++ b/.idea/services.iml
@@ -68,8 +68,9 @@
+
-
\ No newline at end of file
+
diff --git a/README.md b/README.md
index 8087406..d2c644f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,10 @@
[](//packagist.org/packages/dhii/services)
[](//packagist.org/packages/dhii/services)
-This package provides a collection of service factory and extension definition implementations that can be used with [PSR-11 containers][psr11], as well as the experimental [service provider spec][sp], to replace the anonymous functions that are typically used for definitions.
+This package provides a collection of service factory and extension definition implementations
+that can be used with [PSR-11][] containers, as well as the experimental
+[Service Provider][] spec, to replace the anonymous functions that are typically used
+for definitions. Services here implement [`dhii/services-interface`][].
----
@@ -280,8 +283,9 @@ By having all services declare their dependencies, we open up the possibility to
No such tool exists at the time of writing, but I _do_ plan on taking on this task.
-[psr11]: https://github.com/php-fig/container
-[sp]: https://github.com/container-interop/service-provider
+[PSR-11]: https://github.com/php-fig/container
+[Service Provider]: https://github.com/container-interop/service-provider
+[`dhii/services-interface`]: https://github.com/Dhii/services-interface
[composer]: https://getcomposer.org/
[__invoke]: https://www.php.net/manual/en/language.oop5.magic.php#object.invoke
[getDeps]: https://github.com/Dhii/services/blob/initial-version/src/Service.php#L49
diff --git a/composer.json b/composer.json
index 9d4e51d..607247c 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,8 @@
"minimum-stability": "dev",
"require": {
"php": "^7.1 | ^8.0",
- "psr/container": "^1.0"
+ "psr/container": "^1.0",
+ "dhii/services-interface": "^0.1.0-alpha1"
},
"require-dev": {
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
diff --git a/composer.lock b/composer.lock
index db12a20..4b110c1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,60 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "85dc3612b05361cd2f34be34f1107cda",
+ "content-hash": "00a92d51a58fbfff5cd2916e3a7e84f4",
"packages": [
+ {
+ "name": "dhii/services-interface",
+ "version": "v0.1.0-alpha1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Dhii/services-interface.git",
+ "reference": "e147543744a5ed83474ed44d0ba31c9d48b81ef9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Dhii/services-interface/zipball/e147543744a5ed83474ed44d0ba31c9d48b81ef9",
+ "reference": "e147543744a5ed83474ed44d0ba31c9d48b81ef9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 | ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
+ "slevomat/coding-standard": "^6.0",
+ "vimeo/psalm": "^4.0",
+ "webmozart/path-util": "^2.3@stable"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-initial": "0.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Dhii\\Services\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Ukhanev",
+ "email": "xedin.unknown@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "Interfaces for services compatible with Service Provider spec",
+ "support": {
+ "issues": "https://github.com/Dhii/services-interface/issues",
+ "source": "https://github.com/Dhii/services-interface/tree/v0.1.0-alpha1"
+ },
+ "time": "2021-03-16T06:05:04+00:00"
+ },
{
"name": "psr/container",
"version": "1.0.0",
diff --git a/src/Extension.php b/src/Extension.php
index 3d35fa6..d2758b4 100644
--- a/src/Extension.php
+++ b/src/Extension.php
@@ -25,7 +25,7 @@
*
* @see Factory For a similar implementation that does not accept a previous service value.
*/
-class Extension extends Service
+class Extension extends Service implements ExtensionInterface
{
use ResolveKeysCapableTrait;
diff --git a/src/Factory.php b/src/Factory.php
index 3a10200..6f9dd18 100644
--- a/src/Factory.php
+++ b/src/Factory.php
@@ -23,7 +23,7 @@
* @see Constructor For a similar implementation that automatically injects dependencies into constructors.
* @see Extension For a similar implementation that can be used with extension services.
*/
-class Factory extends Service
+class Factory extends Service implements ServiceInterface
{
use ResolveKeysCapableTrait;