sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

Sonata\MediaBundle\Twig\Extension\MediaRuntime #2148

Closed mpoiriert closed 3 years ago

mpoiriert commented 3 years ago

Environment

Sonata packages

show

``` $ composer show --latest 'sonata-project/*' # Put the result here. ```

Symfony packages

show

``` $ composer show --latest 'symfony/*' sonata-project/admin-bundle 3.86.0 4.0.1 The missing Symfony Admin Generator sonata-project/block-bundle 3.23.2 4.7.0 Symfony SonataBlockBundle sonata-project/cache 2.2.0 2.2.0 Cache library sonata-project/doctrine-extensions 1.14.0 1.14.0 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.26.0 4.0.0 Integrate Doctrine ORM into the SonataAdminBundle sonata-project/exporter 2.8.0 2.8.0 Lightweight Exporter library sonata-project/form-extensions 1.11.0 1.11.0 Symfony form extensions sonata-project/media-bundle 3.34.0 3.34.0 Symfony SonataMediaBundle sonata-project/translation-bundle 2.8.1 2.9.0 SonataTranslationBundle sonata-project/twig-extensions 1.9.0 1.9.0 Sonata twig extensions ```

PHP version

$ php -v
PHP 7.4.2 (cli) (built: Feb  1 2020 19:47:36) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans

Subject

twig.xml refer to a service class Sonata\MediaBundle\Twig\Extension\MediaRuntime it should be Sonata\MediaBundle\Twig\MediaRuntime

Minimal repository with the bug

Steps to reproduce

Load the admin on a edit of a medi

Expected results

Working

Actual results

Unable to load the "Sonata\MediaBundle\Twig\MediaRuntime" runtime.

Note

There is a lack of integration testing in all sonata bundle. I catch those errors by just having the symfony crawler loading the admin in a automation test.

jordisala1991 commented 3 years ago

I just prepared a PR to fix this and add a test about the container. (It won't cover all cases since it is not an integration test, but it will catch this one, my bad).

There is a lack of integration testing in all sonata bundle. I catch those errors by just having the symfony crawler loading the admin in a automation test.

All contributions are welcome, I am just giving the final touches to the 4.x branch and it is almost ready to release, so give it a try and maybe you want to contribute some test.

mpoiriert commented 3 years ago

I have already check in the past to contribute but unfortunately the setup is not friendly and it's taking too much time.

What should be done for me to be more involved (I am using sonata for 3 differents client in production with a title of about 100 different entities to manage) are to have docker ( I am not installing anything for dev directly other than git and docker), and the biggest part considering the size of the object and the interdependence is a mono repo (I am using simplify toolset in my own project).

In could be interested to set up this for sonata but it would most likely need to rename all the package because of the subsplit involve in the monorepo.

I have think about forking everything and do it myself but it will be too time consuming to maintain alone afterward and my client don't need it that much. I am just not updating sonata packages often because of the amount of bugs I come across when I do.

On Wed., Oct. 6, 2021, 2:29 a.m. Jordi Sala Morales, < @.***> wrote:

I just prepared a PR to fix this and add a test about the container. (It won't cover all cases since it is not an integration test, but it will catch this one, my bad).

There is a lack of integration testing in all sonata bundle. I catch those errors by just having the symfony crawler loading the admin in a automation test.

All contributions are welcome, I am just giving the final touches to the 4.x branch and it is almost ready to release, so give it a try and maybe you want to contribute some test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sonata-project/SonataMediaBundle/issues/2148#issuecomment-935567517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA73OAHN2TEJH7VDVYOY2KLUFPUCZANCNFSM5FNGCNMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.