[更新]ComposerUpdate

This commit is contained in:
Anyon 2018-03-30 10:51:10 +08:00
parent e5d40ce32b
commit 217a29863b
7 changed files with 26 additions and 20 deletions

View File

@ -126,7 +126,7 @@ class App implements \ArrayAccess
public function __construct($appPath = '')
{
$this->appPath = $appPath ?: realpath(dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . DIRECTORY_SEPARATOR . 'application') . DIRECTORY_SEPARATOR;
$this->appPath = $appPath ?: $this->getAppPath();
$this->container = Container::getInstance();
}
@ -750,6 +750,12 @@ class App implements \ArrayAccess
*/
public function getAppPath()
{
if (is_null($this->appPath)) {
$scriptName = 'cli' == PHP_SAPI ? getcwd() . DIRECTORY_SEPARATOR . $_SERVER['argv'][0] : $_SERVER['SCRIPT_FILENAME'];
$this->appPath = realpath(dirname(dirname($scriptName)) . DIRECTORY_SEPARATOR . 'application') . DIRECTORY_SEPARATOR;
}
return $this->appPath;
}

View File

@ -121,7 +121,7 @@ class Response
$data = $this->getContent();
// Trace调试注入
if (Container::get('env')->get('app_trace', Container::get('app')->config('app.app_trace'))) {
if ('cli' != PHP_SAPI && Container::get('env')->get('app_trace', Container::get('app')->config('app.app_trace'))) {
Container::get('debug')->inject($this, $data);
}

View File

@ -1390,7 +1390,7 @@ class Query
* @param string $logic 查询逻辑 and or xor
* @return $this
*/
public function whereRaw($where, array $bind = [], $logic = 'AND')
public function whereRaw($where, $bind = [], $logic = 'AND')
{
$this->options['where'][$logic][] = $this->raw($where);
@ -1408,7 +1408,7 @@ class Query
* @param array $bind 参数绑定
* @return $this
*/
public function whereOrRaw($where, array $bind = [])
public function whereOrRaw($where, $bind = [])
{
return $this->whereRaw($where, $bind, 'OR');
}

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773::getLoader();
return ComposerAutoloaderInitd7f5fe6e2ec784ab7d22f916aff0bf87::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773
class ComposerAutoloaderInitd7f5fe6e2ec784ab7d22f916aff0bf87
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitd7f5fe6e2ec784ab7d22f916aff0bf87', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitd7f5fe6e2ec784ab7d22f916aff0bf87', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitef233a8780a2db8cb038f052f6e06773::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInitef233a8780a2db8cb038f052f6e06773
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitef233a8780a2db8cb038f052f6e06773::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireef233a8780a2db8cb038f052f6e06773($fileIdentifier, $file);
composerRequired7f5fe6e2ec784ab7d22f916aff0bf87($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequireef233a8780a2db8cb038f052f6e06773($fileIdentifier, $file)
function composerRequired7f5fe6e2ec784ab7d22f916aff0bf87($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitef233a8780a2db8cb038f052f6e06773
class ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87
{
public static $files = array (
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
@ -257,9 +257,9 @@ class ComposerStaticInitef233a8780a2db8cb038f052f6e06773
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitef233a8780a2db8cb038f052f6e06773::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitef233a8780a2db8cb038f052f6e06773::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitef233a8780a2db8cb038f052f6e06773::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd7f5fe6e2ec784ab7d22f916aff0bf87::$classMap;
}, null, ClassLoader::class);
}

View File

@ -180,12 +180,12 @@
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
"reference": "cc946e535f1a0336a83ca75d65c696d39567f861"
"reference": "81a93819dbbd66774405daf9c27a9219232dba9a"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/top-think/framework/cc946e535f1a0336a83ca75d65c696d39567f861.zip",
"reference": "cc946e535f1a0336a83ca75d65c696d39567f861",
"url": "https://files.phpcomposer.com/files/top-think/framework/81a93819dbbd66774405daf9c27a9219232dba9a.zip",
"reference": "81a93819dbbd66774405daf9c27a9219232dba9a",
"shasum": ""
},
"require": {
@ -201,7 +201,7 @@
"sebastian/phpcpd": "2.*",
"squizlabs/php_codesniffer": "2.*"
},
"time": "2018-03-28T10:06:49+00:00",
"time": "2018-03-29T04:16:43+00:00",
"type": "think-framework",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",