Welcome Guest, Not a member yet? Register   Sign In
Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement)

(01-17-2020, 08:09 PM)kilishan Wrote: At this time there are no intentions to raise minimum requirements to 7.4. Those on shared hosting have a limited selection of 7.2 capable-hosting as it is, the last time I checked. No need to make that even more difficult.

I really don't want to insult anybody but this is a perfect example why people think that CodeIgniter is not on par with other frameworks. It feels like the developers are somewhat divided into different groups. One that wants progress, on that wants backwards compatibility.

  1. If the "shared hosting" argument is a reason to not raise the minimum requirement to PHP 7.4, CI4 should remove everything related to composer and Git. You can't argue that one is able to use composer but is not able to use the current PHP version.

    And while you're working on that, please also remove the /public/ directory since some shared hosts may not allow to set the root path of a domain. You make it impossible to use CI4 on those hostings without exposing the /public/ directory in the URL.

    (Also: re-add the option to set environment configurations in the /app/config/<ENVIRONMENT> folders since people on shared hostings will not push their code via Git and therefore don't have to chance to set different .env files in the main directory for each host.)

  2. The support for 7.2 ends in December 2020 and the framework should always encourage people to update to the latest stable version of PHP. Cut the support for older versions as soon as they're outdated.

  3. Typed hints would also help when working with Entities
    "Just" use https://www.php.net/manual/en/class.refl...operty.php and get rid of both the Property Casting (https://codeigniter4.github.io/userguide...e-mutators) and Date Mutator (https://codeigniter4.github.io/userguide...ty-casting). This would make working with Entities easier and also helps the developer's IDE (hints & autocomplete) without having to set a @var for every property.

Messages In This Thread
RE: Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement) - by fabsn182 - 01-21-2020, 02:55 AM

Theme © iAndrew 2016 - Forum software by © MyBB