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
Hi, When running in php 7.3 on WSL on Windows 10 preg_grep returns windows style line endings (\n\r) at the end of line string. To be precise in https://github.com/ongr-io/ElasticsearchBundle/blob/master/DependencyInjection/Compiler/MappingPass.php#L165 got this value:
array:1 [▼ 2 => "namespace App\Admin\Common\Controller;\n\r" ]
this causes: _preg_match('/^namespace (.*);$/', $namespaceLine, $match); to fail because of 2 whitespace at end dont match $ i preg.
To fix this issue need to make sure that namespace does not have any whitesapces so in https://github.com/ongr-io/ElasticsearchBundle/blob/master/DependencyInjection/Compiler/MappingPass.php#L166 please add trim: $namespaceLine = trim(array_shift($lines));
Please help :)
The text was updated successfully, but these errors were encountered:
Any update on that?
Sorry, something went wrong.
Required patch:
Index: vendor/ongr/elasticsearch-bundle/DependencyInjection/Compiler/MappingPass.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- vendor/ongr/elasticsearch-bundle/DependencyInjection/Compiler/MappingPass.php (date 1584856142992) +++ vendor/ongr/elasticsearch-bundle/DependencyInjection/Compiler/MappingPass.php (date 1584856142992) @@ -163,7 +163,7 @@ private function getFullNamespace($filename) { $lines = preg_grep('/^namespace /', file($filename)); - $namespaceLine = array_shift($lines); + $namespaceLine = trim(array_shift($lines)); $match = array(); preg_match('/^namespace (.*);$/', $namespaceLine, $match); $fullNamespace = array_pop($match);
No branches or pull requests
Hi,
When running in php 7.3 on WSL on Windows 10 preg_grep returns windows style line endings (\n\r) at the end of line string. To be precise in https://github.com/ongr-io/ElasticsearchBundle/blob/master/DependencyInjection/Compiler/MappingPass.php#L165
got this value:
array:1 [▼
2 => "namespace App\Admin\Common\Controller;\n\r"
]
this causes: _preg_match('/^namespace (.*);$/', $namespaceLine, $match); to fail because of 2 whitespace at end dont match $ i preg.
To fix this issue need to make sure that namespace does not have any whitesapces so in
https://github.com/ongr-io/ElasticsearchBundle/blob/master/DependencyInjection/Compiler/MappingPass.php#L166 please add trim:
$namespaceLine = trim(array_shift($lines));
Please help :)
The text was updated successfully, but these errors were encountered: