First step towards Laravel 5.5

This commit is contained in:
James Cole
2017-09-09 21:57:24 +02:00
parent 834db4d02f
commit d1e60cd546
11 changed files with 71 additions and 238 deletions

2
.gitattributes vendored Executable file → Normal file
View File

@@ -1,3 +1,5 @@
* text=auto * text=auto
*.css linguist-vendored *.css linguist-vendored
*.scss linguist-vendored *.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore

13
.gitignore vendored Executable file → Normal file
View File

@@ -1,11 +1,12 @@
/node_modules /node_modules
/public/hot
/public/storage /public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
Homestead.json Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log
yarn-error.log
.env .env
public/google*.html
report.html
### Composer ###
composer.phar
/vendor/

View File

@@ -1,79 +1,42 @@
<?php <?php
/**
* Kernel.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
namespace FireflyIII\Console; namespace FireflyIII\Console;
use FireflyIII\Console\Commands\CreateImport; use Illuminate\Console\Scheduling\Schedule;
use FireflyIII\Console\Commands\DecryptAttachment;
use FireflyIII\Console\Commands\EncryptFile;
use FireflyIII\Console\Commands\Import;
use FireflyIII\Console\Commands\ScanAttachments;
use FireflyIII\Console\Commands\UpgradeDatabase;
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
use FireflyIII\Console\Commands\UseEncryption;
use FireflyIII\Console\Commands\VerifyDatabase;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
/**
* Class Kernel
*
* @package FireflyIII\Console
*/
class Kernel extends ConsoleKernel class Kernel extends ConsoleKernel
{ {
/**
* The bootstrap classes for the application.
*
* Next upgrade verify these are the same.
*
* @var array
*/
protected $bootstrappers
= [
'Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
'Illuminate\Foundation\Bootstrap\HandleExceptions',
'Illuminate\Foundation\Bootstrap\RegisterFacades',
'Illuminate\Foundation\Bootstrap\SetRequestForConsole',
'Illuminate\Foundation\Bootstrap\RegisterProviders',
'Illuminate\Foundation\Bootstrap\BootProviders',
];
/** /**
* The Artisan commands provided by your application. * The Artisan commands provided by your application.
* *
* @var array * @var array
*/ */
protected $commands protected $commands = [
= [ //
UpgradeFireflyInstructions::class, ];
VerifyDatabase::class,
Import::class,
CreateImport::class,
EncryptFile::class,
ScanAttachments::class,
UpgradeDatabase::class,
UseEncryption::class,
DecryptAttachment::class,
];
/** /**
* Register the Closure based commands for the application. * Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the commands for the application.
* *
* @return void * @return void
*/ */
protected function commands() protected function commands()
{ {
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php'); require base_path('routes/console.php');
} }
} }

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
define('LARAVEL_START', microtime(true));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Auto Loader | Register The Auto Loader
@@ -13,7 +15,7 @@
| |
*/ */
require __DIR__.'/bootstrap/autoload.php'; require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php'; $app = require_once __DIR__.'/bootstrap/app.php';
@@ -40,7 +42,7 @@ $status = $kernel->handle(
| Shutdown The Application | Shutdown The Application
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Once Artisan has finished running. We will fire off the shutdown events | Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut | so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request. | down the process. This is the last thing to happen to the request.
| |

28
gulpfile.js vendored
View File

@@ -1,28 +0,0 @@
/*
* gulpfile.js
* Copyright (c) 2017 thegrumpydictator@gmail.com
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
const elixir = require('laravel-elixir');
require('laravel-elixir-vue');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(mix => {
mix.sass('app.scss')
.webpack('app.js');
});

35
package.json Executable file → Normal file
View File

@@ -1,18 +1,21 @@
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"prod": "gulp --production", "dev": "npm run development",
"dev": "gulp watch" "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
}, "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"devDependencies": { "watch-poll": "npm run watch -- --watch-poll",
"bootstrap-sass": "^3.3.7", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"gulp": "^3.9.1", "prod": "npm run production",
"jquery": "^3.1.0", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"laravel-elixir": "^6.0.0-9", },
"laravel-elixir-vue": "^0.1.4", "devDependencies": {
"laravel-elixir-webpack-official": "^1.0.2", "axios": "^0.16.2",
"lodash": "^4.14.0", "bootstrap-sass": "^3.3.7",
"vue": "^1.0.26", "cross-env": "^5.0.1",
"vue-resource": "^0.9.3" "jquery": "^3.1.1",
} "laravel-mix": "^1.0",
"lodash": "^4.17.4",
"vue": "^2.1.10"
}
} }

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ phpunit.coverage.specific.xml
~ Copyright (c) 2017 thegrumpydictator@gmail.com
~ This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
~
~ See the LICENSE file for details.
-->
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
beStrictAboutOutputDuringTests="true"
stopOnFailure="true">
<testsuites>
<testsuite name="Feature Tests">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
<blacklist>
<directory>vendor/</directory>
</blacklist>
</filter>
<logging>
<log type="coverage-clover" target="./storage/build/clover-specific.xml" charset="UTF-8"/>
</logging>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>

View File

@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ phpunit.coverage.xml
~ Copyright (c) 2017 thegrumpydictator@gmail.com
~ This software may be modified and distributed under the terms of the
~ Creative Commons Attribution-ShareAlike 4.0 International License.
~
~ See the LICENSE file for details.
-->
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
beStrictAboutOutputDuringTests="true"
stopOnFailure="true">
<testsuites>
<testsuite name="Feature Tests">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
<blacklist>
<directory>vendor/</directory>
</blacklist>
</filter>
<logging>
<log type="coverage-clover" target="./storage/build/clover-all.xml" charset="UTF-8"/>
</logging>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>

23
phpunit.xml Executable file → Normal file
View File

@@ -1,39 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
~ phpunit.xml
~ Copyright (c) 2017 thegrumpydictator@gmail.com
~ This software may be modified and distributed under the terms of the
~ Creative Commons Attribution-ShareAlike 4.0 International License.
~
~ See the LICENSE file for details.
-->
<phpunit backupGlobals="false" <phpunit backupGlobals="false"
backupStaticAttributes="false" backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php" bootstrap="vendor/autoload.php"
colors="true" colors="true"
convertErrorsToExceptions="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false" processIsolation="false"
beStrictAboutOutputDuringTests="true" stopOnFailure="false">
stopOnFailure="true">
<testsuites> <testsuites>
<testsuite name="Feature Tests"> <testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory> <directory suffix="Test.php">./tests/Feature</directory>
</testsuite> </testsuite>
<testsuite name="Unit Tests"> <testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory> <directory suffix="Test.php">./tests/Unit</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter> <filter>
<whitelist addUncoveredFilesFromWhitelist="true"> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory> <directory suffix=".php">./app</directory>
</whitelist> </whitelist>
<blacklist>
<directory>vendor/</directory>
</blacklist>
</filter> </filter>
<php> <php>
<env name="APP_ENV" value="testing"/> <env name="APP_ENV" value="testing"/>

9
server.php Executable file → Normal file
View File

@@ -1,13 +1,4 @@
<?php <?php
/**
* server.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
/** /**
* Laravel - A PHP Framework For Web Artisans * Laravel - A PHP Framework For Web Artisans

15
webpack.mix.js vendored Normal file
View File

@@ -0,0 +1,15 @@
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');