ulrichsg/getopt-php
Lightweight PHP library for parsing command-line options and arguments (getopt). Define short/long flags, required/optional values, and get a clean result for building CLI tools. No framework dependencies, simple API, supports help/usage output.
Changelog:
Changelog:
Changelog:
Changelog:
Changelog:
This release is for testing the new version.
This might be the last version 3 version as we might get rid of the php 5.x compatibility.
Changelog:
Changelog:
Changelog:
This is a pre release for version 3.1. The help is still not adapted and the release has to wait for it.
Operand::required() made the operand multiple on second call (solves #84)Operand::multiple() for sake of consistenceMany changes have been made. People already using version 2.* will have to change their code on some places. The most important: the class name and the namespace have changed. If you don't want to change everything just change your use-Statement:
// use ulrichsg\Getopt;
use GetOpt\GetOpt as Getopt;
GetOptGetOptGetOpt::SETTING_* constants):*ArgGetOpt::MULTIPLE_ARGUMENT for parameter aggregation (solves #57)Command for kinda routing in console applications (solves #41)Operand for named operands and validation (solves #27)HelpInterface for custom help implementationsGetOpt::getHelpText() for better support of other features and customizationGetOpt::count() returns the wrong value (solves #70)Many changes have been made. People already using version 2.* will have to change their code on some places. The most important: the class name and the namespace have changed. If you don't want to change everything just change your use-Statement:
// use ulrichsg\Getopt;
use GetOpt\GetOpt as Getopt;
GetOptGetOptGetOpt::SETTING_* constants):*ArgGetOpt::MULTIPLE_ARGUMENT for parameter aggregation (solves #57)Command for kinda routing in console applications (solves #41)Operand for named operands and validation (solves #27)HelpInterface for custom help implementationsGetOpt::getHelpText() for better support of other features and customizationGetOpt::count() returns the wrong value (solves #70)Changelog:
GetOpt::getOption() for an option with multiple argument but without default valueMajor changes to command interface.
Some slightly changes to the API for Command.
Because the OptionParser is static now the default mode is a public static property too. All instances from GetOpt and Command use the same default mode. For backward compatibility you can still use the SETTING_DEFAULT_MODE for GetOpt.
Many changes have been made. People already using version 2.* will have to change their code on some places. The most important: the class name and the namespace have changed. If you don't want to change everything just change your use-Statement:
// use ulrichsg\Getopt;
use GetOpt\GetOpt as Getopt;
GetOptGetOptGetOpt::SETTING_* constants):*ArgGetOpt::MULTIPLE_ARGUMENT for parameter aggregation (solves #57)Command for kinda routing in console applications (solves #41)Operand for named operands and validation (solves #27)HelpInterface for custom help implementationsGetOpt::getHelpText() for better support of other features and customizationGetOpt::count() returns the wrong value (solves #70)Changelog
merged tflori/getopt-php
Changelog:
How can I help you explore Laravel packages today?