packagist ulrichsg/getopt-php 3.0.0-beta.1
Version 3.0.0 beta 1

latest releases: v4.0.2, dev-master, dev-phpunit-upgrade...
7 years ago

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;

Changelog:

Features:

  • php 5.3 support dropped (solves #72)
  • moved to neutral namespace GetOpt
  • classname changed to GetOpt
  • second parameter for constructor got array of settings (use GetOpt::SETTING_* constants)
  • argument constants changed to string :*Arg
  • parse options after operands (gnu compatibility; solves #39)
  • added GetOpt::MULTIPLE_ARGUMENT for parameter aggregation (solves #57)
  • implemented Command for kinda routing in console applications (solves #41)
  • implemented Operand for named operands and validation (solves #27)
  • added strict modes for strict operand and parameter matches (default is true for options) (solves #14)
  • added HelpInterface for custom help implementations
  • refactored GetOpt::getHelpText() for better support of other features and customization
  • default help class uses templates

Bugfixes:

  • GetOpt::count() returns the wrong value (solves #70)

Don't miss a new getopt-php release

NewReleases is sending notifications on new releases.