Download the PHP package funct-gmbh/php-watcher without Composer

On this page you can find all versions of the php package funct-gmbh/php-watcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-watcher

PHP-watcher

PHP Version Total Downloads

Latest Stable Version Latest Version Latest Unstable Version

License

PHP-watcher helps develop long-running PHP applications by automatically restarting them when file changes in the directory are detected.

Here's how it looks like:

PHP-watcher does not require any additional changes to your code or method of development. php-watcher is a replacement wrapper for php, to use PHP -watcher replace the word php in the command line when executing your script.

Table of contents

Installation

You can install this package globally like this:

After that phpunit-watcher watch can be run in any directory on your system.

Alternatively, you can install the package locally as a dev dependency in your project:

Locally installed you can run it with vendor/bin/php-watcher.

Usage

All the examples assume you've installed the package globally. If you opted for the local installation prepend vendor/bin/ everywhere where php-watcher is mentioned.

PHP-watcher wraps your application, so you can pass all the arguments you would normally pass to your app:

Using PHP-Watcher is simple. If your application accepts a host and port as the arguments, I can start it using option --arguments:

Any output from this script is prefixed with [php-watcher], otherwise all output from your application, errors included, will be echoed out as expected.

Config files

PHP-Watcher supports customization of its behavior with config files. The file for options may be named .php-watcher.yml, php-watcher.yml or php-watcher.yml.dist. The tool will look for a file in the current working directory in that order. An alternative local configuration file can be specified with the `--config

` option. The specificity is as follows, so that a command line argument will always override the config file settings: - command line arguments - local config A config file can take any of the command line arguments, for example: ## Monitoring multiple directories By default, PHP-Watcher monitors the current working directory. If you want to take control of that option, use the `--watch` option to add specific paths: Now PHP-Watcher will only restart if there are changes in the `./src` or `./config ` directories. By default traverses sub-directories, so there's no need to explicitly include them. ## Specifying extension watch list By default, PHP-Watcher looks for files with the `.php` extension. If you use the `--ext` option and monitor `app,yml` PHP-Watcher will monitor files with the extension of `.php` and `.yml`: Now PHP-Watcher will restart on any changes to files in the directory (or subdirectories) with the extensions `.php`, `.yml`. ## Ignoring files By default, PHP-Watcher will only restart when a `.php` file changes. In some cases you may want to ignore some specific files, directories or file patterns, to prevent PHP-Watcher from prematurely restarting your application. This can be done via the command line: Or specific files can be ignored: Patterns can also be ignored (but be sure to quote the arguments): Note that by default, PHP-Watcher ignores all *dot* and VCS files. ## Delaying restarting In some situations, you may want to wait until a number of files have changed . The timeout before checking for new file changes is 1 second. If you're uploading a number of files and it's taking some number of seconds, this could cause your app to restart multiple times unnecessarily. To add an extra throttle, or delay restarting, use the `--delay` option: For more precision, use a float: ## Default executable By default, PHP-Watcher uses `php` bin executable to run your scripts. If you want to provide your own executable use `--exec` option or `executable` param in config file. This is particularly useful if you're working with several PHP versions. or using CLI: ### Running non-php scripts PHP-Watcher can also be used to execute and monitor other non-php programs. For example, you can use PHP-Watcher to listen to `*.js` files and use `node` executable to run them: The command above uses NodeJS to start `server.js` and then listens to changes in `app` directory. ## Gracefully reloading down your script It is possible to have PHP-watcher send any signal that you specify to your application. Your application can handle the signal as follows: By default PHP-watcher sends `SIGINT` signal. ## Automatic restart PHP-watcher was originally written to restart long-running processes such as web servers, but it also supports apps that cleanly exit. If your script exits cleanly, the watcher will continue to monitor the directory (or directories) and restart the script if there are any changes. If the script crashes PHP-watcher will notify you about that. ![app exit](images/exit.svg) ## Spinner By default the watcher outputs a nice spinner which indicates that the process is running and watching your files. But if your system doesn't support ansi coded the watcher will try to detect it and disable the spinner. Or you can always disable the spinner manually with option '--no-spinner': ## Attribution Based on the work of [seregazhuk/php-watcher](https://github.com/seregazhuk/php-watcher) # License MIT [http://rem.mit-license.org](http://rem.mit-license.org)

All versions of php-watcher with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
ext-pcntl Version *
yosymfony/resource-watcher Version ^2.0
symfony/console Version ^4.3 || ^5.0 || ^6.0
react/event-loop Version ^1.1
symfony/yaml Version ^4.3 || ^5.0 || ^6.0
react/child-process Version ^0.6.1
react/stream Version ^1.0.0
symfony/finder Version ^4.3 || ^5.0 || ^6.0
alecrabbit/php-cli-snake Version ^0.5
react/promise Version ^2.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package funct-gmbh/php-watcher contains the following files

Loading the files please wait ....