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

Phpstorm Attributes Laravel Package

jetbrains/phpstorm-attributes

JetBrains PhpStorm Attributes for PHP 8+: add IDE-only attributes like Deprecated, ArrayShape, ObjectShape, and Immutable to improve code completion and static analysis. Bundled with PhpStorm 2020.3+, optional composer dev dependency to avoid “Class not found” in other tools.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Purely dev-time dependency with zero runtime impact. Integrates natively with PhpStorm's static analysis engine without altering application architecture or dependencies. Works seamlessly with PHP 8+ projects and Laravel's existing toolchain.

Integration feasibility: Extremely low effort. Single composer require --dev command suffices. No code refactoring needed beyond applying attributes to relevant code elements. Fully compatible with Composer-based workflows and IDE-driven development.

Technical risk: Minimal. No runtime dependencies or conflicts. Primary risks are developer misapplication (e.g., incorrect ArrayShape definitions causing false IDE warnings) and potential IDE version mismatches if team uses outdated PhpStorm versions. No security implications.

Key questions: How do static analysis tools (Psalm/PHPStan) integrate with these attributes? What's the process for ensuring consistent PhpStorm versioning across teams? Are there edge cases where attributes might conflict with other PHP 8 features like attributes in metadata?

Integration Approach

Stack fit: Requires PHP 8.0+ (for attribute syntax), PhpStorm 2020.3+, and Composer. Fully compatible with Laravel projects as a dev-only dependency. No production stack impact or configuration changes needed.

Migration path: Install as dev dependency → train team on core attributes → incrementally apply to new code (e.g., #[Deprecated] on deprecated methods) → retroactively add to high-value areas (DTOs, API responses). Zero-breaking changes to existing code.

Compatibility: Works with all PHP versions (attributes ignored by non-PhpStorm tools). Requires PhpStorm ≥2020.3 for full feature support. Backward-compatible for PHP ≤7.4 via single-line attribute syntax. No conflicts with other Composer packages.

Sequencing: 1) Add to composer.json as dev dependency. 2) Establish team guidelines for attribute usage (e.g., "use ObjectShape for all untyped object returns"). 3) Apply to new features first. 4) Prioritize retrofitting critical paths (e.g., API controllers, services with complex return types).

Operational Impact

Maintenance: Minimal. JetBrains maintains the package with infrequent updates (last release Nov 2024). No ongoing configuration or monitoring required. Updates only needed when new PhpStorm versions introduce changes (rare).

Support: Official JetBrains support via YouTrack issue tracker. Community support through GitHub issues. No dedicated internal

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
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
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation