Refactor cURL to Guzzle With Retry Logic - Multiple API Integrations - Full PHP 8 Tutorial

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 54

  • @dotsad
    @dotsad 2 роки тому +32

    11 months ago I wrote my first line of code, it was python, I used python to learn the basics and get on road. I studied front end for 5-6 months, mostly React, every day, the entire fking day, I was enjoying it, but getting a job was so hard (Yes, now I know 6 months is nothing), it felt like everyone was filling the vacancies for React instantly. So I got frustrated and took a break for ~40 days. when I came back I was sick of the front end, I started learning Node (Yes, once again I was entering the same hole) and quickly discarded it. So I started thinking about programming something a notch below popularity, I noticed here in my country a lot of people still uses php, which i thought was trash bc not many people make content for php compared to the holy grail fullstack JS. But oh boy I was wrong, actually that is the reason why php is so perfect, it is underrated, "nobody" wants to learn, you have more opportunities. I started learning php 3-4 months ago bc i found this series, I learned Laravel in parallel at some point and now im working as a freelancer, yesterday I finished my first Web App for a company and now i have like dozen Apps to come bc they loved it. PHP rocks! Thank you Gio for your hard work man, I love you.

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +5

      This has made my day, that is awesome & proud of you. Thank you so much 💙

    • @veltive3268
      @veltive3268 2 роки тому +3

      In the US Node might be taking over PHP, but pretty much the rest of the world still prefers PHP, around 70%.

    • @Zubbee
      @Zubbee 2 роки тому +1

      Wow, this great! Gio's lessons have been absolutely amazing. Thanks again and again Gio

    • @bijianwu5124
      @bijianwu5124 2 роки тому +1

      very inspiring! keep it up!

    • @DigitaSkills101
      @DigitaSkills101 Рік тому +1

      Are you programming in vanilla Php?

  • @Vitalii-m6r
    @Vitalii-m6r Рік тому +2

    This is by far the best tutorial for PHP learners! Thanks!

  • @yuriymiroshnychenko5446
    @yuriymiroshnychenko5446 2 роки тому +1

    Great video as always! I've been using Guzzle for a long time and didn't know about the retry method. Thank you!

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      I know right? I did not know this as well myself.

  • @Zubbee
    @Zubbee 2 роки тому

    This was very cool. Again seeing how refactoring makes things scalable, expandable and more is amazing. I've been forging ahead with the hope that I'll return to these lessons when I encounter these things. I'm like a sponge for now, just taking... Lord help me. Thanks Gio!

  • @cpanagoulias
    @cpanagoulias 2 роки тому

    I see a new video from Gio, I smash the like button!

  • @mwaas
    @mwaas Рік тому

    king of deep explanation

  • @shaikhalamin23
    @shaikhalamin23 2 роки тому +1

    Really awesome video. Waiting for your DTO video.

  • @yongdev
    @yongdev 2 роки тому +1

    Never heard about this. Thanks for bringing it to my notice ❣️❣️🤗

  • @devhenry9054
    @devhenry9054 2 роки тому +2

    Awesome knowledge, thanks
    If possible after finishing this course.. please make a full project like ecommerce or blog ... That's way we understand all of the knowledge that you share and how to implement in real life project.

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      Thanks for the suggestion 💙

    • @nerminsistek9006
      @nerminsistek9006 2 роки тому +1

      I totally agree with you. Those are really abstract and advanced concepts, and the best way to absorb all this stuff is through some kind of a project. I swear, I would pay for that. This is the most complete and most advanced PHP course I found on the internet, and if he includes a project in it, that would be perfect.

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +2

      @@nerminsistek9006 we will work on a full project at the end and deploy it

    • @devhenry9054
      @devhenry9054 2 роки тому +2

      @@ProgramWithGio Thanks sir for accepting suggestions. It's means a lot. You have share a such tremendous knowledge in this 3 course. After the real project our base is strong enough to create any project. We will waiting for that project. Once again thank you

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      @@devhenry9054 no problem. It was always a plan to work on a project at the end. It won't be e-commerce but it's going to be a good project that will allow us to practice most of what we learned in the series

  • @memack101
    @memack101 2 роки тому

    Pure gold. Thank you.

  • @ЯоКуассиЖан-Клод

    Thanks you very very much may god bless you, bro!)

  • @dhirendrasinghnegi7948
    @dhirendrasinghnegi7948 10 місяців тому

    Sir, there is a callable argument $handler in the retry method can you you explain from where it is fetching that argument while you didn't declared that anywhere.

  • @danielpaszek9071
    @danielpaszek9071 2 роки тому

    Great tutorial series :)

  • @DevAmirull
    @DevAmirull Рік тому

    Thank you ❤

  • @joemak8181
    @joemak8181 2 роки тому

    Can you have an overview about grpcurl

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      Haven't used that, thanks for the suggestion

  • @wildrose7291
    @wildrose7291 2 роки тому

    Hello,
    I'm start learning php from this series , l'm asking about how can i practice php or where can i find php exercises as i need Practical application to lessons( l'm in first lessons)
    Thx

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      Hello. At the end of first & second sections there is an exercise you can work on. Aside from that you can work on some project and practice your skills that way, can even expand on the exercise project from the end of section one.

  • @Nuszja
    @Nuszja 2 роки тому

    Would it be possible to instead of binding key in the DI container, make $apiKey in constructor of EmailValidationService as optional? If different key is not passed as argument, it pulls it from .env? By the way, you create amazing videos and I hope more people will consider learning PHP after seeing your channel ✌️

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому +1

      Thank you 🙏. Sure, many different ways you can do this. The thing that would bother me though is having to load stuff from env from within email validation service.

  • @memack101
    @memack101 2 роки тому

    Thank you.

  • @cpanagoulias
    @cpanagoulias 2 роки тому

    On line 80 in the RetryMiddleware (method onFulfilled) it should say "if (!call_user_func(
    $this->decider,
    $options['retries'],
    $req,
    $value,
    null
    )) {
    return $value;
    }"
    It took me a while to figure out what the !($this-decider) meant until I checked the Guzzle code myself and I found it like I quoted before. Unless it's a notation I m not familiar with... Gio your comments please.

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому

      It calls the function by doing () on it, it doesn't need call_user_func in that case. You can call functions like this $variable()

    • @cpanagoulias
      @cpanagoulias 2 роки тому

      @@ProgramWithGio I knew the $variable() and the call_user_func but never have I seen the ($variable) one. Just wanted to clarify this.

    • @cpanagoulias
      @cpanagoulias 2 роки тому

      Or the ($variable)(args) rather...

    • @ProgramWithGio
      @ProgramWithGio  2 роки тому

      ($variable) does not call function, it just wraps it around, ! $this->decider() would not evaluate properly, therefore it wraps the variable in parenthesis ($this->decider)() and applies the ! to it. Its basically to make sure that the ! part is applied to the result of the function call instead of it being applied to $this->decider as a property.

    • @cpanagoulias
      @cpanagoulias 2 роки тому

      @@ProgramWithGio Ohh I see. Didn't know that! Now it makes more sense. The call_user_func made it clear to me as soon as I read it in the code (at least of the Guzzle version I 've got). I know this part wasn't your code but I really struggled to follow the part of the middleware before having understood this. Thanks for clearing that out Gio. I hope this explanation helps others that are unfamiliar with this as well :)

  • @mamdouhzaq
    @mamdouhzaq 2 роки тому