File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2525 "require" : {
2626 "php" : " >=8.1" ,
2727 "nette/php-generator" : " ^4.0" ,
28- "okapi/code-transformer" : " 1.3.6 " ,
28+ "okapi/code-transformer" : " 1.3.7 " ,
2929 "okapi/wildcards" : " ^1.0" ,
3030 "okapi/singleton" : " ^1.0" ,
3131 "php-di/php-di" : " ^7.0"
Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ abstract class AopKernel extends CodeTransformerKernel
5757 */
5858 protected ?string $ cacheDir = null ;
5959
60+ /**
61+ * The exclude paths. Paths/directories in this array will be excluded
62+ *
63+ * @var array
64+ */
65+ protected array $ excludePaths = [];
66+
6067 // endregion
6168
6269 /**
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ public function findFile($namespacedClass): false|string
5858
5959 $ filePath = Path::resolve ($ filePath );
6060
61+ foreach ($ this ->options ->getExcludePaths () as $ path ) {
62+ if (str_starts_with ($ filePath , Path::resolve ($ path ))) {
63+ return $ filePath ;
64+ }
65+ }
6166
6267 // Query cache state
6368 $ cacheState = $ this ->cacheStateManager ->queryCacheState ($ filePath );
You can’t perform that action at this time.
0 commit comments