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

Php Code Browser Laravel Package

zerkalica/php-code-browser

A lightweight PHP package for exploring source code, navigating files, and inspecting classes and methods in a project. It provides a simple interface for understanding package internals, browsing code structure, and quickly locating implementation details during development.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit zerkalica/php-code-browser is not a library you call from application code — it is the historical phpcb CLI from Mayflower's PHP_CodeBrowser, a static-site generator that ingests QA artifacts and emits syntax-highlighted HTML source pages with error/coverage overlays. That makes it a build-pipeline tool, not a Laravel runtime dependency. It has no service provider, no config contract, no facade, and no events; wiring it into a Laravel app means shelling out to a binary from a Composer script or an Artisan command. Architecturally it sits next to PHPUnit/PHPCS in the require-dev + CI layer, and should never appear in the production autoload graph.

Integration feasibility Feasible only as an isolated dev tool. Expected inputs are XML reports (PHPUnit coverage/Clover, PHPCS checkstyle, PHPMD, CPD); expected output is a directory of static HTML. A wrapper command that runs the analysis tools, points phpcb at the report directory, and writes to storage/app/reports/code-browser is ~50 lines. The realistic blockers are version drift: the tool's PEAR-era dependencies (Console_CommandLine, Log, source-tokenizing libraries) and PHP 5/7-era syntax generally collide with PHP 8.2+, PHPUnit 10/11, and PHPCS 3.x report schemas. Composer resolution in a modern Laravel 10/11 app is likely to fail outright, which pushes you to a pinned Docker image rather than an in-repo dependency.

Technical risk High, and asymmetric — the upside is cosmetic developer ergonomics, the downside is owning unmaintained code.

  • Abandonment: the fork shows 0 stars, 0 dependents, and a composite score of 0.03. That is not a quality signal so much as an absence of signal: no downstream validation, no issue traffic, no release cadence. The upstream project is itself effectively dormant.
  • Fork provenance: zerkalica is a personal fork of mayflower/PHP_CodeBrowser; divergence from upstream is undocumented, so bug reports and patches have nowhere to land.
  • Runtime compatibility: high likelihood of PHP 8 incompatibilities (removed functions, deprecations emitted into HTML output), and no PHPUnit 10+/PHPCS 3.x schema support.
  • Security surface: dev-only, so exposure is limited, but an unmaintained transitive dependency tree will trip composer audit and SCA gates; expect to add exclusions or accept noise.
  • Licensing: BSD-3-Clause is permissive and commercially safe; retain the copyright notice and don't imply endorsement.

Key questions

  1. What is the actual user need — an in-app browsable code/coverage report, or a CI artifact for reviewers? If CI, native tooling likely already covers it.
  2. Does the fork materially differ from upstream, or is it a vanity mirror we could replace with a pinned upstream tag?
  3. Which PHP version and which QA tool report formats are actually required, and does the tool parse them without patching?
  4. Is there appetite to fork-and-maintain (est. 1–2 eng-weeks/year), or is this a one-off spike that gets discarded?
  5. Does the org already run SonarQube, GitLab Code Quality, or Jenkins coverage plugins that subsume this capability?

Integration Approach

Stack fit Poor as a Composer dependency; acceptable as a containerized sidecar. Treat it as infrastructure-in-a-box: a small Dockerfile with the legacy PHP runtime plus phpcb, invoked from CI or a local Make target. Laravel's role is limited to (a) a composer script alias, and (b) optionally an Artisan command that shells out and serves the output behind auth middleware from public/reports/.

Migration path Because there is nothing to migrate from in the current stack, frame this as a build-vs-buy-vs-drop comparison rather than an integration:

Option Effort Maintenance Verdict
Adopt this fork 2–3 days (Docker + wrapper) You own it Only if HTML source-browsing is a hard requirement
Upstream Mayflower PHP_CodeBrowser 1–2 days, same risks Slightly better provenance Prefer over the fork if the fork adds nothing
phpunit --coverage-html + GitLab/Jenkins HTML publisher <1 day, zero deps Vendor-maintained Strong default
SonarQube / static-analysis platform 1–2 weeks Vendor-maintained Right answer at org scale

Compatibility Pin the tool to a specific PHP minor (7.4 or 8.0) inside its own image; do not attempt to co-resolve its dependencies with the app's composer.json. Generate reports with the same PHPUnit/PHPCS versions the tool understands, or normalize artifacts through an XSLT/JSON shim before feeding it. Verify the checkstyle and Clover schemas explicitly — this is where silent mis-parsing hides.

Sequencing

  1. Spike (1 day): throwaway branch, containerized run against one representative Laravel module; capture actual output quality.
  2. Gate: confirm it renders correctly on PHP 8.x-era artifacts and that generate-time is tolerable.
  3. Isolate: bake into a dedicated CI job/image, publish artifacts, no app dependency changes.
  4. Wrap: if retained, add reports:code-browser Artisan command + storage-backed output path + auth-gated route.
  5. Decide: schedule an explicit four-week re-evaluation against the incumbent CI report viewer; default to sunset.

Operational Impact

Maintenance Effectively zero upstream maintenance means full ownership transfer to us. Budget for: PHP runtime upgrades, patching report-schema drift after every PHPUnit/PHPCS bump, and periodic SCA triage of an unmaintained dependency tree. A realistic steady-state cost is 1–2 engineer-days per year plus reactive firefighting on tool upgrades — acceptable for a nice-to-have, expensive for a nice-to-have nobody uses.

Support No vendor, no SLA, no maintainer to escalate to. Internal runbooks must be written from scratch, and institutional knowledge will concentrate in one or two engineers. Add a README in the tooling repo documenting the pinned PHP version, input artifact formats, and the exact failure signatures.

Scaling Weak. HTML generation is per-file and single-threaded; on codebases above a few thousand files expect multi-minute runs and large artifact sizes (syntax-highlighted markup is verbose — hundreds of MB for monorepos). Artifact storage and CI retention policies need tuning, and the output must be sharded or pruned by module to stay usable. This is the dimension most likely to force abandonment as the codebase grows.

Failure modes

  • Silent mis-parse of a changed XML schema → report renders but shows no errors, which is worse than failing loudly. Mitigate with a smoke assertion on a known-bad file.
  • PHP deprecation/notice output injected into HTML → corrupted pages.
  • Non-zero exit on partial failure swallowed by a || true in CI → stale reports presented as current.
  • Missing/empty artifact directory from an upstream test job → empty browser, no error.
  • Composer resolution failure if anyone adds it to composer.json instead of the isolated image.

Ramp-up Low to learn, moderate to own. A Laravel developer can be productive with the CLI in half a day and can build the Artisan wrapper in one to two days. Understanding why it breaks — tokenizer behavior, report schemas, legacy PHP quirks — takes considerably longer and is the real cost. Restrict ownership to one named engineer, document the pin, and keep the container image as the single source of truth so the tool can be deleted cleanly if the four-week evaluation says so.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core