Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Class Finder Laravel Package

danog/class-finder

Fast PHP class discovery utility. Scan directories/files and find classes, interfaces, and traits without manually maintaining lists. Useful for autoload-based plugins, reflection tooling, and package indexing, with a simple API and minimal setup.

View on GitHub
Deep Wiki
Context7

FilesFinder requires that exec() is available.

Example PHP:

<?php

require_once __DIR__ . '/../vendor/autoload.php';

use danog\ClassFinder\ClassFinder;

ClassFinder::enableExperimentalFilesSupport();
$classes = ClassFinder::getClassesInNamespace('Acme\Foo\Bar');

Results in this exception:

FilesFinder requires that exec() is available. Check your php.ini to see if it is disabled.

When running ClassFinder with support for autoloaded classes in files, ClassFinder must execute the included file in a shell to determine any defined classes in it. exec() is used to accomplish this. In some environments, hosts may intentionally disable the use exec() as a security or performance precaution.

Possible Solution 1

Disable files support.

The majority of users won't need files support. If you've copy / pasted a snippet (including from documentation here) that enabled it, you should remove it and see if you're part of the 99% that doesn't need this feature. You may also want to explicitly disable it:

ClassFinder::disableExperimentalFilesSupport();
$classes = ClassFinder::getClassesInNamespace('Acme\Foo\Bar');

Possible Solution 2

Ensure exec() is available to PHP.

Find your php.ini file and look for a configuration value called disabled_functions:

disable_functions = exec,passthru,shell_exec,system,proc_open,popen

Remove exec from the list and restart your webserver.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4