Skip to content

Add Laravel storage disk name intelligence - #371

Merged
AJenbo merged 5 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-storage-disk-names
Sep 7, 2026
Merged

Add Laravel storage disk name intelligence#371
AJenbo merged 5 commits into
PHPantom-dev:mainfrom
shuvroroy:feat/laravel-storage-disk-names

Conversation

@shuvroroy

Copy link
Copy Markdown
Contributor

Summary

Laravel storage disk names now behave like navigable config symbols in every direct storage context:

  • Storage::disk()
  • Storage::fake() and Storage::persistentFake()
  • Scalar and array arguments to Storage::forgetDisk()
  • Laravel's #[Storage] contextual attribute, including named arguments

Completion reads filesystems.disks.*; hover and Ctrl+Click resolve the matching config entry; find-references connects storage calls, generic config access, and the config declaration.

Runtime semantics

The diagnostic behavior follows Laravel rather than treating every occurrence as a required config read:

  • disk() diagnoses an unknown configured disk.
  • fake() and persistentFake() may create ad-hoc test disks, so they remain valid without a declaration.
  • forgetDisk() accepts a scalar or array and tolerates names that are not currently configured.

Array keys, nested values, dynamic expressions, unrelated Storage classes, and incorrect named parameters are deliberately excluded.

Why this is separate

This is the focused storage-disk layer split from #368 after review feedback. It contains only the Laravel storage task and its tests, docs, and demo changes.

Depends on:

The dependency is the independent filesystem-alias fix discovered while testing this work. Once #369 lands, this branch can be rebased and the PR will show only the storage feature.

Verification

  • 13,667 tests passed; 2 intentionally skipped
  • 734/734 changed executable Rust lines covered (100.00%)
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check
  • PHP playground syntax checks and runtime assertions
  • Laravel demo syntax check
  • Laravel analyzer reports exactly the three intentional demo errors

Checklist

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, examples/)
  • I have updated the config schema (config-schema.json)
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

🤖 Generated with Codex

@codecov-commenter

codecov-commenter commented Aug 17, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 98.95178% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/completion/laravel_string_keys.rs 99.12% 4 Missing ⚠️
src/indexing/init.rs 55.55% 4 Missing ⚠️
src/symbol_map/extraction/laravel.rs 99.53% 1 Missing ⚠️
src/virtual_members/laravel/config_keys.rs 98.64% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@shuvroroy
shuvroroy marked this pull request as ready for review August 17, 2026 04:17
@AJenbo AJenbo added this to the Sprint 7 milestone Aug 18, 2026
# Conflicts:
#	docs/CHANGELOG.md
#	docs/todo.md
#	src/analyse/run.rs
#	src/blade/call_site_inference.rs
#	src/completion/laravel_string_keys.rs
#	src/symbol_map/extraction/laravel.rs
#	tests/integration/main.rs
@shuvroroy

Copy link
Copy Markdown
Contributor Author

@AJenbo I already resolved the conflicts for you so it's ready for review again

@AJenbo
AJenbo force-pushed the feat/laravel-storage-disk-names branch from fea27da to 993d0a2 Compare September 7, 2026 00:37
@AJenbo
AJenbo merged commit 20650a9 into PHPantom-dev:main Sep 7, 2026
8 checks passed
@AJenbo

AJenbo commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Thanks. I handled some regressions, please make sure it still works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants