-
Notifications
You must be signed in to change notification settings - Fork 23.9k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php namespace App\Console; | ||
|
||
use Exception; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel { | ||
|
||
/** | ||
* The bootstrap classes for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected $bootstrappers = [ | ||
'Illuminate\Foundation\Bootstrap\LoadEnvironment', | ||
'Illuminate\Foundation\Bootstrap\LoadConfiguration', | ||
'Illuminate\Foundation\Bootstrap\RegisterProviders', | ||
'Illuminate\Foundation\Bootstrap\BootProviders', | ||
]; | ||
|
||
/** | ||
* Run the console application. | ||
* | ||
* @param \Symfony\Component\Console\Input\InputInterface $input | ||
* @param \Symfony\Component\Console\Output\OutputInterface $output | ||
* @return int | ||
*/ | ||
public function handle($input, $output = null) | ||
{ | ||
try | ||
{ | ||
return parent::handle($input, $output); | ||
} | ||
catch (Exception $e) | ||
{ | ||
$output->writeln((string) $e); | ||
|
||
return 1; | ||
} | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php namespace App\Http; | ||
|
||
use Exception; | ||
use Illuminate\Foundation\Http\Kernel as HttpKernel; | ||
|
||
class Kernel extends HttpKernel { | ||
|
||
/** | ||
* The bootstrap classes for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected $bootstrappers = [ | ||
'Illuminate\Foundation\Bootstrap\LoadEnvironment', | ||
'Illuminate\Foundation\Bootstrap\HandleExceptions', | ||
'Illuminate\Foundation\Bootstrap\LoadConfiguration', | ||
'Illuminate\Foundation\Bootstrap\RegisterProviders', | ||
'Illuminate\Foundation\Bootstrap\BootProviders', | ||
]; | ||
|
||
/** | ||
* The application's HTTP middleware stack. | ||
* | ||
* @var array | ||
*/ | ||
protected $stack = [ | ||
'App\Http\Middleware\MaintenanceMiddleware', | ||
'Illuminate\Cookie\Middleware\Guard', | ||
'Illuminate\Cookie\Middleware\Queue', | ||
'Illuminate\Session\Middleware\Reader', | ||
'Illuminate\Session\Middleware\Writer', | ||
'Illuminate\View\Middleware\ErrorBinder', | ||
'App\Http\Middleware\CsrfMiddleware', | ||
]; | ||
|
||
/** | ||
* Handle an incoming HTTP request. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function handle($request) | ||
{ | ||
try | ||
{ | ||
return parent::handle($request); | ||
} | ||
catch (Exception $e) | ||
{ | ||
throw $e; | ||
} | ||
} | ||
|
||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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__.'/..') | ||
); | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| 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->bind( | ||
'Illuminate\Contracts\Http\Kernel', | ||
'App\Http\Kernel' | ||
); | ||
|
||
$app->bind( | ||
'Illuminate\Contracts\Console\Kernel', | ||
'App\Console\Kernel' | ||
); | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| 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; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,19 +33,3 @@ | |
{ | ||
require $compiledPath; | ||
} | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Register The Workbench Loaders | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The Laravel workbench provides a convenient place to develop packages | ||
| when working locally. However we will need to load in the Composer | ||
| auto-load files for the packages so that these can be used here. | ||
| | ||
*/ | ||
|
||
if (is_dir($workbench = __DIR__.'/../workbench')) | ||
{ | ||
Illuminate\Workbench\Starter::start($workbench); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jszobody
|
||
} |
9 comments
on commit 4301348
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help, I would like to change the path to the public directory. Will that still be possible? Or am I writing too soon. Apologies if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! You remove bootstrap/paths.php and app not started, because app not found this paths:(
Fatal error: require(): Failed opening required '......./bootstrap/paths.php'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to change the public path of the app ,where can i override the App Class ?!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of interesting changes, I think I like the way it's going (still trying to actually understand the changes xD), but damn it's "interesting" to work on a project in this branch :P But learning a lot in the process ;)
Keep up the great work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those asking about changing public (and other) paths. A simple adjustment to bootstrap\app.php allows Application class methods containing path settings to be overridden. This includes all those defined in paths.php. Example:
class MyApplication extends Illuminate\Foundation\Application {
/**
* Get the path to the public / web directory.
*
* @return string
*/
public function publicPath()
{
return $this->basePath.'/public_html';
}
}
$app = new MyApplication(
realpath(__DIR__.'/..')
);
The last 3 lines replace the existing $app instantiation. There might be a nicer method that allows the seamless injection of a new Application class without touching app.php, but this'll work nicely. Take a look at the Application class to get an idea of the other paths that may be overriden. The constructor accepts (and sets) the base path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taylorotwell You removed bootstrap/paths.php, but server.php still requires that file. Hence, php artisan serve is not working any longer. How to fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raphaelbeckmann This will be fixed pretty soon since L5 is in rapid development at the moment. If you need to get L5 working for the now with artisan serve, you can simply comment out the lines that refer the $paths and hardcode the public path instead. Everything in the app should work since paths are now defined inside the Application class.
Eg. server.php:
<?php
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri = urldecode($uri);
// $paths = require __DIR__.'/bootstrap/paths.php';
$requested = 'public/'.$uri;
// 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($requested))
{
return false;
}
require_once 'public/index.php';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's related to this commit, but somewhere between Oct 15 and Oct 29 the Form::open() helper now requires an absolute namespace when using the 'action' param, or else it throws a php error.
Used to work:
{!! Form::open(['action']=>'FooController@save']) !!}
Now the namespace is needed:
{!! Form::open(['action']=>'App\Http\Controllers\FooController@save']) !!}
How is autoload working for workbench packages now? Am I missing something or it just not work?