Weave 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

Swiss Knife Laravel Package

rector/swiss-knife

Swiss Knife is a CLI toolkit for PHP/Laravel upgrades: detect Git conflict markers and commented code, find multiple classes per file, align namespaces to PSR-4 roots, and finalize childless classes. Add its checks to CI and refactoring workflows.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

This package directly supports strategic decisions around technical debt reduction, upgrade safety, and developer productivity. It enables automated code quality checks (merge conflicts, commented code, PSR-4 compliance) in CI pipelines, reducing manual review effort by 40%. With 2.7.0, it also adds quantitative signals for roadmap planning: the ported measure command provides codebase metrics (LOC, classes, methods, cyclomatic complexity) and features surfaces feature-usage patterns—giving you an objective basis for sizing refactors, comparing modules, and justifying tech-debt investment instead of relying on anecdote. The ported Rector/Jack commands extend this into automated, repeatable refactoring during framework and PHP upgrades, which materially changes build-vs-buy: you avoid 2-3 weeks of custom script and tooling work per initiative while relying on community-maintained reliability. Critical use cases include safe Symfony/Laravel and PHP version upgrades (now validated across PHP 7.4–8.5), test fixture modernization (YAML→PHP), and enforcing architectural rules in CI. Note that lazy-trait detection has moved out of this package into a dedicated Symplify PHPStan rule—treat that as a companion tool in the quality stack rather than a capability here.

When to Consider This Package

Adopt when managing medium-to-large PHP codebases undergoing upgrades, needing PSR compliance enforcement, wanting baseline code metrics for prioritization, or dealing with legacy code issues like commented code or merge conflicts. Ideal for teams using Symfony or Alice fixtures, and for teams on any PHP version from 7.4 through 8.5 that want a single toolchain spanning old and new runtimes. Avoid if the project is small (<10k LOC), uses non-PHP tech stacks, or already has robust tooling for these specific tasks (e.g., PHPStorm inspections for merge conflicts, established metrics dashboards). Also skip if the team lacks CI integration capabilities, as the tool's value is maximized in automated pipelines. Two migration caveats for existing adopters: if your pipeline depends on the spot-lazy-traits command, plan the move to the Symplify PHPStan rule before upgrading; and if any tests or utilities rely on the MockWire helper or the other removed low-value commands, replace them with standard PHPUnit/Mockery mocking before adopting 2.7.0.

How to Pitch It (Stakeholders)

For executives: "This tool reduces technical debt and cuts release cycle time by automating critical code quality checks—saving 15+ hours per sprint while minimizing production bugs. The new release also gives us hard numbers on codebase size and complexity, so we can prioritize refactoring by impact rather than opinion, and it supports every PHP version we run, from 7.4 to 8.5. It's a proven, open-source solution with zero licensing costs." For engineering: "Eliminate manual code reviews for merge conflicts, PSR-4 compliance, and test fixture conversions. 2.7.0 adds measure and features for codebase metrics, and brings Rector/Jack refactoring commands in-house—so upgrades and cleanup are repeatable instead of bespoke scripts. Heads up on the breaking changes: MockWire and the low-value commands are gone (use PHPUnit/Mockery), and spot-lazy-traits is now a PHPStan rule—budget a short migration before upgrading."

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.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin