Skip to content

Releases: jeremeamia/mu

v2.0.0

27 Mar 20:46
4bad004
Compare
Choose a tag to compare

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

28 Apr 15:01
Compare
Choose a tag to compare
Updated mu to be only 3 lines long