PHPMaker v2026.13
Go to the User Levels -> User Level Permissions page. Then click Logout from the top right menu. Then click the browser Back button. It will show back the Permission page (without the data) instead of rerouting back to Login page.
PHPMaker v2026.13
Go to the User Levels -> User Level Permissions page. Then click Logout from the top right menu. Then click the browser Back button. It will show back the Permission page (without the data) instead of rerouting back to Login page.
I've just updated the template, re-generating ALL the script files, clear the dev's cache files, and the issue has been resolved.
After updating the template and re-generating everything, it works now but there is a new issue. Setting APP_DEBUG=true in the .env file will now throw error when you refresh your login page:
RuntimeException:
The autoloader expected class "PHPMaker2026\MySampleApp\Security" to be defined in file "E:\Apps\laragon\www\MySampleApp\vendor\composer/../../src\Security.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
at E:\Apps\laragon\www\MySampleApp\vendor\symfony\error-handler\DebugClassLoader.php:376
at Symfony\Component\ErrorHandler\DebugClassLoader->checkClass('PHPMaker2026\MySampleApp\Security', 'E:\Apps\laragon\www\MySampleApp\vendor\composer/../../src\Security.php')
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\error-handler\DebugClassLoader.php:333)
at Symfony\Component\ErrorHandler\DebugClassLoader->loadClass('PHPMaker2026\MySampleApp\Security')
at is_subclass_of('PHPMaker2026\MySampleApp\Security', 'UnitEnum')
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\http-kernel\DependencyInjection\RegisterControllerArgumentLocatorsPass.php:158)
at Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass->process(object(ContainerBuilder))
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\dependency-injection\Compiler\Compiler.php:73)
at Symfony\Component\DependencyInjection\Compiler\Compiler->compile(object(ContainerBuilder))
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\dependency-injection\ContainerBuilder.php:825)
at Symfony\Component\DependencyInjection\ContainerBuilder->compile()
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\http-kernel\Kernel.php:516)
at Symfony\Component\HttpKernel\Kernel->initializeContainer()
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\http-kernel\Kernel.php:762)
at Symfony\Component\HttpKernel\Kernel->preBoot()
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\http-kernel\Kernel.php:172)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(E:\Apps\laragon\www\MySampleApp\vendor\symfony\runtime\Runner\Symfony\HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(E:\Apps\laragon\www\MySampleApp\vendor\autoload_runtime.php:32)
at require_once('E:\Apps\laragon\www\MySampleApp\vendor\autoload_runtime.php')
(E:\Apps\laragon\www\MySampleApp\index.php:8)
You may read Clearing Symfony Cache.
I cannot reproduce that issue.
Make sure:
My APP_ENV is "dev" and APP_DEBUG is "true". To simulate this, change APP_DEBUG=true, then try manually go to your var\cache folder and delete all the files and folders in it and refresh the Login page, you will get this error. I tried running "php bin/console cache:clear --env=dev" but it still shows the same error.
p/s: I generate the script to a totally new folder instead of my old project folder and I did check on the Composer update option.
I found the issue which was not shown in the stack trace. It was due to a function in my ApiActionController.php where I added Security $security in the parameter and I missed adding "use Symfony\Bundle\SecurityBundle\Security;" at the header. Without it, the bare "Security" type hint resolves to PHPMaker2026\MySampleApp\Security, which PSR-4 maps to src/Security.php — a Symfony CONFIG file that declares no class. With APP_DEBUG=true the DebugClassLoader then aborts container compilation and EVERY page 500s, login included.
#[Route('/api/turnstile/validate', methods: ['GET', 'POST', 'OPTIONS'], name: 'api.turnstile_validate')]
public function turnstileValidate(Request $request, Security $security): JsonResponse
{
try {
if ($security->getUser() === null) {
return new JsonResponse([
'allow' => false,
'reason' => 'UNAUTHENTICATED',
'message' => 'Missing or expired token. Sign in again at /api/login.',
], 401);
}
$payload = [];
if (str_contains((string) $request->headers->get('Content-Type'), 'application/json')) {
$payload = json_decode((string) $request->getContent(), true) ?: [];
}
//
//
// my codes
//
//
return new JsonResponse($this->turnstileDecision($ticketCode, $systemId));
} catch (\Throwable $e) {
Log('Turnstile validate failed: ' . $e->getMessage());
return new JsonResponse([
'allow' => false,
'reason' => 'SERVER_ERROR',
'message' => 'Validation is unavailable — please see the counter.',
], 500);
}
}