beyondcode / beyondcode/invoker-community

Creating Trend widget causes a FatalError

Open
#352 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
1
PR merge metrics
No merged PRs in 30d

Description


------
**OS**: darwin
**Invoker Version**: 2.13.1
**Laravel Version**: 10.17
**Local project**: true
**PHP Binary**: /opt/homebrew/Cellar/php/8.2.8/bin/php
**Route**: /project/index?class=App%5CModels%5CInvoice&time=1692027774627&project=local-hyLt5zswyaqmohewQmjtHR

**Error**:
```
Symfony\Component\ErrorHandler\Error\FatalError

Declaration of _HumbugBox691400d5ac8c\Invoker\Metrics\MySqlTrendDateExpression::getValue() must be compatible with Illuminate\Database\Query\Expression::getValue(Illuminate\Database\Grammar $grammar)

at phar:/Applications/Invoker.app/Contents/Resources/invoker_l10.phar/src/Metrics/MySqlTrendDateExpression.php:7
3▕ namespace _HumbugBox691400d5ac8c\Invoker\Metrics;
4▕
5▕ class MySqlTrendDateExpression extends \_HumbugBox691400d5ac8c\Invoker\Metrics\TrendDateExpression
6▕ {
➜ 7▕ public function getValue()
8▕ {
9▕ switch ($this->unit) {
10▕ case 'months':
11▕ return "date_format({$this->wrap($this->column)}, '%Y-%m')";

+6 vendor frames 

7 phar:/Applications/Invoker.app/Contents/Resources/invoker_l10.phar/src/Metrics/TrendDateExpressionFactory.php:16
Composer\Autoload\ClassLoader::loadClass("'_HumbugBox691400d5ac8c\\Invoker\\Metrics\\MySqlTrendDateExpression'")

8 phar:/Applications/Invoker.app/Contents/Resources/invoker_l10.phar/src/Actions/CalculateWidgetAction.php:104
_HumbugBox691400d5ac8c\Invoker\Metrics\TrendDateExpressionFactory::make("class Illuminate\Database\Eloquent\Builder { protected $query = class Illuminate\Database\Query\Builder { public $connection = class Illuminate\Database\MySqlConnection { ... }; public $grammar = class Illuminate\Database\Query\Grammars\MySqlGrammar { ... }; public $processor = class Illuminate\Database\Query\Processors\MySqlProcessor { ... }; public $bindings = [...]; public $aggregate = NULL; public $columns = NULL; public $distinct = FALSE; public $from = 'invoices'; public $indexHint = NULL; public $joins = NULL; public $wheres = [...]; public $groups = NULL; public $havings = NULL; public $orders = NULL; public $limit = NULL; public $offset = NULL; public $unions = NULL; public $unionLimit = NULL; public $unionOffset = NULL; public $unionOrders = NULL; public $lock = NULL; public $beforeQueryCallbacks = [...]; public $operators = [...]; public $bitwiseOperators = [...]; public $useWritePdo = FALSE }; protected $model = class App\Models\Invoice { protected $connection = NULL; prote...", "'created_at'", "'days'")

Whoops\Exception\ErrorException

Declaration of _HumbugBox691400d5ac8c\Invoker\Metrics\MySqlTrendDateExpression::getValue() must be compatible with Illuminate\Database\Query\Expression::getValue(Illuminate\Database\Grammar $grammar)

at phar:/Applications/Invoker.app/Contents/Resources/invoker_l10.phar/src/Metrics/MySqlTrendDateExpression.php:7
3▕ namespace _HumbugBox691400d5ac8c\Invoker\Metrics;
4▕
5▕ class MySqlTrendDateExpression extends \_HumbugBox691400d5ac8c\Invoker\Metrics\TrendDateExpression
6▕ {
➜ 7▕ public function getValue()
8▕ {
9▕ switch ($this->unit) {
10▕ case 'months':
11▕ return "date_format({$this->wrap($this->column)}, '%Y-%m')";

+1 vendor frames 

2 [internal]:0
Whoops\Run::handleShutdown()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.