Releases: jeremeamia/mu
Releases · jeremeamia/mu
v2.0.0
Fixed an issue to make mu compatible with PHP 8.2.
In doing so, I've introduced a breaking change, which is why version 2.0.0 is needed.
You can no longer use ->cfg('views', $dir)
to set the template/views directory. You must specify the directory in the ->view($dir, $name, $vars)
function.
Example:
const VIEWS_DIR = __DIR__ . '/views';
(new µ)
->get('/hello/(?<name>\w+)', function ($app, $params) {
echo $app->view(VIEWS_DIR, 'hello', [
'greeting' => 'howdy',
'name' => $params['name'],
]);
})
->run();
v1.0.0
Updated mu to be only 3 lines long