Download the PHP package webware/webware-theme without Composer
On this page you can find all versions of the php package webware/webware-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webware/webware-theme
More information about webware/webware-theme
Files in webware/webware-theme
Package webware-theme
Short Description Provides theme support via laminas-view to webware applications.
License BSD-3-Clause
Informations about the package webware-theme
webware/webware-theme
Theme support for Webware applications. A theme is a set of template and asset overrides; the active theme
is consulted first and default answers for everything it does not override. Template lookups are a
single array read, with no filesystem walk.
Quickstart
-
Install it and register the provider after
Mezzio\LaminasView\ConfigProvider: -
Describe a theme in any autoloaded config file, for example
config/autoload/theme.acme.global.php: - Put the asset file at
public/theme/acme/css/acme.css, and use it in a template:
layout::default now comes from the acme theme and every other address from default;
asset('theme.css') returns /theme/acme/css/acme.css, and a name acme does not define falls back to the
default theme's file. Anything not listed in a theme falls back to default per address and per name.
Addresses stay mezzio's namespaced ones (<namespace>::<name>) and never contain a theme name, so a
component's references to its own templates survive a theme change.
Documentation
| Document | Contents |
|---|---|
| Installation | Requirements, provider order, what the provider registers |
| Configuration | The theme.active, theme.themes and theme.assets keys and their rules |
| Template resolution | How ThemeResolver answers, and the resolver order |
| Assets | The theme-aware asset() helper, URL layout, theme-name rules |
Not built yet: publishing assets into public/, the command that creates and switches themes, and the
admin widget. They are specified in specs/001-theme-resolution/.
Design
The design and its measurements live with the component, in specs/001-theme-resolution/:
| Document | Contents |
|---|---|
spec.md |
Requirements, user stories, success criteria |
plan.md |
Approach, and the measurements it answers to |
research.md |
What was measured, and why the earlier renderer-modifying approach was dropped |
data-model.md |
Entities, the layout on disk, resolution, the configuration shape |
tasks.md |
The task list |
quickstart.md |
Using a theme, from either side |
What ships here
Everything in this repository is either a package of record consumed from
webware/webware-tools, or the thin per-repo wiring that cannot live in a shared
config:
| Path | Role |
|---|---|
mago.toml |
Extends the centre (vendor/webware/webware-tools/mago.toml) and overrides php-version only. Never re-add general rules locally. |
webware-ci.json |
The required CI workflow's parameter contract — read from the repository root by webinertia/.github. |
phpunit.xml.dist |
PHPUnit 13 strict mode: requireCoverageMetadata, failOnNotice, failOnWarning, failOnDeprecation. |
compose.yml / Dockerfile / .devcontainer/ |
The containerized toolchain (Composer, PHPUnit, Mago, Infection, PHPBench, roave BC-check). |
src/ConfigProvider.php |
The package wiring entry point, declared under extra.laminas.config-provider. |
mago.toml, phpunit.xml.dist, .gitattributes, codecov.yml, Dockerfile,
.dockerignore, infection.json5.dist, phpbench.json.dist and devcontainer config are
byte-identical to the canonical artifacts in
webware-tools/presets/webware-alignment/artifacts/ — copy updates from there rather than
editing them here.
Quality gates
Both MSI gates are set to 95 — the ecosystem standard, not a starting point. Lower them only with a deliberate decision, and never silently:
Four Mago gates run in CI and must be clean: format --check, lint, analyze, guard.
Run mago fmt first when making changes, and fix findings at source rather than adding
@mago-expect — a suppression needs to be a decision, not a reflex.
Development
The toolchain runs in a container, so the host needs no PHP install. With VS Code, reopen in the container; without it:
Packages whose tests need MySQL uncomment the mysql service in compose.yml, mirroring the
db_image / db_env_json / db_port values they declare in webware-ci.json.
All versions of webware-theme with dependencies
laminas/laminas-view Version ^3.0
mezzio/mezzio-laminasviewrenderer Version ^3.0
psr/container Version ^2.0