PHP 8.4: 3 New Features That I WON'T Use

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ธ.ค. 2024

ความคิดเห็น • 49

  • @fcolecumberri
    @fcolecumberri 3 วันที่ผ่านมา +13

    Maybe for developers that use Laravel, this won't be a big deal. But for developers that develop Laravel itself, this might be usefull.

    • @LaravelDaily
      @LaravelDaily  3 วันที่ผ่านมา +7

      Good point about different audiences!

    • @fcolecumberri
      @fcolecumberri 3 วันที่ผ่านมา

      @@LaravelDaily I am pretty sure I am not the only viewer who has ever submitted a PR to Laravel GitHub.

  • @Zendo909
    @Zendo909 3 วันที่ผ่านมา +21

    Wild idea - maybe its finally a chance for Laravel to drop some of its magic via Accessors and Mutators and actually use php?

    • @LaravelDaily
      @LaravelDaily  3 วันที่ผ่านมา +10

      It will be possible only with minimum PHP 8.4+ requirement, so only Laravel 13+ probably
      Also, imagine how many developers would be angry that they would need to re-code big parts of their projects.
      So I don't see it coming any time soon.

    • @imqqmi
      @imqqmi 3 วันที่ผ่านมา +8

      They could just add another library, just another way of doing things right? Property hooks are also great for intellisense, allowing the editor to give more sensible suggestions and navigating the code could be a little easier

    • @abdalmonaemgamal9149
      @abdalmonaemgamal9149 3 วันที่ผ่านมา +2

      ​@@LaravelDaily
      Maybe The logic in Laravel will be the same as it was, but in feature update 13+, magic will be dropped and language features will be used.

    • @ward7576
      @ward7576 3 วันที่ผ่านมา

      As already mentioned, that would be a big rewrite but if they allowed it in a way of "another way of defining and using", the same how they did with new and old way of defining accessors/mutators. Some version checking will be needed, probably, otherwise it would be a massive roadblock before upgrading to a certain Laravel version if they chose to overwrite it to property hooks.

    • @imqqmi
      @imqqmi 3 วันที่ผ่านมา

      @@ward7576 Agreed, 8.4 is new now, but a few years down the road it'll be common, at least for new projects. We'll see what the Laravel team decides to do :)

  • @dandansysanalyst
    @dandansysanalyst 2 วันที่ผ่านมา +1

    I like the support to declare properties in Interfaces. I think this is where the news of Property hooks seems to fit more into my daily work.

  • @kernag7688
    @kernag7688 3 วันที่ผ่านมา +2

    I use Laravel for my projects, but I do prefer to use native PHP where it can, since Laravel is just a layer between PHP. Great video!

  • @svoloSlovakia
    @svoloSlovakia 3 วันที่ผ่านมา +1

    We are using Doctrine as ORM and property hooks will be a great step forward for clean code :)

  • @basirxujamuradov8704
    @basirxujamuradov8704 3 วันที่ผ่านมา +2

    In my opinion the coolest feature released in php 8.4 is lazy objects. Not for as, but for framework developers. Imagine how cool it would be to only instantiate some class when it's needed. We could get much better performance with much less memory usage

  • @joshhh4642
    @joshhh4642 2 วันที่ผ่านมา +1

    For me php property hooks are much more straightforward than the eloquent's mutators and accessors which is hidden specially for people that are new to laravel.

  • @klausschmidt6171
    @klausschmidt6171 3 วันที่ผ่านมา +1

    Regarding 3:42, I was wondering, if you don't use the factory pattern at all (a bit weird, that it is also not to be found in the laravel documentation)? What do you use instead? And how?

    • @LaravelDaily
      @LaravelDaily  2 วันที่ผ่านมา +1

      I don't remember using it lately, to be honest. But maybe my projects are too simple, that reminded me that I need to get back to creating more complex projects.

  • @dudu99200
    @dudu99200 3 วันที่ผ่านมา +4

    The new property hooks seems to allow a big mess, you can have both a set{PropertyName} function and a defined property hook for that property. I just fear for when I go to a code base and has both being used, and I hope that PHPStorm adds something to know for sure that a property is actually a hook and can have side-effects

  • @bboydarknesz
    @bboydarknesz วันที่ผ่านมา +1

    as ex-Mobile Kotlin Developer, that set get usually I used in MVVM concept.
    But yeah, Laravel developer won't need this but thank you.

  • @MarkSnape
    @MarkSnape 3 วันที่ผ่านมา +3

    property hooks might be useful in DTO classes

  • @Samuel.Mwangi
    @Samuel.Mwangi 3 วันที่ผ่านมา +3

    My personal feeling about 8.4 is that the majority (if not all) of the features were targeted at framework maintainers. For the rest of us developing on top of a framework the features have little impact on our code.
    Don't get me wrong, this is a good thing as it speaks to a mature language. GoLang mature public api across versions over the years comes to mind.

  • @SiddharthPant
    @SiddharthPant วันที่ผ่านมา +1

    Currently Pint has not updated support for 8.4 because its major dependency PHP-CS-Fixer takes time to move to next version. So I am still hanging out on 8.3 meanwhile.

  • @ahmedsafaa1097
    @ahmedsafaa1097 2 วันที่ผ่านมา +1

    If you are talking about juniors and mid developers. I agree
    But senior developers that build skelton projects, reusable packages, HMVC architectures, different design patterns codes. Would be very interested in such features as property hooks.
    We build a lot of code on top of laravel as code generators, dynamic level of software plugins and such on

  • @cardboarddignity
    @cardboarddignity 2 วันที่ผ่านมา

    Eloquent attributes are great, but these are for Laravel. Remember that Laravel is not a separate language, it still uses PHP. And with a simple Laravel it is almost always not enough- we need to extend classes, write custom actions/services/processors/resolvers/repositories/etc. And this is a step where we are using PHP native stuff.

  • @jcc5018
    @jcc5018 3 วันที่ผ่านมา

    From my understanding Herd is tool that would replace things like Laragon or Xampp right? Or in conjunction with?

  • @s7s96
    @s7s96 3 วันที่ผ่านมา +1

    is there any way to use biometric authentication with laravel?

    • @LaravelDaily
      @LaravelDaily  3 วันที่ผ่านมา +1

      Googled it, there are a few packages and tutorials, like this:
      - laravel-news.com/fastlogin
      - www.reddit.com/r/laravel/comments/ibx6cf/laravel_login_users_with_their_fingerprints/

    • @krekas
      @krekas 3 วันที่ผ่านมา +3

      have you tried google your own words? "biometric authentication with laravel"

    • @ward7576
      @ward7576 3 วันที่ผ่านมา +3

      @@krekas I sometimes wonder how these developers even have a full-time job not being able to google their own questions.

    • @williandamascenomusic
      @williandamascenomusic 2 วันที่ผ่านมา

      Maybe he has googled it, but asked anyway to get a different solution to his problem from people with different experience

    • @krekas
      @krekas 2 วันที่ผ่านมา +1

      @williandamascenomusic doubt

  • @OleksandrAndreiev
    @OleksandrAndreiev 3 วันที่ผ่านมา +3

    It's interesting how author of the video makes a review of new features though the prism of laravel ? In case it's not useful for laravel, maybe it's time for the laravel to upgrade and adopt new features ?

    • @LaravelDaily
      @LaravelDaily  3 วันที่ผ่านมา +1

      I'm sure they will adopt new features in the future versions, as they did with return types, PHP attributes and other things.

  • @Larapods
    @Larapods 2 วันที่ผ่านมา

    You know, Something i am eager to see in modern php is " Multiple inheritance ".
    Imagin Laravel 13+ with multiple inheritance.
    What do you think about it?
    would php developers achieve that ?

  • @trewlove
    @trewlove 3 วันที่ผ่านมา

    We could use getters and setters in DTOs

  • @genechristiansomoza4931
    @genechristiansomoza4931 3 วันที่ผ่านมา +2

    Does it mean Laravel devs are not php devs? 🤔

    • @LaravelDaily
      @LaravelDaily  3 วันที่ผ่านมา +1

      Well, I have a course called "PHP for Laravel developers" which was surprisingly popular at the time I released it :)
      laraveldaily.com/course/php-laravel

    • @Zendo909
      @Zendo909 3 วันที่ผ่านมา

      Yes.

  • @webdev8659
    @webdev8659 3 วันที่ผ่านมา

    Yeah. But the first was Vue with computed properties.

  • @hardcoreteunes
    @hardcoreteunes 3 วันที่ผ่านมา

    Would be nice if traits can use abstract variables. It is php related not laravel xD

  • @CricketMoments130
    @CricketMoments130 วันที่ผ่านมา

    Hy, I m beginner and learned laravel but wanted to practice and can work as internee free of cost for obtiaing experience.

    • @LaravelDaily
      @LaravelDaily  วันที่ผ่านมา

      Sorry I'm not hiring at the moment

  • @Crickart786
    @Crickart786 3 วันที่ผ่านมา

    Great sir

  • @nosecndy
    @nosecndy 3 วันที่ผ่านมา

    Let your browser update itself for once, damn it! Seems like in every video your browser is outdated lmao