Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor (Option::type) More consistant constants #94

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Commits on Jul 19, 2018

  1. Refactor (Option::type) More consistant constants

    Add class for holding constants which are common accross classes
    and performing simple value operations and comparisons. DEPRECATE
    the current constants, which are similar but use different naming
    and values to mean the same thing in other classes.
    
    BREAKING: The original constant values used in the Command class
    have changed.
    
     - Add enumerator class to contain Option type constant values along
    with some utility functions for comparing types.
     - Replace constant values with those from TypeEnum in Option
     - Replace constant values with those from TypeEnum in Command
     - Add dependency for systems without SplTypes PECL extension
     - Tests for new class
    
    *_Deprecated:_*
     - Option::TYPE_SHORT
     - Option::TYPE_VERBOSE
     - Option::TYPE_NAMED
     - Option::TYPE_ANONYMOUS
     - Command::OPTION_TYPE_SHORT
     - Command::OPTION_TYPE_VERBOSE
     - Command::OPTION_TYPE_ARGUMENT
    Devon Bagley committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    d4f8588 View commit details
    Browse the repository at this point in the history
  2. Refactor (Option::type) Backward compatibility with PHP 5.4+

     - Replace ::class since this was introduced in 5.5
     - Constants could not be declared with expressions until 5.6
    Devon Bagley committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    c24897f View commit details
    Browse the repository at this point in the history
  3. Refactor (Option::type) get_class expects object

    Use explicit class name as string for is_subclass_of
    Devon Bagley committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    b2a987b View commit details
    Browse the repository at this point in the history