Closed weilewantieba closed 2 years ago
config文件配置是没有问题。对了很多次了
php 版本多少?
然后看看弄个最小的复现 demo 出来吧
PHP 8.0.20 demo代码已经贴出来了。thinkphp6+ think-swoole $result = Pay::alipay($this->config)->web([ 'out_trade_no' => ''.time(), 'total_amount' => '0.01', 'subject' => 'yansongda 测试 - 1', ]);
composer.json 里的呢
{ "name": "topthink/think", "description": "the new thinkphp framework", "type": "project", "keywords": [ "framework", "thinkphp", "ORM" ], "homepage": "http://thinkphp.cn/", "license": "Apache-2.0", "authors": [ { "name": "liu21st", "email": "liu21st@gmail.com" }, { "name": "yunwuxin", "email": "448901948@qq.com" } ], "require": { "php": ">=7.2.5", "topthink/framework": "^6.0.0", "topthink/think-orm": "^2.0", "topthink/think-swoole": "^4.0", "hg/apidoc": "^3.1", "d-os/jwt": "^1.6", "alibabacloud/darabonba-openapi": "^0.2.5", "yuchl/aliyun-dy-sdk-lite": "^1.0", "overtrue/wechat": "~5.0", "overtrue/pinyin": "~4.0", "phpoffice/phpspreadsheet": "^1.14", "weilewantieba/1688openapi": "dev-master", "pda/pheanstalk": "^4.0", "yansongda/pay": "~3.1.0", "php-di/php-di": "^6.4" }, "require-dev": { "symfony/var-dumper": "^4.2", "topthink/think-trace":"^1.0" }, "autoload": { "psr-4": { "app\": "app" }, "psr-0": { "": "extend/" } }, "config": { "preferred-install": "dist", "allow-plugins": { "easywechat-composer/easywechat-composer": true } }, "scripts": { "post-autoload-dump": [ "@php think service:discover", "@php think vendor:publish" ] } }
我是thinkphp6 + think-swoole得composer 来运行的。
"code":0,"message":"No entry or class found for 'alipay' 偶尔也会报这个错误
PHP 8.0.20 demo代码已经贴出来了。
你这不对吧,都安装不上,你弄个最小的 demo repo 出来吧。
我感觉你这是环境问题,或者哪个包里的 symfony/event-dispatcher
冲突了
这个包你要忽略掉来装。这个jwt包是我自己的 composer install --ignore-platform-reqs 我没有更新最新包。你把jwt忽略掉
你把jwt包弄掉 应该是没问题。 "d-os/jwt": "^1.6", 这个包你可以去除掉
你弄个最小的能复现的项目 repo 吧
已经排查 和ewasywechat这个包有冲突 "overtrue/wechat": "~5.0",
这个包不冲突的,无论是最新版还是历史版本,你检查你自己的环境吧
已经排查 和ewasywechat这个包有冲突 "overtrue/wechat": "~5.0", 我就单独去了这个包 就不会报错了。。
包版本号
3.1.0
问题描述
thinkphp6+thinkswoole使用的时候。一直无法使用。我看了源码是因为服务无法注入还是什么原因导致。在this->register的时候会爆出错误
你的代码
报错详情
syntax error, unexpected token \")\";\/www\/wwwroot\/erp-agent-platforme\/api\/vendor\/symfony\/event-dispatcher\/EventDispatcher.php:270
composer版本
sdk 日志
无
nginx/apache 日志
无