1:"$Sreact.fragment" 2:I[3361,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 3:I[8320,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 4:I[9766,[],""] 5:I[8924,[],""] 6:I[2619,["619","static/chunks/619-ba102abea3e3d0e4.js","146","static/chunks/app/guides/stemcode-php-developers/page-0aa623f29d826b1a.js"],""] 7:I[9526,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 8:I[1503,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 9:I[2067,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] a:I[271,["619","static/chunks/619-ba102abea3e3d0e4.js","558","static/chunks/app/layout-8ed3165a2efc4aed.js"],"default"] 10:I[7150,[],""] :HL["/_next/static/css/a106fc8500d469f6.css","style"] b:T456,{"@context":"https://schema.org","@type":"BlogPosting","headline":"StemCode for PHP Developers: AI Coding with Laravel, Symfony, PHPUnit, PHPStan, and Intelephense","description":"Learn how PHP developers can use StemCode with Laravel, Symfony, Intelephense, Phpactor, Composer, PHPUnit, Pest, PHPStan, refactoring, and AI-assisted code review.","datePublished":"2026-09-21","dateModified":"2026-09-21","author":{"@type":"Organization","name":"GrowBitLabs","url":"https://growbitlabs.com"},"publisher":{"@type":"Organization","name":"GrowBitLabs","url":"https://growbitlabs.com"},"mainEntityOfPage":"https://growbitlabs.com/guides/stemcode-php-developers","url":"https://growbitlabs.com/guides/stemcode-php-developers","keywords":"StemCode PHP, AI coding agent for PHP, Laravel AI coding assistant, Symfony AI coding assistant, PHPStan AI, PHPUnit AI, Intelephense AI coding, PHP code review AI, repository aware AI coding","about":{"@type":"SoftwareApplication","name":"StemCode","applicationCategory":"DeveloperApplication","operatingSystem":"Windows, macOS, Linux","url":"https://growbitlabs.com/stemcode"}}0:{"P":null,"b":"52mZGPOTbZG1yQUVMfwha","p":"","c":["","guides","stemcode-php-developers"],"i":false,"f":[[["",{"children":["guides",{"children":["stemcode-php-developers",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/a106fc8500d469f6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"children":[["$","div",null,{"className":"scroll-progress","id":"scrollProgress"}],["$","$L3",null,{}],["$","main",null,{"id":"top","children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","section",null,{"className":"inner-hero","children":["$","div",null,{"className":"container","children":[["$","div",null,{"className":"inner-eyebrow reveal","children":[["$","span",null,{"children":"404"}],["$","i",null,{}],["$","span",null,{"children":"PAGE NOT FOUND"}]]}],["$","div",null,{"className":"inner-hero-copy reveal","children":[["$","h1",null,{"children":["This page took a wrong ",["$","em",null,{"children":"turn."}]]}],["$","p",null,{"children":"The address may have changed, or the page may no longer be available."}],["$","div",null,{"className":"inner-hero-actions","children":[["$","$L6",null,{"className":"btn primary","href":"/","children":"GO HOME"}],["$","$L6",null,{"className":"btn text","href":"/stemcode","children":"VIEW STEMCODE →"}]]}]]}]]}]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L7",null,{}],["$","footer",null,{"className":"site-footer","children":["$","div",null,{"className":"container footer-shell","children":[["$","div",null,{"className":"footer-brand-block","children":[["$","$L6",null,{"className":"brand brand-footer","href":"/","aria-label":"GrowBitLabs home","children":["$","img",null,{"className":"brand-logo","src":"/assets/logo.png","alt":"GrowBitLabs logo"}]}],["$","p",null,{"children":"Home of StemCode and GrowBit Convo. Local-first AI development, private AI infrastructure, and agent engineering."}]]}],["$","div",null,{"className":"footer-columns","children":[["$","nav",null,{"aria-label":"Solutions links","children":[["$","strong",null,{"children":"SOLUTIONS"}],["$","$L6",null,{"href":"/stemcode","children":"StemCode"}],["$","$L6",null,{"href":"/stemcode-survey","children":"StemCode Survey"}],["$","$L6",null,{"href":"/compare","children":"StemCode Comparisons"}],["$","$L6",null,{"href":"/growbit-convo","children":"GrowBit Convo"}],["$","$L6",null,{"href":"/open-models","children":"Open Models"}],["$","$L6",null,{"href":"/pricing","children":"Pricing"}],["$","$L6",null,{"href":"/enterprise","children":"Enterprise"}],["$","$L6",null,{"href":"/docs","children":"StemCode Docs"}],["$","$L6",null,{"href":"/guides","children":"Developer Guides"}]]}],["$","nav",null,{"aria-label":"Company links","children":[["$","strong",null,{"children":"COMPANY"}],["$","$L6",null,{"href":"/about","children":"About"}],["$","$L6",null,{"href":"/services","children":"Services"}],["$","$L6",null,{"href":"/contact","children":"Contact"}],["$","$L6",null,{"href":"/careers","children":"Careers"}],["$","$L6",null,{"href":"/press","children":"Press"}]]}],["$","nav",null,{"aria-label":"Legal links","children":[["$","strong",null,{"children":"LEGAL"}],["$","$L6",null,{"href":"/privacy","children":"Privacy Policy"}],["$","$L6",null,{"href":"/terms","children":"Terms of Service"}],["$","$L8",null,{}]]}],["$","nav",null,{"aria-label":"Social links","children":[["$","strong",null,{"children":"SOCIAL"}],["$","a",null,{"href":"https://www.linkedin.com/company/growbitlabs","target":"_blank","rel":"noopener noreferrer","children":"LinkedIn"}],["$","a",null,{"href":"https://www.facebook.com/growbitlabs/","target":"_blank","rel":"noopener noreferrer","children":"Facebook"}]]}]]}],["$","div",null,{"className":"footer-bottom","children":[["$","span",null,{"children":["(c) ",["$","span",null,{"id":"year"}]," GrowBitLabs"]}],["$","span",null,{"children":"StemCode + GrowBit Convo"}]]}]]}]}],["$","$L9",null,{}],["$","$La",null,{}]]}]}]}]]}],{"children":["guides",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["stemcode-php-developers",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","script",null,{"type":"application/ld+json","dangerouslySetInnerHTML":{"__html":"$b"}}],"$Lc","$Ld"],null,"$Le"]}],{},null,false]},null,false]},null,false]},null,false],"$Lf",false]],"m":"$undefined","G":["$10",[]],"s":false,"S":true} 1f:I[4431,[],"OutletBoundary"] 21:I[5278,[],"AsyncMetadataOutlet"] 23:I[4431,[],"ViewportBoundary"] 25:I[4431,[],"MetadataBoundary"] 26:"$Sreact.suspense" c:["$","section",null,{"className":"inner-hero docs-hero","children":["$","div",null,{"className":"container","children":[["$","div",null,{"className":"inner-eyebrow reveal","children":[["$","$L6",null,{"href":"/guides","children":"RESOURCES / GUIDES"}],["$","i",null,{}],["$","span",null,{"children":"PHP"}]]}],["$","div",null,{"className":"inner-hero-copy reveal","children":[["$","h1",null,{"children":["StemCode for PHP Developers: AI Coding with ",["$","em",null,{"children":"Laravel, Symfony, and PHP tooling."}]]}],["$","p",null,{"children":"Learn how PHP developers can use StemCode with Laravel, Symfony, Intelephense, Phpactor, Composer, PHPUnit, Pest, PHPStan, refactoring, and AI-assisted code review."}],["$","div",null,{"className":"inner-hero-actions docs-hero-actions","children":[["$","a",null,{"className":"btn primary","href":"#setup","children":"START SETUP"}],["$","$L6",null,{"className":"btn text","href":"/stemcode","children":"EXPLORE STEMCODE →"}]]}],["$","div",null,{"className":"docs-meta-strip","aria-label":"Guide metadata","children":[["$","span",null,{"children":["PUBLISHED ","2026-09-21"]}],["$","span",null,{"children":"STEMCODE DEVELOPER GUIDE"}],["$","span",null,{"children":"LOCAL-FIRST AI CODING"}]]}]]}]]}]}] d:["$","section",null,{"className":"docs-layout section","children":["$","div",null,{"className":"container docs-shell docs-shell-wide","children":[["$","aside",null,{"className":"docs-sidebar","aria-label":"Guide table of contents","children":[["$","span",null,{"className":"toc-label","children":"GUIDE"}],["$","$L6",null,{"href":"/guides","children":"All developer guides"}],["$","$L6",null,{"href":"/stemcode","children":"StemCode overview"}],["$","$L6",null,{"href":"/docs","children":"StemCode docs"}],["$","span",null,{"className":"toc-label","children":"ON THIS PAGE"}],["$","a",null,{"href":"#agents-md","children":"AGENTS.md project instructions"}],[["$","a","#why",{"href":"#why","children":"Why StemCode for PHP"}],["$","a","#setup",{"href":"#setup","children":"Install and set up"}],["$","a","#php-lsp",{"href":"#php-lsp","children":"PHP code intelligence"}],["$","a","#laravel",{"href":"#laravel","children":"Laravel workflow"}],["$","a","#symfony",{"href":"#symfony","children":"Symfony workflow"}],["$","a","#testing",{"href":"#testing","children":"PHPUnit and Pest"}],["$","a","#analysis",{"href":"#analysis","children":"PHPStan and Psalm"}],["$","a","#database",{"href":"#database","children":"Eloquent and Doctrine"}],["$","a","#refactoring",{"href":"#refactoring","children":"Refactoring"}],["$","a","#memory",{"href":"#memory","children":"Project memory"}],["$","a","#review",{"href":"#review","children":"Git and code review"}],["$","a","#faq",{"href":"#faq","children":"FAQ"}]]]}],["$","article",null,{"className":"docs-content","children":[["$","section",null,{"id":"agents-md","className":"docs-section reveal","children":[["$","span",null,{"children":"PROJECT INSTRUCTIONS / AGENTS.MD"}],["$","h2",null,{"children":"Give StemCode durable repository instructions before asking it to edit."}],["$","p",null,{"children":["Add an ",["$","code",null,{"children":"AGENTS.md"}]," file at the repository root for persistent project instructions. StemCode loads",["$","code",null,{"children":" AGENTS.md"}]," or ",["$","code",null,{"children":".agent/AGENTS.md"}]," from the workspace into the model context, so this is the right place for architecture boundaries, generated-file rules, coding conventions, validation expectations, and manual setup notes that should apply across sessions."]}],["$","div",null,{"className":"docs-note","children":[["$","b",null,{"children":"Keep AGENTS.md practical and repository-specific"}],["$","p",null,{"children":"Prefer concrete rules the agent can act on: where important source lives, what it must not edit, which patterns it should preserve, and which checks it should run after a change."}]]}],["$","pre",null,{"children":["$","code",null,{"children":"# PHP Project Instructions\n\nThis is a PHP project.\n\nImportant source and configuration:\n- composer.json and composer.lock\n- app/ or src/\n- tests/\n- routes, configuration, migrations, and templates used by the framework\n\nFollow these rules:\n- Follow the repository's existing PHP style and Laravel, Symfony, or framework conventions.\n- Do not modify vendor/, framework caches, generated files, or build output.\n- Preserve validation, authorization, transaction, ORM, and queue boundaries when changing request flows.\n- Reuse existing Composer packages and project abstractions before adding dependencies.\n- Keep migrations and backwards compatibility in view when changing persisted data.\n- Run focused PHPUnit or Pest tests plus the repository's static-analysis checks before broader validation."}]}],["$","p",null,{"children":"Commit the file with the project so the same instructions are reviewable and shared by everyone using StemCode in the repository."}]]}],[["$","section",null,{"id":"why","className":"docs-section reveal","children":[["$","span",null,{"children":"01 / WHY STEMCODE FOR PHP"}],["$","h2",null,{"children":"Use AI across routes, services, data access, queues, and tests."}],["$","p",null,{"children":"Modern PHP applications are rarely a collection of isolated scripts. Laravel and Symfony projects can include middleware, controllers, request validation, policies, services, ORM models, repositories, events, listeners, jobs, queues, notifications, static analysis, and deployment-sensitive database changes."}],"$L11","$L12"]}],"$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d"],"$L1e"]}]]}]}] e:["$","$L1f",null,{"children":["$L20",["$","$L21",null,{"promise":"$@22"}]]}] f:["$","$1","h",{"children":[null,[["$","$L23",null,{"children":"$L24"}],null],["$","$L25",null,{"children":["$","div",null,{"hidden":true,"children":["$","$26",null,{"fallback":null,"children":"$L27"}]}]}]]}] 11:["$","p",null,{"children":"StemCode works directly with the repository that contains all of those pieces. It can inspect the codebase, use semantic language-server information, make tracked changes, run approved project commands, investigate failures, and review Git diffs."}] 12:["$","div",null,{"className":"docs-callout docs-callout-strong","children":[["$","strong",null,{"children":"GOOD FIT FOR PHP TEAMS"}],["$","p",null,{"children":"Laravel, Symfony, Composer, PHPUnit, Pest, PHPStan, Psalm, Eloquent, Doctrine, queues, events, API projects, legacy modernization, and normal Git workflows can remain part of the same engineering loop."}]]}] 13:["$","section",null,{"id":"setup","className":"docs-section reveal","children":[["$","span",null,{"children":"02 / SETUP"}],["$","h2",null,{"children":"Install StemCode and start it from your PHP project root."}],["$","p",null,{"children":"Install the self-contained StemCode CLI with an npm-family package manager or the official shell installers."}],["$","div",null,{"className":"doc-command","children":[["$","b",null,{"children":"npm"}],["$","code",null,{"children":"npm install -g stemcode"}]]}],["$","div",null,{"className":"doc-command","children":[["$","b",null,{"children":"pnpm"}],["$","code",null,{"children":"pnpm add -g stemcode"}]]}],["$","p",null,{"children":"Then open the repository:"}],["$","pre",null,{"children":["$","code",null,{"children":["cd my-php-project","\n","stemcode"]}]}],["$","p",null,{"children":"Initialize project-specific StemCode files:"}],["$","pre",null,{"children":["$","code",null,{"children":"/init"}]}],["$","p",null,{"children":"Use the resulting workspace configuration for reusable commands, architecture notes, project conventions, and test instructions that should stay visible and reviewable."}]]}] 14:["$","section",null,{"id":"php-lsp","className":"docs-section reveal","children":[["$","span",null,{"children":"03 / PHP CODE INTELLIGENCE"}],["$","h2",null,{"children":"Use Intelephense or Phpactor for semantic navigation."}],["$","p",null,{"children":"StemCode includes built-in PHP language-server definitions for Intelephense and Phpactor. That gives the agent a path to richer symbol information instead of relying entirely on text search."}],["$","h3",null,{"children":"Install Intelephense"}],["$","pre",null,{"children":["$","code",null,{"children":"npm install -g intelephense"}]}],["$","p",null,{"children":"Then refresh StemCode:"}],["$","pre",null,{"children":["$","code",null,{"children":"/lsp refresh"}]}],["$","p",null,{"children":"Inspect the detected servers:"}],["$","pre",null,{"children":["$","code",null,{"children":"/lsp"}]}],["$","p",null,{"children":"Or inspect one PHP file:"}],["$","pre",null,{"children":["$","code",null,{"children":"/lsp file app/Services/OrderService.php"}]}],["$","p",null,{"children":["Phpactor is also supported when the ",["$","code",null,{"children":"phpactor"}]," command is installed and available on PATH."]}],["$","div",null,{"className":"docs-note","children":[["$","b",null,{"children":"Why language intelligence helps"}],["$","p",null,{"children":"Framework conventions can hide relationships behind container bindings, interfaces, traits, inheritance, and generated code. Semantic symbol information gives StemCode another signal when tracing those relationships."}]]}]]}] 15:["$","section",null,{"id":"laravel","className":"docs-section reveal","children":[["$","span",null,{"children":"04 / LARAVEL"}],["$","h2",null,{"children":"Trace a Laravel feature from route to side effects."}],["$","p",null,{"children":"Before asking the agent to write code, ask it to build a map of the existing feature."}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"EXAMPLE PROMPT"}],["$","h3",null,{"children":"Trace order creation."}],["$","p",null,{"children":"Trace the complete order creation workflow starting at the route. Include middleware, controller logic, FormRequest validation, policies, application services, Eloquent writes, events, listeners, queued jobs, and notifications."}]]}],["$","p",null,{"children":"Then ask focused follow-ups:"}],["$","pre",null,{"children":["$","code",null,{"children":"Find every place OrderStatus is updated and explain the allowed transitions."}]}],["$","pre",null,{"children":["$","code",null,{"children":"Show all listeners for OrderPlaced and explain which work is synchronous versus queued."}]}],["$","p",null,{"children":"When implementing a new feature, make discovery and validation part of the request:"}],["$","pre",null,{"children":["$","code",null,{"children":"Add an administrator action for resending an order confirmation.\n\nBefore editing:\n- find existing admin authorization patterns\n- inspect the order controller and service structure\n- identify the existing notification\n- find audit and logging conventions\n- identify relevant tests\n\nThen implement the feature, run the relevant tests, and review the Git diff."}]}]]}] 16:["$","section",null,{"id":"symfony","className":"docs-section reveal","children":[["$","span",null,{"children":"05 / SYMFONY"}],["$","h2",null,{"children":"Use the same repository workflow with Symfony."}],["$","p",null,{"children":"StemCode is framework-agnostic. In a Symfony repository, ask it to trace controllers, services, handlers, Doctrine repositories, event subscribers, Messenger handlers, and external integrations."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"REQUEST FLOW"}],["$","h3",null,{"children":"Understand service boundaries."}],["$","p",null,{"children":"Trace this request from the route through the controller, services, Doctrine repositories, domain events, and external API calls."}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"MESSENGER"}],["$","h3",null,{"children":"Review background work."}],["$","p",null,{"children":"Review this Messenger handler for idempotency, retry behavior, transaction boundaries, duplicate delivery, and failure handling."}]]}]]}]]}] 17:["$","section",null,{"id":"testing","className":"docs-section reveal","children":[["$","span",null,{"children":"06 / PHPUNIT AND PEST"}],["$","h2",null,{"children":"Run the project's real PHP test suite after edits."}],["$","p",null,{"children":"StemCode can run approved shell commands, so validation can use the same test entry points your team already has."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"LARAVEL"}],["$","h3",null,{"children":"Framework test runner."}],["$","pre",null,{"children":["$","code",null,{"children":["php artisan test","\n","php artisan test --filter=OrderTest"]}]}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"PHPUNIT / PEST"}],["$","h3",null,{"children":"Direct project tooling."}],["$","pre",null,{"children":["$","code",null,{"children":["vendor/bin/phpunit","\n","vendor/bin/pest"]}]}]]}]]}],["$","p",null,{"children":"A useful instruction for large suites is to start narrow:"}],["$","pre",null,{"children":["$","code",null,{"children":"Implement the fix and run the smallest relevant test scope first. If it passes, run the broader suite."}]}],["$","h3",null,{"children":"Add a reusable PHP validation command"}],["$","p",null,{"children":["Teams can turn Composer, tests, and static analysis into a project command under ",["$","code",null,{"children":".stemcode/commands"}],". After this file is committed, developers can run it in StemCode as",["$","code",null,{"children":" /php-validate"}],"."]}],["$","pre",null,{"children":["$","code",null,{"children":"---\nname: php-validate\ndescription: Install PHP dependencies and run tests plus analysis\nargs: [\"testScope\"]\n---\n\nValidate the PHP workspace using Composer and project-local tools.\n\nRun these commands in order:\n\n1. composer install\n2. php artisan test $testScope\n3. vendor/bin/phpstan analyse\n\nIf this is not a Laravel project, replace step 2 with vendor/bin/phpunit\nor vendor/bin/pest. If a command fails, stop, summarize the failure,\nidentify the most relevant files, and explain the next fix before editing."}]}],["$","h3",null,{"children":"Important allow-list checks"}],["$","p",null,{"children":"Composer and framework test runners can write dependency directories, caches, logs, and generated files, so keep shell permissions explicit:"}],["$","pre",null,{"children":["$","code",null,{"children":"/permissions\n/rules\n/allow shell \"composer *\"\n/allow shell \"php artisan test *\"\n/allow shell \"vendor/bin/phpunit *\"\n/allow shell \"vendor/bin/pest *\"\n/allow shell \"vendor/bin/phpstan *\""}]}],["$","p",null,{"children":"The important tool categories are repository file read/search, PHP language-server inspection, shell execution for Composer, tests, and analysis, and file writes only when you ask StemCode to implement a fix."}],["$","h3",null,{"children":"Use failing tests as an investigation starting point"}],["$","pre",null,{"children":["$","code",null,{"children":"Run the failing test and identify the root cause before editing code. Check production behavior, fixtures, database setup, container bindings, and mocks."}]}]]}] 18:["$","section",null,{"id":"analysis","className":"docs-section reveal","children":[["$","span",null,{"children":"07 / STATIC ANALYSIS"}],["$","h2",null,{"children":"Make PHPStan and Psalm part of the AI feedback loop."}],["$","p",null,{"children":"Static analysis is one of the best guardrails for AI-assisted PHP changes because it catches type and contract problems before runtime."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"PHPSTAN"}],["$","h3",null,{"children":"Analyze affected code."}],["$","pre",null,{"children":["$","code",null,{"children":"vendor/bin/phpstan analyse"}]}],["$","p",null,{"children":"Ask StemCode to fix only issues introduced by the current change and avoid unrelated cleanup."}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"PSALM"}],["$","h3",null,{"children":"Separate new issues from old ones."}],["$","pre",null,{"children":["$","code",null,{"children":"vendor/bin/psalm"}]}],["$","p",null,{"children":"Have the agent distinguish new warnings from pre-existing project debt before making additional edits."}]]}]]}],["$","h3",null,{"children":"Formatting"}],["$","p",null,{"children":"Laravel projects can keep Pint in the same validation workflow:"}],["$","pre",null,{"children":["$","code",null,{"children":"vendor/bin/pint"}]}]]}] 19:["$","section",null,{"id":"database","className":"docs-section reveal","children":[["$","span",null,{"children":"08 / ELOQUENT AND DOCTRINE"}],["$","h2",null,{"children":"Review data access across serialization and service boundaries."}],["$","p",null,{"children":"ORM performance problems often appear outside the query itself. API resources, accessors, loops, lazy relationships, service methods, and transaction boundaries can all affect behavior."}],["$","div",null,{"className":"docs-grid-2","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"ELOQUENT"}],["$","h3",null,{"children":"Look for N+1 queries."}],["$","p",null,{"children":"Review the order listing flow for N+1 queries. Check controllers, resources, service code, relationships, accessors, and serialization."}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"DOCTRINE"}],["$","h3",null,{"children":"Inspect entity loading."}],["$","p",null,{"children":"Review repository queries for excessive joins, unexpected lazy loading, large entity graphs, and transaction-boundary mistakes."}]]}]]}],["$","p",null,{"children":"For database migrations, ask specifically about destructive operations, lock duration, backwards compatibility, and staged deployment."}]]}] 1a:["$","section",null,{"id":"refactoring","className":"docs-section reveal","children":[["$","span",null,{"children":"09 / REFACTORING"}],["$","h2",null,{"children":"Use planning mode before modernizing legacy PHP."}],["$","p",null,{"children":"A large controller or service is easier to refactor when the agent first identifies responsibilities, callers, framework bindings, tests, and externally visible behavior."}],["$","pre",null,{"children":["$","code",null,{"children":"Analyze this controller and separate HTTP responsibilities from business rules. Show me a refactoring plan without modifying files."}]}],["$","p",null,{"children":"Switch to planning mode for the design pass:"}],["$","pre",null,{"children":["$","code",null,{"children":"/profile plan"}]}],["$","p",null,{"children":"Then ask for a safe migration sequence:"}],["$","pre",null,{"children":["$","code",null,{"children":"Propose a staged migration toward an application service while preserving current behavior and tests."}]}],["$","p",null,{"children":"The same approach works for Symfony service extraction, Doctrine repository changes, and gradual modernization of legacy PHP codebases."}]]}] 1b:["$","section",null,{"id":"memory","className":"docs-section reveal","children":[["$","span",null,{"children":"10 / PROJECT MEMORY"}],["$","h2",null,{"children":"Keep Laravel and Symfony conventions with the codebase."}],["$","p",null,{"children":"StemCode workspace memory can store rules that your team wants the agent to apply consistently."}],["$","h3",null,{"children":"Example Laravel conventions"}],["$","pre",null,{"children":["$","code",null,{"children":"Controllers contain HTTP orchestration only.\nUse FormRequest classes for complex request validation.\nUse policies for resource authorization.\nBusiness workflows belong in application services.\nQueued jobs must be idempotent.\nMulti-write database workflows require explicit transactions."}]}],["$","h3",null,{"children":"Example test strategy"}],["$","pre",null,{"children":["$","code",null,{"children":"Unit tests: php artisan test --testsuite=Unit\nFeature tests: php artisan test --testsuite=Feature\nStatic analysis: vendor/bin/phpstan analyse\nFormatting: vendor/bin/pint"}]}]]}] 1c:["$","section",null,{"id":"review","className":"docs-section reveal","children":[["$","span",null,{"children":"11 / GIT AND CODE REVIEW"}],["$","h2",null,{"children":"Run a PHP-specific review before opening the pull request."}],["$","pre",null,{"children":["$","code",null,{"children":"Review the current Git diff as a senior PHP reviewer.\n\nFocus on:\n- correctness and regressions\n- authorization and validation\n- Eloquent or Doctrine query behavior\n- transaction boundaries\n- queue and retry behavior\n- error handling\n- backward compatibility\n- static-analysis impact\n- missing tests"}]}],["$","p",null,{"children":"Or pipe the diff directly:"}],["$","pre",null,{"children":["$","code",null,{"children":"git diff | stemcode --stdin --profile review"}]}],["$","div",null,{"className":"docs-callout","children":[["$","strong",null,{"children":"THE PRACTICAL LOOP"}],["$","p",null,{"children":"Understand → plan → implement → test → analyze → review. PHPUnit, Pest, PHPStan, Psalm, Composer, framework tooling, Git, and human review stay part of the validation process."}]]}]]}] 1d:["$","section",null,{"id":"faq","className":"docs-section reveal","children":[["$","span",null,{"children":"12 / FAQ"}],["$","h2",null,{"children":"StemCode for PHP developers: common questions."}],["$","h3",null,{"children":"Does StemCode work with Laravel?"}],["$","p",null,{"children":"Yes. StemCode works against the repository and can use the project's existing Laravel, Composer, test, static-analysis, and formatting commands."}],["$","h3",null,{"children":"Does StemCode work with Symfony?"}],["$","p",null,{"children":"Yes. It can inspect Symfony services, controllers, Doctrine code, Messenger handlers, configuration, and the surrounding project structure."}],["$","h3",null,{"children":"Can StemCode run PHPUnit or Pest?"}],["$","p",null,{"children":"Yes. Approved shell commands can invoke vendor/bin/phpunit, vendor/bin/pest, php artisan test, or repository-specific Composer scripts."}],["$","h3",null,{"children":"Does StemCode support PHP code intelligence?"}],["$","p",null,{"children":"Yes. Its built-in language-server registry includes Intelephense and Phpactor support for PHP files."}],["$","h3",null,{"children":"Can StemCode run PHPStan?"}],["$","p",null,{"children":"Yes. You can include PHPStan or Psalm in the validation steps for a change and ask StemCode to focus on newly introduced issues."}]]}] 1e:["$","section",null,{"className":"docs-section reveal","children":[["$","span",null,{"children":"NEXT STEP"}],["$","h2",null,{"children":"Put StemCode to work in a real repository."}],["$","p",null,{"children":"Install StemCode, open the project you already work in, and begin with a repository-understanding task before asking the agent to change code. That gives the model better context and keeps the workflow reviewable."}],["$","div",null,{"className":"docs-grid-2 docs-spaced","children":[["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"INSTALL"}],["$","h3",null,{"children":"Start with the CLI."}],["$","pre",null,{"children":["$","code",null,{"children":["npm install -g stemcode","\n","cd your-project","\n","stemcode"]}]}]]}],["$","div",null,{"className":"docs-feature-card","children":[["$","span",null,{"children":"LEARN"}],["$","h3",null,{"children":"Go deeper."}],["$","p",null,{"children":"Read the full StemCode documentation for providers, permissions, LSP integrations, memory, MCP, CI review, and advanced workspace configuration."}],["$","$L6",null,{"className":"inline-arrow","href":"/docs","children":"READ THE DOCS →"}]]}]]}]]}] 24:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#f4f5f0"}]] 20:null 28:I[622,[],"IconMark"] 22:{"metadata":[["$","title","0",{"children":"StemCode for PHP Developers: AI Coding with Laravel, Symfony, PHPUnit, PHPStan, and Intelephense | GrowBitLabs"}],["$","meta","1",{"name":"description","content":"Learn how PHP developers can use StemCode with Laravel, Symfony, Intelephense, Phpactor, Composer, PHPUnit, Pest, PHPStan, refactoring, and AI-assisted code review."}],["$","meta","2",{"name":"keywords","content":"StemCode PHP,AI coding agent for PHP,Laravel AI coding assistant,Symfony AI coding assistant,PHPStan AI,PHPUnit AI,Intelephense AI coding,PHP code review AI,repository aware AI coding"}],["$","meta","3",{"name":"robots","content":"index, follow"}],["$","meta","4",{"name":"googlebot","content":"index, follow"}],["$","link","5",{"rel":"canonical","href":"https://growbitlabs.com/guides/stemcode-php-developers"}],["$","meta","6",{"property":"og:title","content":"StemCode for PHP Developers: AI Coding with Laravel, Symfony, PHPUnit, PHPStan, and Intelephense"}],["$","meta","7",{"property":"og:description","content":"Learn how PHP developers can use StemCode with Laravel, Symfony, Intelephense, Phpactor, Composer, PHPUnit, Pest, PHPStan, refactoring, and AI-assisted code review."}],["$","meta","8",{"property":"og:url","content":"https://growbitlabs.com/guides/stemcode-php-developers"}],["$","meta","9",{"property":"og:type","content":"article"}],["$","meta","10",{"property":"article:published_time","content":"2026-09-21"}],["$","meta","11",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","12",{"name":"twitter:title","content":"StemCode for PHP Developers: AI Coding with Laravel, Symfony, PHPUnit, PHPStan, and Intelephense"}],["$","meta","13",{"name":"twitter:description","content":"Learn how PHP developers can use StemCode with Laravel, Symfony, Intelephense, Phpactor, Composer, PHPUnit, Pest, PHPStan, refactoring, and AI-assisted code review."}],["$","link","14",{"rel":"icon","href":"/assets/fav.png","sizes":"196x186","type":"image/png"}],["$","link","15",{"rel":"apple-touch-icon","href":"/assets/fav.png","sizes":"196x186","type":"image/png"}],["$","$L28","16",{}]],"error":null,"digest":"$undefined"} 27:"$22:metadata"