新安装webman有警告 support\Plugin is not autoloadable

gedongdong2010

问题描述

新安装的webman出现警告:Class support\Plugin is not autoloadable, can not call post-package-install script

截图报错信息里报错文件相关代码

截图

操作系统及workerman/webman等框架组件具体版本

php版本信息:

PHP 7.2.34 (cli) (built: Dec  7 2021 10:06:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

composer版本:

Composer version 2.0.0-RC2 2020-10-14 21:34:07

composer.json文件:

{
  "name": "workerman/webman",
  "type": "project",
  "keywords": [
    "high performance",
    "http service"
  ],
  "homepage": "https://www.workerman.net",
  "license": "MIT",
  "description": "High performance HTTP Service Framework.",
  "authors": [
    {
      "name": "walkor",
      "email": "walkor@workerman.net",
      "homepage": "https://www.workerman.net",
      "role": "Developer"
    }
  ],
  "support": {
    "email": "walkor@workerman.net",
    "issues": "https://github.com/walkor/webman/issues",
    "forum": "https://wenda.workerman.net/",
    "wiki": "https://workerman.net/doc/webman",
    "source": "https://github.com/walkor/webman"
  },
  "require": {
    "php": ">=7.2",
    "workerman/webman-framework": "^1.5.0",
    "monolog/monolog": "^2.0"
  },
  "suggest": {
    "ext-event": "For better performance. "
  },
  "autoload": {
    "psr-4": {
      "": "./",
      "app\\": "./app",
      "App\\": "./app",
      "app\\View\\Components\\": "./app/view/components"
    },
    "files": [
      "./support/helpers.php"
    ]
  },
  "scripts": {
    "post-package-install": [
      "support\\Plugin::install"
    ],
    "post-package-update": [
      "support\\Plugin::install"
    ],
    "pre-package-uninstall": [
      "support\\Plugin::uninstall"
    ]
  }
}
535 1 0
1个回答

gedongdong2010

找到原因了,是composer版本的问题,composer升级到2.5.7之后就不再报了。

Composer version 2.5.7 2023-05-24 15:00:39
  • 暂无评论
年代过于久远,无法发表回答
×
🔝