mirror of https://github.com/flarum/flarum
New skeleton architecture
flarum/core submodule needs to be added back in (to system/core)pull/9/head
parent
806ae8ab96
commit
d9ebd27a93
|
@ -1,4 +1,3 @@
|
||||||
/vendor
|
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
|
|
@ -60,7 +60,7 @@ composer_packages = [ # List any global Composer packages that you wa
|
||||||
# Default web server document root
|
# Default web server document root
|
||||||
# Symfony's public directory is assumed "web"
|
# Symfony's public directory is assumed "web"
|
||||||
# Laravel's public directory is assumed "public"
|
# Laravel's public directory is assumed "public"
|
||||||
public_folder = "/vagrant/public"
|
public_folder = "/vagrant"
|
||||||
|
|
||||||
laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
|
laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
|
||||||
laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
|
laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
|
||||||
|
@ -318,6 +318,6 @@ Vagrant.configure("2") do |config|
|
||||||
# Any local scripts you may want to run post-provisioning.
|
# Any local scripts you may want to run post-provisioning.
|
||||||
# Add these to the same directory as the Vagrantfile.
|
# Add these to the same directory as the Vagrantfile.
|
||||||
##########
|
##########
|
||||||
config.vm.provision "shell", path: "./scripts/environment.sh", privileged: false
|
config.vm.provision "shell", path: "./system/vagrant/environment.sh", privileged: false
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?php namespace App\Console;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
||||||
|
|
||||||
class Kernel extends ConsoleKernel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Artisan commands provided by your application.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $commands = [
|
|
||||||
//
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?php namespace App\Http;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
||||||
|
|
||||||
class Kernel extends HttpKernel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The application's global HTTP middleware stack.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $middleware = [
|
|
||||||
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
|
|
||||||
'Illuminate\Cookie\Middleware\EncryptCookies',
|
|
||||||
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
|
|
||||||
'Illuminate\Session\Middleware\StartSession',
|
|
||||||
'Illuminate\View\Middleware\ShareErrorsFromSession',
|
|
||||||
// 'App\Http\Middleware\VerifyCsrfToken',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The application's route middleware.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $routeMiddleware = [];
|
|
||||||
|
|
||||||
}
|
|
51
artisan
51
artisan
|
@ -1,51 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Register The Auto Loader
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader
|
|
||||||
| for our application. We just need to utilize it! We'll require it
|
|
||||||
| into the script here so that we do not have to worry about the
|
|
||||||
| loading of any our classes "manually". Feels great to relax.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
require __DIR__.'/bootstrap/autoload.php';
|
|
||||||
|
|
||||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Run The Artisan Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When we run the console application, the current CLI command will be
|
|
||||||
| executed in this console and the response sent back to a terminal
|
|
||||||
| or another output device for the developers. Here goes nothing!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
|
|
||||||
|
|
||||||
$status = $kernel->handle(
|
|
||||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
|
||||||
new Symfony\Component\Console\Output\ConsoleOutput
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Shutdown The Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| 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
|
|
||||||
| down the process. This is the last thing to happen to the request.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$kernel->terminate($input, $status);
|
|
||||||
|
|
||||||
exit($status);
|
|
|
@ -1,55 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Create The Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The first thing we will do is create a new Laravel application instance
|
|
||||||
| which serves as the "glue" for all the components of Laravel, and is
|
|
||||||
| the IoC container for the system binding all of the various parts.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application(
|
|
||||||
realpath(__DIR__.'/../')
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Bind Important Interfaces
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Next, we need to bind some important interfaces into the container so
|
|
||||||
| we will be able to resolve them when needed. The kernels serve the
|
|
||||||
| incoming requests to this application from both the web and CLI.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$app->singleton(
|
|
||||||
'Illuminate\Contracts\Http\Kernel',
|
|
||||||
'App\Http\Kernel'
|
|
||||||
);
|
|
||||||
|
|
||||||
$app->singleton(
|
|
||||||
'Illuminate\Contracts\Console\Kernel',
|
|
||||||
'App\Console\Kernel'
|
|
||||||
);
|
|
||||||
|
|
||||||
$app->singleton(
|
|
||||||
'Illuminate\Contracts\Debug\ExceptionHandler',
|
|
||||||
'Illuminate\Foundation\Exceptions\Handler'
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Return The Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This script returns the application instance. The instance is given to
|
|
||||||
| the calling script so we can separate the building of the instances
|
|
||||||
| from the actual running of the application and sending responses.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
return $app;
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Register The Composer Auto Loader
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader
|
|
||||||
| for our application. We just need to utilize it! We'll require it
|
|
||||||
| into the script here so that we do not have to worry about the
|
|
||||||
| loading of any our classes "manually". Feels great to relax.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Include The Compiled Class File
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| To dramatically increase your application's performance, you may use a
|
|
||||||
| compiled class file which contains all of the classes commonly used
|
|
||||||
| by a request. The Artisan "optimize" is used to create this file.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$compiledPath = __DIR__.'/../vendor/compiled.php';
|
|
||||||
|
|
||||||
if (file_exists($compiledPath))
|
|
||||||
{
|
|
||||||
require $compiledPath;
|
|
||||||
}
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'database' => 'flarum',
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => 'root',
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'collation' => 'utf8_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
'strict' => false
|
||||||
|
]
|
||||||
|
];
|
1
core
1
core
|
@ -1 +0,0 @@
|
||||||
Subproject commit eef16ec8cc36be8eabd89592b050c4531b42186c
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$app = require __DIR__.'/system/bootstrap.php';
|
||||||
|
|
||||||
|
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
|
||||||
|
|
||||||
|
$response = $kernel->handle(
|
||||||
|
$request = Illuminate\Http\Request::capture()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response->send();
|
||||||
|
|
||||||
|
$kernel->terminate($request, $response);
|
|
@ -1,15 +0,0 @@
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
<IfModule mod_negotiation.c>
|
|
||||||
Options -MultiViews
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
RewriteEngine On
|
|
||||||
|
|
||||||
# Redirect Trailing Slashes...
|
|
||||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
|
||||||
|
|
||||||
# Handle Front Controller...
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteRule ^ index.php [L]
|
|
||||||
</IfModule>
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Register The Auto Loader
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader for
|
|
||||||
| our application. We just need to utilize it! We'll simply require it
|
|
||||||
| into the script here so that we don't have to worry about manual
|
|
||||||
| loading any of our classes later on. It feels nice to relax.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
require __DIR__.'/../bootstrap/autoload.php';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Turn On The Lights
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| We need to illuminate PHP development, so let us turn on the lights.
|
|
||||||
| This bootstraps the framework and gets it ready for use, then it
|
|
||||||
| will load up this application so that we can run it and send
|
|
||||||
| the responses back to the browser and delight our users.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Run The Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Once we have the application, we can simply call the run method,
|
|
||||||
| which will execute the request and send the response back to
|
|
||||||
| the client's browser allowing them to enjoy the creative
|
|
||||||
| and wonderful application we have prepared for them.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
|
|
||||||
|
|
||||||
$response = $kernel->handle(
|
|
||||||
$request = Illuminate\Http\Request::capture()
|
|
||||||
);
|
|
||||||
|
|
||||||
$response->send();
|
|
||||||
|
|
||||||
$kernel->terminate($request, $response);
|
|
21
server.php
21
server.php
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
$uri = urldecode(
|
|
||||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
|
||||||
);
|
|
||||||
|
|
||||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
|
||||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
|
||||||
// application without having installed a "real" web server software here.
|
|
||||||
if ($uri !== '/' and file_exists(__DIR__.'/public'.$uri))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once __DIR__.'/public/index.php';
|
|
|
@ -0,0 +1 @@
|
||||||
|
vendor
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap.php';
|
||||||
|
|
||||||
|
$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
|
exit($status);
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
$app = new Illuminate\Foundation\Application(
|
||||||
|
realpath(__DIR__)
|
||||||
|
);
|
||||||
|
$app->instance('path.public', __DIR__.'/..');
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Kernel as IlluminateHttpKernel;
|
||||||
|
|
||||||
|
class HttpKernel extends IlluminateHttpKernel {
|
||||||
|
protected $middleware = [
|
||||||
|
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
|
||||||
|
'Illuminate\Cookie\Middleware\EncryptCookies',
|
||||||
|
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
|
||||||
|
'Illuminate\Session\Middleware\StartSession',
|
||||||
|
'Illuminate\View\Middleware\ShareErrorsFromSession',
|
||||||
|
// 'App\Http\Middleware\VerifyCsrfToken',
|
||||||
|
];
|
||||||
|
protected $routeMiddleware = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Console\Kernel as IlluminateConsoleKernel;
|
||||||
|
|
||||||
|
class ConsoleKernel extends IlluminateConsoleKernel {
|
||||||
|
protected $commands = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
'Illuminate\Contracts\Http\Kernel',
|
||||||
|
'HttpKernel'
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
'Illuminate\Contracts\Console\Kernel',
|
||||||
|
'ConsoleKernel'
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
'Illuminate\Contracts\Debug\ExceptionHandler',
|
||||||
|
'Illuminate\Foundation\Exceptions\Handler'
|
||||||
|
);
|
||||||
|
|
||||||
|
return $app;
|
|
@ -136,6 +136,7 @@ return [
|
||||||
'Illuminate\Validation\ValidationServiceProvider',
|
'Illuminate\Validation\ValidationServiceProvider',
|
||||||
'Illuminate\View\ViewServiceProvider',
|
'Illuminate\View\ViewServiceProvider',
|
||||||
|
|
||||||
|
// 'Flarum\Support\Extensions\ExtensionsServiceProvider',
|
||||||
'Flarum\Core\CoreServiceProvider',
|
'Flarum\Core\CoreServiceProvider',
|
||||||
'Flarum\Api\ApiServiceProvider',
|
'Flarum\Api\ApiServiceProvider',
|
||||||
'Flarum\Forum\ForumServiceProvider',
|
'Flarum\Forum\ForumServiceProvider',
|
|
@ -54,7 +54,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'from' => ['address' => null, 'name' => null],
|
'from' => ['address' => 'noreply@localhost', 'name' => 'Flarum Demo Forum'],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
Loading…
Reference in New Issue