for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use DebugBar\DataCollector\TimeDataCollector;
class DebugBarTimeDataCollector extends TimeDataCollector
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Add in a warning or danger notification if the request time is greater than the configured thresholds
*
* {@inheritDoc}
*/
public function getWidgets()
$widgets = parent::getWidgets();
$widgets['time']['warn'] = false;
// Request duration rather than Request Duration
$widgets['time']['tooltip'] = ucfirst(strtolower($widgets['time']['tooltip']));
$upperThreshold = DebugBar::config()->warn_request_time_seconds;
$warningRatio = DebugBar::config()->warn_warning_ratio;
// Can be disabled by setting the value to false
if (!is_numeric($upperThreshold)) {
return $widgets;
}
$warningThreshold = $upperThreshold * $warningRatio;
if ($this->getRequestDuration() > $warningThreshold) {
$widgets['time']['indicator'] = 'PhpDebugBar.DebugBar.WarnableRequestTimeIndicator';
$widgets['time']['warn'] = 'warning';
$widgets['time']['warn_threshold_seconds'] = $warningThreshold;
if ($this->getRequestDuration() > $upperThreshold) {
$widgets['time']['warn'] = 'danger';
$widgets['time']['warn_threshold_seconds'] = $upperThreshold;
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.