Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Getopt Php Laravel Package

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.

View on GitHub
Deep Wiki
Context7
3.0.0

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)
2.4.3

Features:

  • move documentation to master branch
  • added badges to readme
2.4.2

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
2.3.0

Features:

  • Optional argument descriptions (courtesy of @sabl0r)

Bugfixes:

  • Passing a single hyphen as an option value works now (courtesy of @tistre)
2.2.0

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)
2.1.0

Features:

  • Added setters for default values and validation to Option
2.0.0-RC.1

Changes:

  • Namespace is now Ulrichsg\GetOpt
  • Public API has been cleaned up, please refer to the documentation
2.0.0

Features:

1.4.1

Bugfixes:

  • Long options are required to be longer than 1 character
  • Passing duplicate option names to the constructor is forbidden by default
1.4.0

Features:

  • Options can be numeric (courtesy of @patinthehat)
  • Additional convenience methods for working with operands (ditto)
1.3.0

Features:

  • Default values for options
  • ArrayAccess, Countable and Traversable support
  • Can set program name to enhance help message (courtesy of @misterion)
1.2.0

Features:

  • Allow passing incomplete option arrays
1.1.0

Features:

  • Added help text printing functionality

Bugfixes:

  • Fixed passing a mandatory argument to the last in a sequence of collapsed short options
1.0.1

Bugfixes:

  • Fixed bug where '0' could not be passed as an option value
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator