Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve #486 - Warning: Illegal offset type #487

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pdias
Copy link

@pdias pdias commented May 13, 2018

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes/no
Fixed tickets #486
License Apache2

Description

Resolve: Warning: Illegal offset type
Resolve: FormExtrator must be changed to respect translation domains.

Todos

  • [ x] Tests
  • Documentation
  • Changelog

pdias added 2 commits May 13, 2018 17:13
Now the class PhpParser\Node\Stmt\UseUse in nikic/php-parser v4.0.1, getting the property alias ($node->alias) will return always null.
If we use the method getAlias ($node->getAlias()) this will return a Identifier object.
Now in nikic/php-parser v4.0.1, $node->name is a Identifier object.
@mcorteel-harel
Copy link

mcorteel-harel commented May 1, 2020

This PR is out of date, but I get an error with the latest version of the bundle (1.5.4):

In FormExtractor.php line 295:

  [Symfony\Component\Debug\Exception\FatalThrowableError]      
  strtolower() expects parameter 1 to be string, object given  

which can be fixed by something mentioned in #486:

Translation/Extractor/File/FormExtractor.php:295

- if (!isset($returningMethods[strtolower($var->name)])) {
+ if (!isset($returningMethods[$var->name->toLowerString()])) {

@schmittjoh Should I make another PR?

@goetas
Copy link
Collaborator

goetas commented May 1, 2020

Hi @mcorteel-harel yes please.
I started to take care of this lib in the recent period, so if you have a fix fo this, it would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants