alexivanou/russian-text-bundle
laravel-localization or similar), this could complement existing workflows.HttpFoundation, Validator, Translation). Laravel’s native components may overlap or conflict (e.g., Illuminate\Support\Str vs. Symfony’s StringUtils). Resolving these will require either:
replace in composer.json or aliasing Symfony services.ServiceProvider bindings) or converted to Laravel’s bind()/singleton() syntax.Str::plural() for basic pluralization) or third-party packages (e.g., spatie/laravel-translatable) that overlap with this bundle’s features.voku/helper?app.php language files, trans() helper)? Risk of duplication or conflicts.Cache facade).| Bundle Feature | Laravel Equivalent/Conflict | Integration Strategy |
|---|---|---|
| Pluralization | Str::plural() (basic) |
Extend or replace with bundle’s logic |
| Transliteration | Str::ascii() (limited) |
Use bundle’s Transliteration service |
| Phone Formatting | None | Create Laravel facade/service wrapper |
| Money Spelling | None | Direct integration via service provider |
| Validation | Laravel’s Validator |
Override or extend validator rules |
| Name Inflection | None | Service provider binding |
RussianTextServiceProvider to bind the bundle’s services to Laravel’s container.public function register() {
$this->app->singleton('russian.text.pluralizer', function ($app) {
return new \Alexivanou\RussianTextBundle\Service\Pluralizer();
});
}
RussianText::pluralize()).laravel-russian-text), and adapt it to use Laravel’s dependencies (e.g., replace HttpFoundation with Illuminate\Http).Cache::remember()).composer.json overrides or Laravel’s aliases to resolve Symfony conflicts:
"extra": {
"laravel": {
"dont-discover": ["*"]
}
}
bind() to override Symfony’s container:
$this->app->bind(\Symfony\Component\HttpFoundation\Request::class, function () {
return app(\Illuminate\Http\Request::class);
});
Request object. Replace with Laravel’s Request in wrappers:
$request = app(\Illuminate\Http\Request::class);
$bundleRequest = new \Symfony\Component\HttpFoundation\Request(
$request->query->all(),
$request->request->all(),
[]
);
composer.json."require": {
"symfony/http-foundation": "5.4.*", // Tested version
"symfony/validator": "5.4.*"
}
HttpKernelException) may be opaque in Laravel. Mitigate by:
Log::error($e->getMessage(), $e->getTrace())).try {
$result = RussianText::plural
How can I help you explore Laravel packages today?