jawira/plantuml-encoding
PHP library providing PlantUML text encoding helpers. Use encodep() to convert an @startuml diagram (UTF-8) into the compressed URL-safe string used by plantuml.com. Includes encode6bit(), append3bytes(), and encode64().
Architecture fit: The package remains a lightweight, standalone utility with no external dependencies, maintaining strong alignment with Laravel’s service container and dependency injection patterns. The addition of composer normalize (a tool for standardizing Composer configurations) does not impact core functionality or architecture. The package continues to operate purely at the PHP layer, requiring no external services or complex configuration.
Integration feasibility: Still high. Installation via Composer remains straightforward, and the API (encode() method) is unchanged. The new release introduces no breaking changes or new dependencies, preserving the package’s plug-and-play nature. A facade or service provider could still be added for convenience, though it is not required.
Technical risk: Reduced to Low (previously Moderate).
composer normalize), indicating stability and a focus on process rather than breaking changes.Key questions:
Stack fit: Unchanged. The package remains ideal for Laravel, with no breaking changes to its usage pattern:
use Jawira\PlantUmlEncoding\Encoder;
$encoded = Encoder::encode('@startuml\n...@enduml');
No Laravel-specific adapters are required, though a service provider could still be added for DI.
Migration path: Unchanged. The package continues to replace server-based PlantUML rendering (e.g., HTTP calls to http://www.plantuml.com/plantuml/...) with local encoding. Example migration:
file_get_contents("http://www.plantuml.com/plantuml/svg/{$encoded}");$encoded = Encoder::encode($uml); $url = "https://www.plantuml.com/plantuml/svg/{$encoded}";Compatibility: Confirmed for PHP 7.4+ (aligned with Laravel 8+). The CI updates in v1.1.1 suggest compatibility is actively maintained, though explicit version constraints should be reviewed in composer.json.
Sequencing:
composer require jawira/plantuml-encoding:^1.1.1.$this->app->singleton(Encoder::class, function ($app) {
return new Encoder();
});
Maintenance: Reduced effort.
composer normalize) suggest a focus on stability over breaking updates.Support: Minimal overhead.
Scaling: No impact.
Failure modes: Low risk.
Ramp-up: Fast adoption.
How can I help you explore Laravel packages today?