插件在第一次安装时一切都是正常的,但是卸载composer包的时候会报错,插件所产生的配置文件也不会被删除干净(有时会,有时不会,暂且认为不会),具体的操作步骤及报错信息如下:
./composer.json has been updated
Using version ^1.0 for webman/think-cache
./composer.json has been updated
Running composer update webman/think-cache
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
- Locking opis/closure (3.6.3)
- Locking topthink/think-cache (v2.0.6)
- Locking topthink/think-container (v2.0.3)
- Locking webman/think-cache (v1.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
> support\Plugin::uninstall
Script support\Plugin::uninstall handling the pre-package-uninstall event terminated with an exception
[ErrorException]
require(/Users/webman-v1.2.5/vendor/composer/../symfony/deprecation-contracts/function.php): Failed to open stream: No such file or direct
ory
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
之后对这个插件重装产生如下问题
Using version ^1.0 for webman/think-cache
./composer.json has been updated
Running composer update webman/think-cache
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
- Locking opis/closure (3.6.3)
- Locking topthink/think-cache (v2.0.6)
- Locking topthink/think-container (v2.0.3)
- Locking webman/think-cache (v1.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
> support\Plugin::uninstall
Script support\Plugin::uninstall handling the pre-package-uninstall event terminated with an exception
[ErrorException]
require(/Users/webman-v1.2.5/vendor/composer/../symfony/deprecation-contracts/function.php): Failed to open stream: No such file or direct
ory
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
修改 support/Plugin.php 里面 requireAutoloadFile 方法,改成这样试下
我刚看了 本来就是这样的
我也有这个问题,老大完全没法卸载
你看错了,有改动