Remove fetch dependency#77
Conversation
Greptile SummaryThis PR removes Confidence Score: 5/5Safe to merge after updating the PR description to reflect the actual change (dependency removal, not a version bump) No functional bugs found; the AMQP passive-declare approach is correct and the channel-null handling on error is appropriate. The only finding is a P2 PR description inaccuracy. No files require special attention Important Files Changed
Reviews (2): Last reviewed commit: "Remove fetch dependency" | Re-trigger Greptile |
d92c83b to
9b4bcc0
Compare
Summary
utopia-php/fetchdependency from Queuequeue_declare(..., passive: true)0, matching the previous HTTP 404 behaviorContext
utopia-php/fetchwas only used insrc/Queue/Broker/AMQP.phpto call RabbitMQ's HTTP management API fromgetQueueSize().RabbitMQ already returns the queue depth in the AMQP
queue.declare-okresponse asmessage_count, so the broker can get queue size through its existing AMQP channel instead of requiring the HTTP management plugin and an extra HTTP client dependency.A passive declare closes the channel when the queue does not exist, so the implementation catches RabbitMQ's 404 channel exception, clears the cached channel, and returns
0to preserve the old behavior.Test Plan
php -l src/Queue/Broker/AMQP.phpcomposer validate --no-check-publishvendor/bin/pint --testvendor/bin/phpstan analyse --no-progress --memory-limit=512M