Skip to content

Add the local dev environment, component wiring and view templates - #5

Closed
tyrsson wants to merge 2 commits into
1.0.xfrom
feat/dev-environment-and-views
Closed

tyrsson wants to merge 2 commits into
1.0.xfrom
feat/dev-environment-and-views

Conversation

@tyrsson

@tyrsson tyrsson commented Sep 24, 2026

Copy link
Copy Markdown
Member

Work in progress. Not ready to merge, and CI is expected to fail.

Checkpoint of the application surface built so far.

  • compose.yml gains MySQL, phpMyAdmin and Mailpit alongside the tooling container, with the ports published so PHP running on the host reaches the database on 127.0.0.1. This is what the console's acl:init-db and user:init-db were exercised against.
  • composer.json consumes the webware components from sibling path repositories and adds php-db, with composer.lock following.
  • config/config.php registers the Webware, php-db and view providers.
  • App\ConfigProvider maps the layout, home page and error templates.
  • Adds the layout, home page, 404 and error templates, plus the htmx body template.

Relationship to #4

This branch is cut from feat/mezzio-app-bootstrap, so it carries #4's commits and the diff below includes them until #4 merges. The app surface from #4 is a hard dependency of this work: these changes modify config/config.php and build on public/, bin/ and the Mezzio dependency set that #4 introduces, so the two cannot be separated without breaking this one. If you would rather not have the overlap in review, I can instead push these commits onto #4 and close this.

Known state

  • mago and the unit suite are not yet green against this snapshot.
  • The templates are imported from the existing application and are not yet restyled for this project.
  • config/autoload/mysql.local.php is deliberately untracked, since it holds local credentials.

Brings over the app skeleton structure from tyrsson/mezzio-bleeding-edge
(1.1.x) -- the layout, not that repo's tool config.

- `config/config.php` -- the ConfigAggregator stack, with App\ConfigProvider in
  the provider list
- `config/container.php` -- ServiceManager built from the aggregated config
- `config/pipeline.php` -- the stock Mezzio pipeline (error handler, routing,
  dispatch, not-found)
- `config/autoload/dependencies.global.php`, `config/autoload/mezzio.global.php`
  and the `local.php` ignore
- `config/development.config.php.dist` -- laminas-development-mode stub
- `public/index.php` and `public/.htaccess`
- `bin/clear-config-cache.php`, wired as `composer clear-config-cache`
- `data/cache/` as the config cache target, ignored except for `.gitkeep`
- composer: mezzio/mezzio (+ fastroute, helpers),
  laminas/laminas-config-aggregator, laminas-diactoros,
  laminas-servicemanager, laminas-stdlib, and a `serve` script

Deliberately left out until they are needed: the view layer (laminas-view,
mezzio-laminasviewrenderer), the templates, the sample handlers, and the
Traccio/swoole dev middleware. Without a renderer Mezzio falls back to its plain
404/error bodies, which is why `mezzio.global.php` carries no `error_handler`
template map yet.

Verified by booting the container and dispatching a request: GET / returns
"404 Cannot GET http://localhost/" (no routes registered yet). Mago
format/lint/analyze/guard clean, both suites green, the config cache writes to
data/cache/ and `composer clear-config-cache` removes it.

Signed-off-by: Joey Smith <jsmith@webinertia.net>
Checkpoint of the in-progress application surface.

- compose.yml gains MySQL, phpMyAdmin and Mailpit alongside the tooling
  container, published on the host so PHP running there reaches the
  database on 127.0.0.1.
- composer.json consumes the webware components from sibling path
  repositories and adds php-db, with composer.lock following.
- config/config.php registers the Webware, php-db and view providers.
- App\ConfigProvider maps the layout, home page and error templates.
- Adds the layout, home page, 404, error and htmx body templates.
@tyrsson

tyrsson commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

Consolidating into #4. It is all setup work, so a single PR is the right shape; this commit has been pushed onto #4's branch. Closing this one.

@tyrsson tyrsson closed this Sep 24, 2026
@tyrsson
tyrsson deleted the feat/dev-environment-and-views branch September 24, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant