Skip to content

Commit 94e684c

Browse files
ondrejmirtesclaude
andcommitted
Exempt main.cpp from the manifest completeness check
Since the PHP-CPP removal it registers the extension-only Runtime class through reg::Class, and extension-only classes shadow no PHP implementation — they never get a shadowed-classes.json entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013j6ePxd1BobZkr8YVLnNet
1 parent c81d12a commit 94e684c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎turbo-ext/bin/side-by-side.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,12 @@ function checkStructure(array $manifest): array
297297
preg_match_all('~stubs/(\w+)\.php~', file_get_contents('src/Turbo/TurboExtensionEnabler.php'), $m);
298298
return $m[1];
299299
})(),
300-
'class-defining .cpp files (PHP_METHOD or reg::Class)' => array_values(array_filter(array_map(
300+
// main.cpp hosts extension-only classes (Runtime) that shadow no PHP
301+
// implementation — they never get a manifest entry.
302+
'class-defining .cpp files (PHP_METHOD or reg::Class)' => array_values(array_diff(array_filter(array_map(
301303
static fn ($f) => preg_match('~PHP_METHOD\(PHPStanTurbo_|reg::Class\s+\w+\("PHPStanTurbo~', file_get_contents($f)) === 1 ? basename($f, '.cpp') : null,
302304
array_merge(glob('turbo-ext/src/*.cpp'), glob('turbo-ext/src/parser/*.cpp')),
303-
))),
305+
)), ['main'])),
304306
];
305307
foreach ($sets as $what => $names) {
306308
foreach (array_diff($names, array_keys($fromManifest)) as $extra) {

0 commit comments

Comments
 (0)