hankhu

hankhu

这家伙有点懒,还没写个性签名!

  • 财富值130
  • 威望值0
  • 总积分220

个人信息

  • 快出来吧,我们在用前后分离,等的花儿都谢了

  • 回复了 的回答

    测试的时候报这个错误,有解答的吗
    `{

    "name": "PHP Recoverable Error",
    "message": "Argument 1 passed to OAuth2\\Server::handleTokenRequest() must be an instance of OAuth2\\RequestInterface, instance of yii\\web\\Request given, called in C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\filsh\\yii2-oauth2-server\\Server.php on line 39 and defined",
    "code": 4096,
    "type": "yii\\base\\ErrorException",
    "file": "C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\bshaffer\\oauth2-server-php\\src\\OAuth2\\Server.php",
    "line": 316,
    "stack-trace": [
        "#0 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\bshaffer\\oauth2-server-php\\src\\OAuth2\\Server.php(316): yii\\base\\ErrorHandler->handleError(4096, 'Argument 1 pass...', 'C:\\\\phpStudy\\\\PHP...', 316, Array)",
        "#1 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\filsh\\yii2-oauth2-server\\Server.php(39): OAuth2\\Server->handleTokenRequest(Object(yii\\web\\Request), NULL)",
        "#2 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\filsh\\yii2-oauth2-server\\controllers\\RestController.php(25): filsh\\yii2\\oauth2server\\Server->handleTokenRequest()",
        "#3 [internal function]: filsh\\yii2\\oauth2server\\controllers\\RestController->actionToken()",
        "#4 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\yiisoft\\yii2\\base\\InlineAction.php(57): call_user_func_array(Array, Array)",
        "#5 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\yiisoft\\yii2\\base\\Controller.php(157): yii\\base\\InlineAction->runWithParams(Array)",
        "#6 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\yiisoft\\yii2\\base\\Module.php(528): yii\\base\\Controller->runAction('token', Array)",
        "#7 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\yiisoft\\yii2\\web\\Application.php(103): yii\\base\\Module->runAction('oauth2/rest/tok...', Array)",
        "#8 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\vendor\\yiisoft\\yii2\\base\\Application.php(386): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",
        "#9 C:\\phpStudy\\PHPTutorial\\WWW\\oauthtest\\api\\web\\index.php(17): yii\\base\\Application->run()",
        "#10 {main}"
    ]
    

    }`

    `
    'oauth2' => [

            'class' => \filsh\yii2\oauth2server\Module::class,
            'tokenParamName' => 'accessToken',
            'tokenAccessLifetime' => 3600 * 24,
            'storageMap' => [
                'user_credentials' => 'common\models\User',
            ],
            'grantTypes' => [
                'user_credentials' => [
                    'class' => 'OAuth2\GrantType\UserCredentials',
                ],
                'refresh_token' => [
                    'class' => 'OAuth2\GrantType\RefreshToken',
                    'always_issue_new_refresh_token' => true
                ]
            ],
            'components' => [
                'request' => function () {
                    return \filsh\yii2\oauth2server\Request::createFromGlobals();
                },
                'response' => [
                    'class' => \filsh\yii2\oauth2server\Response::class,
                ],
            ],
        ],
    

    `

  • 回复了 的评论

    我安装看到一些提示,这些提示不装问题么
    swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
    sebastian/global-state suggests installing ext-uopz ()
    phpunit/php-code-coverage suggests installing ext-xdebug (^2.6.0)
    phpunit/phpunit suggests installing phpunit/php-invoker (^2.0)
    phpunit/phpunit suggests installing ext-xdebug (
    )
    symfony/browser-kit suggests installing symfony/process ()
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/event-dispatcher suggests installing symfony/http-kernel ()
    symfony/console suggests installing psr/log-implementation (For using the console logger)
    symfony/console suggests installing symfony/lock ()
    symfony/console suggests installing symfony/process ()
    codeception/base suggests installing aws/aws-sdk-php (For using AWS Auth in REST module and Queue module)
    codeception/base suggests installing codeception/phpbuiltinserver (Start and stop PHP built-in web server for your tests)
    codeception/base suggests installing codeception/specify (BDD-style code blocks)
    codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)
    codeception/base suggests installing league/factory-muffin (For DataFactory module)
    codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
    codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
    codeception/base suggests installing stecman/symfony-console-completion (For BASH autocompletion)
    codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)

    不装好像也没啥问题

  • 写得好,多更新更好啊,哈哈

  • 赞了教程
    yii2 restful 风格搭建(一)
  • 回复了 的回复

    只专注于个人出租合租功能 网站是“开源”的
    开源的可以搞个qq群交流交流

    你用什么方式,我是yii2 rest + vue

  • 回复了 的评论

    写得不错,挺好的

    主要是我也在看他的视频,哈哈

见习主管 等级规则
220/500
资料完整度
10/100
用户活跃度
0/100

Ta的关注

1

Ta的粉丝

1

Ta的访客

14