Skip to content

Commit 81d1861

Browse files
Merge pull request #158 from striezel-stash/fix-clap-errors
Use arg instead of deprecated clap attribute
2 parents 04dd0cc + 7b238ee commit 81d1861

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

crates/cli/src/lib.rs

Lines changed: 11 additions & 11 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)]
92+
#[arg(long)]
9393
install_dir: Option<PathBuf>,
9494
/// Path to the `php.ini` file to update with the new extension.
95-
#[clap(long)]
95+
#[arg(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)]
99+
#[arg(long)]
100100
disable: bool,
101101
/// Whether to install the release version of the extension.
102-
#[clap(long)]
102+
#[arg(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)]
106+
#[arg(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)]
115+
#[arg(long)]
116116
install_dir: Option<PathBuf>,
117117
/// Path to the `php.ini` file to remove the extension from.
118-
#[clap(long)]
118+
#[arg(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)]
122+
#[arg(long)]
123123
manifest: Option<PathBuf>,
124124
}
125125

@@ -131,18 +131,18 @@ struct Stubs {
131131
ext: Option<PathBuf>,
132132
/// Path used to store generated stub file. Defaults to writing to
133133
/// `<ext-name>.stubs.php` in the current directory.
134-
#[clap(short, long)]
134+
#[arg(short, long)]
135135
out: Option<PathBuf>,
136136
/// Print stubs to stdout rather than write to file. Cannot be used with
137137
/// `out`.
138-
#[clap(long, conflicts_with = "out")]
138+
#[arg(long, conflicts_with = "out")]
139139
stdout: bool,
140140
/// Path to the Cargo manifest of the extension. Defaults to the manifest in
141141
/// the directory the command is called.
142142
///
143143
/// This cannot be provided alongside the `ext` option, as that option
144144
/// provides a direct path to the extension shared library.
145-
#[clap(long, conflicts_with = "ext")]
145+
#[arg(long, conflicts_with = "ext")]
146146
manifest: Option<PathBuf>,
147147
}
148148

0 commit comments

Comments
 (0)