yakeing/php_badge
A lightweight PHP library for generating SVG badges for READMEs, CI status, versions, downloads, and custom labels. Create shields-style badges with simple PHP calls and no external badge services.
Architecture fit
App\Support\BadgeRenderer) rather than a facade. It should never leak into domain code./badge/{status}.svg endpoint). The former is the lower-risk default.Integration feasibility
composer require yakeing/php_badge is the entire install. Real gate is the PHP version constraint in composer.json — the package predates the PHP 8 ecosystem and likely targets ^7.x.--ignore-platform-reqs (unacceptable in CI), a fork with a widened constraint, or exclusion. This must be resolved in a spike, not assumed.Technical risk
<text> yields stored XSS if the SVG is served same-origin. Must audit escaping before any user-facing endpoint.Key questions
composer.json permit PHP 8.2/8.3, and does it emit deprecations under E_ALL?Stack fit
BadgeRenderer::render(array $params): string) keeps the vendor call site to a single line.response($svg, 200, ['Content-Type' => 'image/svg+xml']). Add Cache-Control and a CSP img-src/sandbox consideration if served same-origin.Migration path
badges.driver = php_badge | shields | fork). Alternatives include shields.io/staticbadge endpoints, badgen, or a ~200-line internal SVG builder.packages/php_badge with a private VCS entry, not a workaround in CI.Compatibility
composer audit and Renovate/Dependabot ignore lists so the frozen state is explicit.Sequencing
Maintenance
Support
Scaling
Failure modes
TypeError/removed-function errors after a PHP minor upgrade on the abandoned codebase.composer install in CI for everyone.Ramp-up
How can I help you explore Laravel packages today?