2017 © Pedro Peláez
 

library dsm-symfony

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

image

edmondscommerce/dsm-symfony

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

  • Friday, July 27, 2018
  • by edmondscommerce
  • Repository
  • 1 Watchers
  • 0 Stars
  • 62 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 4 Versions
  • 148 % Grown

The README.md

dsm-symfony

By Edmonds Commerce

A symfony bundle that facilitates using Doctrine Static Meta, (*1)

THIS IS NOT PRODUCTION READY

Install

First you need to add the following to your composer.json:, (*2)

{
    "require": {
        "edmondscommerce/dsm-symfony": "dev-master"
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/edmondscommerce/dsm-symfony"
        }
    ]
}

Then you need to register the bundle by adding the following to config/bundles.php:, (*3)

return [
    EdmondsCommerce\DsmApiPlatformBundle\DsmApiPlatformBundle::class => ['all' => true]
];

You should now see the DSM commands when you run ./bin/console:, (*4)

./bin/console
# ...
 dsm
  dsm:generate:entity                     Generate an Entity
  dsm:generate:field                      Generate a field
  dsm:generate:relations                  Generate relations traits for your entities. Optionally filter down the list of entities to generate relationship traits for
  dsm:set:field                           Set an Entity as having a Field
  dsm:set:relation
# ...

Regenerating Entities in Existing Project

In order to avoid autowiring issues it is advised that you comment out any services in config/services.yaml that reference your project code. For example:, (*5)

#    # makes classes in src/ available to be used as services
#    # this creates a service per class whose id is the fully-qualified class name
#    App\:
#        resource: '../src/*'
#        exclude: '../src/{Entities,Entity,Migrations,Tests,Kernel.php}'

This should only be needed when regenerating entities that are referenced elsewhere in the code. Once the generation is complete then these lines should be uncommented again. See Issue 3 for more details, (*6)

Configuration

This will add the Symfony doctrine configuration to DSM. This is handled in the Container file where we remove the DMS Entity Manager Factory and replace it with our own, (*7)

The Versions

27/07 2018

dev-PdfUpdate

dev-PdfUpdate

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

  Sources   Download

The Requires

 

The Development Requires

by Edmonds Commerce

24/07 2018

dev-master

9999999-dev

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

  Sources   Download

The Requires

 

The Development Requires

by Edmonds Commerce

17/05 2018

dev-RemoveDependencyOnApiPlatform

dev-RemoveDependencyOnApiPlatform

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

  Sources   Download

The Requires

 

The Development Requires

by Edmonds Commerce

15/05 2018

dev-UpdateDocs

dev-UpdateDocs

A symfony bundle for Doctrine Static Meta (edmondscommerce/doctrine-static-meta) and Symfony

  Sources   Download

The Requires

 

The Development Requires

by Edmonds Commerce