Download the PHP package nepada/consistence-doctrine without Composer

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

Consistence Enum Doctrine types

Build Status Coverage Status Downloads this Month Latest stable

Package abandoned

This package is considered obsolete and abandoned. Since PHP 8.1 introduced native enum support, there is no need for user-land implementation of enums, neither their custom integration into Doctrine.

Installation

Via Composer:

Usage

Define Doctrine type for the enum

You can choose to inherit from StringEnumType, IntegerEnumType, FloatEnumType or BooleanEnumType depending on the enum values.

Register the created type in Doctrine

In Nette with nettrine/dbal integration, you can register the types in your configuration:

Use the type in entity

Use enum in query builder

PHPStan support (via phpstan/phpstan-doctrine)

The abstract enum type classes are anotated as PHPStan generics and define proper typehints for their convert* methods. This means you can teach PHPStan your custom enum types via ReflectionDescriptor:

Differences from the official consistence/consistence-doctrine

The official integration consistence/consistence-doctrine uses postload entity event to convert data stored in database to enum instances.

The main advantage of that approach is that you don't need to create and register new doctrine type for every enum.

The disadvantages are:


All versions of consistence-doctrine with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0 <8.2
consistence/consistence Version ^2.0@dev
doctrine/dbal Version ^2.6@dev || ^3.0@dev
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 nepada/consistence-doctrine contains the following files

Loading the files please wait ....