Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/services.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
[![Latest Stable Version](https://poser.pugx.org/dhii/services/v)](//packagist.org/packages/dhii/services)
[![Latest Unstable Version](https://poser.pugx.org/dhii/services/v/unstable)](//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`][].

----

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
54 changes: 53 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down