PackageTrack
Sign in Get early access

ulrichsg/getopt-php

Command line arguments parser for PHP 7.1 and above

v4.0.4 5.4M downloads/mo #1207 most downloaded on Packagist getopt-php/getopt-php

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 months to 2.2 years

Most releases are documented

notes for 20 of 31 stable releases

Nothing withdrawn

no release was ever pulled

15 years old

41 releases · first in 2012

0 releases in the last 12 months

see the full history below

Release timeline

40 releases · Jan 2012 to Feb 2025
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 41
  1. v4.0.4 11 Feb 2025
    Release notes

    Changelog:

    • fix nullable parameters (many thanks to @AdamSGit)
    • fix github actions and add tests on php 8.4
    Open source →
    Release notes

    v4.0.4 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. v4.0.3 13 Dec 2022
    Release notes

    Changelog:

    Open source →
    Release notes

    Version 4.0.3

    Compare

    Choose a tag to compare

    Open source →
  3. v4.0.2 11 Mar 2022
    Release notes

    Changelog:

    • add php 8.0 to compatibility list in composer.json
    • use the latest phpunit versions available for the php version (#175)
    Open source →
    Release notes

    Version 4.0.2

    Compare

    Choose a tag to compare

    Open source →
  4. v4.0.1 04 Jan 2022
    Release notes

    Changelog:

    • fix ArrayAccess signature compatibility in php 8.1 (mixed return value; see #171)
    Open source →
    Release notes

    Version 4.0.1

    Compare

    Choose a tag to compare

    Open source →
  5. v4.0.0 02 May 2021
    Release notes

    Changelog:

    • drop support for php 5.x and add support for php 8
    • run tests on php 7.x and php 8 on gitlab-ci
    • add type declarations for parameters
    • add link to github versions in old changelog
    • fix return type declarations
    Open source →
    Release notes

    This release is for testing the new version.

    Open source →
    Release notes

    Version 4.0.0

    Compare

    Choose a tag to compare

    Open source →
  6. v4.0.0-alpha.1 18 Feb 2021 pre-release

    Nothing published for this version

  7. v3.4.0 14 Jul 2020
    Release notes

    Version 3.4

    This might be the last version 3 version as we might get rid of the php 5.x compatibility.

    Changelog:

    • compaitibly to php 7.4 #161 and #162
    • updated phpdoc comments #159
    • allow command names to have spaces #150
    Open source →
    Release notes

    Version 3.4.0

    Compare

    Choose a tag to compare

    Open source →
  8. v3.3.0 06 Nov 2019

    Nothing published for this version

  9. v3.3.0-rc.1 08 Sep 2019 pre-release

    Nothing published for this version

  10. 3.2.2 22 Jan 2019
    Release notes

    Changelog

    • accept option arguments starting with a hypen when argument is required
    Open source →
    Release notes

    Version 3.2.2

    Compare

    Choose a tag to compare

    Open source →
  11. 3.2.1 17 Aug 2018

    Nothing published for this version

  12. 3.2.0 31 May 2018

    Nothing published for this version

  13. 3.2.0-alpha.1 no date pre-release

    Nothing published for this version

  14. 3.1.3 29 May 2018

    Nothing published for this version

  15. 3.1.2 15 May 2018

    Nothing published for this version

  16. 3.1.1 01 May 2018

    Nothing published for this version

  17. 3.1.0 25 Nov 2017

    Nothing published for this version

  18. 3.1.0-alpha.1 08 Nov 2017 pre-release

    Nothing published for this version

  19. 3.0.3 02 Nov 2017

    Nothing published for this version

  20. 3.0.2 24 Aug 2017

    Nothing published for this version

  21. 3.0.1 23 Aug 2017

    Nothing published for this version

  22. 3.0.0 18 Aug 2017
    Release notes

    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)
    Open source →
  23. 3.0.0-beta.1 07 Aug 2017 pre-release

    Nothing published for this version

  24. 3.0.0-alpha.8 05 Aug 2017 pre-release

    Nothing published for this version

  25. 3.0.0-alpha.7 02 Aug 2017 pre-release

    Nothing published for this version

  26. 3.0.0-alpha.6 30 Jul 2017 pre-release

    Nothing published for this version

  27. 3.0.0-alpha.4 28 Jul 2017 pre-release

    Nothing published for this version

  28. 3.0.0-alpha.3 26 Jul 2017 pre-release

    Nothing published for this version

  29. 2.4.3 02 Jul 2017
    Release notes

    Features:

    • move documentation to master branch
    • added badges to readme
    Open source →
  30. 2.4.2 01 Jul 2017
    Release notes

    Features:

    • don't show options when there are no options configured
    • allow arguments in quotes (allows single quote in double quote and vice versa)
    • get script name from argv[0] when parsing arguments from array or string
    • add method to set script name manually
    • support for php 7.1
    Open source →
  31. 2.3.0 28 Mar 2015
    Release notes

    Features:

    • Optional argument descriptions (courtesy of @sabl0r)

    Bugfixes:

    • Passing a single hyphen as an option value works now (courtesy of @tistre)
    Open source →
  32. 2.2.0 13 Sep 2014
    Release notes

    Features:

    • Added method to customize the help message (courtesy of @mfn)
    • Option now has a static create method for call chaining in PHP 5.3 (courtesy of @kamermans)
    Open source →
  33. 2.1.0 28 Feb 2014
    Release notes

    Features:

    • Added setters for default values and validation to Option
    Open source →
  34. 2.0.0 30 Jan 2014
    Release notes

    Features:

    • Argument validation (courtesy of @jochenvdv)
    Open source →
  35. 1.4.1 13 Dec 2013
    Release notes

    Bugfixes:

    • Long options are required to be longer than 1 character
    • Passing duplicate option names to the constructor is forbidden by default
    Open source →
  36. 1.4.0 13 Dec 2013
    Release notes

    Features:

    • Options can be numeric (courtesy of @patinthehat)
    • Additional convenience methods for working with operands (ditto)
    Open source →
  37. 1.3.0 07 Dec 2013
    Release notes

    Features:

    • Default values for options
    • ArrayAccess, Countable and Traversable support
    • Can set program name to enhance help message (courtesy of @misterion)
    Open source →
  38. 1.2.0 14 Nov 2013
    Release notes

    Features:

    • Allow passing incomplete option arrays
    Open source →
  39. 1.1.0 19 Jun 2013
    Release notes

    Features:

    • Added help text printing functionality

    Bugfixes:

    • Fixed passing a mandatory argument to the last in a sequence of collapsed short options
    Open source →
  40. 1.0.1 13 Feb 2013
    Release notes

    Bugfixes:

    • Fixed bug where '0' could not be passed as an option value
    Open source →
  41. 1.0.0 04 Jan 2012

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive