app()->singleton() with Auth/Request/SessionAuth::user() in constructorsrequest() helper in constructorssession() helper in constructorsConfig::set() at runtimeconfig([...]) helperputenv() calls$_ENV[] assignmentsDB::connection() switching in requestsCache::rememberForever() without contextapp()->instance() usage (singleton registration)$this->prop = Auth::user() in boot/register$request->user() in propertiesAuth::user() in Model::booted()request() in boot methodssession() in boot methodsCache::rememberForever() in bootAuth::user() in job constructor (NEW)request() in job constructor (NEW)ShouldBeUnique interfacerender() methodmount()mount()hydrate()hydrate()dehydrate()[@php](https://github.com/php) blocks$GLOBALS usage in templates[@inject](https://github.com/inject) directive usage (NEW)[@php](https://github.com/php) blocks (NEW)[@auth](https://github.com/auth)/[@guest](https://github.com/guest) with guards (NEW)Event::listen() in controllers/middleware/routes$events->listen() dynamic registrationapp('events')->listen() via containerQueue::before(), Queue::after() outside providersRateLimiter::for() using static propertiestenant() access without request contextAuth::id() instead of $request->user()->idthrottle middleware without user contextdate_default_timezone_set() - changes timezone globallyini_set() - changes PHP config globallyputenv() - modifies environment variablessetlocale() - changes locale globallyerror_reporting() - changes error levelset_time_limit() - doesn't work in Octanechdir() - changes working directorydefine() - runtime constant declarationregister_shutdown_function() - functions stackapp('Service') in loopsresolve('Service') in loops$container->make() or ->get() in loopsnew Model() in loopsconfig() in loopsserialize($model) - PDO connection issuesjson_encode($model->get()) direct encodingCache::put('key', function() {}) - caching closures__sleep() and __wakeup() magic methodsvar_export() on objectsunserialize() security riskssleep() or usleep() - blocks workerModel::all() without limits->get() in loops (N+1)DB::select('SELECT *') without LIMIT->get()->count() instead of ->count()->save() in loops - use bulk operationsfile_get_contents() on large filesresponse()->download() without streamingimplode() on large query results$GLOBALS usage in bootstrap/helpersCache::rememberForever() in helpersIssues that WILL cause data leaks or security vulnerabilities:
Auth::user() in constructorsEvent::listen() outside providersdate_default_timezone_set(), putenv()sleep() blocking workersIssues that LIKELY cause problems in production:
Model::all() without limitsmount()Issues that MAY cause problems under load:
file_get_contents() usageIssues that are BEST PRACTICES violations:
Cache::rememberForever() without invalidationset_time_limit() usage# Basic scan
php artisan af-octane:test
# JSON output
php artisan af-octane:test --json
# CI mode (fail on critical)
php artisan af-octane:test --ci
# Scan specific path
php artisan af-octane:test --path=app/Livewire
Model::all() without pagination (43 found)mount() (22 found)render() (6 found)file_get_contents() usage (2 found)Auth::user() in constructors or boot methodsEvent::listen() outside service providersConfig::set() or putenv() at runtimeModel::all() without paginationsleep() or blocking operationsmount()Auth::user() in constructor💡 Tip: Run php artisan af-octane:test --ci in your CI/CD pipeline to catch issues before deployment!
How can I help you explore Laravel packages today?