Skip to content

Commit 9033d33

Browse files
committed
Refactored service registration
1 parent 83ced0f commit 9033d33

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "okapi/code-transformer",
33
"description": "PHP Code Transformer is a PHP library that allows you to modify and transform the source code of a loaded PHP class.",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"type": "library",
66
"homepage": "https://github.com/okapi-web/php-code-transformer",
77
"license": "MIT",

src/CodeTransformerKernel.php

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public static function init(
6969

7070
// Register the services
7171
$instance->registerServices();
72+
$instance->registerAutoloadInterceptor();
7273
}
7374

7475
$instance->setInitialized();
@@ -92,7 +93,15 @@ protected function registerServices(): void
9293

9394
// Stream filter -> Source transformer
9495
StreamFilter::register();
96+
}
9597

98+
/**
99+
* Register the autoload interceptor.
100+
*
101+
* @return void
102+
*/
103+
protected function registerAutoloadInterceptor(): void
104+
{
96105
// Overload the composer class loaders
97106
AutoloadInterceptor::register();
98107
}

0 commit comments

Comments
 (0)