From d4330053a86b0faec612d758c5eba6ca92172624 Mon Sep 17 00:00:00 2001 From: Eric Fortmeyer Date: Mon, 21 Aug 2023 11:52:28 -0500 Subject: [PATCH 1/3] feat(PropertyInjector): implement property injector interface This will decoupling of the implementation from client code. --- composer.json | 1 + composer.lock | 42 ++++++++++++++++++- ...lar-PropertyInjector-PropertyInjector.html | 35 +++++++++++----- docs/graphs/classes.svg | 29 +++++++------ docs/js/searchIndex.js | 2 +- src/PropertyInjector.php | 5 ++- 6 files changed, 88 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index 5bd452f..346466f 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ }, "require": { "php": ">=8.1", + "phpolar/property-injector-contract": "^1.0", "psr/container": "^2.0" }, "license": "MIT", diff --git a/composer.lock b/composer.lock index 484304e..3af182d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,48 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e17b4de0951f7d8095f23ed30886d120", + "content-hash": "cea746b6924156097f912f620edc998d", "packages": [ + { + "name": "phpolar/property-injector-contract", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpolar/property-injector-contract.git", + "reference": "77b00a75c5029a7e5485a016643419d882f3dcab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpolar/property-injector-contract/zipball/77b00a75c5029a7e5485a016643419d882f3dcab", + "reference": "77b00a75c5029a7e5485a016643419d882f3dcab", + "shasum": "" + }, + "suggest": { + "phpolar/property-injector": "A property injection implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Phpolar\\PropertyInjectorContract\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric Fortmeyer", + "email": "e.fortmeyer01@gmail.com" + } + ], + "description": "Unifies property injector implementations.", + "support": { + "issues": "https://github.com/phpolar/property-injector-contract/issues", + "source": "https://github.com/phpolar/property-injector-contract/tree/1.0.0" + }, + "time": "2023-08-21T16:09:08+00:00" + }, { "name": "psr/container", "version": "2.0.2", diff --git a/docs/classes/Phpolar-PropertyInjector-PropertyInjector.html b/docs/classes/Phpolar-PropertyInjector-PropertyInjector.html index 6e012e2..d45ae04 100644 --- a/docs/classes/Phpolar-PropertyInjector-PropertyInjector.html +++ b/docs/classes/Phpolar-PropertyInjector-PropertyInjector.html @@ -106,13 +106,16 @@

+ + implements + PropertyInjectorInterface

@@ -129,6 +132,18 @@

+

+ Interfaces, Classes, Traits and Enums + +

+ +
+
PropertyInjectorInterface
+
+ + + +

@@ -149,9 +164,7 @@

 : void -
Attempts to inject the dependency into -the marked property using the configured -dependency id.
+
{@inheritdoc}
@@ -179,7 +192,7 @@

@@ -223,19 +236,21 @@

-

Attempts to inject the dependency into -the marked property using the configured -dependency id.

+

{@inheritdoc}

public inject(object $injectee) : void - +

Attempts to inject the dependency into +the marked property using the configured +dependency id.

+
+

Parameters
diff --git a/docs/graphs/classes.svg b/docs/graphs/classes.svg index 6bb67eb..acfbf50 100644 --- a/docs/graphs/classes.svg +++ b/docs/graphs/classes.svg @@ -1,15 +1,18 @@ -Phpolar\PropertyInjectorPhpolar\PropertyInjector\ExceptionInjectPropertyInjectorIntersectionTypeExceptionInvalidAttributeConfigurationExceptionUnionTypeExceptionRuntimeExceptionPhpolar\PropertyInjectorPhpolar\PropertyInjectorContractPhpolar\PropertyInjector\ExceptionInjectPropertyInjectorPropertyInjectorInterfaceIntersectionTypeExceptionInvalidAttributeConfigurationExceptionUnionTypeExceptionRuntimeException