Closed eerison closed 9 months ago
hello, be aware that _page_internal_global have null slug/url/title. In my app, most of the rows have null title.
By the way i don't really get the point on removing the null return ? In a database pov, i prefer storing null value and not empty string to avoid a return type error
hello, be aware that _page_internal_global have null slug/url/title. In my app, most of the rows have null title.
By the way i don't really get the point on removing the null return ? In a database pov, i prefer storing null value and not empty string to avoid a return type error
Hmmm interesting, But don't you need those fields to have pages working 🤔🤔.
If you don't have those fields, how do you use those pages 🤔
I have a suggestion (and may want to implement it 🙂) I can't do that atm :(
But I guess it is important we have this issue open to fix models, that contains
nullable
fields, But it shouldn't.Context
Into the Models we have defined some nullable methods for example
Model/Page::getName(): ?string
, and we should return juststring
.
1) When you write new Page()
, no title/slug/name are set, so you require nullable getter or
$page = new Page();
$page->getName();
will crash. Those getters are used by Sonata when you're creating a page.
2) Removing those ?
are BC break.
So I think it can be closed.
But I guess it is important we have this issue open to fix models, that contains
nullable
fields, But it shouldn't.Context
Into the Models we have defined some nullable methods for example
Model/Page::getName(): ?string
, and we should return juststring
.Page:
Note: I am adding just page here, because I want to avoid huge issue that gonna spend a lot of time, when we fix one, we can go to other model.