In order to be able to deploy the library in various environments, it would be better to check if the primitive functions/classes of the different providers are present instead of checking if the package has been deployed in a specific vendor directory.
Even if it's a best practice to put external libraries in a vendor directory, all projects don't respect it and can't deploy your great library.
I created a pull request for the DonatjUAParser Provider : #60
Let me know if it makes sense to you
In order to be able to deploy the library in various environments, it would be better to check if the primitive functions/classes of the different providers are present instead of checking if the package has been deployed in a specific vendor directory.
Even if it's a best practice to put external libraries in a vendor directory, all projects don't respect it and can't deploy your great library.
I created a pull request for the DonatjUAParser Provider : #60
Let me know if it makes sense to you