Skip to content

Feature: possibility to configure custom bootstrap/ autoloader #8

@oleg-andreyev

Description

@oleg-andreyev

we are using bamarni/composer-bin-plugin to install phpunit in vendor-bin/phpunit

phpunit has custom bootstrap

<?php

declare(strict_types=1);

use App\Helpers\MoneyHelper;

require dirname(__DIR__).'/vendor/autoload.php';

\bcscale(MoneyHelper::PRICE_SCALE_GLOBAL);

if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
    require dirname(__DIR__).'/config/bootstrap.php';
}

getting following error:

Could not load class 'ReadyToShipItemsTest' -> ' Roave\BetterReflection\Reflection\ReflectionClass "App\Tests\E2E\AbstractTestCase" could not be found in the located source

because custom bootstrap is not loaded thus does not load "application" autoloader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions