-
-
Notifications
You must be signed in to change notification settings - Fork 853
Description
Summary of problem or feature request
After upgrading our app to laravel-datatables 9.21 and above, you can't pass a class implementing __invoke() to addColumn. While this has never been supported according to the docs, it has worked until now.
In our project, we used this to share common columns across multiple tables.
Code snippet of problem
This is the context where the issue arises for us.
https://github.com/eveseat/web/blob/master/src/Http/DataTables/Character/Intel/Assets/DataTable.php#L120
https://github.com/eveseat/web/blob/master/src/Http/DataTables/Common/Intel/AbstractAssetDataTable.php#L95
https://github.com/eveseat/web/blob/master/src/Http/DataTables/Common/IColumn.php
https://github.com/eveseat/web/blob/master/src/Http/DataTables/Character/Intel/Assets/Columns/Owner.php
Commits introducing the problem
Instead of allowing everything that's callable, only Closures are passed through. It should be an easy fix to allow everything callable again.
System details
- Operating System docker containers on mac os
- PHP Version 8.1
- Laravel Version 10
- Laravel-Datatables Version >= 9.21