10 个版本
0.1.9 | 2023 年 10 月 12 日 |
---|---|
0.1.8 | 2023 年 6 月 26 日 |
0.1.7 | 2022 年 11 月 10 日 |
0.1.6 | 2022 年 10 月 11 日 |
0.1.2 | 2021 年 11 月 23 日 |
302 在 命令行界面
每月 46 次下载
525KB
11K SLoC
cargo-php
安装扩展并为使用 ext-php-rs
生成的 PHP 扩展生成存根文件。
安装
使用 Cargo 安装: cargo install cargo-php
。
用法
$ cargo php --help
cargo-php 0.1.0
David Cole <[email protected]>
Installs extensions and generates stub files for PHP extensions generated with `ext-php-rs`.
USAGE:
cargo-php <SUBCOMMAND>
OPTIONS:
-h, --help
Print help information
-V, --version
Print version information
SUBCOMMANDS:
help
Print this message or the help of the given subcommand(s)
install
Installs the extension in the current PHP installation
remove
Removes the extension in the current PHP installation
stubs
Generates stub PHP files for the extension
$ cargo php install --help
cargo-php-install
Installs the extension in the current PHP installation.
This copies the extension to the PHP installation and adds the extension to a PHP configuration
file.
USAGE:
cargo-php install [OPTIONS]
OPTIONS:
--disable
Installs the extension but doesn't enable the extension in the `php.ini` file
-h, --help
Print help information
--ini-path <INI_PATH>
Path to the `php.ini` file to update with the new extension
--install-dir <INSTALL_DIR>
Changes the path that the extension is copied to. This will not activate the extension
unless `ini_path` is also passed
--manifest <MANIFEST>
Path to the Cargo manifest of the extension. Defaults to the manifest in the directory
the command is called
--release
Whether to install the release version of the extension
--yes
Bypasses the confirmation prompt
$ cargo php remove --help
cargo-php-remove
Removes the extension in the current PHP installation.
This deletes the extension from the PHP installation and also removes it from the main PHP
configuration file.
USAGE:
cargo-php remove [OPTIONS]
OPTIONS:
-h, --help
Print help information
--ini-path <INI_PATH>
Path to the `php.ini` file to remove the extension from
--install-dir <INSTALL_DIR>
Changes the path that the extension will be removed from. This will not remove the
extension from a configuration file unless `ini_path` is also passed
--manifest <MANIFEST>
Path to the Cargo manifest of the extension. Defaults to the manifest in the directory
the command is called
--yes
Bypasses the confirmation prompt
$ cargo php stubs --help
cargo-php-stubs
Generates stub PHP files for the extension.
These stub files can be used in IDEs to provide typehinting for extension classes, functions and
constants.
USAGE:
cargo-php stubs [OPTIONS] [EXT]
ARGS:
<EXT>
Path to extension to generate stubs for. Defaults for searching the directory the
executable is located in
OPTIONS:
-h, --help
Print help information
--manifest <MANIFEST>
Path to the Cargo manifest of the extension. Defaults to the manifest in the directory
the command is called.
This cannot be provided alongside the `ext` option, as that option provides a direct
path to the extension shared library.
-o, --out <OUT>
Path used to store generated stub file. Defaults to writing to `<ext-name>.stubs.php` in
the current directory
--stdout
Print stubs to stdout rather than write to file. Cannot be used with `out`
许可证
许可协议为以下之一
- Apache 许可证 2.0 (LICENSE_APACHE 或 http://www.apache.org/licenses/LICENSE_2.0)
- MIT 许可证 (LICENSE_MIT 或 http://opensource.org/licenses/MIT)
由您选择。
依赖项
~4–14MB
~169K SLoC