Closed nettsite closed 1 year ago
You need to update the DataTable Html package, the ReadOnly
class has already been renamed into ReadOnlyField.
Thanks! I thought I was up to date, as I ran composer update, but it seems that doesn't do it.
composer update yajra/laravel-datatables-html
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
I have now removed yajra-datatables altogether, and required it, and there is still the ReadOnly class.
Sounds like you got a package installed which requires a specific version of the html package. You can use composers depends
command to find out which package is blocking the upgrade, you then need to upgrade the blocking package:
I am giving up for now, my workaround work for me. I am sure after a few weeks or months other packages which may be causing the issue will catch up.
Thanks for your help!
@nettsite Have you tried using the all-in-one installer?
composer require yajra/laravel-datatables:^9.0
I have tried that, I have even deleted the composer.lock file and the vendor directory and did a full install. The only way I can get yajra/laravel-datatables to install is
composer require yajra/laravel-datatables:*
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been inactive for 7 days since being marked as stale.
Summary of problem or feature request
readonly is a reserved keyword in PHP 8.1. Any existing classes or other symbols that use the name readonly (case insensitive) will result in a syntax error in PHP 8.1.
It is not possible to port the readonly functionality to older PHP versions.
Code snippet of problem
System details
I have fixed this by changing "ReadOnly" to "ReadOnlyProp", which works for me, but I haven't done any testing.