We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when i use code
print_r( '<?php return '.\Brick\VarExporter\VarExporter::export($array,0,0).';'.PHP_EOL);
and $array is :
$array = [ 'id' => [ 'type' => 'searchableEnums', 'label' => '__::articleCategory/articleCategory.module.name.plural', 'options' => fn (string|array|null $values) => App(ArticleCategoryService::class)->searchableArticleCategoryEnum($values), ]];
response is : [ function (string|array|\Projects\Controllers\null $values) ]
<?php return [ 'id' => [ 'type' => 'searchableEnums', 'label' => '__::articleCategory/articleCategory.module.name.plural', 'options' => function (string|array|\Projects\Controllers\null $values){ return App(\ArticleCategory\ArticleCategoryService::class)->searchableArticleCategoryEnum($values); } ] ];
The text was updated successfully, but these errors were encountered:
Indeed, this is a bug, thanks for reporting it!
Full reproduce:
namespace Project\Controllers; use Brick\VarExporter\VarExporter; require 'vendor/autoload.php'; $function = function (string|array|null $values): string|null { return null; }; $fn = fn (string|array|null $values): string|null => null; echo VarExporter::export($function), "\n"; echo VarExporter::export($fn), "\n";
Expected output:
function (string|array|null $values): string|null { return null; } function (string|array|null $values): string|null { return null; }
Actual output:
function (string|array|\Project\Controllers\null $values): string|\Project\Controllers\null { return null; } function (string|array|\Project\Controllers\null $values): string|\Project\Controllers\null { return null; }
Maybe @jasny could help?
Sorry, something went wrong.
This seems to be a bug in https://github.com/nikic/PHP-Parser. We need to open an issue there.
Thanks for taking a look, @jasny! Do you want to take care of it?
No branches or pull requests
when i use code
and $array is :
response is : [ function (string|array|\Projects\Controllers\null $values) ]
The text was updated successfully, but these errors were encountered: