diff --git a/.gitignore b/.gitignore index 63cfbc8..bad7e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ vendor lumen.log .php_cs.cache tmp[a-zA-Z0-9]{6,99} +Vagrantfile +.vagrant/ diff --git a/.travis.yml b/.travis.yml index de010e8..38e2f09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ language: php php: - - 5.5 - 5.6 - 7.0 + - 7.1 - hhvm before_script: - travis_retry composer self-update - - travis_retry composer install --prefer-source --no-interaction --dev + - travis_retry composer install --prefer-source --no-interaction script: - "phpunit --process-isolation" diff --git a/bootstrap.php b/bootstrap.php index 95f7709..3853139 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -1,6 +1,6 @@ singleton('Illuminate\Contracts\Console\Kernel', 'App\Console\Kernel'); +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); -$app->get('awesome/action', 'AwesomeController@action'); +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + Laravel\Lumen\Exceptions\Handler::class +); /* |-------------------------------------------------------------------------- @@ -50,11 +56,8 @@ */ $app->middleware([ - Illuminate\Cookie\Middleware\EncryptCookies::class, - Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, - Illuminate\View\Middleware\ShareErrorsFromSession::class, - Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class, + Illuminate\View\Middleware\ShareErrorsFromSession::class ]); $app->routeMiddleware([]); diff --git a/composer.json b/composer.json index e7ba3a2..7ce5593 100644 --- a/composer.json +++ b/composer.json @@ -5,19 +5,23 @@ "license": "MIT", "type": "package", "authors":[ - { - "name": "Vagner do Carmo", - "email": "vluzrmos@gmail.com" - } + { + "name": "Vagner do Carmo", + "email": "vluzrmos@gmail.com" + }, + { + "name": "Szabolcs (Szasza) Palmer", + "email": "szasza@szasza.info" + } ], "require":{ - "laravel/lumen-framework": "~5.1", - "psy/psysh":"~0.5.1|~0.6.1" + "laravel/lumen-framework": "~5.3", + "psy/psysh":"~0.7.0|~0.8.0" }, "require-dev":{ - "phpunit/phpunit": "~4.0", - "fzaninotto/faker": "~1.4", - "fabpot/php-cs-fixer": "~2.0" + "phpunit/phpunit": "~5.0", + "fzaninotto/faker": "~1.4", + "friendsofphp/php-cs-fixer": "^2.0" }, "autoload": { "psr-4": { @@ -25,12 +29,12 @@ } }, "autoload-dev": { - "psr-4": { - "App\\": "fixture/app/" - } + "psr-4": { + "App\\": "fixture/app/" + } }, "config":{ - "preferred-install":"dist" + "preferred-install":"dist" }, "minimum-stability":"dev" } diff --git a/readme.md b/readme.md index bedad23..21c7174 100644 --- a/readme.md +++ b/readme.md @@ -21,6 +21,7 @@ Package Versions: |-------|--------| | 5.0 | 1.0.* | | 5.1 | 1.1.* | +| 5.3 | 1.3.* | Download from packagist: diff --git a/src/TinkerServiceProvider.php b/src/TinkerServiceProvider.php index b3de2d3..779f01b 100644 --- a/src/TinkerServiceProvider.php +++ b/src/TinkerServiceProvider.php @@ -17,7 +17,7 @@ class TinkerServiceProvider extends ServiceProvider public function register() { $this->commands([ - 'Vluzrmos\Tinker\TinkerCommand', + TinkerCommand::class, ]); } } diff --git a/src/TinkerShell.php b/src/TinkerShell.php index 6869fc8..5a8619b 100644 --- a/src/TinkerShell.php +++ b/src/TinkerShell.php @@ -9,6 +9,9 @@ namespace Vluzrmos\Tinker; use Illuminate\Contracts\Console\Kernel as Console; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Collection; +use Laravel\Lumen\Application; use Psy\Configuration; use Psy\Shell; @@ -88,9 +91,9 @@ public function getShell() protected function getCasters() { return [ - 'Laravel\Lumen\Application' => 'Vluzrmos\Tinker\TinkerCaster::castApplication', - 'Illuminate\Support\Collection' => 'Vluzrmos\Tinker\TinkerCaster::castCollection', - 'Illuminate\Database\Eloquent\Model' => 'Vluzrmos\Tinker\TinkerCaster::castModel', + Application::class => 'Vluzrmos\Tinker\TinkerCaster::castApplication', + Collection::class => 'Vluzrmos\Tinker\TinkerCaster::castCollection', + Model::class => 'Vluzrmos\Tinker\TinkerCaster::castModel', ]; }