Skip to content

Commit

Permalink
Merge pull request #6 from hmazter/laravel-55-autodiscover
Browse files Browse the repository at this point in the history
Support Laravel 5.5, PHPUnit 6 and include auto discovery of package
  • Loading branch information
hmazter authored Aug 12, 2017
2 parents 9f14d5f + cdece8f commit fb328d4
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
This project tries to adhere to [Semantic Versioning](http://semver.org/).

## [0.1.5] - 2017-08-12
### Added
- Support Laravel auto discover

### Other
- Verify with Laravel 5.5 and PHPUnit 6

## [0.1.4] - 2017-01-28
### Updated
- Updated tests
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Kristoffer Högberg
Copyright (c) 2017 Kristoffer Högberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Require this package with composer using the following command:
```bash
composer require hmazter/laravel-schedule-list
```
### Laravel 5.5 and above

Install is done


### Laravel < 5.5

After updating composer, add the service provider to the `providers` array in `config/app.php`

Expand Down
13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
],
"require": {
"php": ">=5.6.4",
"illuminate/support": ">=5.0 <5.5",
"illuminate/console": ">=5.0 <5.5"
"illuminate/support": ">=5.0 <5.6",
"illuminate/console": ">=5.0 <5.6"
},
"require-dev": {
"phpunit/phpunit": "^5.0",
"phpunit/phpunit": "^5.0|^6.0",
"orchestra/testbench": "~3.3"
},
"autoload": {
Expand All @@ -27,5 +27,12 @@
"classmap": [
"tests/"
]
},
"extra": {
"laravel": {
"providers": [
"Hmazter\\LaravelScheduleList\\ScheduleListServiceProvider"
]
}
}
}
10 changes: 9 additions & 1 deletion src/Console/ListScheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function getOptions()
*
* @return mixed
*/
public function fire()
public function handle()
{
$events = $this->schedule->events();

Expand All @@ -75,6 +75,14 @@ public function fire()
$this->outputTableStyle($events);
}

/**
* Backwards compatibility for laravel <5.5
*/
public function fire()
{
$this->handle();
}

/**
* @param $events
*/
Expand Down

0 comments on commit fb328d4

Please sign in to comment.