fix(lib): retain empty opcode table runtime stubs

master
韩天峰 3 weeks ago
parent c6453746c5
commit 12a34c1716
  1. 9
      phpunit/src/EmptyTranslationUnitTest.php
  2. 2
      src/Build/SourcePipelineTrait.php

@ -118,9 +118,12 @@ PHP);
$this->compiler->prepareFile($source);
$sources = $this->compiler->convert([$source]);
self::assertCount(1, $sources);
self::assertStringContainsString('extension-app.cc', $sources[0]);
self::assertFileExists($sources[0]);
self::assertCount(2, $sources);
self::assertContains($this->compiler->getBuildDir() . '/extension-app.cc', $sources);
self::assertContains($this->compiler->getBuildDir() . '/embedded-opcodes-app.cc', $sources);
foreach ($sources as $generatedSource) {
self::assertFileExists($generatedSource);
}
self::assertFileDoesNotExist($this->compiler->getCppFile($source));
}

@ -1114,7 +1114,7 @@ PHP
// Nano keeps the ordinary statically registered Zend class/module
// metadata, then adds a direct native process entry beside it.
$sourceFiles[] = $this->genExtension();
if ($this->isBuildModeBin() && !$this->isNanoMode()) {
if ($this->isBuildModeEmbed() && !$this->isNanoMode()) {
array_push($sourceFiles, ...$this->genEmbeddedOpcodeTable());
}
if ($this->isNanoMode()) {

Loading…
Cancel
Save