Code Monkey home page Code Monkey logo

laravel-soar's Introduction

laravel-soar's People

Contributors

create-issue-branch[bot] avatar dependabot[bot] avatar github-actions[bot] avatar guanguans avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel-soar's Issues

Error Output: panic: runtime error: invalid memory address or nil pointer dereference

Describe the bug


Error Output: ================ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1910ce5] goroutine 1 [running]: github.com/pingcap/tidb/util/memory.MemTotalNormal() pkg/mod/github.com/pingcap/[email protected]/util/memory/meminfo.go:41 +0x65 github.com/pingcap/tidb/util/memory.init.0() pkg/mod/github.com/pingcap/[email protected]/util/memory/meminfo.go:134 +0x175

To Reproduce

  1. 安装后访问任意页面都报错,尝试去掉所有参数还是一样报错。
  2. 看日志是二进制包的问题,但奇怪的是在命令行却可以正常输出结果。

image

Screenshots
image

Additional context

  • macos 13.2

  • php
    PHP 8.2.0 (cli) (built: Dec 9 2022 16:30:32) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.0, Copyright (c), by Zend Technologies

Weekly Digest (19 July, 2020 - 26 July, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (26 July, 2020 - 2 August, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Undefined array key "Sample"

Laravel Framework 9.9.0
PHP 8.1.1

/vendor/guanguans/laravel-soar/src/Bootstrapper.php 160 行 报错

我在 getScores() 方法 打印 $score
image

Weekly Digest (2 August, 2020 - 9 August, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (5 July, 2020 - 12 July, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (12 July, 2020 - 19 July, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

输出响应中间件格式问题

public function handle(Request $request, callable $next): Response

如果接口输出的是文件流格式,这里会出现错误,自己试了下这样改是可以

`

    $response = $next($request);

    if (
        $response instanceof JsonResponse &&
        is_object($response->getData())
    ) {
        return tap($next($request), fn(Response $response) => $this->outputManager->output(
            $this->bootstrapper->getScores(),
            $response
        ));
    }

    return $next($request);

`

Weekly Digest (28 June, 2020 - 5 July, 2020)

Here's the Weekly Digest for guanguans/laravel-soar:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository guanguans/laravel-soar to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

win10 运行失败

###运行环境

PHP 7.4.3 (cli) (built: Feb 18 2020 17:29:57) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

win10配置文件要修改文件目录分隔符 config/soar.php

  '-soar-path' => env(
        'SOAR_FILE',
        OsHelper::isWindows() ? base_path('vendor/guanguans/soar-php/bin/soar.windows-amd64') :
            (OsHelper::isMacOS() ? base_path('vendor/guanguans/soar-php/bin/soar.darwin-amd64') : base_path('vendor/guanguans/soar-php/bin/soar.linux-amd64'))
    ),
需要把 base_path('vendor/guanguans/soar-php/bin/soar.windows-amd64')  
修改为base_path('vendor\guanguans\soar-php\bin\soar.windows-amd64') 
 /*
     * soar 路径
     */
    '-soar-path' => env(
        'SOAR_FILE',
        OsHelper::isWindows() ? base_path('vendor\guanguans\soar-php\bin\soar.windows-amd64') :
            (OsHelper::isMacOS() ? base_path('vendor/guanguans/soar-php/bin/soar.darwin-amd64') : base_path('vendor/guanguans/soar-php/bin/soar.linux-amd64'))
    ),

<?php

declare(strict_types=1);

/*
 * This file is part of the guanguans/soar-php.
 *
 * (c) 琯琯 <[email protected]>
 *
 * This source file is subject to the MIT license that is bundled.
 */

namespace Guanguans\SoarPHP\Traits;

use Guanguans\SoarPHP\Exceptions\InvalidArgumentException;
use Guanguans\SoarPHP\Support\OsHelper;

/**
 * Trait HasExecAble.
 */
trait HasExecAble
{
    /**
     * @throws \Guanguans\SoarPHP\Exceptions\InvalidArgumentException
     */
    public function exec(string $command): ?string
    {
        if (false === strpos(strtolower($command), 'soar')) {
            throw new InvalidArgumentException(sprintf("Command error: '%s'", $command));
        }


        if (true === OsHelper::isWindows()) {
            $command = 'powershell '.$command;
        }

        $command=str_replace('"',"'",$command);


        return shell_exec($command);
    }
}

在windows10 中我需要加入 $command=str_replace('"',"'",$command); 才能执行shell_exec,不然返回null

"powershell echo "select id, name, price, original_price, goods_type_id, details, status, is_featured, picture, useful_life from goods where store_id = 1 and goods_type = 2 and status = 1" | D:\phpstudy_pro\WWW\mh\vendor\guanguans\soar-php\bin\soar.windows-amd64  -test-dsn=mh_shop:[email protected]:3306/mh_shop  -log-output=D:\phpstudy_pro\WWW\mh\storage\logs/soar.log  -log-level=4  -report-type=html  -allow-online-as-test=1  -drop-test-temporary=1  -max-join-table-count=5  -max-group-by-cols-count=5  -max-distinct-count=5  -max-index-cols-count=5  -max-total-rows=9999999  -spaghetti-query-length=2048  -explain-sql-report-type=pretty  -explain-type=extended  -explain-format=traditional  -explain-warn-select-type=[]  -explain-warn-access-type=[]  -explain-max-keys=3  -explain-min-keys=0  -explain-max-rows=10000  -explain-warn-extra=[]  -explain-max-filtered=100  -explain-warn-scalability=[]  -ignore-rules=[]  -blacklist=D:\phpstudy_pro\WWW\mh\soar.blacklist "

替换后

"powershell echo 'select id, name, price, original_price, goods_type_id, details, status, is_featured, picture, useful_life from goods where store_id = 1 and goods_type = 2 and status = 1' | D:\phpstudy_pro\WWW\mh\vendor\guanguans\soar-php\bin\soar.windows-amd64  -test-dsn=mh_shop:[email protected]:3306/mh_shop  -log-output=D:\phpstudy_pro\WWW\mh\storage\logs/soar.log  -log-level=4  -report-type=html  -allow-online-as-test=1  -drop-test-temporary=1  -max-join-table-count=5  -max-group-by-cols-count=5  -max-distinct-count=5  -max-index-cols-count=5  -max-total-rows=9999999  -spaghetti-query-length=2048  -explain-sql-report-type=pretty  -explain-type=extended  -explain-format=traditional  -explain-warn-select-type=[]  -explain-warn-access-type=[]  -explain-max-keys=3  -explain-min-keys=0  -explain-max-rows=10000  -explain-warn-extra=[]  -explain-max-filtered=100  -explain-warn-scalability=[]  -ignore-rules=[]  -blacklist=D:\phpstudy_pro\WWW\mh\soar.blacklist "

主要是把 sql 语句的"替换成'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.