Treblle / treblle-php

The official Treblle SDK for PHP. Seamlessly integrate Treblle to manage communication with your dashboard, send errors, and secure sensitive data.
https://www.treblle.com/
MIT License
20 stars 3 forks source link

Trouble installing Trebble #3

Closed india2sarthak closed 2 years ago

india2sarthak commented 2 years ago

Was trying to integrate Treblle via PHP, on your github I can see that the minimum PHP version required is 7.4. However, when I run it with my code, I am getting the following error :

 AH01071: Got error 'PHP message: PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.20. in .../vendor/composer/platform_check.php on line 24'

Here is my composer.json

{
    "require": {
        "treblle/treblle-php": "^2.0"
    }
}

Not sure where I am going wrong. Please help me out

cindreta commented 2 years ago

Hey man. Thank you for the report. Let me check this out and I'll let you know! We'll figure it out no worries 💪🏻

india2sarthak commented 2 years ago

Any updates on this? This is preventing us from using Trebble

cindreta commented 2 years ago

We've been checking a lot of things on our side and didn't see the problems you see. But there are a few more checks we will do tomorrow.

what would be super helpful if we jumped on a call and saw what the rest of your composer looks like. Maybe when you added Treblle composer was trying to update something else that has that requirement. If you want just book a call with me for tomorrow and we'll try live: https://calendly.com/treblle/30-mins if not email me your compose.json on vedran@treblle.com

india2sarthak commented 2 years ago
{
    "require": {
        "firebase/php-jwt": "^5.2",
        "sendgrid/sendgrid": "~7",
        "treblle/treblle-php": "^2.0"
    }
}

This is how my rest of the composer looks like, however this problem only pops up when I try to install treblle.

cindreta commented 2 years ago

Amazing! Thank you let me try this out!

cindreta commented 2 years ago

Hey @india2sarthak we've checked again specifically this time on your version of PHP(8.0.20) as well as using exactly the packages you listed and had NO PROBLEMS. This would leave us to believe that this might be a problem with either loaded PHP modules on your machine or something else.

What I would suggest is try running composer update without including Treblle. So first updated all your dependencies and then run composer require treblle/treblle-php from the console.

If that doesn't work try appending this: composer require treblle/treblle-php --ignore-platform-reqs

Having said all of that we would still like to help you resolve this. Again we think that this is something with your local PHP version. Either it isn't installed correctly or some modules are missing. Are you running this locally or?

india2sarthak commented 2 years ago

Using composer require treblle/treblle-php --ignore-platform-reqs solved the issue. Thanks for the support. Closing this now.