andersundsehr/rector-p

rector 逐文件运行(类似 git add -p)

1.2.0 2024-09-19 08:19 UTC

This package is auto-updated.

Last update: 2024-09-19 08:19:49 UTC


README

安装

composer req andersundsehr/rector-p

为什么你需要这个?

如果你有一个大型旧项目并且想使用 rector,一次性转换整个项目可能会很痛苦。因此,你可以使用 rector-p 来逐文件转换项目。如果你想要应用更改,你将需要为每个有更改的文件进行确认。

示例

rector-pvendor/bin/rector-p 如果你没有设置 PATH 环境变量

asciicast

如果你只想运行特定路径,你可以这样做

rector-p src/Controller/
或者
rector-p src/Controller/MyController.php src/Controller/MyOtherController.php

你可以使用的选项

rector-p --help

Usage:
  partial [options] [--] [<source>...]

Arguments:
  source                Files or directories to be upgraded.

Options:
  -s, --startOver       Start over with the first file (be default rector-p keeps a record of files that have no changes in them)
  -p, --chunk=CHUNK     chunk(part) definition eg 1/2 (first half) or 2/2 (second half) or 3/10 (third tenth) [default: "1/1"]
  -c, --config=CONFIG   Path to config file [default: "/app/rector.php"]
  -h, --help            Display help for the given command. When no command is given display help for the partial command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

由 anders und sehr GmbH 爱心呈现

如果有什么不工作 😮
或者你欣赏这个扩展 🥰 请告诉我们。

我们正在招聘 https://www.andersundsehr.com/karriere/