Closed ivan-au closed 2 months ago
Can you walk me through your upgrade process @ivan-au
I am brand new to leaf and would like to experiment with it. Unfortunately, I encounter the same problem when using Blade. Simple Example:
[DocumentRoot]/composer.json
{
"require": {
"php": "^8.2",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.0",
"doctrine/dbal": "^4.0",
"leafs/leaf": "^3.5",
"leafs/anchor": "^1.5",
"leafs/auth": "^2.3",
"leafs/csrf": "^0.4.1",
"leafs/form": "^2.1",
"leafs/router": "^0.2.3",
"leafs/logger": "^1.3",
"leafs/exception": "^3.2",
"leafs/blade": "^2.0"
}
}
[DocumentRoot]/public/index.php
<?php
require __DIR__ . '/../vendor/autoload.php';
Leaf\View::attach(\Leaf\Blade::class);
Leaf\View::blade()->configure(
viewPaths: __DIR__ . '/../views/',
cachePath: __DIR__ . '/../cache/views/'
);
app()->get('/', function () {
echo app()->blade->render('home');
});
app()->run();
Can you walk me through your upgrade process @ivan-au
Hi @mychidarko , I followed the instructions at https://leafphp.dev/docs/migration/introduction.html#migrating-from-leaf-2:
My composer.json now:
{
"require": {
"html2text/html2text": "^4.3",
"leafs/leaf": "^3.5",
"monolog/monolog": "^3.6",
"aws/aws-sdk-php": "^3.314",
"vlucas/phpdotenv": "^5.6",
"whichbrowser/parser": "^2.1",
"leafs/session": "^2.0",
"leafs/logger": "^1.3",
"leafs/http": "^2.3",
"leafs/blade": "^2.0"
}
}
I just pushed out a new version of leafs/blade. Can you pls check if this fixes your issue @ivan-au @Teisi
@mychidarko short test seems fine to me currently :) thank you.
Apologies for the late feedback @mychidarko , confirming that the issue was resolved for me as well. Thanks a lot!
Describe the bug I'm upgrading my application from Leaf v2.5 to Leaf v3 and I'm finding an issue with Blade.
To Reproduce Below is the log trace I get. It points to issues in dependencies used by Leaf. A quick Google search shows the same issue reported in Laravel and other apps.
Expected behavior Leaf App should run
Additional context As mentioned, I'm upgrading gtom Leaf 2.5 to Leaf 3