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
Laravel Stats Phploc

Laravel Stats Phploc Laravel Package

stefanzweifel/laravel-stats-phploc

Fork of sebastianbergmann/phploc used to keep wnx/laravel-stats compatible across Laravel versions by supporting multiple sebastian/version releases. Measures PHP project size and structure (LOC, complexity, dependencies). Not intended for real projects.

View on GitHub
Deep Wiki
Context7

A tool for quickly measuring the size of a PHP project.

Frequently asked questions about Laravel Stats Phploc
Can I use this package directly in a Laravel application as a Composer dependency?
No, this package is not designed for Composer installation. It’s a fork of phploc to support `wnx/laravel-stats` compatibility. Use the official PHAR or Phive instead, as recommended by Sebastian Bergmann.
How do I integrate phploc metrics into a Laravel dashboard?
You’ll need to run the PHAR via `shell_exec()` or an Artisan command, parse the JSON/XML output (if using `--log-json`), and store results in a database. For Laravel-specific dashboards, consider using `wnx/laravel-stats` instead.
What Laravel versions does this package support?
This fork doesn’t explicitly guarantee Laravel version support. It focuses on compatibility with `wnx/laravel-stats` by supporting multiple `sebastian/version` releases, but test thoroughly in your environment.
Is this package safe to use in production?
No, the package explicitly warns against production use. It’s a static analysis tool for CI/CD, local development, or non-critical environments. Avoid runtime dependencies in production.
How do I run phploc in a Laravel CI/CD pipeline?
Add a step to execute the PHAR (e.g., `php phploc.phar src --log-json`) and parse the output. Use it to enforce thresholds (e.g., fail builds if complexity exceeds limits) or log trends over time.
What PHP versions are supported by this fork?
This fork drops support for PHP <8.0. Ensure your Laravel app runs on PHP 8.0+ to avoid compatibility issues with the underlying phploc tool.
How do I handle phploc’s CLI output in Laravel?
Use `shell_exec()` or `Artisan::command()` to run the PHAR, then parse the JSON output (if using `--log-json`) or regex-scrape the CLI output. Store results in a database or log them for later analysis.
What’s the difference between this fork and the original phploc?
This fork is only for maintaining compatibility with `wnx/laravel-stats` across Laravel versions. The original phploc (PHAR) is actively maintained and recommended for standalone use.
Can I use this package to track real-time metrics in a Laravel app?
No, phploc is a batch-process tool for static analysis, not real-time metrics. Run it periodically (e.g., via Laravel scheduler or CI/CD) and cache results for dashboard display.
Who maintains this fork, and how often is it updated?
This fork is maintained by Stefan Zweifel for `wnx/laravel-stats` compatibility but isn’t actively updated. Monitor the repository for changes or rely on the upstream phploc for long-term stability.
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.
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
spatie/mailcoach-vapor