-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Calling static trait method LaraZeus\Bolt\Concerns\Designer::ui is deprecated #331
Comments
do you have |
is it only in the paid version? then no. i use free version. |
no, its available for the free. |
are overriding the form resources or any part of it? |
have you also done: php artisan optimize |
as this caches config and routes |
artisan storage:link |
yep okay. i'm going to check if getBoltFormDesigner() exists.. |
dd($this->getBoltFormDesigner()); |
i'm not overriding anything. and the trait use Designer; exists in the FillForms.php when i change it to this: protected function getFormSchema(): array
{
$getDesignerClass = $this->getBoltFormDesigner() ?? $this;
return $getDesignerClass::ui($this->zeusForm, $this->inline);
} i'm getting another error: LOG.error: Creation of dynamic property LaraZeus\Bolt\Livewire\FillForms::$placeholder-zeus-form-section is deprecated |
APP_ENV=local and enabled APP_DEBUG=true with barryvdh/laravel-debugbar enabled. also when i try to use: return (new class { use Designer; })::ui($this->zeusForm, $this->inline); i get :
|
the second error can be fixed to add Attribute like this: #[\AllowDynamicProperties]
class FillForms extends Component implements Forms\Contracts\HasForms |
then everything works as expected even in other ENV with debugging enabled. Hope you can add these fixes soon :) |
bolt on |
Got it. 👌🏻 |
Perhaps using magic methods __get() and __set() can still be used for dynamic attributes. |
public array $dynamicProperties = [];
public function __set(string $name, mixed $value)
{
if (property_exists($this, $name))
$this->{$name} = $value;
else
$this->dynamicProperties[$name] = $value;
}
public function __get($property)
{
if (property_exists($this, $property))
return $this->$property;
else
return $this->dynamicProperties[$property];
} |
What happened?
it only happens when i enable barryvdh/laravel-debugbar.
How to reproduce the bug
open a form on the frontend side with barryvdh/laravel-debugbar enabled
Package Version
v3.0.68
PHP Version
8.3.12
Laravel Version
10.48.22
Which operating systems does with happen with?
macOS
Notes
No response
The text was updated successfully, but these errors were encountered: