Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating BrowserDetector fails when located in vendor #38

Closed
mimmi20 opened this issue Jul 9, 2019 · 4 comments · Fixed by #39
Closed

creating BrowserDetector fails when located in vendor #38

mimmi20 opened this issue Jul 9, 2019 · 4 comments · Fixed by #39
Assignees

Comments

@mimmi20
Copy link

mimmi20 commented Jul 9, 2019

If this project is an dependency of another project, creating a new BrowserDetector instance fails.

 PHP Fatal error:  Uncaught EndorphinStudio\Detector\Exception\StorageException: /home/developer/projects/useragent-parser-comparison/parsers/endorphin-php-4/vendor/endorphin-studio/browser-detector/vendor/endorphin-studio/browser-detector-data/var/yaml is not directory or not exists in /home/developer/projects/useragent-parser-comparison/parsers/endorphin-php-4/vendor/endorphin-studio/browser-detector-data/src/Storage/AbstractStorage.php:39
Stack trace:
#0 /home/developer/projects/useragent-parser-comparison/parsers/endorphin-php-4/vendor/endorphin-studio/browser-detector/src/Detector.php(87): EndorphinStudio\Detector\Storage\AbstractStorage->setDataDirectory('/home/developer...')
#1 /home/developer/projects/useragent-parser-comparison/parsers/endorphin-php-4/scripts/parse-ua.php(25): EndorphinStudio\Detector\Detector->__construct()
#2 {main}
  thrown in /home/developer/projects/useragent-parser-comparison/parsers/endorphin-php-4/vendor/endorphin-studio/browser-detector-data/src/Storage/AbstractStorage.php on line 39
@mimmi20 mimmi20 changed the title creating BrowserDetector fails when localed in vendor creating BrowserDetector fails when located in vendor Jul 9, 2019
@serhiime serhiime self-assigned this Jul 15, 2019
@serhiime
Copy link
Member

@mimmi20 Thanks for your submission. I will try to fix it asap

serhiime added a commit that referenced this issue Jul 15, 2019
- change detector initialization
- add options to constructor
- add reflection to find data dir
serhiime added a commit that referenced this issue Jul 15, 2019
serhiime added a commit that referenced this issue Jul 15, 2019
serhiime added a commit that referenced this issue Jul 15, 2019
serhiime added a commit that referenced this issue Jul 15, 2019
serhiime added a commit that referenced this issue Jul 15, 2019
GH-38 - GH-38 - creating BrowserDetector fails when located in vendor
@serhiime
Copy link
Member

@mimmi20 Test it please. I think i fixed it at 4.0.3 version

@mimmi20
Copy link
Author

mimmi20 commented Jul 15, 2019

@serhiime It works now. Thanks

@serhiime
Copy link
Member

@mimmi20 You are welcome

@endorphin-studio endorphin-studio locked as resolved and limited conversation to collaborators Jul 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants