Closed smj320 closed 3 years ago
This is not a bug really. This is desired behavior. If you use mezzio for api's you don't need a template renderer. Since the template renderer is optional, we also don't want to select or force one by default.
If you read the first section of the tutorial carefully we also mention this here: https://docs.mezzio.dev/mezzio/v3/getting-started/quick-start/#create-a-new-project
A template renderer. You can ignore this when creating an API project, but if you will be creating any HTML pages, we recommend installing one. We prefer Plates.
This is different for the router and container because you always need one with mezzio.
The whoops error handler is debatable, because you don't need it but it is very easy to debug during development. Besides that, it is switched off for production environments.
@geerteltink
This is not a bug really.
Are you sure? If no template renderer is installed then the following must work:
But something doesn't seem to be working here.
Bug Report
Version 3.9.x
Windows 10, PHP7.4 Composer version 2.0.9
Summary
When I installed it as default, I met a rendering error.
Current behavior
When I install it as default, the choice of template engine is "no template engine[n]".
Tracing the tutorial and access localhost:8080, I met a rendering error.
When I choice laminas-view[3], localhost:8080 successfully show the demonstration page. And when I chose [2], I had to install a twigrenderer and create template directires additionally .
How to reproduce
Install using default value.
and access http://localhost:8080
My result was
Expected behavior
I think this behavior will surprise beginners (me too) and It leads to giving up on the choice of mezzio.
So please consider to change the default value to [3], if you can.
And also consider improving [2] to install twigrenderer and create directories automatically.