outl1ne / nova-page-manager

Static page and region manager for Laravel Nova - designed for headless CMS's.
MIT License
180 stars 39 forks source link

Cannot unpack array with string keys #110

Closed dmitrijsmihailovs closed 2 years ago

dmitrijsmihailovs commented 2 years ago

I am getting this error on latest pre release. Templates config looks like this 'templates' => [ 'pages' => [ 'language-page' => [ 'class' => \App\Nova\Templates\LanguagePage::class, 'unique' => false, // Whether more than one page can be created with this template ], ], 'regions' => [ // 'header' => [ // 'class' => '\App\Nova\Templates\HeaderRegionTemplate', // 'unique' => true, // ], ], ],

Tarpsvo commented 2 years ago

Can you check where the error occurs? Via stacktrace in logs etc.

dmitrijsmihailovs commented 2 years ago

It occurs here https://github.com/outl1ne/nova-page-manager/blob/cd2da05d27d56c2c294cfe24a4329c50ba460f9d/src/NPM.php#L58

Tarpsvo commented 2 years ago

Ah okay, only PHP 8.1 allows unpacking w/ string keys. I forgot about that. I will fix it in a sec.

Tarpsvo commented 2 years ago

Hey! Sorry about that - fixed in version 5.0.1. See release notes here: https://github.com/outl1ne/nova-page-manager/releases/tag/5.0.1