From 7b174e6ce866deaa53a913bf3fa9851342601e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1sztor=20G=C3=A1bor?= Date: Sat, 2 Jan 2016 15:41:27 +0100 Subject: [PATCH 1/2] Add missing config file, remove php 5.4 support. --- .travis.yml | 1 - bootstrap/autoload.php | 2 +- bootstrap/cache/.gitignore | 2 ++ config/app.php | 4 +-- config/broadcasting.php | 52 ++++++++++++++++++++++++++++++++++++++ config/cache.php | 2 +- config/cms.php | 4 +-- config/database.php | 2 +- config/filesystems.php | 2 +- config/session.php | 2 +- config/testing/cms.php | 4 +-- config/view.php | 2 +- 12 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 bootstrap/cache/.gitignore create mode 100644 config/broadcasting.php diff --git a/.travis.yml b/.travis.yml index dfeea409e..20b6e700a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.4 - 5.5 - 5.6 - 7.0 diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index b980622d7..db989dae3 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -47,7 +47,7 @@ require __DIR__.'/../vendor/autoload.php'; | */ -$compiledPath = __DIR__.'/../storage/framework/compiled.php'; +$compiledPath = __DIR__.'/cache/compiled.php'; if (file_exists($compiledPath)) { require $compiledPath; diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 000000000..c96a04f00 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/config/app.php b/config/app.php index 1da5680c6..4f2959817 100644 --- a/config/app.php +++ b/config/app.php @@ -111,7 +111,7 @@ return [ | */ - 'providers' => array_merge(include(base_path().'/modules/system/providers.php'), [ + 'providers' => array_merge(include(base_path('modules/system/providers.php')), [ // 'Illuminate\Html\HtmlServiceProvider', // Example @@ -129,7 +129,7 @@ return [ | */ - 'aliases' => array_merge(include(base_path().'/modules/system/aliases.php'), [ + 'aliases' => array_merge(include(base_path('modules/system/aliases.php')), [ // 'Str' => 'Illuminate\Support\Str', // Example diff --git a/config/broadcasting.php b/config/broadcasting.php new file mode 100644 index 000000000..02cf625a5 --- /dev/null +++ b/config/broadcasting.php @@ -0,0 +1,52 @@ + 'pusher', + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => '', + 'secret' => '', + 'app_id' => '', + 'options' => [ + // + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + ], + +]; \ No newline at end of file diff --git a/config/cache.php b/config/cache.php index 425c74e4b..65939e071 100644 --- a/config/cache.php +++ b/config/cache.php @@ -44,7 +44,7 @@ return [ 'file' => [ 'driver' => 'file', - 'path' => storage_path().'/framework/cache', + 'path' => storage_path('framework/cache'), ], 'memcached' => [ diff --git a/config/cms.php b/config/cms.php index 88ee86081..49f922403 100644 --- a/config/cms.php +++ b/config/cms.php @@ -200,13 +200,13 @@ return [ 'uploads' => [ 'disk' => 'local', 'folder' => 'uploads', - 'path' => '/storage/app/uploads', + 'path' => storage_path('app/uploads'), ], 'media' => [ 'disk' => 'local', 'folder' => 'media', - 'path' => '/storage/app/media', + 'path' => storage_path('app/media'), ], ], diff --git a/config/database.php b/config/database.php index 13f816854..f76288396 100644 --- a/config/database.php +++ b/config/database.php @@ -48,7 +48,7 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => 'storage/database.sqlite', + 'database' => database_path('database.sqlite'), 'prefix' => '', ], diff --git a/config/filesystems.php b/config/filesystems.php index c636d36c3..a265cbb3e 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -45,7 +45,7 @@ return [ 'local' => [ 'driver' => 'local', - 'root' => storage_path().'/app', + 'root' => storage_path('app'), ], 's3' => [ diff --git a/config/session.php b/config/session.php index 739563bde..3ee92a981 100644 --- a/config/session.php +++ b/config/session.php @@ -57,7 +57,7 @@ return [ | */ - 'files' => storage_path().'/framework/sessions', + 'files' => storage_path('framework/sessions'), /* |-------------------------------------------------------------------------- diff --git a/config/testing/cms.php b/config/testing/cms.php index 36fe39edd..dfea912c7 100644 --- a/config/testing/cms.php +++ b/config/testing/cms.php @@ -96,7 +96,7 @@ return [ | */ - 'pluginsPathLocal' => base_path().'/tests/fixtures/plugins', + 'pluginsPathLocal' => base_path('tests/fixtures/plugins'), /* |-------------------------------------------------------------------------- @@ -107,6 +107,6 @@ return [ | */ - 'themesPathLocal' => base_path().'/tests/fixtures/themes', + 'themesPathLocal' => base_path('tests/fixtures/themes'), ]; diff --git a/config/view.php b/config/view.php index 215dfafc2..9948f06ea 100644 --- a/config/view.php +++ b/config/view.php @@ -28,6 +28,6 @@ return [ | */ - 'compiled' => realpath(storage_path().'/framework/views'), + 'compiled' => realpath(storage_path('framework/views')), ]; From bb612f096eadbe21bdb2e2bbd47beb591018affc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1sztor=20G=C3=A1bor?= Date: Sat, 2 Jan 2016 16:57:57 +0100 Subject: [PATCH 2/2] Use the ::class notation, add Broadcasting service provider and Gate alias --- bootstrap/app.php | 12 ++-- modules/system/aliases.php | 103 ++++++++++++++++++----------------- modules/system/providers.php | 51 ++++++++--------- 3 files changed, 84 insertions(+), 82 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 1304ef30b..cc0ec8d58 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -27,18 +27,18 @@ $app = new October\Rain\Foundation\Application( */ $app->singleton( - 'Illuminate\Contracts\Http\Kernel', - 'October\Rain\Foundation\Http\Kernel' + Illuminate\Contracts\Http\Kernel::class, + October\Rain\Foundation\Http\Kernel::class ); $app->singleton( - 'Illuminate\Contracts\Console\Kernel', - 'October\Rain\Foundation\Console\Kernel' + Illuminate\Contracts\Console\Kernel::class, + October\Rain\Foundation\Console\Kernel::class ); $app->singleton( - 'Illuminate\Contracts\Debug\ExceptionHandler', - 'October\Rain\Foundation\Exception\Handler' + Illuminate\Contracts\Debug\ExceptionHandler::class, + October\Rain\Foundation\Exception\Handler::class ); /* diff --git a/modules/system/aliases.php b/modules/system/aliases.php index e667169e2..a7ea636d7 100644 --- a/modules/system/aliases.php +++ b/modules/system/aliases.php @@ -5,59 +5,60 @@ return [ /* * Laravel aliases */ - 'App' => 'Illuminate\Support\Facades\App', - 'Artisan' => 'Illuminate\Support\Facades\Artisan', - 'Bus' => 'Illuminate\Support\Facades\Bus', - 'Cache' => 'Illuminate\Support\Facades\Cache', - 'Cookie' => 'Illuminate\Support\Facades\Cookie', - 'Crypt' => 'Illuminate\Support\Facades\Crypt', - 'Db' => 'Illuminate\Support\Facades\DB', // Preferred - 'DB' => 'Illuminate\Support\Facades\DB', - 'Eloquent' => 'Illuminate\Database\Eloquent\Model', - 'Event' => 'Illuminate\Support\Facades\Event', - 'Hash' => 'Illuminate\Support\Facades\Hash', - 'Input' => 'Illuminate\Support\Facades\Input', - 'Lang' => 'Illuminate\Support\Facades\Lang', - 'Log' => 'Illuminate\Support\Facades\Log', - 'Mail' => 'Illuminate\Support\Facades\Mail', - 'Password' => 'Illuminate\Support\Facades\Password', - 'Queue' => 'Illuminate\Support\Facades\Queue', - 'Redirect' => 'Illuminate\Support\Facades\Redirect', - 'Redis' => 'Illuminate\Support\Facades\Redis', - 'Request' => 'Illuminate\Support\Facades\Request', - 'Response' => 'Illuminate\Support\Facades\Response', - 'Route' => 'Illuminate\Support\Facades\Route', - 'Schema' => 'Illuminate\Support\Facades\Schema', - 'Session' => 'Illuminate\Support\Facades\Session', - 'Storage' => 'Illuminate\Support\Facades\Storage', - 'Url' => 'Illuminate\Support\Facades\URL', // Preferred - 'URL' => 'Illuminate\Support\Facades\URL', - 'Validator' => 'Illuminate\Support\Facades\Validator', - 'View' => 'Illuminate\Support\Facades\View', + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Bus' => Illuminate\Support\Facades\Bus::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'Db' => Illuminate\Support\Facades\DB::class, // Preferred + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Input' => Illuminate\Support\Facades\Input::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'Url' => Illuminate\Support\Facades\URL::class, // Preferred + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, /* * October aliases */ - 'Model' => 'October\Rain\Database\Model', - 'Block' => 'October\Rain\Support\Facades\Block', - 'File' => 'October\Rain\Support\Facades\File', - 'Config' => 'October\Rain\Support\Facades\Config', - 'Seeder' => 'October\Rain\Database\Updates\Seeder', - 'Flash' => 'October\Rain\Support\Facades\Flash', - 'Form' => 'October\Rain\Support\Facades\Form', - 'Html' => 'October\Rain\Support\Facades\Html', - 'Http' => 'October\Rain\Support\Facades\Http', - 'Str' => 'October\Rain\Support\Facades\Str', - 'Markdown' => 'October\Rain\Support\Facades\Markdown', - 'Yaml' => 'October\Rain\Support\Facades\Yaml', - 'Ini' => 'October\Rain\Support\Facades\Ini', - 'Twig' => 'October\Rain\Support\Facades\Twig', - 'DbDongle' => 'October\Rain\Support\Facades\DbDongle', - 'Backend' => 'Backend\Facades\Backend', - 'BackendMenu' => 'Backend\Facades\BackendMenu', - 'BackendAuth' => 'Backend\Facades\BackendAuth', - 'AjaxException' => 'October\Rain\Exception\AjaxException', - 'SystemException' => 'October\Rain\Exception\SystemException', - 'ApplicationException' => 'October\Rain\Exception\ApplicationException', - 'ValidationException' => 'October\Rain\Exception\ValidationException', + 'Model' => October\Rain\Database\Model::class, + 'Block' => October\Rain\Support\Facades\Block::class, + 'File' => October\Rain\Support\Facades\File::class, + 'Config' => October\Rain\Support\Facades\Config::class, + 'Seeder' => October\Rain\Database\Updates\Seeder::class, + 'Flash' => October\Rain\Support\Facades\Flash::class, + 'Form' => October\Rain\Support\Facades\Form::class, + 'Html' => October\Rain\Support\Facades\Html::class, + 'Http' => October\Rain\Support\Facades\Http::class, + 'Str' => October\Rain\Support\Facades\Str::class, + 'Markdown' => October\Rain\Support\Facades\Markdown::class, + 'Yaml' => October\Rain\Support\Facades\Yaml::class, + 'Ini' => October\Rain\Support\Facades\Ini::class, + 'Twig' => October\Rain\Support\Facades\Twig::class, + 'DbDongle' => October\Rain\Support\Facades\DbDongle::class, + 'Backend' => Backend\Facades\Backend::class, + 'BackendMenu' => Backend\Facades\BackendMenu::class, + 'BackendAuth' => Backend\Facades\BackendAuth::class, + 'AjaxException' => October\Rain\Exception\AjaxException::class, + 'SystemException' => October\Rain\Exception\SystemException::class, + 'ApplicationException' => October\Rain\Exception\ApplicationException::class, + 'ValidationException' => October\Rain\Exception\ValidationException::class, ]; diff --git a/modules/system/providers.php b/modules/system/providers.php index fa7636402..f95f05547 100644 --- a/modules/system/providers.php +++ b/modules/system/providers.php @@ -5,34 +5,35 @@ return [ /* * Laravel providers */ - 'Illuminate\Bus\BusServiceProvider', - 'Illuminate\Cache\CacheServiceProvider', - 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', - 'Illuminate\Routing\ControllerServiceProvider', - 'Illuminate\Cookie\CookieServiceProvider', - 'Illuminate\Encryption\EncryptionServiceProvider', - 'Illuminate\Foundation\Providers\FoundationServiceProvider', - 'Illuminate\Hashing\HashServiceProvider', - 'Illuminate\Pagination\PaginationServiceProvider', - 'Illuminate\Pipeline\PipelineServiceProvider', - 'Illuminate\Queue\QueueServiceProvider', - 'Illuminate\Redis\RedisServiceProvider', - 'Illuminate\Session\SessionServiceProvider', - 'Illuminate\Validation\ValidationServiceProvider', - 'Illuminate\View\ViewServiceProvider', + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Routing\ControllerServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, /* * October Rain providers */ - 'October\Rain\Foundation\Providers\ArtisanServiceProvider', - 'October\Rain\Database\DatabaseServiceProvider', - 'October\Rain\Filesystem\FilesystemServiceProvider', - 'October\Rain\Parse\ParseServiceProvider', - 'October\Rain\Html\HtmlServiceProvider', - 'October\Rain\Html\UrlServiceProvider', - 'October\Rain\Network\NetworkServiceProvider', - 'October\Rain\Scaffold\ScaffoldServiceProvider', - 'October\Rain\Flash\FlashServiceProvider', - 'October\Rain\Mail\MailServiceProvider', + October\Rain\Foundation\Providers\ArtisanServiceProvider::class, + October\Rain\Database\DatabaseServiceProvider::class, + October\Rain\Filesystem\FilesystemServiceProvider::class, + October\Rain\Parse\ParseServiceProvider::class, + October\Rain\Html\HtmlServiceProvider::class, + October\Rain\Html\UrlServiceProvider::class, + October\Rain\Network\NetworkServiceProvider::class, + October\Rain\Scaffold\ScaffoldServiceProvider::class, + October\Rain\Flash\FlashServiceProvider::class, + October\Rain\Mail\MailServiceProvider::class, ];