@@ -180,7 +180,7 @@ at our example but resolve the problem with `FooConsumer` for this specific para
180
180
``` php
181
181
<?php
182
182
183
- use Cspray\AnnotatedContainer\Attribute\UseService ;
183
+ use Cspray\AnnotatedContainer\Attribute\InjectService ;
184
184
use Cspray\AnnotatedContainer\Attribute\Service;
185
185
186
186
#[Service]
@@ -201,7 +201,7 @@ class FooConsumer {
201
201
private Foo $foo;
202
202
203
203
public function __construct(
204
- #[UseService (Qux::class)]
204
+ #[InjectService (Qux::class)]
205
205
Foo $foo
206
206
) {
207
207
$this->foo = $foo;
@@ -253,7 +253,7 @@ Attribute on the parameter with the desired value. Our previous example, properl
253
253
``` php
254
254
<?php
255
255
256
- use Cspray\AnnotatedContainer\Attribute\UseScalar ;
256
+ use Cspray\AnnotatedContainer\Attribute\InjectScalar ;
257
257
use Cspray\AnnotatedContainer\Attribute\Service;
258
258
259
259
#[Service]
@@ -263,9 +263,9 @@ class FooWebClient {
263
263
private string $apiSecret;
264
264
265
265
public function __construct(
266
- #[UseScalar ("my-client-id")]
266
+ #[InjectScalar ("my-client-id")]
267
267
string $clientId,
268
- #[UseScalar ("my-api-secret")]
268
+ #[InjectScalar ("my-api-secret")]
269
269
string $apiSecret
270
270
)
271
271
{
@@ -290,7 +290,7 @@ Let's take our previous example and improve it by reading in our client id and s
290
290
``` php
291
291
<?php
292
292
293
- use Cspray\AnnotatedContainer\Attribute\UseScalarFromEnv ;
293
+ use Cspray\AnnotatedContainer\Attribute\InjectEnv ;
294
294
use Cspray\AnnotatedContainer\Attribute\Service;
295
295
296
296
#[Service]
@@ -300,9 +300,9 @@ class FooWebClient {
300
300
private string $apiSecret;
301
301
302
302
public function __construct(
303
- #[UseScalarFromEnv ('MY_CLIENT_ID')]
303
+ #[InjectEnv ('MY_CLIENT_ID')]
304
304
string $clientId,
305
- #[UseScalarFromEnv ('MY_API_SECRET')]
305
+ #[InjectEnv ('MY_API_SECRET')]
306
306
string $apiSecret
307
307
) {
308
308
$this->clientId = $clientId;
@@ -428,26 +428,33 @@ The following Attributes are made available through this library. All Attributes
428
428
### 0.1.x
429
429
430
430
- Compiler to parse Attributes from source directories ... :heavy_check_mark :
431
- - Factory to create Injector based on parsed Attributes ... :heavy_check_mark :
431
+ - Factory to create Container based on parsed Attributes ... :heavy_check_mark :
432
432
- Support methods invoked in Injector::prepares ... :heavy_check_mark :
433
433
- Support defining scalar values on parameters ... :heavy_check_mark :
434
434
- Support defining specific Service on parameters ... :heavy_check_mark :
435
435
436
436
### 0.2.x
437
437
438
438
- Support the concept of a Service factory ... :heavy_check_mark :
439
- - Support serializing and caching InjectorDefinition ... :x :
440
- - Improve handling of low-hanging fruit logical errors... :x :
439
+ - Support a PSR ContainerInterface Factory ... :heavy_check_mark :
440
+ - Support serializing and caching ContainerDefinition ... :x :
441
+ - Handle when abstract Service does not have corresponding alias ... :x :
442
+ - Handle when an abstract Service might have more than 1 alias ... :x :
443
+ - Handle when Attributes on parameters and methods are not annotated with correct class Attributes ... :x :
441
444
442
445
### 0.3.x
443
446
444
- - Support defining scalar values from an arbitrary source ... :x :
445
- - Improve handling of logical errors... :x :
446
- - Harden library for production use ... :x :
447
+ - Support for amphp/injector ... :x :
448
+ - Support for PrototypeServices, or an unshared Service ... :x :
449
+ - Support Profiles instead of Environments ... :x :
450
+
451
+ ### 0.4.x
447
452
448
- ### 0.4.x and beyond
453
+ - Support creating a ContainerDefinition for libraries that can't be Annotated ... :x :
454
+ - Support a Service having an explicit name that is not the FQCN ... :x :
455
+ - Have convenience functions that abstracts away common boilerplate ... :x :
449
456
450
- - Add support for amphp/injector ... : x :
451
- - Support working with identifiers once feature is in amphp/injector ... : x :
452
- - Research potentially supporting other containers ... :question :
453
- - Further improve library's use in production environment ... :x :
457
+ ### 1.0 and beyond
458
+
459
+ - Improve handling of logical errors ... :x :
460
+ - Support defining scalar values from an arbitrary source ... :question_mark :
0 commit comments