mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-06 20:18:10 +08:00
补齐 v8 分支的自动化质量保障,使插件化迁移、发布安装和架构边界都能在目标仓库内验证。 主要内容: - 新增 PHPUnit 配置和 smoke 测试,覆盖发布、安装与 think 命令加载。 - 新增根级 tests 用例,验证路由、构建器、插件边界和业务集成行为。 - 新增 PHPStan 配置与运行时 stub,避免 Composer 插件环境误报。 - 保留旧包、旧 View 和旧 helper 命名空间的防回归检查。
53 lines
909 B
PHP
53 lines
909 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Composer;
|
|
|
|
class Config
|
|
{
|
|
public function get(string $key): mixed
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
class Composer
|
|
{
|
|
public function getConfig(): Config
|
|
{
|
|
return new Config();
|
|
}
|
|
}
|
|
|
|
namespace Composer\IO;
|
|
|
|
interface IOInterface
|
|
{
|
|
public function write($messages, bool $newline = true, int $verbosity = 0): void;
|
|
}
|
|
|
|
namespace Composer\Plugin;
|
|
|
|
use Composer\Composer;
|
|
use Composer\IO\IOInterface;
|
|
|
|
interface PluginInterface
|
|
{
|
|
public function activate(Composer $composer, IOInterface $io): void;
|
|
|
|
public function deactivate(Composer $composer, IOInterface $io): void;
|
|
|
|
public function uninstall(Composer $composer, IOInterface $io): void;
|
|
}
|
|
|
|
namespace Composer\EventDispatcher;
|
|
|
|
interface EventSubscriberInterface
|
|
{
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public static function getSubscribedEvents(): array;
|
|
}
|