-
Hello, I have started migrating a project made on Phalcon 3 to the latest version of Phalcon (5.2.3) with PHP 8.2.8. When mounting the first collection, I get the following error: This is how the code is: use Phalcon\DI\FactoryDefault;
use Phalcon\Mvc\Micro;
use Phalcon\Mvc\Micro\Collection;
use CustomNamespace\Controllers\AccountController;
$di = new FactoryDefault();
$app = new Micro($di);
$accountCollection = new Collection();
$accountCollection
->setPrefix('/v1/account')
//->setHandler('\CustomNamespace\Controllers\AccountController')
->setHandler(AccountController::class, true);
//->setLazy(true);
$accountCollection->get('/', 'get');
$app->mount($accountCollection); I understand that the method "get" has changed the second param to accept a callable as the $handler instead of mixed, but I don't know if its related to the error I am getting. However in the documentation I see that there are examples similar to what I am posting, so I assume that this is still correct. https://docs.phalcon.io/5.0/en/api/phalcon_mvc#mvc-micro-collection Any ideas of what is wrong here? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@hugohiram thank you for reporting this. I have resolved this in #16415 |
Beta Was this translation helpful? Give feedback.
@hugohiram thank you for reporting this. I have resolved this in #16415