Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 55b6b9e

Browse files
committed
Merge branch 'release/0.5.0'
2 parents 76dfcbc + 3289875 commit 55b6b9e

File tree

4 files changed

+36
-17
lines changed

4 files changed

+36
-17
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ env:
1313

1414
matrix:
1515
include:
16-
- php: 5.6
16+
- php: 7.0
1717
env: setup=lowest
18-
- php: 5.6
18+
- php: 7.0
19+
env: setup=stable
20+
- php: 7.1
21+
env: setup=lowest
22+
- php: 7.1
1923
env: setup=stable
2024

2125
sudo: false
@@ -25,7 +29,7 @@ cache:
2529
- $HOME/.composer/cache
2630

2731
before_install:
28-
- if [[ $TRAVIS_PHP_VERSION != 7.1 ]] ; then phpenv config-rm xdebug.ini; fi
32+
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
2933
- travis_retry composer self-update
3034

3135
install:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.0
1+
0.5.0

composer.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
],
1717
"require": {
1818
"php": ">=5.5.0",
19-
"illuminate/console": "~5.1.10|5.2.*|5.3.*|5.4.*",
20-
"illuminate/log": "~5.1.10|5.2.*|5.3.*|5.4.*",
21-
"illuminate/support": "~5.1.10|5.2.*|5.3.*|5.4.*",
19+
"illuminate/console": "~5.1.10|5.2.*|5.3.*|5.4.*|5.5.*",
20+
"illuminate/log": "~5.1.10|5.2.*|5.3.*|5.4.*|5.5.*",
21+
"illuminate/support": "~5.1.10|5.2.*|5.3.*|5.4.*|5.5.*",
2222
"nesbot/carbon": "~1.19"
2323
},
2424
"require-dev": {
@@ -38,7 +38,16 @@
3838
"Spinen\\GarbageMan\\": "tests"
3939
}
4040
},
41+
"extra": {
42+
"laravel": {
43+
"providers": [
44+
"Spinen\\GarbageMan\\GarbageManServiceProvider"
45+
]
46+
}
47+
},
4148
"config": {
42-
"preferred-install": "dist"
43-
}
49+
"sort-packages": true
50+
},
51+
"minimum-stability": "dev",
52+
"prefer-stable": true
4453
}

readme.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Install Garbage Man:
2929
$ composer require spinen/laravel-garbage-man
3030
```
3131

32+
### For >= Laravel 5.5, you are done with the Install
33+
34+
The package uses the auto registration feature
35+
36+
### For < Laravel 5.5, you have to register the Service Provider
37+
3238
Add the Service Provider to `config/app.php`:
3339

3440
```php
@@ -38,12 +44,6 @@ Add the Service Provider to `config/app.php`:
3844
];
3945
```
4046

41-
Publish the package config file to `config/garbageman.php`:
42-
43-
```bash
44-
$ php artisan vendor:publish
45-
```
46-
4747
## Using the command
4848

4949
The command is registered with laravel as ```garbageman:purge```. You can run it one of 2 ways...
@@ -67,15 +67,20 @@ listed on the [Laravel documentation](http://laravel.com/docs/master/scheduling)
6767

6868
## Configuration
6969

70-
During the install process `config/garbageman.php` is copied to the config directory of the project. That file is fully documented. You will need to make the changes to that file to suit your needs.
70+
Publish the package config file to `config/garbageman.php`:
71+
72+
```bash
73+
$ php artisan vendor:publish
74+
```
7175

72-
There are 3 main configuration items...
76+
This file is fully documented. You will need to make the changes to that file to suit your needs. There are 3 main configuration items...
7377

7478
1. Fire purge events - Fire events on purge of each record.
7579
2. Logging level - Level to log.
7680
3. Schedule - Models & number of days to allow the soft deleted record to stay.
7781

7882
### Fire purge events (fire\_purge\_events)
83+
7984
Allow hook into the purge of each record by throwing events before & after deleting of each record. There are 2 events thrown:
8085

8186
* garbageman.purging:\<full/model/name\>
@@ -86,6 +91,7 @@ The model is passed with each of the events. The "purging" event is thrown just
8691
This is an expensive operation as it requires a SQL command for each record to delete so that the record can be thrown with the events. Therefore, unless you need to catch the events to preform some other action, leave this false to allow all records per model to get deleted with a single SQL call.
8792

8893
### Logging level (logging_level)
94+
8995
The level that log messages are generated, which will display information on the console output and in the logs.
9096

9197
| Level | Description |

0 commit comments

Comments
 (0)