8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

symfony/stopwatch required #238

Closed HEKET313 closed 5 years ago

HEKET313 commented 5 years ago

| Symfony version | 4.1.6 | Bundle version | 7.4.0

I executed composer update, your bundle updated and I've got an error "Eightpoint GuzzleBundle profiling requires "symfony/stopwatch" package" on "cache clear" stage. I see that your package requires this package under dev environment, but why it requires this package after including into project?

image

gregurco commented 5 years ago

Hello. Do you run composer update in prod environment? Bundle requires symfony/stopwatch package in dev only and normally it should be installed in dev.

HEKET313 commented 5 years ago

Nope, I don't run composer update in prod, but packages don't install their dev requirements even under dev environment. This is normal composer behavior

HEKET313 commented 5 years ago

Ok. I've resolved this issue. I've added to my config following line:

eight_points_guzzle:
    profiling: false

But I still think that you have a bug. The fact that I use your bundle under dev environment doesn't mean that I want to profile my requests

gregurco commented 5 years ago

Yep, you are right. Stopwatch component is included in website-skeleton and not included in skeleton. Probably you're using clean version. Please install it with composer require --dev symfony/stopwatch.

gregurco commented 5 years ago

It's not a bug, it's requirement, but only in dev. We don't want to force it to install in prod too, because it's useless in prod. That's why there is written that symfony/stopwatch is required and you can install it manually.

HEKET313 commented 5 years ago

I won't argue, but I don't agree. Anyway, thank you for your time and fast response

gregurco commented 5 years ago

I agree with you too. I will try to find more elegant solution :slightly_smiling_face: Thank you for reporting.

gregurco commented 5 years ago

@HEKET313 fixed in PR #239. Thank you for reporting this issue :slightly_smiling_face: