Kreyu / data-table-bundle

Streamlines creation process of the data tables in Symfony applications. NOT PRODUCTION READY.
https://data-table-bundle.swroblewski.pl
MIT License
75 stars 14 forks source link

Pass row data as second argument of the `formatter` column option #126

Closed Kreyu closed 1 month ago

Kreyu commented 1 month ago

Currently, the formatter option supports two arguments:

  1. data of the column
  2. an instance of the column

Getting an instance of the column as second argument should be deprecated and moved to the third argument (via the reflection).

Second argument should receive row data instead:

// Deprecated
'formatter' => function (string $fullName, ColumnInterface $column) {
    // ...
}

// ok
'formatter' => function (string $fullName, User $user, ColumnInterface $column) {
    // ...
}
Kreyu commented 1 month ago

Changed in 0.23, marked as "breaking change".