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

Phpmnd Laravel Package

povils/phpmnd

PHPMND detects magic numbers in PHP code to improve readability and maintainability. Flags numeric literals that should be constants (0 and 1 ignored by default). Install via Composer and run vendor/bin/phpmnd locally or globally in CI and dev workflows.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Code Quality & Maintainability: Continued enforcement of consistent naming conventions for hardcoded values, now with expanded compatibility for modern PHP/Symfony stacks (PHP 8.5, Symfony 8). Strengthens alignment with long-term goals for scalable, self-documenting codebases in teams adopting newer PHP versions.
  • Developer Experience (DX): Reduced friction for teams using Symfony 8 or PHPUnit 9, ensuring the tool remains relevant for modern Laravel ecosystems. Eliminates adoption barriers for projects upgrading dependencies.
  • Build vs. Buy: Reinforces the package as a low-cost, high-value alternative to custom solutions, especially for teams migrating to PHP 8.5 or Symfony 8. Justifies incremental adoption in CI/CD pipelines without vendor lock-in.
  • Roadmap Prioritization: Validates the package’s forward compatibility, reducing risk for teams planning to upgrade PHP/Symfony in the next 12–18 months. Can be positioned as a "future-proof" linting layer.

When to Consider This Package

  • Adopt if:

    • Your codebase uses Symfony 8 or plans to upgrade (now fully supported).
    • You’re on PHP 8.5 (or testing PHP 8.5+) and need magic-number detection.
    • Your team uses PHPUnit 9 (compatibility ensures no integration friction).
    • You’re evaluating long-term tooling and want to avoid rework when upgrading PHP/Symfony.
    • Your CI/CD pipeline already includes PHPStan/PHP-CS-Fixer (seamless integration).
  • Look elsewhere if:

    • You’re locked into PHP <8.0 or Symfony <6 (package drops support for older versions).
    • Your project explicitly avoids PHPUnit 9 or Symfony 8 (though this is rare for new Laravel projects).
    • You prioritize minimal dependencies and the package’s Symfony/PHPUnit ties are a concern (though core functionality remains lightweight).
    • Your team already uses SonarQube with built-in magic-number rules (though this package remains faster and more targeted).

How to Pitch It (Stakeholders)

For Executives:

"This update ensures phpmnd works flawlessly with Symfony 8 and PHP 8.5—the same modern stack we’re targeting for [Project X]’s refactor. It’s like upgrading your car’s safety features without changing the engine: same reliability, but now it handles the latest highways. For example, if we upgrade to Symfony 8 next quarter, this tool will automatically catch undocumented values in new controllers, reducing debug time. It’s a 5-minute setup with a 5-year payoff. Competitors charge for this; this is open-source and just got more future-proof."

For Engineering:

*"v3.6.1 adds official support for Symfony 8 and PHP 8.5, which means:

  • Zero integration issues if you’re using PHPUnit 9 or Symfony 8.
  • Future-proofing: No need to migrate to a different tool when upgrading PHP. Action item: If your team is on Symfony 7/PHP 8.1+, test this in staging. For others, this is a green light to add it to your linting suite. Pair with a 1-hour workshop on replacing magic numbers with constants—we’ll provide templates."*

For Developers:

*"Good news: phpmnd now plays nice with Symfony 8 and PHP 8.5! That means if you’re using the latest PHPUnit or Symfony, you can run:

composer require --dev povils/phpmnd:^3.6
./vendor/bin/phpmnd check src/ --config=phpmnd.xml

and it’ll work without a hitch. No more ‘works on my machine’ excuses when upgrading dependencies. Pro tip: Use the --allow-magic-numbers flag for known safe values (e.g., true/false) to avoid noise."*

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