[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"docs:\u002Fdocs\u002Ftooling\u002Flocal-development":3},"\u003Cp>Working on a Phaenon project is working on a PHP project whose PHP is built from the \u003Ccode>.phn\u003C\u002Fcode> you\nedit. The loop has one extra step, the build, and editors run it for you on save. This page\nfollows that loop on a project set up as in \u003Ca href=\"\u002Fdocs\u002Fgetting-started\u002Ffirst-project\">A first project\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"the-project-on-your-machine\">The project on your machine\u003Ca class=\"docs-anchor\" href=\"#the-project-on-your-machine\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>composer install\u003C\u002Fcode> brings the compiler as \u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode> and builds every root, so a fresh\nclone runs as soon as the install is done. Your editor checks as you type and builds on save\n(\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Feditors\">Editors\u003C\u002Fa>). The outputs, \u003Ccode>.src\u002F\u003C\u002Fcode> and \u003Ccode>.tests\u002F\u003C\u002Fcode>, are what PHP, PHPUnit and\nPHPStan run; you never edit them.\u003C\u002Fp>\n\u003Cp>Composer scripts put \u003Ccode>vendor\u002Fbin\u003C\u002Fcode> on the \u003Ccode>PATH\u003C\u002Fcode>, so a project can name its commands once:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">scripts\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">build\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \"phn build\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">cs\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \"phn fmt\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">cs:check\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \"phn fmt --check\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">        \"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#0D5F78;--phn-dark:#6FC3DF\">test\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">\"\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">:\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> \"phpunit\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Ch2 id=\"building-as-you-work\">Building as you work\u003Ca class=\"docs-anchor\" href=\"#building-as-you-work\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A test runs the outputs, so a change reaches it once the project is built. Any of these builds:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>The editor&#39;s build on save\u003C\u002Fstrong>: PhpStorm, VS Code and an LSP client such as Neovim write the\noutputs after each save, a file with errors withheld.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>vendor\u002Fbin\u002Fphn watch\u003C\u002Fcode>\u003C\u002Fstrong> in a terminal, which checks and builds after each change.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>vendor\u002Fbin\u002Fphn build\u003C\u002Fcode>\u003C\u002Fstrong> (or \u003Ccode>composer build\u003C\u002Fcode>) by hand, or \u003Ccode>composer dump-autoload\u003C\u002Fcode>, which\nruns the plugin&#39;s build.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A file with an error is not written, so the previous output of that file keeps running until the\nerror is fixed. \u003Ccode>phn watch\u003C\u002Fcode> and the build on save say so: \u003Ccode>1 withheld\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"running-a-test\">Running a test\u003Ca class=\"docs-anchor\" href=\"#running-a-test\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Run PHPUnit as in any project; its configuration points at \u003Ccode>.tests\u003C\u002Fcode> and \u003Ccode>.src\u003C\u002Fcode>\n(\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fconfiguration#pointing-the-tools-at-the-outputs\">\u003Ccode>phaenon.json\u003C\u002Fcode>\u003C\u002Fa>):\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphpunit\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --filter\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> testRefusesMoreThanThere\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>OK (1 test, 1 assertion)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>A failure reports positions in the compiled files. Pipe the output through \u003Ccode>phn trace\u003C\u002Fcode> to read it\non the \u003Ccode>.phn\u003C\u002Fcode> lines:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphpunit\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> 2>&#x26;1\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\"> |\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> trace\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1) App\\Tests\\RestockTest::testTakesAfterRestocking\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>App\\OutOfStock: pear: 2 wanted, 1 left\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>\u002Fapp\u002Fsrc\u002FInventory.phn:14\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>\u002Fapp\u002Ftests\u002FRestockTest.phn:11\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>…\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>PhpStorm with the Phaenon plugin needs no pipe: its test runner and consoles link a compiled\nposition to its \u003Ccode>.phn\u003C\u002Fcode> line, and its debugger stops at breakpoints set in the \u003Ccode>.phn\u003C\u002Fcode>\n(\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fdebugging#xdebug-in-phpstorm\">Line maps and debugging\u003C\u002Fa>). In VS Code, \u003Cstrong>Phaenon:\nTrace the Terminal&#39;s Text\u003C\u002Fstrong> does what the pipe does.\u003C\u002Fp>\n\u003Ch2 id=\"phpstan-and-coverage\">PHPStan and coverage\u003Ca class=\"docs-anchor\" href=\"#phpstan-and-coverage\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>PHPStan analyses the outputs; its findings go through \u003Ccode>phn trace\u003C\u002Fcode> too:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphpstan\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> analyse\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --no-progress\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --error-format=raw\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#474C5A;--phn-dark:#B1B6C4\"> |\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\"> vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> trace\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Ccode>phn check\u003C\u002Fcode> already reports what PHPStan reports at level max, so PHPStan earns its place through\nits extensions and your project&#39;s own rules (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fchecker\">The type checker\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>For coverage, PCOV must be told to measure the outputs, or it measures \u003Ccode>src\u002F\u003C\u002Fcode> and reports nothing:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">php\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> -d\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> pcov.directory=.\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> vendor\u002Fbin\u002Fphpunit\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#B4431A;--phn-dark:#F29D6B\"> --coverage-clover\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> clover.xml\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--phn-light:#7A3D99;--phn-dark:#C9A0F0\">vendor\u002Fbin\u002Fphn\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> trace\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> &#x3C;\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> clover.xml\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#6A6F7D;--phn-dark:#8B91A2\"> >\u003C\u002Fspan>\u003Cspan style=\"--phn-light:#2A7A4B;--phn-dark:#8FD3A3\"> clover.phn.xml\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>The traced report counts \u003Ccode>.phn\u003C\u002Fcode> lines, for an IDE or a coverage service to read.\u003C\u002Fp>\n\u003Ch2 id=\"after-git-pull\">After git pull\u003Ca class=\"docs-anchor\" href=\"#after-git-pull\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Run \u003Ccode>composer install\u003C\u002Fcode>. It installs what \u003Ccode>composer.lock\u003C\u002Fcode> changed, and it always writes the\nautoloader, so the plugin builds the project: new sources are compiled, and the outputs of\nsources that are gone are removed.\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Installing dependencies from lock file (including require-dev)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Verifying lock file contents can be installed on current platform.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Nothing to install, update or remove\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>Generating autoload files\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>> phn build\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>5 files compiled, 0 written, 0 files copied, 0 stale outputs removed\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Ccode>vendor\u002Fbin\u002Fphn build\u003C\u002Fcode> does the same when the lock did not change. The outputs are never\ncommitted in an application, so a pull never conflicts on them.\u003C\u002Fp>\n\u003Ch2 id=\"working-in-docker\">Working in Docker\u003Ca class=\"docs-anchor\" href=\"#working-in-docker\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The plugin downloads the \u003Ccode>phn\u003C\u002Fcode> binary for the platform Composer runs on: on a Mac, a macOS\nbinary; in a Linux container, a Linux one, for the container&#39;s architecture. It installs it in\n\u003Ccode>vendor\u002Fphaenon\u002Fphn\u002Fbin\u002F\u003C\u002Fcode>, so the platform that last ran \u003Ccode>composer install\u003C\u002Fcode> or \u003Ccode>composer dump-autoload\u003C\u002Fcode> owns the binary.\u003C\u002Fp>\n\u003Cp>When the project directory, \u003Ccode>vendor\u002F\u003C\u002Fcode> included, is mounted into a container, the two sides take\nthe binary from each other. A macOS binary run in the container fails with an exec format error,\nwhose wording depends on the container runtime; one prints:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>Cannot run macOS (Mach-O) executable in Docker: Exec format error\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>and after a \u003Ccode>composer install\u003C\u002Fcode> in the container, the Linux binary fails on the Mac:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phaenon\u002Fphn: cannot run …\u002Fvendor\u002Fphaenon\u002Fphn\u002Fbin\u002Fphn: Exec format error\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Ccode>vendor\u002Fbin\u002Fphn\u003C\u002Fcode> exits with 126 in both cases. A \u003Ccode>composer dump-autoload\u003C\u002Fcode> on the side you are on\nputs that side&#39;s binary back, from Composer&#39;s cache. To stop the back and forth, run Composer and\n\u003Ccode>phn\u003C\u002Fcode> on one side only, or keep the container&#39;s \u003Ccode>vendor\u002F\u003C\u002Fcode> in a volume of its own.\u003C\u002Fp>\n\u003Cp>A trace from the container names its paths, \u003Ccode>\u002Fapp\u002F.src\u002FInventory.php(28)\u003C\u002Fcode>; \u003Ccode>phn trace --root \u002Fapp=.\u003C\u002Fcode> reads them from your checkout. VS Code&#39;s \u003Ccode>phaenon.traceRoots\u003C\u002Fcode> setting does the same for\nits trace commands.\u003C\u002Fp>\n\u003Ch2 id=\"common-mistakes\">Common mistakes\u003Ca class=\"docs-anchor\" href=\"#common-mistakes\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>A change does not show in the test.\u003C\u002Fstrong> The \u003Ccode>.phn\u003C\u002Fcode> was saved but not built: the editor&#39;s build on\nsave is off, or the file has an error and its output was withheld. Run \u003Ccode>vendor\u002Fbin\u002Fphn build\u003C\u002Fcode> and\nread its findings.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>An edit to \u003Ccode>.src\u002F\u003C\u002Fcode> disappears.\u003C\u002Fstrong> The outputs are rewritten from the sources at every build. Edit\nthe \u003Ccode>.phn\u003C\u002Fcode>. \u003Ccode>phn build --check\u003C\u002Fcode> names an output that differs from what the build writes:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>.src\u002FCurrencyMismatch.php: stale or missing\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan>1 outputs are stale, 0 copies are stale, 0 outputs have no source; run `phn build`\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Cstrong>\u003Ccode>Class &quot;App\\Inventory&quot; not found\u003C\u002Fcode>.\u003C\u002Fstrong> Composer&#39;s \u003Ccode>autoload\u003C\u002Fcode> points at \u003Ccode>src\u002F\u003C\u002Fcode>, where PHP finds no\n\u003Ccode>.php\u003C\u002Fcode>; it names the outputs, \u003Ccode>&quot;App\\\\&quot;: &quot;.src\u002F&quot;\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>PHPStan finds nothing to analyse.\u003C\u002Fstrong> Its \u003Ccode>paths\u003C\u002Fcode> name \u003Ccode>src\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan> [ERROR] No files found to analyse.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>Point them at \u003Ccode>.src\u003C\u002Fcode> and \u003Ccode>.tests\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>\u003Ccode>phn build\u003C\u002Fcode> asks for paths.\u003C\u002Fstrong> There is no \u003Ccode>phaenon.json\u003C\u002Fcode>, or it names no roots:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phn build: give paths, or a phaenon.json naming the roots\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Cstrong>\u003Ccode>phaenon.json\u003C\u002Fcode> is refused.\u003C\u002Fstrong> The message says why, a key misspelt or an output that is not a\nsibling of its root (\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fconfiguration#how-the-file-is-read\">How the file is read\u003C\u002Fa>):\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>phaenon.json: the output of \"src\" must be its sibling, a directory with the same parent, so that __DIR__ keeps its depth; \"build\u002Fsrc\" is not\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>\u003Cstrong>Composer blocks the plugin.\u003C\u002Fstrong> Composer runs only the plugins \u003Ccode>allow-plugins\u003C\u002Fcode> names, and\nwithout the entry it stops:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>  phaenon\u002Fphn contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>Add \u003Ccode>&quot;allow-plugins&quot;: {&quot;phaenon\u002Fphn&quot;: true}\u003C\u002Fcode> under \u003Ccode>config\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>\u003Ccode>composer install --no-dev\u003C\u002Fcode> fails on the tests.\u003C\u002Fstrong> The plugin builds every root the tree has, and\nwithout the development dependencies \u003Ccode>tests\u002F\u003C\u002Fcode> cannot compile:\u003C\u002Fp>\n\u003Cfigure class=\"docs-code phn-code-surface\">\u003Cdiv class=\"docs-code-body\">\u003Cpre class=\"shiki shiki-themes phaenon-light phaenon-dark\" style=\"--phn-light:#1f2127;--phn-dark:#e2e3e7;--phn-light-bg:#f9fafb;--phn-dark-bg:#0f1115\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>tests\u002FInventoryTest.phn:7:35: error P2001: unknown class PHPUnit\\Framework\\TestCase\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Ffigure>\n\u003Cp>Leave \u003Ccode>tests\u002F\u003C\u002Fcode> out of a production tree, as a \u003Ccode>.dockerignore\u003C\u002Fcode> does\n(\u003Ca href=\"\u002Fdocs\u002Ftooling\u002Fci#building-an-image\">Continuous integration\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Coverage is 0 everywhere.\u003C\u002Fstrong> PCOV measures \u003Ccode>src\u002F\u003C\u002Fcode> by default; run PHPUnit with\n\u003Ccode>-d pcov.directory=.\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>A finding names a line that does not match the file.\u003C\u002Fstrong> It is a compiled line. Pass the text\nthrough \u003Ccode>phn trace\u003C\u002Fcode>, or open the position from PhpStorm, which maps it.\u003C\u002Fp>\n",1794925619740]