Giter Club home page Giter Club logo

Comments (3)

VincentLanglet avatar VincentLanglet commented on July 18, 2024 1

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 just string.

  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.

  1. Removing those ? are BC break.

So I think it can be closed.

from sonatapagebundle.

GeraudBourdin avatar GeraudBourdin commented on July 18, 2024

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

from sonatapagebundle.

eerison avatar eerison commented on July 18, 2024

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 🤔

from sonatapagebundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.