Make giggsey/libphonenumber-for-php an optional dependency? #577
Replies: 3 comments 3 replies
-
The exception would be placed here: https://github.com/kreait/firebase-php/blob/5.x/src/Firebase/Value/PhoneNumber.php#L22 |
Beta Was this translation helpful? Give feedback.
-
I totally agree with you, I've been planning to remove that dependency for a long time now and just can't decide when to remove it. The reason why it's included at all is to prevent a round trip to the Firebase API in case of an invalid phone number and, at the same time, to not re-invent the wheel. But I think now seems to be as good a time as any to finally do it 😅. I'll spin something up and let you know once I have a PR ready. |
Beta Was this translation helpful? Give feedback.
-
It took a little longer than anticipated, but release 5.17 makes |
Beta Was this translation helpful? Give feedback.
-
Hi!
We're evaluating our container images sizes and we discovered a pretty big 21MB package
giggsey/libphonenumber-for-php
that's a dependency of this one, it's our biggest dependency. I inspected the code and seems like phone numbers are only used occasionally on some parts of the library. I was wondering if this dependency could be made optional with an exception on thePhoneNumber
class asking you to composer require it if you want to use those features. What do you think? It would save us quite a lot of space in our containers.I can work on a PR if needed, thanks!
Beta Was this translation helpful? Give feedback.
All reactions