Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage an autoloader file over bootstrap, remove compiler extension
- Loading branch information
Showing
9 changed files
with
93 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php declare(strict_types=1); | ||
|
||
use PHPStan\DependencyInjection\Container; | ||
use PHPStan\Drupal\DrupalAutoloader; | ||
|
||
assert($container instanceof Container); | ||
if ($container === NULL && !($container instanceof Container)) { | ||
throw new \PHPStan\ShouldNotHappenException('The autoloader did not receive the container.'); | ||
} | ||
|
||
if (!defined('DRUPAL_TEST_IN_CHILD_SITE')) { | ||
define('DRUPAL_TEST_IN_CHILD_SITE', false); | ||
} | ||
|
||
$drupalAutoloader = new DrupalAutoloader(); | ||
$drupalAutoloader->register($container); |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Includes the autoloader created by Composer. | ||
* | ||
* This file was generated by drupal-composer/drupal-scaffold. | ||
* https://github.com/drupal-composer/drupal-scaffold | ||
* | ||
* @see composer.json | ||
* @see index.php | ||
* @see core/install.php | ||
* @see core/rebuild.php | ||
* @see core/modules/statistics/statistics.php | ||
*/ | ||
|
||
return require __DIR__ . '/../../../../vendor/autoload.php'; |
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
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