fleshgrinder/exit-codes

This package is abandoned and no longer maintained. No replacement package was suggested.

Library providing constants for common CLI exit codes.

1.0.0 2016-08-11 07:27 UTC

This package is not auto-updated.

Last update: 2020-01-19 14:52:00 UTC


README

Commonly used exit codes for usage in console applications and commands.

Using appropriate exit codes greatly helps users of your project or library to include them in their own scripting and take appropriate decisions based on the returned code. Simply always using the catch-all exit code 1, as is most common, does not help the user in any way unless there is only a single source of error in the complete script; which is very unlikely.

Installation

Open a terminal, enter your project directory and execute the following command to add this package to your dependencies:

$ composer require fleshgrinder/exit-codes

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Usage

The constants are automatically loaded if you include the Composer provided auto-loader in your script.

<?php

include __DIR__ . '/vendor/autoload.php';

exit(EXIT_SUCCESS);

Weblinks

License

This is free and unencumbered software released into the public domain.

Unlicense