{"id":49805960,"url":"https://github.com/oxhq/deadcode-laravel","last_synced_at":"2026-05-12T21:05:14.148Z","repository":{"id":353751692,"uuid":"1220761950","full_name":"oxhq/deadcode-laravel","owner":"oxhq","description":"Laravel dead code pruning with evidence, staged deletion, and rollback","archived":false,"fork":false,"pushed_at":"2026-04-25T21:49:09.000Z","size":283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T23:30:12.243Z","etag":null,"topics":["artisan","code-analysis","dead-code","laravel","php","refactoring","rust","static-analysis"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxhq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T09:48:34.000Z","updated_at":"2026-04-25T21:49:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oxhq/deadcode-laravel","commit_stats":null,"previous_names":["garaekz/deadcode-laravel","oxhq/deadcode-laravel"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oxhq/deadcode-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Fdeadcode-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Fdeadcode-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Fdeadcode-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Fdeadcode-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxhq","download_url":"https://codeload.github.com/oxhq/deadcode-laravel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Fdeadcode-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32956878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","code-analysis","dead-code","laravel","php","refactoring","rust","static-analysis"],"created_at":"2026-05-12T21:05:11.231Z","updated_at":"2026-05-12T21:05:14.141Z","avatar_url":"https://github.com/oxhq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deadcode-laravel\n\nLaravel dead code pruning with evidence, staged deletion, and rollback.\n\n`deadcode-laravel` boots the host Laravel app, captures runtime truth, calls the Rust `deadcore` engine, renders the `deadcode.analysis.v1` report, and stages only the conservative removals that the current policy allows.\n\n## Command Flow\n\n```bash\nphp artisan deadcode:doctor\nphp artisan deadcode:analyze\nphp artisan deadcode:report --input=storage/app/deadcode/analysis.json --format=json\nphp artisan deadcode:report --input=storage/app/deadcode/analysis.json --format=table\nphp artisan deadcode:apply --input=storage/app/deadcode/analysis.json --dry-run\nphp artisan deadcode:apply --input=storage/app/deadcode/analysis.json --stage\nphp artisan deadcode:rollback\n```\n\n`deadcode:analyze {projectPath?}` is supervisor-backed. The command sends an analysis task to `deadcode-supervisor`, streams task progress, and prints the generated `deadcode.analysis.v1` payload path.\n\n`deadcode:report` does not analyze a project. It only renders an existing analysis payload from `--input`.\n\n`deadcode:apply --dry-run` explains what would be staged and which findings were skipped. `deadcode:apply --stage` writes conservative edits and stores rollback data for the latest staged change set.\n\n## Installation\n\nRequire the package from Packagist and publish configuration:\n\n```bash\ncomposer require oxhq/deadcode-laravel\nphp artisan vendor:publish --tag=deadcode-config\n```\n\nFor development against the public GitHub repository instead of Packagist:\n\n```bash\ncomposer config repositories.deadcode-laravel vcs https://github.com/oxhq/deadcode-laravel\ncomposer require oxhq/deadcode-laravel:^0.1.5\nphp artisan vendor:publish --tag=deadcode-config\n```\n\nInstall or build the `deadcore` binary:\n\n```bash\nphp artisan deadcode:install-binary v0.1.5\nphp artisan deadcode:install-supervisor v0.1.5\n```\n\nFor local development against a source checkout:\n\n```bash\nphp artisan deadcode:install-binary v0.1.5 --source-root=/absolute/path/to/deadcore --prefer-source\n```\n\nConfigure explicit binary paths when defaults are not valid for the host app:\n\n```env\nDEADCODE_SUPERVISOR_INSTALL_PATH=bin/deadcode-supervisor\nDEADCODE_SUPERVISOR_BINARY=/absolute/path/to/deadcode-supervisor\nDEADCODE_SUPERVISOR_TIMEOUT=300\nDEADCORE_BINARY=/absolute/path/to/deadcore\nDEADCORE_SOURCE_ROOT=/absolute/path/to/deadcore\nDEADCORE_WORKING_DIRECTORY=/absolute/path/to/your/laravel/app\nDEADCORE_TIMEOUT=120\n```\n\nSee [docs/installation.md](docs/installation.md) for the longer install path.\nSee [docs/fixtures.md](docs/fixtures.md) for the package fixture map and verification boundaries.\n\n## Release Status\n\n`v0.1.5` is the current coordinated public release:\n\n- `deadcode-laravel` provides the Artisan workflow and Laravel runtime snapshot.\n- `deadcore` provides the Rust analysis engine and `deadcode.analysis.v1`.\n- `go-supervisor` provides the native JSONL worker supervisor used by `deadcode:analyze`.\n\nThe GitHub releases publish checksum-verified Windows, Linux, and macOS binaries for the native components.\n\n## Current Coverage\n\nThe current verified slice reports:\n\n- controller methods\n- dead controller classes\n- explicit typed `FormRequest` classes\n- direct supported resource usage\n- runtime-registered command classes\n- runtime-registered listener classes\n- explicitly registered subscriber classes\n- job classes reached from supported explicit dispatch patterns\n- policy classes from the runtime Gate policy map\n- model helper methods reached from supported explicit calls\n- local scopes reached from supported explicit scope-call patterns\n- relationship methods reached from supported explicit access and eager-loading patterns\n- legacy and modern accessors/mutators reached from supported explicit reads, writes, and append-style metadata\n\n`deadcode:report` renders compact `reasonSummary` values plus structured `reachabilityReasons` and `evidence` emitted by `deadcore`.\n\n`deadcode:apply --dry-run` explains skipped findings with planner decisions such as report-only category, insufficient confidence, missing range, missing removal plan, or non-isolated removal plan.\n\n## Remediation Policy\n\nAuto-removal is limited to high-confidence findings with a matching removal plan for:\n\n- `unused_controller_method`\n- `unused_form_request`\n- `unused_resource_class`\n- `unused_controller_class`\n- `unused_command_class`\n- `unused_listener_class`\n- `unused_subscriber_class`\n- `unused_job_class`\n\nReport-only categories:\n\n- `unused_policy_class`\n- `unused_model_method`\n- `unused_model_scope`\n- `unused_model_relationship`\n- `unused_model_accessor`\n- `unused_model_mutator`\n\nRollback currently restores only the latest staged change set.\n\n## Limits\n\n- Controller-class deadness is defined by extracted controller methods.\n- Job support is limited to `SomeJob::dispatch(...)`, `dispatch(new SomeJob(...))`, and `Bus::dispatch(new SomeJob(...))`.\n- Model-method support is limited to explicit supported calls from already-reachable surfaces.\n- Scope support is limited to explicit conventional scope-call patterns.\n- Relationship support is limited to explicit access plus supported eager-loading patterns.\n- Accessor support is limited to explicit reads plus append-driven serialization support.\n- Mutator support is limited to explicit writes, `setAttribute(...)`, and supported bulk write paths.\n- The package renders engine explanations; it does not synthesize deeper reasoning than `deadcore` emitted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxhq%2Fdeadcode-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxhq%2Fdeadcode-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxhq%2Fdeadcode-laravel/lists"}