cbschuld / Browser.php

A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.
https://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
MIT License
579 stars 303 forks source link

Consider using the PSR-4 autoloader #75

Open peter279k opened 5 years ago

peter279k commented 5 years ago

As title, it seems that this class still uses the classmap approach to load the Browser class in composer.json.

I think we can consider using the PSR-4 autoloader and the advantages are as follows:

Once this issue is accepted, I can help this issue :).

cbschuld commented 5 years ago

@peter279k - I am completely fine with this; we could issue a 2.x version that has this breaking change for those importing it w/ the classmap model

peter279k commented 5 years ago

@cbschuld, thanks for your reply and concern.

I think we can mark the 2.x milestone for this issue and it can let us know that it will be the psr-4 compliant autoloader since the package version is 2.x.