8000 [Refactor] Add additional command change and update dependencies · Naxon/laravel-json-api@338c046 · GitHub
[go: up one dir, main page]

Skip to content
65E3

Commit 338c046

Browse files
committed
[Refactor] Add additional command change and update dependencies
1 parent c343560 commit 338c046

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
}
7070
}
7171
},
72-
"minimum-stability": "dev",
72+
"minimum-stability": "stable",
7373
"prefer-stable": true,
7474
"config": {
7575
"sort-packages": true

docs/upgrade.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ $ composer require cloudcreativity/laravel-json-api:^0.11 --update-with-dependen
99

1010
## Upgrading to 0.11 from 0.10
1111

12-
Version `0.11` now supports Laravel 5.5.
12+
Version `0.11` now supports Laravel 5.5 in addition to 5.4.
13+
14+
### Package Discovery
15+
16+
If you are on Laravel 5.5, you no longer need to add the service provider and facade to your `app.php` config as
17+
we have added package discovery configuration. Feel free to remove the service provider and facade from your
18+
config file.
1319

1420
### Testing
1521

src/Console/Commands/AbstractGeneratorCommand.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,17 @@ public function __construct(Filesystem $files, Repository $apiRepository)
9090

9191
/**
9292
* @return bool|null
93-
* @todo this maintains support for Laravel 5.4 - remove when no longer supporting 5.4
9493
*/
95-
public function fire()
94+
public function handle()
9695
{
9796
if (!$this->apiRepository->exists($api = $this->argument('api'))) {
9897
$this->error("JSON API '$api' does not exist.");
9998
return 1;
10099
}
101100

102-
return (parent::fire() !== false) ? 0 : 1;
103-
}
104-
105-
/**
106-
* @return bool|null
107-
*/
108-
public function handle()
109-
{
110-
if (!$this->apiRepository->exists($api = $this->argument('api'))) {
111-
$this->error("JSON API '$api' does not exist.");
112-
return 1;
101+
/** @todo remove when removing support for Laravel 5.4 */
102+
if (is_callable(['parent', 'fire'])) {
103+
return (parent::fire() !== false) ? 0 : 1;
113104
}
114105

115106
return (parent::handle() !== false) ? 0 : 1;

0 commit comments

Comments
 (0)
0