Skip to content

Commit 1f065b3

Browse files
Dropping Laravel 5.8 (#27)
* Drop Laravel 5.8 * Update readme file
1 parent 26a14a1 commit 1f065b3

File tree

4 files changed

+136
-92
lines changed

4 files changed

+136
-92
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ dist: bionic
55
matrix:
66
fast_finish: true
77
include:
8-
- php: 7.2
9-
env: LARAVEL=5.8.* ORCHESTRA=3.8.*
108
- php: 7.3
119
env: LARAVEL=^6.0 ORCHESTRA=^4.0
1210
- php: 7.4

composer.json

Lines changed: 88 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,92 @@
11
{
2-
"name": "richan-fongdasen/eloquent-blameable",
3-
"description": "Blameable behavior implementation for your Eloquent Model in Laravel",
4-
"type": "library",
5-
"license": "MIT",
6-
"homepage": "https://github.com/richan-fongdasen/eloquent-blameable",
7-
"keywords": [
8-
"laravel",
9-
"eloquent",
10-
"blameable"
2+
"name": "richan-fongdasen/eloquent-blameable",
3+
"description": "Blameable behavior implementation for your Eloquent Model in Laravel",
4+
"type": "library",
5+
"license": "MIT",
6+
"homepage": "https://github.com/richan-fongdasen/eloquent-blameable",
7+
"keywords": [
8+
"laravel",
9+
"laravel-package",
10+
"eloquent",
11+
"blameable"
12+
],
13+
"authors": [
14+
{
15+
"name": "Richan Fongdasen",
16+
"email": "[email protected]"
17+
}
18+
],
19+
"support": {
20+
"issues": "https://github.com/richan-fongdasen/eloquent-blameable/issues",
21+
"source": "https://github.com/richan-fongdasen/eloquent-blameable"
22+
},
23+
"require": {
24+
"php": "^7.3",
25+
"illuminate/database": "^6.0|^7.0",
26+
"illuminate/support": "^6.0|^7.0"
27+
},
28+
"require-dev": {
29+
"ekino/phpstan-banned-code": "^0.3.1",
30+
"mockery/mockery": "~1.0",
31+
"orchestra/database": "~4.0|~5.0",
32+
"orchestra/testbench": "~4.0|~5.0",
33+
"phpmd/phpmd": "^2.8",
34+
"phpstan/phpstan": "^0.11|^0.12",
35+
"phpstan/phpstan-deprecation-rules": "^0.11|^0.12",
36+
"phpstan/phpstan-strict-rules": "^0.11|^0.12",
37+
"phpunit/phpunit": "^9.0 || ^8.0",
38+
"sebastian/phpcpd": "^5.0"
39+
},
40+
"config": {
41+
"sort-packages": true
42+
},
43+
"autoload": {
44+
"psr-4": {
45+
"RichanFongdasen\\EloquentBlameable\\": "src/"
46+
},
47+
"files": [
48+
"src/helpers.php"
49+
]
50+
},
51+
"autoload-dev": {
52+
"psr-4": {
53+
"RichanFongdasen\\EloquentBlameableTest\\": "tests/"
54+
}
55+
},
56+
"extra": {
57+
"laravel": {
58+
"providers": [
59+
"RichanFongdasen\\EloquentBlameable\\ServiceProvider"
60+
]
61+
}
62+
},
63+
"scripts": {
64+
"analyse": [
65+
"composer check-syntax",
66+
"composer phpstan-analysis",
67+
"composer phpmd-analysis",
68+
"vendor/bin/phpcpd --min-lines=3 --min-tokens=36 src/"
1169
],
12-
"authors": [
13-
{
14-
"name": "Richan Fongdasen",
15-
"email": "[email protected]"
16-
}
70+
"check-syntax": [
71+
"! find src -type f -name \"*.php\" -exec php -l {} \\; | grep -v 'No syntax errors'",
72+
"! find tests -type f -name \"*.php\" -exec php -l {} \\; | grep -v 'No syntax errors'"
1773
],
18-
"support": {
19-
"issues": "https://github.com/richan-fongdasen/eloquent-blameable/issues",
20-
"source": "https://github.com/richan-fongdasen/eloquent-blameable"
21-
},
22-
"require": {
23-
"php": "^7.2",
24-
"illuminate/database": "5.8.*|^6.0|^7.0",
25-
"illuminate/support": "5.8.*|^6.0|^7.0"
26-
},
27-
"require-dev": {
28-
"mockery/mockery": "~1.0",
29-
"orchestra/testbench": "~3.8|~4.0|~5.0",
30-
"orchestra/database": "~3.8|~4.0|~5.0",
31-
"phpmd/phpmd": "^2.6",
32-
"phpstan/phpstan": "^0.11|^0.12",
33-
"phpstan/phpstan-deprecation-rules": "^0.11|^0.12",
34-
"phpstan/phpstan-strict-rules": "^0.11|^0.12",
35-
"phpunit/phpunit": "^9.0 || ^8.0 || ~7.0 || ~6.0",
36-
"sebastian/phpcpd": "^5.0 || ^4.1 || ~3.0"
37-
},
38-
"config": {
39-
"sort-packages": true
40-
},
41-
"autoload": {
42-
"psr-4": {
43-
"RichanFongdasen\\EloquentBlameable\\": "src/"
44-
},
45-
"files": [
46-
"src/helpers.php"
47-
]
48-
},
49-
"autoload-dev": {
50-
"psr-4": {
51-
"RichanFongdasen\\EloquentBlameableTest\\": "tests/"
52-
}
53-
},
54-
"extra": {
55-
"laravel": {
56-
"providers": [
57-
"RichanFongdasen\\EloquentBlameable\\ServiceProvider"
58-
]
59-
}
60-
},
61-
"scripts": {
62-
"analyse": [
63-
"! find src -type f -name '*.php' -exec php -l {} \\; | grep -v 'No syntax errors'",
64-
"vendor/bin/phpmd src/ text codesize,controversial,design,naming,unusedcode,.phpmd.cleancode.xml",
65-
"vendor/bin/phpcpd --min-lines=3 --min-tokens=36 -vn src/",
66-
"vendor/bin/phpstan analyse src/"
67-
]
68-
},
69-
"minimum-stability": "dev",
70-
"prefer-stable": true
74+
"phpstan-analysis": [
75+
"vendor/bin/phpstan analyse -c phpstan.neon --no-progress"
76+
],
77+
"phpmd-analysis": [
78+
"vendor/bin/phpmd src text codesize,controversial,design,naming,unusedcode,.phpmd.cleancode.xml"
79+
],
80+
"cov-text": [
81+
"phpdbg -qrr vendor/bin/phpunit --coverage-text"
82+
],
83+
"cov-html": [
84+
"phpdbg -qrr vendor/bin/phpunit --coverage-html coverage"
85+
],
86+
"test": [
87+
"vendor/bin/phpunit"
88+
]
89+
},
90+
"minimum-stability": "dev",
91+
"prefer-stable": true
7192
}

phpstan.neon

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
includes:
22
- vendor/phpstan/phpstan-strict-rules/rules.neon
33
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+
- vendor/ekino/phpstan-banned-code/extension.neon
45

56
parameters:
6-
level: 7
7+
level: max
8+
checkMissingIterableValueType: false
9+
paths:
10+
- src
11+
banned_code:
12+
nodes:
13+
- type: Expr_FuncCall
14+
functions:
15+
- dd
16+
- debug_backtrace
17+
- die
18+
- dump
19+
- echo
20+
- eval
21+
- exec
22+
- exit
23+
- passthru
24+
- phpinfo
25+
- print_r
26+
- proc_open
27+
- shell_exec
28+
- system
29+
- var_dump

readme.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[![Build Status](https://travis-ci.org/richan-fongdasen/eloquent-blameable.svg?branch=master)](https://travis-ci.org/richan-fongdasen/eloquent-blameable)
2-
[![codecov](https://codecov.io/gh/richan-fongdasen/eloquent-blameable/branch/master/graph/badge.svg)](https://codecov.io/gh/richan-fongdasen/eloquent-blameable)
3-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/richan-fongdasen/eloquent-blameable/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/richan-fongdasen/eloquent-blameable/?branch=master)
4-
[![Total Downloads](https://poser.pugx.org/richan-fongdasen/eloquent-blameable/d/total.svg)](https://packagist.org/packages/richan-fongdasen/eloquent-blameable)
5-
[![Latest Stable Version](https://poser.pugx.org/richan-fongdasen/eloquent-blameable/v/stable.svg)](https://packagist.org/packages/richan-fongdasen/eloquent-blameable)
6-
[![License: MIT](https://poser.pugx.org/laravel/framework/license.svg)](https://opensource.org/licenses/MIT)
1+
[![Build Status](https://travis-ci.org/richan-fongdasen/eloquent-blameable.svg?branch=master)](https://travis-ci.org/richan-fongdasen/eloquent-blameable)
2+
[![codecov](https://codecov.io/gh/richan-fongdasen/eloquent-blameable/branch/master/graph/badge.svg)](https://codecov.io/gh/richan-fongdasen/eloquent-blameable)
3+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/richan-fongdasen/eloquent-blameable/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/richan-fongdasen/eloquent-blameable/?branch=master)
4+
[![Total Downloads](https://poser.pugx.org/richan-fongdasen/eloquent-blameable/d/total.svg)](https://packagist.org/packages/richan-fongdasen/eloquent-blameable)
5+
[![Latest Stable Version](https://poser.pugx.org/richan-fongdasen/eloquent-blameable/v/stable.svg)](https://packagist.org/packages/richan-fongdasen/eloquent-blameable)
6+
[![License: MIT](https://poser.pugx.org/laravel/framework/license.svg)](https://opensource.org/licenses/MIT)
77

88
# Eloquent Blameable
99

@@ -15,32 +15,34 @@ This package would help you to track the creator and updater of each database re
1515

1616
## Table of contents
1717

18-
* [Setup](#setup)
19-
* [Configuration](#configuration)
20-
* [Usage](#usage)
21-
* [License](#license)
18+
- [Setup](#setup)
19+
- [Configuration](#configuration)
20+
- [Usage](#usage)
21+
- [License](#license)
2222

2323
## Setup
2424

2525
Install the package via Composer :
26+
2627
```sh
2728
$ composer require richan-fongdasen/eloquent-blameable
2829
```
2930

3031
### Laravel version compatibility
3132

32-
Laravel version | Blameable version
33-
:------------------|:-----------------
34-
5.1.x | 1.0.x
35-
5.2.x - 5.4.x | 1.1.x - 1.2.x
36-
5.5.x - 5.8.x | 1.3.x
37-
6.0.x | 1.4.x
33+
| Laravel version | Blameable version |
34+
| :-------------- | :---------------- |
35+
| 5.1.x | 1.0.x |
36+
| 5.2.x - 5.4.x | 1.1.x - 1.2.x |
37+
| 5.5.x - 5.8.x | 1.3.x |
38+
| 6.x | 1.4.x |
39+
| 7.x | 1.5.x |
3840

3941
> If you are using Laravel version 5.5+ then you can skip registering the service provider in your Laravel application.
4042
4143
### Service Provider
4244

43-
Add the package service provider in your ``config/app.php``
45+
Add the package service provider in your `config/app.php`
4446

4547
```php
4648
'providers' => [
@@ -51,13 +53,13 @@ Add the package service provider in your ``config/app.php``
5153

5254
## Configuration
5355

54-
Publish configuration file using ``php artisan`` command
56+
Publish configuration file using `php artisan` command
5557

5658
```sh
5759
$ php artisan vendor:publish --provider="RichanFongdasen\EloquentBlameable\ServiceProvider"
5860
```
5961

60-
The command above would copy a new configuration file to ``/config/blameable.php``
62+
The command above would copy a new configuration file to `/config/blameable.php`
6163

6264
```php
6365
return [
@@ -138,15 +140,15 @@ return [
138140
```php
139141
Schema::create('some_tables', function (Blueprint $table) {
140142
// ...
141-
143+
142144
$table->integer('created_by')->nullable();
143145
$table->integer('updated_by')->nullable();
144146
$table->integer('deleted_by')->nullable();
145147

146148
// ...
147-
148149

149-
150+
151+
150152
/**
151153
* You can also create foreign key constrains
152154
* for the blameable attributes.

0 commit comments

Comments
 (0)