-
-
Save briantully/b797e734af59870025b10443a611e44f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\HttpFoundation\Request; | |
use Drupal\Core\DrupalKernel; | |
$autoload = require __DIR__ . '/vendor/autoload.php'; | |
$cwd = getcwd(); | |
chdir('docroot'); | |
$drupalKernel = DrupalKernel::createFromRequest( | |
Request::createFromGlobals(), | |
$autoload, | |
'dev', | |
true, | |
__DIR__ | |
); | |
$drupalKernel->boot(); | |
$drupalKernel->getContainer()->get('module_handler')->loadAll(); | |
chdir($cwd); | |
return $autoload; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
bootstrap: ./drupal_phpstan_autoload.php | |
ignoreErrors: | |
- '#Function pager_.*#' | |
- ... ignore some other errors here, not _all_ functions are registered in the bootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment