Skip to content

Setup - #4

Closed
tyrsson wants to merge 2 commits into
1.0.xfrom
feat/mezzio-app-bootstrap
Closed

tyrsson wants to merge 2 commits into
1.0.xfrom
feat/mezzio-app-bootstrap

Conversation

@tyrsson

@tyrsson tyrsson commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Everything needed to stand the application up, in one PR.

  • The Mezzio application surface: config/, public/, bin/clear-config-cache.php, data/, the entry point and the serve script.
  • 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, and the templates themselves are added: layout, home page, 404, error and the htmx body.

State

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

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>
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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 changed the title Add the Mezzio application surface Setup Sep 24, 2026
@tyrsson

tyrsson commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

Closing: this branch is not ready for a PR. Reopening once the application loads in a browser.

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