Skip to content

league/plates v4.0.0-alpha to v3.4.0 create error #295

@tiagocaus

Description

@tiagocaus

Hello, I'm downgrading league/plates from v4.0.0-alpha to v3.4.0, because this version supports PHP 8.

When making this change I'm having a problem with this create:

IMG: https://i.imgur.com/fnsrTGz.png

How to fix it?

Code v4.0.0-alpha:

<?php

namespace App\Controllers;

use League\Plates\Engine;

class Panel
{
    private $view;
    public function __construct()
    {
        $this->view = Engine::create(__DIR__ . "/../Views/", "php");
    }

    public function login(): void
    {
        echo $this->view->render("login", [
            "title" => "Login"
        ]);
    }

    public function error(array $data): void
    {
        echo "<h1>Error {$data["errcode"]}</h1>";
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions