WhichBrowser / Parser-PHP

Browser sniffing gone too far — A useragent parser library for PHP
http://whichbrowser.net
MIT License
1.79k stars 240 forks source link

`PlayStation` needs to be standardized + add PlayStation 5 #624

Closed summercms closed 3 years ago

summercms commented 3 years ago

Some code lines say PlayStation and other code lines say Playstation for the results.

Note I'm talking about the S in the word Station.

Example of correct code line: https://github.com/WhichBrowser/Parser-PHP/blob/da24adc4f4f26002673d236e69b91a10f2fd594c/src/Analyser/Header/Useragent/Browser.php#L1660

Example of incorrect code line: https://github.com/WhichBrowser/Parser-PHP/blob/da24adc4f4f26002673d236e69b91a10f2fd594c/src/Analyser/Header/Useragent/Browser.php#L1368

The correct result should be this:

'model' => 'PlayStation 2', 

Issues

This is causing regex problems in the repo when testing.

Files to be updated

https://github.com/WhichBrowser/Parser-PHP/blob/master/src/Analyser/Header/Useragent/Device/Gaming.php https://github.com/WhichBrowser/Parser-PHP/blob/master/tests/unit/Model/DeviceTest.php https://github.com/WhichBrowser/Parser-PHP/blob/master/src/Analyser/Corrections.php https://github.com/WhichBrowser/Parser-PHP/blob/master/src/Analyser/Header/Useragent/Browser.php https://github.com/WhichBrowser/Parser-PHP/blob/master/data/applications-browsers.php

Testing to be updated

https://github.com/WhichBrowser/Parser-PHP/blob/master/tests/data/gaming/sony.yaml

PlayStation 5 UA

Mozilla/5.0 (PlayStation 5/SmartTV) AppleWebKit/605.1.15 (KHTML, like Gecko)

Mozilla/5.0 (PlayStation 5 3.03/SmartTV) AppleWebKit/605.1.15 (KHTML, like Gecko)