Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
/php-qa-watchPublic archive

Automate QA checks for your PHP project

License

NotificationsYou must be signed in to change notification settings

phly/php-qa-watch

Repository files navigation

⚠️Archived 2025-08-17

Use at your own risk.

Automate running your PHP QA toolset!

Installation

# npm$ npm i phly-php-qa-watch -g# yarn$ yarn global add phly-php-qa-watch

Usage

At its most basic, execute the watcher:

$ php-qa-watch

By default, the script, runscomposer check when any of the following change:

  • phpunit.xml.dist
  • phpcs.xml
  • any PHP files undersrc/
  • any PHP files undertest/

You can alter the behavior via the following flags:

  • -d|--no-notifications will disable system notifications when failures occur
  • -w|--watch-files allows you to provide a comma separated list of files/globpatterns to watch
  • -c|--check-command allows you to specify an alternate command to run inorder to perform checks; defaults to "composer check"

Using either-h or--help will provide the usage message as well.

Using alternate checkers

To use an alternate tool or pipeline for checking your project, use the-c or--check-command flags to provide one. As an example, perhaps you want tocombine several composer scripts, without writing an aggregate:

$ php-qa-watch -c"composer cs-lint && composer unit-test && composer mess-detector"

Alternately, perhaps you don't have composer scripts defined; you can justspecify an&&'d set of commands in that case:

$ php-qa-watch -c"./vendor/bin/php-cs-fixer fix --dry-run -v --diff && phpunit --colors=always"

Specifying different files to watch

The-w or--watch-files flags allow you to specify a comma-separated list offiles, directories, or glob patterns detailing what files to watch for changes.

Let's combine this with the above example:

$ php-qa-watch \> -c"./vendor/bin/php-cs-fixer fix --dry-run -v --diff && phpunit --colors=always" \> -w".php_cs,phpunit.xml,phpunit.xml.dist,src/**/*.php,test/**/*.php"

The above adds ensures that the.php_cs andphpunit.xml files are watched,but not thephpcs.xml (which is in the default set).

Disabling notifications

By default,php-qa-watch will provide a system notification when the specifiedchecker fails. This is done to allow you to run the watcher in a hiddenterminal, and only raise it when you see a notification of a break.

If you do not want the notification, disable it with the-d or--no-notifications flag.

About

Automate QA checks for your PHP project

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp