ash-jc-allen / short-url

A Laravel package for creating shortened URLs for your web apps.
MIT License
1.25k stars 158 forks source link

Use WhichBrowser/Parser-PHP #250

Closed marzvrover closed 4 months ago

marzvrover commented 5 months ago

This uses WhichBrowser/Parser-PHP as a replacement for jenssegers/agent which fixes #227 and closes #249.

It would be good to test this using an actual project, which I won't be able to commit to for awhile. The tests using mocks works though. WhichBrowser/Parser-PHP looks like it contains a lot of additional data that could be supported by a future version of this project.

ash-jc-allen commented 5 months ago

Hey @marzvrover! Thanks for this PR, I really appreciate the effort! I'm super busy at the moment, but I'll check this out as soon as I can 😄

ash-jc-allen commented 4 months ago

Hey @marzvrover! As I mentioned in #249, I'm really sorry for taking so long to get back to you on this one. Huge thank you for your effort on this PR!

To reduce the chances of future blockers, I've created a thin abstraction layer that wraps the user agent parsing up. This means it'll be much easier to switch in the future if needed. I've added this in https://github.com/ash-jc-allen/short-url/pull/256

So although I've not directly used your work added in this PR here, I have taken a lot of inspiration from it. So I'll make sure that you get a mention in the Short URL v8 changelog. I really appreciate your effort on this, thanks! 😄