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

Analyzing *.install: \Drupal::$container is not initialized yet #51

Closed
mglaman opened this issue Apr 6, 2019 · 3 comments
Closed

Analyzing *.install: \Drupal::$container is not initialized yet #51

mglaman opened this issue Apr 6, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mglaman
Copy link
Owner

mglaman commented Apr 6, 2019

\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.

@mglaman mglaman self-assigned this Apr 6, 2019
@mglaman mglaman added the bug Something isn't working label Apr 6, 2019
@mglaman mglaman changed the title HEAD failing: \Drupal::$container is not initialized yet Analyzing *.install: \Drupal::$container is not initialized yet Apr 8, 2019
@mglaman
Copy link
Owner Author

mglaman commented Apr 8, 2019

See #52. Caused by entity_test_update/entity_test_update.install in DbUpdatesTrait

@jibran
Copy link
Contributor

jibran commented May 2, 2019

I don't think this is totally fixed. If you use \Drupal anywhere in your install file you'll see this error. For example

- ./vendor/bin/phpstan analyze web/modules/contrib/token --no-progress || if (($? == 255)); then false; else true; 

will fail. I'll create a PR to show the fail.

@jibran
Copy link
Contributor

jibran commented May 2, 2019

I created #66 but it didn't fail. I'll investigate more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants