permafrost-dev/php-code-search
PHP library for searching code across projects and repositories. Provides fast, programmable text/pattern queries with useful match context and filtering, making it easier to locate symbols, usages, or snippets during audits, refactors, and CI tooling.
call_user_func()).__call(), __get()).debugbar).grep, ripgrep) or augment them?php artisan search:methods command.file:updated events (via Laravel’s filesystem events).phpunit.xml as a pre-test hook to validate method usage..idea/VSCode workspace symbols for navigation.composer require permafrost-dev/php-code-search.Hash::make() → Illuminate\Support\Facades\Hash).App\Models\User vs. User are distinguished.require_once or file_get_contents()-loaded files.| Phase | Task | Owner | Dependencies |
|---|---|---|---|
| Discovery | Benchmark against grep/ripgrep for basic searches. |
Dev/TPM | None |
| Pilot | Test on a Laravel module; validate JSON output. | Backend Engineer | Composer install |
| Wrapper | Create Laravel-specific CLI wrapper. | Backend Engineer | Pilot results |
| CI Hook | Add to GitHub Actions/GitLab CI. | DevOps | Wrapper code |
| Monitoring | Log false positives/negatives; refine queries. | QA/Dev | CI integration |
| Scale | Optimize for large codebases (e.g., parallel processing). | Backend Engineer | Performance data |
composer.json to avoid breaking changes.Auth::user()")..github/workflows/search.yml).call_user_func()).max_execution_time).php -d memory_limit=1G for large codebases.| Scenario | Impact | Mitigation |
|---|---|---|
| Parser breaks on new PHP | Searches fail silently. | Fork package; submit PRs upstream. |
| Large codebase times out | CI pipeline hangs. | Add timeout; split into chunks. |
| False positives flood alerts | Dev team ignores tool. | Tune queries; whitelist exceptions. |
| Laravel version incompatibility | Package fails to install. | Maintain compatibility matrix. |
DB::table() usages").php artisan search:methods calls).Final Note: Priorit
How can I help you explore Laravel packages today?