qossmic / deprecation-detector

MIT License
391 stars 40 forks source link

Symmetric array destructuring results in 'Syntax error' #125

Closed Blackskyliner closed 7 years ago

Blackskyliner commented 7 years ago

When I run the deprecation detector on a codebase using PHP 7.1 which is using the new Symmetric array destructuring feature I get the following error:

Syntax error, unexpected '=' in file /Users/ck/Documents/Work/geh-web/src/Geh/EntityBundle/Request/ParamConverter/EntityParamConverter.php

<?php
[$namespaceAlias, $simpleClassName] = explode(':', 'SomeNamespace:SomeClass');

I don't know if it's an limitation of used php functions which results in that error, just wanted to note that it currently not works correct.

Alternatively don't state '^7.0' in the composer.json and only add tested Version constraints.

Blackskyliner commented 7 years ago

After posting I realized, maybe it's an limitation of https://github.com/nikic/PHP-Parser ?

slde-robin commented 7 years ago

Can you test the master ?

Blackskyliner commented 7 years ago

Yepp, it's now working. I'll close the issue then.

(You'll need to update packagist reference as I had to checkout directly from github instead of using my require-dev instance of the project, as it would not update)