-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 10 (near "- @config.factory"). #30
Comments
Yes, so this is a problem with the phpstan-drupal extension and parsing the services.yml in |
There's code to workaround factories, we'll need to review the imce.services.yml and open an issue in phpstan-drupal. I don't want to transfer this issue just incase more people run into it. |
I have no idea why this is freaking out on IMCE and not anywhere else. @seanhamlin what version of IMCE do you have, -dev or a tagged release |
This seems to happen no matter what module I scan. Another example.
And another.
|
I'm also running into this issue whether checking contrib or custom modules. My output is almost identical to @seanhamlin's above. IMCE version: '8.x-1.6' |
Thanks! I'm guessing IMCE has something which is causing checking anything in that Drupal site to explode. |
@mglaman this is actually coming from the brightcove module in my case. Full call stack: Symfony\Component\Yaml\Inline::parseScalar (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Inline.php:301)
Symfony\Component\Yaml\Inline::parse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Inline.php:94)
Symfony\Component\Yaml\Parser->parseValue (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:719)
Symfony\Component\Yaml\Parser->doParse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:201)
Symfony\Component\Yaml\Parser->parseBlock (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:464)
Symfony\Component\Yaml\Parser->doParse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:323)
Symfony\Component\Yaml\Parser->parseBlock (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:464)
Symfony\Component\Yaml\Parser->doParse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:323)
Symfony\Component\Yaml\Parser->parseBlock (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:464)
Symfony\Component\Yaml\Parser->doParse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:323)
Symfony\Component\Yaml\Parser->parse (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:96)
Symfony\Component\Yaml\Parser->parseFile (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Parser.php:63)
Symfony\Component\Yaml\Yaml::parseFile (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/yaml/Yaml.php:56)
PHPStan\DependencyInjection\DrupalExtension->loadConfiguration (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/mglaman/phpstan-drupal/src/DependencyInjection/DrupalExtension.php:134)
Nette\DI\Compiler->processExtensions (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/Compiler.php:215)
Nette\DI\Compiler->compile (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/Compiler.php:175)
PHPStan\DependencyInjection\Configurator->generateContainer (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/bootstrap/src/Bootstrap/Configurator.php:306)
call_user_func_array:{phar:https:///var/www/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/ContainerLoader.php:125} (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/ContainerLoader.php:125)
Nette\DI\ContainerLoader->generate (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/ContainerLoader.php:125)
Nette\DI\ContainerLoader->loadFile (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/ContainerLoader.php:85)
Nette\DI\ContainerLoader->load (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/di/src/DI/ContainerLoader.php:47)
PHPStan\DependencyInjection\Configurator->loadContainer (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/bootstrap/src/Bootstrap/Configurator.php:267)
PHPStan\DependencyInjection\Configurator->createContainer (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/nette/bootstrap/src/Bootstrap/Configurator.php:242)
PHPStan\DependencyInjection\ContainerFactory->create (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/phpstan/phpstan/src/DependencyInjection/ContainerFactory.php:64)
PHPStan\Command\CommandHelper::begin (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/phpstan/phpstan/src/Command/CommandHelper.php:144)
DrupalCheck\Command\CheckCommand->execute (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/src/Command/CheckCommand.php:129)
DrupalCheck\Command\CheckCommand->run (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/console/Command/Command.php:255)
DrupalCheck\Application->doRunCommand (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/console/Application.php:908)
DrupalCheck\Application->doRun (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/console/Application.php:269)
DrupalCheck\Application->run (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/vendor/symfony/console/Application.php:145)
require (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check/drupal-check:60)
{main} (/Users/james.flynn/git/mysite/.docksal/addons/drupal-check/scripts/drupal-check:5) |
I have a similar error when checking any module, custom or contrib, e.g.
Running PHP 7.2.10. |
If there's a problem in one line of code, it'll break inspecting any code. @snpdev can you see what service is providing |
@mglaman, Thanks for your reply. The error is not isolated to our custom |
Yes, it'll happen inspecting any module. But it sources all available
services yamls. So we need to find what is being sourced
…On Wed, Jun 19, 2019, 8:31 AM Mike Brooks ***@***.***> wrote:
@mglaman <https://github.com/mglaman>, Thanks for your reply. The error
is not isolated to our custom procurements module. It occurs when we
check any module. One of our developers is exploring this further and will
respond.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30?email_source=notifications&email_token=AA4G7VCPVHL6NFADNQZBVDLP3IYM3A5CNFSM4HFME2BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYB36DI#issuecomment-503561997>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4G7VD3KA73MWXCWA3G4NLP3IYM3ANCNFSM4HFME2BA>
.
|
Edit: I solved the problem!! I had to put the quotes around "@controller.helper". I had put them just around @"controller.helper". I am not an IT person, so please help me with non-technical terms as much as possible. I today have updated my phpBB forum, apparently basically successfully, except that in the Administrative Control Panel I get this exact message, saying that all extensions are temporarily disabled. I went to the location the error message showed, and indeed there were three @'s followed by something not included in quotes. So I tried editing by using single quotes and double quotes, but I still get the same message in the Administrative Control Panel. The message begins: Exception: The file "/home/wvanfleet19/public_html/phpBB3/ext/hifikabin/translate/config/services.yml" does not contain valid YAML: The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 5 (near "- @controller.helper"). I also renamed the cache folder, as my way of "purging" it. I actually do not know what extensions I have and how important they are, so I am continuing to make the Forum available, and I can't tell that anything is wrong. But I assume that something is not right. I even wonder if these extensions (it looks like there are 10 of them) have been put there by a hacker or bot, since I don't remember over the years having put in extensions. If they are bad extensions, I don't know how to get rid of them, but I am making the assumption for now that they are legitimate. I just would like to see that awful message in red no longer being in the ACP. I hope someone can help me. Edit: I just noticed that there were two quotes around [controller.helper], so I removed one set, because that was the way the original message displayed. So apparently after I added the quotes, it changed the message in the ACP to [...scalar at line 5 (near "- @"controller.helper"")]. That would mean to me that a new judgement was being made after my putting in the quotes, but that my doing so did not stop the same message from coming to me in the ACP. Edit: Problem solved. See Edit at beginning. I'm learning. That awful message in red in the ACP is gone! |
Running
1.0.6
on PHP 7.2. Every command I try produces the same cryptic error message.Running with
-vvv
:The text was updated successfully, but these errors were encountered: