Commit f4ef51e9 authored by DevPilot's avatar DevPilot

fix(accounting): GapController fataled on load — private override of a protected parent method

`GapController::currentEmployee()` was declared private where
App\Core\Controller declares it protected. PHP rejects that at class-load
time, not at call time, so every request to /accounting/gaps returned a
500 — the screen was unreachable since it shipped in caca1389.

The override was redundant anyway: the parent's currentEmployee() does
exactly the same thing. Removed it, and the now-unused App import with it.

Missed because the earlier verification exercised the services and
rendered the views directly, but never instantiated the controller —
which is precisely where this class of error surfaces. Added that check
(reflect + instantiate every new controller, resolve every route handler
class and method) and ran it across all 1,486 routes in the system.
Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
parent 4729ee75
......@@ -3,7 +3,6 @@ declare(strict_types=1);
namespace App\Modules\Accounting\Controllers;
use App\Core\App;
use App\Core\Controller;
use App\Core\Request;
use App\Core\Response;
......@@ -98,9 +97,4 @@ class GapController extends Controller
'اتنقل ' . $result['imported'] . ' عقد لجدول التسويات — التسويات الشهرية هتشوفهم دلوقتي.'
);
}
private function currentEmployee()
{
return App::getInstance()->currentEmployee();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment