Download the PHP package goodwix/doctrine-json-odm without Composer

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

Doctrine JSON ODM library

Latest Stable Version Total Downloads License Build Status Code Coverage Scrutinizer Code Quality

Inspired by https://github.com/dunglas/doctrine-json-odm

This is beta version of library. Main differences from Dunglas library:

Features

Additional features

Install

Install with Symfony 4

To install the library, use Composer.

Add lines to config/bundles.php (no automatic configuration is available for beta version).

Create package config file config/packages/doctrine-json-odm.yaml with next content.

there src/ODM is the root path for your ODM entities (like src/Entity for Doctrine).

Usage

Basic usage with automatic ODM types registration

Create entity class for ODM type in ODM-specific directory (like src/ODM) and mark it with \Goodwix\DoctrineJsonOdm\Annotation\ODM annotation.

Create doctrine entity class with field type App\ODM\Document.

Now you can easily manage your ORM entity with ODM class field

Manual usage with Doctrine and Symfony Serializer component

To manually register Doctrine ODM types use ODMType::registerODMType() method.

Examples with Symfony application

You can see example of Symfony 4 application with using ODM library in this directory.

Deal with abstract

As an abstract class could not be created as an instance, each concrete children have to be mapped into the abstract class.

Indeed, the Symfony Serializer must know the real type in this case through a discriminator field to determine the real object behind the stored data. For that, it use Symfony\Component\Serializer\Annotation\DiscriminatorMap. More info is available [here]( Maybe this way : Symfony serializer : discriminator

For example, if we have an abstract and 2 children

Contribution

You can run composer lint before pushing to repository to ensure that there are no code style errors.

Please remember to add some tests if you change library code.


All versions of doctrine-json-odm with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
doctrine/orm Version ^2.5
symfony/property-access Version ^4.4|^5.3|^6.0
symfony/property-info Version ^4.4|^5.3|^6.0
symfony/serializer Version ^4.4|^5.3|^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 goodwix/doctrine-json-odm contains the following files

Loading the files please wait ....