schmittjoh / JMSTranslationBundle

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

php 7.2 method return type throw error #494

Closed grekpg closed 6 years ago

grekpg commented 6 years ago
Q A
Bundle version "jms/translation-bundle": "^1.4.3",
Symfony version "symfony/symfony": "3.4.*",
PHP version PHP 7.2.7-1+ubuntu18.04.1+deb.sury.org+1 (

Actual behavior

php bin/console translation:extract pt --keep --config=app --dir=./src/AppBundle/

in FileExtractor.php line 223:

  Could not parse "./src/AppBundle/Entity/HistoryPrepaid.php": Syntax error,   
  unexpected '?' on line 200     

File content :

   /**
     * @return PaymentDetails
     */
    public function getPaymentDetails(): ?PaymentDetails
    {
        return $this->paymentDetails;
    }

line 200 public function getPaymentDetails(): ?PaymentDetails

gnat42 commented 6 years ago

what version of nikic/php-parser do you have installed?

grekpg commented 6 years ago

ok its fixed