b2pweb/bdf-prime-shell

用于执行质查询的交互式shell

v1.0.5 2024-03-05 13:33 UTC

This package is auto-updated.

Last update: 2024-09-05 14:44:15 UTC


README

build codecov Packagist Version Total Downloads Type Coverage

用于通过质仓库执行查询的交互式shell。

用法

使用composer安装

composer require b2pweb/bdf-prime-shell

将命令注册到控制台(以symfony为例)

services:
    Bdf\Prime\Shell\PrimeShellCommand:
        class: 'Bdf\Prime\Shell\PrimeShellCommand'
        arguments: ['@prime']
        tags: ['console.command']

现在你可以执行shell

bin/console prime:shell -p src/Entity

-p选项允许预加载实体类以实现自动完成。现在你可以像在真实的PHP中一样调用仓库和查询方法!