govard-symfony
Skill4 starsChanged 3 months agoMITView on GitHub
This skill should be used when the user asks to "clear Symfony cache", "run bin/console commands", "run doctrine migrations", "debug Symfony routes", "run Symfony CLI", "govard symfony", "symfony cache:clear", "lint Symfony project", "audit Symfony", "govard audit", "deploy Symfony", or "govard deploy". Provides Symfony-specific Govard shortcuts. DEPENDENT on govard-toolbox for base commands.
- Reads credentials
- Deletes or force-pushes
- Installs packages
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- diagnosing-superpowersSkill
- diagram-studioSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- govard-laravelSkill
- govard-magentoSkill
- govard-toolboxSkill
- govard-wordpressSkill
- maestro-designSkill
- magento2-backend-devSkill
- magento2-code-reviewSkill
- magento2-dev-coreSkill
- magento2-frontend-devSkill
- magento2-hyva-devSkill
- magento2-linterSkill
- magento2-performance-auditSkill
- magento2-security-scanSkill
- php-dev-coreSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- review-in-worktreeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
Govard Symfony Commands
Symfony-specific shortcuts and commands for Govard environments.
Related Skills
REQUIRED BACKGROUND: Load govard-toolbox first — this skill only covers Symfony-specific shortcuts layered on top of Govard's base environment commands (govard up, govard sh, govard db, remote sync, Xdebug setup).
Docker requirement: stack commands here (govard up/down/sh, govard db,
govard tool ...) need Docker. On a host without it they exit 3 with
CAPABILITY_MISSING; govard audit run --checks integrity still works and
covers manifest/lock and Magento module/DI checks without a container.
For generic PHP (strict_types/PSR-12/PHPStan/Security) see php-dev-core.
Symfony CLI
Symfony console is bin/console inside the PHP container. Govard exposes it as govard tool symfony:
# Run any bin/console command
govard tool symfony cache:clear
govard tool symfony debug:router
govard tool symfony make:controller BlogController
# Alternative: open shell and run natively
govard sh
bin/console cache:clearAudit
For generic PHP (strict_types/PSR-12/PHPStan/Security) see php-dev-core. For 4-framework matrix and govard audit run --checks lint --lint-provider govard --mode project --format json see govard-toolbox ## Audit.
Cache Management
# Clear cache (no warmup)
govard tool symfony cache:clear --no-warmup
# Warmup after clear
govard tool symfony cache:warmup
# Clear + warmup in one step (default)
govard tool symfony cache:clear
# Pool-specific clear (if using cache pools)
govard tool symfony cache:pool:clear cache.appGovard's stack.php_version (default 8.2 for the Symfony 7 skeleton; Symfony 8 requires 8.4) determines the PHP runtime; govard config get stack.php_version shows the active version. Verified 2026-08-28 on fresh symfony/skeleton 7.4.17 (govard-test-symfony, PHP 8.2.33, MariaDB 10.11) — bootstrap warns Cannot use symfony/skeleton v8.1.99 as it requires php >=8.4.
Routing & Debug
# List all routes
govard tool symfony debug:router
# Single route
govard tool symfony debug:router app_home
# Container services
govard tool symfony debug:container
govard tool symfony debug:container --parameters
# Environment info
govard tool symfony debug:config frameworkDoctrine ORM
Prerequisite: the fresh
symfony/skeletonships without Doctrine. Install first:govard tool composer require symfony/orm-pack
# Migrations — always dry-run first on a fresh DB
govard tool symfony doctrine:migrations:migrate --dry-run
govard tool symfony doctrine:migrations:migrate --no-interaction
# Migration status
govard tool symfony doctrine:migrations:status
# Create migration from entity diff
govard tool symfony doctrine:migrations:diff
# Schema validation
govard tool symfony doctrine:schema:validate
# Fixtures (dev only)
govard tool symfony doctrine:fixtures:load --append
# Direct SQL via Govard DB layer (respects table_prefix if set)
govard db query "SELECT * FROM migration_versions LIMIT 5"On a fresh Govard Symfony install the DB is empty — migrate --dry-run is safe after symfony/orm-pack; real migrate requires govard env up and a reachable DATABASE_URL. Verified 2026-08-28: fresh skeleton without orm-pack returns There are no commands defined in the "doctrine:migrations" namespace.
Assets
# Install bundle assets
govard tool symfony assets:install
# Webpack Encore (if used)
govard tool npm install
govard tool npm run dev
govard tool npm run build
# Clear Encore cache
rm -rf node_modules/.viteSymfony has no Govard frontend_sync watcher (unlike Hyvä/Luma). Use govard tool npm run watch for live builds.
Environment (.env)
Govard injects DATABASE_URL, MAILER_DSN, and APP_ENV via .env.local (Symfony dotenv, not container env). Check current values:
govard config get stack.php_version
govard config get stack.db_version
cat .env.local
# or inside container
govard tool symfony debug:container --env-vars | grep -E 'APP_ENV|DATABASE_URL|MAILER_DSN'APP_ENVdefaults todevlocally; Govard does not overwrite a committed.env.DATABASE_URLis auto-wired to the Govard MariaDB service (mariadb 11.4default). Override via.govard.ymlstack.db_versionorGOVARD_ENVlayer if needed.MAILER_DSNpoints to Mailpit (mail:1025) — seegovard open mail(https://mail.govard.test).
For env-specific overrides use GOVARD_ENV=staging govard env up (loads .govard.staging.yml).
Deployment
Symfony ships a deploy recipe. Its point is undoing Composer's auto-scripts, which run cache:clear and assets:install in the wrong place — both belong on the target, not on whichever machine ran composer install.
govard deploy plan production # the resolved pipeline — no connection, no Docker
govard deploy check production # preflight over ssh
govard deploy production --yes| Step | Command on the target |
build:vendors | composer install … --no-scripts |
build:assets | bin/console assets:install public --symlink --relative — marked needs the application, so the target runs it even in artifact mode |
build:frontend | frontend_command inside each frontend_dir |
db:migrate | doctrine:migrations:migrate --env=<symfony_env> --no-interaction --allow-no-migration |
app:cache:flush | cache:clear --no-warmup then cache:warmup, both --env=<symfony_env> |
app:workers:pause | with worker_control: true: messenger:stop-workers --env=<symfony_env> |
maintenance:enable / disable | empty — Symfony has no core mechanism, so both are reported as skipped |
db:backup | none — --db-backup fails naming the reason |
.env.localis a shared file,var/loga shared directory;var/cacheis deliberately not shared — the compiled container belongs to one release and one environment.sync_pathsisvendorandpublic/bundles.symfony_env(defaultprod) sets--envfor every console command and is not validated — a typo builds the wrong cache directory, and--allow-no-migrationis there because an emptymigrations/directory is a healthy project.- There is no maintenance window.
db:migrateruns against a live site; a project that needs a window anchors twodeploy.hooksonmaintenance:enable/maintenance:disable. - Sandbox:
default-mysql-client, extensionsintl mysql mbstring xml curl zip, servicesmariadb+redis-server.
Deploy preflight where provided: a native deploy-plan tool prints this pipeline without connecting; a native deploy-check runs the preflight. Running it stays in the terminal. Otherwise:
govard deploy plan/govard deploy check.
Reference: https://govard.ddtcorex.com/workflows/deployment#laravel-symfony-and-wordpress · worked config: https://govard.ddtcorex.com/workflows/deploy-case-studies#case-10-symfony.
Common Workflows
After Pulling Code
govard tool composer install
govard tool symfony doctrine:migrations:migrate --no-interaction
govard tool symfony cache:clearDebugging Routes
govard tool symfony debug:router | grep api
govard tool symfony debug:router app_blog_show --show-controllersDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

