Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite using native Attributes instead of annotations. #138

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ Next up you need to create a configuration class `MyConfiguration` and document

use bitExpert\Disco\Annotations\Configuration;

/**
* @Configuration
*/
#[Configuration]
class MyConfiguration
{
}
Expand All @@ -52,14 +50,10 @@ use bitExpert\Disco\Annotations\Bean;
use bitExpert\Disco\Annotations\Configuration;
use bitExpert\Disco\Helper\SampleService;

/**
* @Configuration
*/
#[Configuration]
class MyConfiguration
{
/**
* @Bean
*/
#[Bean]
public function mySampleService() : SampleService
{
return new SampleService();
Expand Down
2 changes: 2 additions & 0 deletions Upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Disco 0.5.0 dropped support for the @return annotations and strictly
relies on the return type definitions now.

While this was valid configuration code before the 0.5.0 release:

```php
<?php

Expand All @@ -96,6 +97,7 @@ class MyConfiguration
```

This is how you have to define bean instances for the 0.5.0 release:

```php
<?php

Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
],
"require": {
"php": "^8.0.0",
"psr/container": "^1.1.1",
"doctrine/annotations": "^1.12.1",
"bitexpert/slf4psrlog": "^0.1.3",
"ocramius/proxy-manager": "^2.11.1",
"bitexpert/slf4psrlog": "^0.1.3"
"psr/container": "^2.0.0",
"webmozart/assert": "^1.10"
},
"require-dev": {
"bookdown/bookdown": "@dev",
Expand All @@ -42,8 +42,7 @@
}
},
"provide": {
"container-interop/container-interop-implementation": "^1.2",
"psr/container-implementation": "^1.0"
"psr/container-implementation": "^2.0"
},
"scripts": {
"check": [
Expand Down
Loading