Merge pull request #463 from rectorphp/default-kernel-class

Add Default kernel class
This commit is contained in:
Tomáš Votruba 2018-05-10 22:12:36 +02:00 committed by GitHub
commit 4a20730c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
parameters:
# default Symfony Kernel class
kernel_class: 'App\Kernel'
imports:
- { resource: '../../packages/**/src/config/*services.yml' }
- { resource: 'services.yml' }

View File

@ -13,7 +13,10 @@ final class InvalidConfigurationConstructorInjectionRectorTest extends AbstractR
public function test(): void
{
$this->expectException(InvalidConfigurationException::class);
$this->expectExceptionMessage('Make sure "kernel_class" parameters is set in rector.yml in "parameters:');
$this->expectExceptionMessage(
'Kernel class "App\Kernel" provided in "parameters > kernel_class" is not autoloadable.'
. ' Make sure composer.json of your application is valid and rector is loading "vendor/autoload.php" of your application.'
);
$this->doTestFileMatchesExpectedContent(__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc');
}