schmittjoh / JMSTranslationBundle

Puts the Symfony2 Translation Component on steroids
http://jmsyst.com/bundles/JMSTranslationBundle
426 stars 292 forks source link

Fixed wrong offset #400

Closed deguif closed 7 years ago

deguif commented 8 years ago
Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes/no
Fixed tickets
License Apache2

Description

Fixed wrong offset when computing a @bundle/folder notation. Currently the bundle name is bundlinstead of bundle, which generates error when using the console.

deguif commented 8 years ago
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Apparently there're some errors with Scrutinizer

gnat42 commented 8 years ago

Is there anyway to provide tests for this change?

deguif commented 8 years ago

I didn't see any test on the configuration. But maybe I'm wrong ?

gnat42 commented 8 years ago

yeah I don't know if anything is there - however it would be nice for us to at least know how to reproduce the error and how this fixes it. Could you provide an example that triggers this bug?

deguif commented 8 years ago

Here a very simple command line that will reproduce the problem: In config.yml

jms_translation:
    configs:
        XXXBUNDLE_CONTROLLER:
            #Replace XXX by a valid bundle name
            dirs: ["@XXXBundle/Controller"] 
            output_dir: "%kernel.root_dir%/../src/XXXBundle/Resources/translations"
            keep: true

Then launch this command: php bin/console trans:extract en --config=XXXBUNDLE_CONTROLLER

deguif commented 8 years ago

I just updated the steps to reproduce, as before the example was wrong.

gnat42 commented 7 years ago

I can confirm that this is a bug - I couldn't figure out a way to fix it so I'm just merging.