misd/phone-number-bundle
Symfony bundle integrating Google’s libphonenumber via giggsey/libphonenumber-for-php. Provides services and helpers to parse, validate, format, and geocode phone numbers in Symfony 2–4 apps. Abandoned; use odolbeau/phone-number-bundle instead.
giggsey/libphonenumber-for-php, but the bundle’s Symfony-specific wrappers (e.g., PhoneNumberType form field, Doctrine DBAL type) would need replacement.PhoneNumberUtil) → Directly usable in Laravel with minimal effort.giggsey/libphonenumber-for-php is PHP-native and Symfony-agnostic.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony Lock-in | High | Abstract Symfony-specific code into Laravel-compatible services. |
| Doctrine Migration | Medium | Replace with Eloquent custom attributes or database casts. |
| Twig/Blade Gap | Low | Use Laravel helpers or Blade directives. |
| Form Integration | Medium | Replace with Laravel Validation Rules or Form Requests. |
| Deprecated Features | Low | Bundle is abandoned (migrated to odolbeau/phone-number-bundle), but core libphonenumber is stable. |
libphonenumber version supports offline geocoding.odolbeau/phone-number-bundle (if Symfony-compatible).giggsey/libphonenumber-for-php directly.| Step | Action | Effort | Laravel Equivalent |
|---|---|---|---|
| 1 | Install giggsey/libphonenumber-for-php |
Low | composer require giggsey/libphonenumber-for-php |
| 2 | Replace Symfony PhoneNumberUtil with direct libphonenumber\PhoneNumberUtil |
Low | Inject via Laravel Service Provider |
| 3 | Replace Doctrine DBAL type with Eloquent cast | Medium | Custom PhoneNumber cast |
| 4 | Replace Twig filters with Blade directives | Medium | Blade::directive() |
| 5 | Replace Form PhoneNumberType with Laravel Validation |
Medium | Custom PhoneNumber rule |
| 6 | Replace geocoding services with direct libphonenumber calls |
Low | N/A (same API) |
libphonenumber version supports it).AppKernel registration → Use Laravel Service Providers.libphonenumber-for-php.libphonenumber versions.libphonenumber functionality (Google support).libphonenumber is CPU-intensive for parsing/geocoding.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Invalid phone number input | Validation fails → user error | Graceful fallback (e.g., "Please enter a valid number"). |
| Database schema mismatch | Eloquent cast fails → data corruption | Migrations to convert old formats to E.164. |
| Libphonenumber version breakage |
How can I help you explore Laravel packages today?