Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Symfony
  3. phone-number-bundle

phone-number-bundle

PHPv1.3.2

A Symfony bundle that integrates Google's libphonenumber for phone number parsing, validation, formatting, and storage.

GitHubGitHub
455 stars145 forks0 contributors

What is phone-number-bundle?

PhoneNumberBundle is a Symfony bundle that integrates Google's libphonenumber library into Symfony applications. It solves the problem of handling international phone numbers by providing tools for parsing, validating, formatting, and storing phone numbers directly within the Symfony framework.

Target Audience

Symfony developers (versions 2-4) who need to handle international phone numbers in their applications, particularly those building forms, APIs, or systems requiring validated phone number data.

Value Proposition

Developers choose this bundle because it provides a seamless, native Symfony integration of the industry-standard libphonenumber library, eliminating the need to manually wire services and offering out-of-the-box support for forms, validation, Doctrine, and templating.

Overview

Integrates libphonenumber into your Symfony2-Symfony4 application

Use Cases

Best For

  • Validating international phone numbers in Symfony form submissions
  • Storing formatted phone numbers in a database using Doctrine
  • Displaying phone numbers in different formats (E.164, national, international) in Twig templates
  • Building forms with country-specific phone number input widgets
  • Serializing phone number objects in APIs using JMS Serializer
  • Checking phone number types (e.g., mobile, landline) within application logic

Not Ideal For

  • Projects using Symfony 5 or higher, as it only supports up to Symfony 4
  • Teams needing active maintenance and security updates, since the project is abandoned
  • Applications that avoid additional bundle dependencies like JMS Serializer or Doctrine Bundle for lightweight setups
  • Developers prioritizing modern PHP features or compatibility with latest library versions

Pros & Cons

Pros

Seamless Symfony Integration

Wraps libphonenumber functionality into native Symfony components like form types (e.g., PhoneNumberType with country choice widgets) and validation constraints, reducing boilerplate code.

Robust Doctrine Support

Provides a custom DBAL type ('phone_number') for persisting phone number objects as E.164 strings, with automatic schema handling and serialization integration for databases.

Extensive Templating Tools

Includes Twig filters (e.g., phone_number_format) and PHP helpers for formatting and type-checking phone numbers in templates, simplifying display logic.

Service Exposure Flexibility

Exposes advanced libphonenumber services (e.g., geocoding, carrier mapping) as Symfony services, allowing direct access to features like timezone lookup without manual wiring.

Cons

Abandoned and Outdated

The README states it's abandoned in favor of a fork (odolbeau/phone-number-bundle), meaning no updates, bug fixes, or support for newer Symfony versions, posing a maintenance risk.

Limited Symfony Version Support

Only compatible with Symfony 2 through 4, making it unsuitable for modern Symfony projects (5+), forcing migration or legacy lock-in.

Dependency-Heavy Features

Full functionality requires optional bundles like JMS Serializer Bundle for serialization and Doctrine Bundle for persistence, adding complexity and potential compatibility issues in minimal setups.

Frequently Asked Questions

Quick Stats

Stars455
Forks145
Contributors0
Open Issues43
Last commit2 years ago
CreatedSince 2013

Tags

#twig-extension#form-types#internationalization#phone-number-validation#bundle#symfony-bundle#php#data-validation#libphonenumber#symfony

Built With

D
Doctrine
P
PHP
T
Twig
S
Symfony

Included in

Symfony1.6k
Auto-fetched 6 hours ago

Related Projects

LiipImagineBundleLiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library

Stars1,706
Forks383
Last commit1 month ago
OneupUploaderBundleOneupUploaderBundle

This Symfony bundle provides a server implementation for handling single and multiple file uploads using either FineUploader, jQuery File Uploader, YUI3 Uploader, Uploadify, FancyUpload, MooUpload, Plupload or Dropzone. Features include chunked uploads, orphanages, Gaufrette and Flysystem support.

Stars606
Forks173
Last commit2 months ago
APYDataGridBundleAPYDataGridBundle

Symfony Datagrid Bundle

Stars492
Forks339
Last commit1 year ago
EightPointsGuzzleBundleEightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony

Stars446
Forks70
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub