Skip to content

Commit 7931886

Browse files
committed
Update clap and fix regression.
1 parent 933294f commit 7931886

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["api-bindings", "command-line-interface"]
1313
[dependencies]
1414
ext-php-rs = { version = ">=0.7.1", path = "../../" }
1515

16-
clap = { version = "3.2", features = ["derive"] }
16+
clap = { version = ">=3.2.5", features = ["derive"] }
1717
anyhow = "1"
1818
dialoguer = "0.10"
1919
libloading = "0.7"

crates/cli/src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ enum Args {
8989
struct Install {
9090
/// Changes the path that the extension is copied to. This will not
9191
/// activate the extension unless `ini_path` is also passed.
92-
#[clap(long, value_parser)]
92+
#[clap(long)]
9393
install_dir: Option<PathBuf>,
9494
/// Path to the `php.ini` file to update with the new extension.
95-
#[clap(long, value_parser)]
95+
#[clap(long)]
9696
ini_path: Option<PathBuf>,
9797
/// Installs the extension but doesn't enable the extension in the `php.ini`
9898
/// file.
99-
#[clap(long, value_parser)]
99+
#[clap(long)]
100100
disable: bool,
101101
/// Whether to install the release version of the extension.
102-
#[clap(long, value_parser)]
102+
#[clap(long)]
103103
release: bool,
104104
/// Path to the Cargo manifest of the extension. Defaults to the manifest in
105105
/// the directory the command is called.
106-
#[clap(long, value_parser)]
106+
#[clap(long)]
107107
manifest: Option<PathBuf>,
108108
}
109109

@@ -112,14 +112,14 @@ struct Remove {
112112
/// Changes the path that the extension will be removed from. This will not
113113
/// remove the extension from a configuration file unless `ini_path` is also
114114
/// passed.
115-
#[clap(long, value_parser)]
115+
#[clap(long)]
116116
install_dir: Option<PathBuf>,
117117
/// Path to the `php.ini` file to remove the extension from.
118-
#[clap(long, value_parser)]
118+
#[clap(long)]
119119
ini_path: Option<PathBuf>,
120120
/// Path to the Cargo manifest of the extension. Defaults to the manifest in
121121
/// the directory the command is called.
122-
#[clap(long, value_parser)]
122+
#[clap(long)]
123123
manifest: Option<PathBuf>,
124124
}
125125

@@ -128,22 +128,22 @@ struct Remove {
128128
struct Stubs {
129129
/// Path to extension to generate stubs for. Defaults for searching the
130130
/// directory the executable is located in.
131-
#[clap(short, long, value_parser)]
131+
#[clap(short, long)]
132132
ext: Option<PathBuf>,
133133
/// Path used to store generated stub file. Defaults to writing to
134134
/// `<ext-name>.stubs.php` in the current directory.
135-
#[clap(short, long, value_parser)]
135+
#[clap(short, long)]
136136
out: Option<PathBuf>,
137137
/// Print stubs to stdout rather than write to file. Cannot be used with
138138
/// `out`.
139-
#[clap(long, conflicts_with = "out", value_parser)]
139+
#[clap(long, conflicts_with = "out")]
140140
stdout: bool,
141141
/// Path to the Cargo manifest of the extension. Defaults to the manifest in
142142
/// the directory the command is called.
143143
///
144144
/// This cannot be provided alongside the `ext` option, as that option
145145
/// provides a direct path to the extension shared library.
146-
#[clap(long, conflicts_with = "ext", value_parser)]
146+
#[clap(long, conflicts_with = "ext")]
147147
manifest: Option<PathBuf>,
148148
}
149149

0 commit comments

Comments
 (0)