Skip to content

Commit

Permalink
优化cli命名,更名为console
Browse files Browse the repository at this point in the history
  • Loading branch information
anoxia committed Mar 4, 2019
1 parent b39287b commit a774e96
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 94 deletions.
77 changes: 16 additions & 61 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/Cli/Http.php → app/Console/Http.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Star\Cli;
namespace Star\Console;

use Bee\Cli\Command;
use Bee\Di\Container;

/**
* Http
*
* @package Eye\Cli
* @package Star\Console
*/
class Http extends Command
{
Expand Down
4 changes: 2 additions & 2 deletions app/Cli/Job.php → app/Console/Job.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Star\Cli;
namespace Star\Console;

use Bee\Cli\Command;
use Bee\Di\Container;

/**
* Job
*
* @package Star\Cli
* @package Star\Console
*/
class Job extends Command
{
Expand Down
2 changes: 0 additions & 2 deletions app/Middleware/CORS.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class CORS extends Middleware
*/
public function call(Application $application, Context $context, $parameters = null)
{
echo $data['test'];

$response = $context->getResponse();
$request = $context->getRequest();
// 请求方法
Expand Down
12 changes: 0 additions & 12 deletions config/cli.php

This file was deleted.

12 changes: 12 additions & 0 deletions config/console.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Cli配置
*/
return [
[
'class' => \Star\Console\Http::class
],
[
'class' => \Star\Console\Job::class
]
];
2 changes: 1 addition & 1 deletion config/di.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// cli组件配置
$di->setShared('config.cli', function () {
return require(CONFIG_PATH . '/cli.php');
return require(CONFIG_PATH . '/console.php');
});

$di->setShared('config.middleware', function () {
Expand Down
14 changes: 1 addition & 13 deletions runtime/default/20190304.log
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
2019-03-04 18:14:21 | CRITICAL | 2450 | 5c7cfa79e3663 | 1551694461.93 | Error - type:1 - file:/vagrant/app/Util/ThrowExceptionHandler.php - line:130 - msg:Uncaught Error: Call to a member function log() on null in /vagrant/app/Util/ThrowExceptionHandler.php:130
Stack trace:
#0 /vagrant/app/Util/ThrowExceptionHandler.php(117): Star\Util\ThrowExceptionHandler::report('critical', Array)
#1 /vagrant/app/Util/HttpServer.php(87): Star\Util\ThrowExceptionHandler::uncaught(Object(Error))
#2 {main}
thrown
2019-03-04 18:15:53 | notice | 2463 | 5c7cfad76249b | 1551694553.823 | {"message":"Undefined variable: data","code":8,"line":25,"class":"Bee\\Error\\Notice","file":"\/vagrant\/app\/Middleware\/CORS.php","args":[],"type":"error"}
2019-03-04 18:21:18 | CRITICAL | 2475 | 5c7cfc1b92d2c | 1551694878.156 | Error - type:1 - file:/vagrant/app/Util/ThrowExceptionHandler.php - line:135 - msg:Uncaught Error: Call to a member function log() on null in /vagrant/app/Util/ThrowExceptionHandler.php:135
Stack trace:
#0 /vagrant/app/Util/ThrowExceptionHandler.php(118): Star\Util\ThrowExceptionHandler::report('critical', Array)
#1 /vagrant/app/Util/HttpServer.php(87): Star\Util\ThrowExceptionHandler::uncaught(Object(Error))
#2 {main}
thrown
2019-03-04 18:37:28 | notice | 2512 | 5c7cffe2e3018 | 1551695848.625 | {"message":"Undefined variable: data","code":8,"line":25,"class":"Bee\\Error\\Notice","file":"\/vagrant\/app\/Middleware\/CORS.php","args":[],"type":"error"}
2 changes: 1 addition & 1 deletion runtime/http.pid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2489
2513
2 changes: 2 additions & 0 deletions runtime/http_server.log
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ Stack trace:
thrown in /vagrant/app/Util/ThrowExceptionHandler.php on line 135
[2019-03-04 10:21:18 $2477.0] WARNING swManager_check_exit_status: worker#0 abnormal exit, status=255, signal=0
[2019-03-04 10:22:43 #2476.1] NOTICE Server is shutdown now.
[2019-03-04 10:37:11 #2489.1] NOTICE Server is shutdown now.
[2019-03-04 10:37:22 #2501.1] NOTICE Server is shutdown now.

0 comments on commit a774e96

Please sign in to comment.