Skip to content

Commit 5b7c7b0

Browse files
authored
removed PostConstruct Annotation / Interceptor / PointCut (#90)
* removed PostConstruct * Update php.yml
1 parent efe752e commit 5b7c7b0

29 files changed

Lines changed: 33 additions & 1438 deletions

.coveralls.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php-versions: ['7.3', '7.4', '8.0']
14+
php-versions: ['8.0', '8.1']
1515
name: PHP ${{ matrix.php-versions }} Test
1616
steps:
1717
- uses: actions/checkout@v2

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ vendor
22
composer.lock
33
composer.phar
44
*.result.cache
5-

.scrutinizer.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.sensiolabs.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
aspect-oriented programming Package for laravel framework
33

44
![Build Status](https://github.com/ytake/Laravel-Aspect/workflows/Tests/badge.svg?branch=master)
5-
[![Coverage Status](http://img.shields.io/coveralls/ytake/Laravel-Aspect/master.svg?style=flat-square)](https://coveralls.io/r/ytake/Laravel-Aspect?branch=master)
6-
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/ytake/Laravel-Aspect.svg?style=flat-square)](https://scrutinizer-ci.com/g/ytake/Laravel-Aspect/?branch=master)
7-
85
[![StyleCI](https://styleci.io/repos/40900709/shield)](https://styleci.io/repos/40900709)
9-
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/70dace68-fe04-4039-aeb4-47a64c6acca3/mini.png)](https://insight.sensiolabs.com/projects/70dace68-fe04-4039-aeb4-47a64c6acca3)
106

117
[![License](http://img.shields.io/packagist/l/ytake/laravel-aspect.svg?style=flat-square)](https://packagist.org/packages/ytake/laravel-aspect)
128
[![Latest Version](http://img.shields.io/packagist/v/ytake/laravel-aspect.svg?style=flat-square)](https://packagist.org/packages/ytake/laravel-aspect)
@@ -31,6 +27,7 @@ This library is heavily inspired by the [jcabi/jcabi-aspects](https://github.com
3127
6.0.x | 4.0
3228
7.x | 6.0
3329
8.x | 7.0
30+
9.x | 8.0
3431

3532
### install
3633

@@ -40,25 +37,15 @@ $ composer require ytake/laravel-aspect
4037

4138
*Supported Auto-Discovery(^Laravel5.5)*
4239

43-
#### for Laravel5.1, 5.2
44-
[branch](https://github.com/ytake/Laravel-Aspect/tree/master-laravel5-legacy)
4540

46-
```json
47-
"require": {
48-
"php": ">=5.5.9",
49-
"laravel/framework": "5.*",
50-
"ytake/laravel-aspect": "^1.0"
51-
},
52-
```
53-
54-
#### for Laravel5.6
41+
#### for Laravel9
5542
[Laravel-Aspect Supported Laravel5.6](https://github.com/ytake/Laravel-Aspect/blob/master-laravel5.6)
5643

5744
```json
5845
"require": {
5946
"php": ">=7.1.3",
6047
"laravel/framework": "^5.7",
61-
"ytake/laravel-aspect": "^3.0.0"
48+
"ytake/laravel-aspect": "^8.0.0"
6249
},
6350
```
6451

@@ -448,46 +435,6 @@ class AspectQueryLog
448435
testing.INFO: QueryLog:AspectQueryLog.multipleDatabaseAppendRecord {"queries":[{"query":"CREATE TABLE tests (test varchar(255) NOT NULL)","bindings":[],"time":0.58,"connectionName":"testing"},{"query":"CREATE TABLE tests (test varchar(255) NOT NULL)","bindings":[],"time":0.31,"connectionName":"testing_second"} ...
449436
```
450437

451-
### @PostConstruct
452-
The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization.
453-
454-
you must use the PostConstructModule
455-
456-
```php
457-
use Ytake\LaravelAspect\Annotation\PostConstruct;
458-
459-
class Something
460-
{
461-
protected $abstract;
462-
463-
protected $counter = 0;
464-
465-
public function __construct(ExampleInterface $abstract)
466-
{
467-
$this->abstract = $abstract;
468-
}
469-
470-
/**
471-
* @PostConstruct
472-
*/
473-
public function init()
474-
{
475-
$this->counter += 1;
476-
}
477-
478-
/**
479-
* @return int
480-
*/
481-
public function returning()
482-
{
483-
return $this->counter;
484-
}
485-
}
486-
487-
```
488-
489-
**The method MUST NOT have any parameters**
490-
491438
### @RetryOnFailure
492439

493440
Retry the method in case of exception.

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^7.3|^8.0",
20+
"php": "^8.0",
2121
"illuminate/console": "^9.0",
2222
"illuminate/filesystem": "^9.0",
2323
"illuminate/support": "^9.0",
@@ -30,16 +30,15 @@
3030
"illuminate/bus": "^9.0",
3131
"illuminate/queue": "^9.0",
3232
"ray/aop": "^2.9",
33-
"doctrine/annotations": "^1.11",
34-
"nikic/php-parser": "^4.0",
35-
"psr/log": "~1.0"
33+
"doctrine/annotations": "^1.10",
34+
"nikic/php-parser": "^4.2",
35+
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
3636
},
3737
"require-dev": {
38-
"symfony/framework-bundle": "^5.2",
39-
"symfony/console": "^5.2|^6.0",
38+
"symfony/framework-bundle": "^6.0",
39+
"symfony/console": "^6.0.9",
4040
"phpunit/phpunit": "^9.3.3",
4141
"mockery/mockery": "*",
42-
"satooshi/php-coveralls": "*",
4342
"sebastian/phpcpd": "*",
4443
"phploc/phploc": "*",
4544
"pdepend/pdepend" : "^2.2.4",

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
<logging/>
2424
<php>
2525
<includePath>./tests</includePath>
26+
<ini name="memory_limit" value="512M"/>
2627
</php>
2728
</phpunit>

src/AnnotateClass.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)