Download the PHP package othyn/php-enum-enhancements without Composer

On this page you can find all versions of the php package othyn/php-enum-enhancements. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-enum-enhancements

PHP Enum Enhancements

Tests Code Style GitHub license Love

A Composer package for PHP that adds some helpful enum traits to the glorious new PHP Enum type.

The package so far provides;

The package is available on Packagist as othyn/php-enum-enhancements.


Installation

Hop into your project that you wish to install it in and run the following Composer command to grab the latest version:


Usage

For more comprehensive usage examples, you can view the test suite. However I'll show some basic usage examples below.

Enum: Value Array

Enum: Value List

Backed String Enum: Value Array

Backed String Enum: Value List

Backed Int Enum: Value Array

Backed Int Enum: Value List


Development

Most development processes are wrapped up in an easy to use Docker container.

Enforcing Style

The projects .php-cs-fixer.dist.php config contains the rules that this repo conforms to and will run against the ./src and ./tests directory.

For remote style enforcement there is a GitHub Action configured to automatically run phpcsfixer.

For local style enforcement there is a composer script composer style configured to run phpcsfixer.

Testing

For remote testing there is a GitHub Action setup to automatically run the test suite on the main branch or and PR branches.

For local testing there is a Docker container that is pre-built that contains an Alpine CLI release of PHP + PHPUnit + xdebug. This is setup to test the project and can be setup via the following:

This should trigger Docker Compose to build the image. You can then up the container via the following:

There are tests for all code written, in which can be run via:

In those tests, there are Feature tests for a production ready implementation of the package. There are no Unit tests at present.

You can also easily open a shell in the testing container by using the command:


Changelog

Any and all project changes for releases should be documented below. Versioning follows the SemVer standard.


Version 1.0.1

[Git Changes] README changes.

Added

Changed

Fixed

Removed


Version 1.0.0

[Git Changes] Initial release.

Added

Changed

Fixed

Removed


All versions of php-enum-enhancements with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package othyn/php-enum-enhancements contains the following files

Loading the files please wait ....