Download the PHP package enumeum/doctrine-enums-bundle without Composer

On this page you can find all versions of the php package enumeum/doctrine-enums-bundle. 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 doctrine-enums-bundle

Doctrine Enums Bundle

Symfony bundle for Doctrine enums extension.

Requirements

Minimum PHP version is 8.1.

Installation

composer require enumeum/doctrine-enums-bundle

Bundle registration

If Symfony did not add bundle into ./config/bundles.php then do it manually.

Setup

Create doctrine_enum.yaml file under Symfony config folder. For single default connection setup is pretty easy

For multiple named connections config also supports them. Connections naming should be similar to Doctrine.

Types and Entities

Enumeum attribute for PHP enum:

Enum setup

Entity setup

Please note that the configuration of the entity is no different from the usual one. Doctrine supports "enumType" property and converts it transparently.

Commands

In order to automate enums management bundle provides some commands.

Diff

Diff command will create migration file using Doctrine Migrations bundle config.

./bin/console enumeum:migrations:diff

List of options is generally similar to Doctrine's doctrine:migrations:diff command, except one additional option. "-U" allows to ignore enums already existing in database, otherwise diff command will try to drop them.

Schema validate

Schema validate command will check whether database enums are in sync with their definitions in application.

./bin/console enumeum:schema:validate

This command has optional "--em" and "--conn" options for those cases when application has different from "default" configuration.
Option "-U" allows to ignore enums already existing in database.

Integration with Doctrine's commands

Bundle also allows to use Enumeum commands with appropriate Doctrine's commands to perform better usability.

enumeum:migrations:diff -> doctrine:migrations:diff
enumeum:schema:validate -> doctrine:schema:validate

This is provided by Doctrine's commands overriding using commands decoration. Every Doctrine's command has additional option "-E" which allows to run Enumeum command before the general. Commands decoration is enabled by default and can be disabled by following configuration:


All versions of doctrine-enums-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
doctrine/migrations Version ^3.2
doctrine/orm Version ^2.14
enumeum/doctrine-enums Version ^2.0
symfony/console Version ^4.4 || ^5.4 || ^6.0
symfony/dependency-injection Version ^4.4 || ^5.4 || ^6.0
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 enumeum/doctrine-enums-bundle contains the following files

Loading the files please wait ....