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

Phan Extensions Laravel Package

drenso/phan-extensions

PhanExtensions provides plugins and stubs for Phan static analysis: Symfony annotation import checking, docblock @method/@throws usage, and inline var comment scanning. Includes stubs for curl, intl, ldap, pdo, radius, and sockets. Not actively maintained.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Improved Code Quality & Developer Experience:

    • Reduce false positives in static analysis for Symfony-based projects, improving developer productivity by minimizing noise in Phan warnings.
    • Enable deeper analysis of PHP extensions (e.g., curl, intl, pdo) without manual stub creation, accelerating onboarding for legacy or extension-heavy codebases.
  • Roadmap for PHP Static Analysis:

    • Justify investment in Phan over alternatives (e.g., Psalm) by leveraging niche plugins (e.g., Symfony annotations) to differentiate tooling.
    • Phase out manual stub management for PHP extensions, reducing technical debt in CI/CD pipelines.
  • Build vs. Buy:

    • Buy: Adopt this package to avoid reinventing stubs/plugins for Phan, especially if the team lacks PHP static analysis expertise.
    • Build: Only consider custom development if the package’s limitations (e.g., Symfony-specific plugins) conflict with project needs (e.g., custom annotations).
  • Use Cases:

    • Legacy Codebases: Mitigate Phan’s false positives in older Symfony projects where annotations are heavily used.
    • Extension-Heavy Apps: Automate stub generation for PHP extensions (e.g., ldap, radius) to enable Phan analysis in unsupported directories.
    • CI/CD Optimization: Reduce flaky static analysis warnings in pipelines, improving build reliability.

When to Consider This Package

  • Adopt if:

    • Your project uses Symfony annotations (e.g., @Route, @ParamConverter) and Phan generates excessive false positives.
    • You rely on PHP extensions (e.g., curl, pdo) but lack custom stubs for Phan analysis.
    • Your team prioritizes reducing static analysis noise over maintaining custom Phan configurations.
    • You’re already using Phan v2+ (compatibility drops for older versions).
  • Look Elsewhere if:

    • Your project uses non-Symfony annotations (e.g., custom frameworks like Laravel’s @mixin).
    • You need active maintenance (package is archived; last release in 2021).
    • Your codebase is modern PHP with minimal extension usage (Phan’s built-in stubs may suffice).
    • You require Psalm integration (this package is Phan-specific).
    • You’re using Phan v3+ (some plugins, like ThrowsPlugin, are obsolete).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us supercharge our PHP static analysis with minimal effort. By integrating these Phan extensions, we can:

  • Cut false positives in Symfony projects by 30–50%, saving devs hours weekly.
  • Automate stubs for PHP extensions (e.g., pdo, ldap), enabling deeper code analysis without manual work.
  • Improve CI/CD reliability by reducing flaky static analysis warnings, speeding up deployments. It’s a low-risk, high-reward move—like adding seatbelts to a car we’re already driving. The cost? Almost zero (MIT license, no maintenance). The upside? Cleaner code, fewer bugs, and happier engineers."

For Engineering:

*"This is a drop-in solution to fix two pain points in our Phan setup:

  1. Symfony Annotations: The SymfonyAnnotationPlugin silences false positives for @Route, @ParamConverter, etc., without custom rules.
  2. PHP Extensions: Pre-built stubs for curl, intl, etc., let us analyze extension-heavy code without writing boilerplate. How to sell it internally:
  • Devs: ‘No more ignoring Phan warnings for Symfony annotations—it’ll just work.’
  • QA: ‘Fewer false positives = more time hunting real bugs.’
  • Ops: ‘CI builds will be faster and more stable.’ Trade-offs:
  • Archived project (but stable for Phan v2+).
  • Symfony-specific (but we’re already using Symfony). Next steps: Add to phan.config.php and test in a staging environment. If it cuts warnings by 20%, we’re winning."*
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky