Giter Site home page Giter Site logo

runroom / runroom-packages Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 6.0 1.71 MB

Runroom packages for Symfony development

License: MIT License

PHP 95.27% JavaScript 0.40% Twig 3.85% Dockerfile 0.16% Makefile 0.33%
php runroom-packages sonata sonata-admin symfony symfony-bundle

runroom-packages's People

Contributors

cenadros avatar danicristante avatar dmitryuk avatar eshishko avatar gremo avatar jordisala1991 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runroom-packages's Issues

sortable-behavior-bundle doesn't support multiple entity managers out of the box

When using sortable-behavior-bundle package with Sonata Admin as described by
8. Sortable behavior in admin listing in a project with several entity managers, the following error appear:

An exception has been thrown during the rendering of a template ("The class 'App\ModuleB\Entity\ValueName' was not found in the chain configured namespaces App\ModuleA\Entity").

This error is raised by vendor/runroom-packages/sortable-behavior-bundle/src/Resources/views/sort.html.twig line 2 : {% set current_position = currentObjectPosition(object) %}

The app use a modular monolith architecture with one database per module. The issue lies with the ORMPositionHandler and GedmoPositionHandler services. They use EntityManagerInterface, that is auto-wired with the first of default entity manager.

It should auto-wire the Doctrine ManagerRegistry to get the correct EntityManager for the class using the getManagerForClass method.

Or the documentation should provide an example on how to create a custom Position Handler service for each entity manager.

Thank you for your work.

Modify service definitions

We need to define names for services declared on container.

Before:

    $services->set(BasicPageController::class)
        ->public()
        ->arg('$service', new ReferenceConfigurator(BasicPageService::class))
        ->call('setContainer', [new ReferenceConfigurator(ContainerInterface::class)])
        ->tag('container.service_subscriber')
        ->tag('controller.service_arguments');

After:

    $services->set('runroom.basic_page.controller.basic_page', BasicPageController::class)
        ->public()
        ->arg('$service', new ReferenceConfigurator(BasicPageService::class))
        ->call('setContainer', [new ReferenceConfigurator(ContainerInterface::class)])
        ->tag('container.service_subscriber')
        ->tag('controller.service_arguments');

Add translation files

We use some translations, currently located on symfony archetype. We should move them here on the corresponding bundles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.