Use Composer to Easily Manage PHP Packages

Поделиться
HTML-код
  • Опубликовано: 6 июн 2024
  • Learn how to use Composer to manage PHP packages and dependencies.
    Please consider supporting my channel: ☕ ko-fi.com/davehollingworth
    Topics covered:
    • What packages are in PHP
    • Using Packagist to find packages
    • Installing Composer
    • Installing packages with Composer
    • Installing specific package versions
    • Using Composer version constraints
    • composer.json and composer.lock
    • The vendor folder
    • Requiring packages only in development
    Links shown in the video:
    ‣ getcomposer.org/
    ‣ packagist.org/
    ‣ www.php.net/
    ‣ www.apachefriends.org/
    ‣ semver.org/
    Videos:
    ‣ Importing namespaced elements with the use operator: • PHP namespaces 5/10: I...
    ‣ Send email with PHP: • Send email with PHP | ...
    Images used:
    ‣ www.iconarchive.com/show/leaf...
    ‣ www.flaticon.com/free-icons/w...
    ‣ www.flaticon.com/free-icon/de...
    ‣ www.flaticon.com/free-icon/de...
    ‣ www.flaticon.com/free-icon/fr...
    ‣ www.flaticon.com/free-icon/so...
    ‣ www.flaticon.com/free-icon/fi...
    ‣ www.flaticon.com/free-icon/me...
    ‣ www.flaticon.com/free-icon/ch...
    00:00 Introduction
    00:13 What is a package?
    01:17 Packagist
    02:09 What is a dependency?
    02:49 What is Composer?
    03:10 Installing Composer
    04:11 Installing packages
    05:11 Composer's autoloader
    06:10 Packages with dependencies
    07:06 composer.json
    08:14 composer update
    08:33 Removing packages
    09:06 Version constraints
    10:21 Updating packages
    11:37 composer.lock
    12:05 Ignoring the vendor folder
    12:59 update vs install
    14:02 Development packages
    15:21 Summary
    #PHP #composer
  • НаукаНаука

Комментарии • 29

  • @dave-hollingworth
    @dave-hollingworth  Месяц назад

    Thank you for watching! Please consider supporting my channel: ☕ ko-fi.com/davehollingworth

  • @totex1979
    @totex1979 Месяц назад +1

    You are the best PHP teacher on YT. Thank you!

  • @Rex-lp1dl
    @Rex-lp1dl 15 дней назад

    This is guide from a Pro. Thank you.

  • @comconet
    @comconet Месяц назад +1

    Thank you. - Rolfe

  • @pottersplants
    @pottersplants 16 дней назад

    Great tutorial again, thanks Dave
    🙂

  • @Jerementor
    @Jerementor 17 дней назад

    Dave, could you please make a tutorial like this for using PDO with SQLite3? Would be nice

  • @ahmad-murery
    @ahmad-murery Месяц назад

    Short yet very informative,
    Thanks Dave!

  • @mdazhardware
    @mdazhardware Месяц назад

    Thanks for this great tutorial.

  • @craigc5879
    @craigc5879 Месяц назад

    Another brilliant video

  • @atharvagitaye
    @atharvagitaye Месяц назад

    Hi, can you make video on how to implement rate limiting OTP/Verification Link request for verifying account in PHP?

  • @Steve-Richter
    @Steve-Richter Месяц назад

    OT - any chance that XAMPP would replace MySQL with Postgres?

    • @dave-hollingworth
      @dave-hollingworth  Месяц назад

      Interesting idea - I can't find any mention of this, so I doubt it anytime soon - there does seem to be various tutorials around though that detail how to integrate PostgreSQL into XAMPP.

  • @syahmihakimbinabdulhalim7565
    @syahmihakimbinabdulhalim7565 27 дней назад

    4:46 I don't know why my vendor files not appear, can you help me?

    • @dave-hollingworth
      @dave-hollingworth  27 дней назад

      What happens when you run it? Do you get any errors?

  • @NedumEze
    @NedumEze Месяц назад +1

    Thanks very much, Dave.
    Can you help me with a serious challenge that I am facing, please?
    My PHPMailer successfully sends mail as $mail->send() = true;
    But there's no mail in the target inbox!
    How would you overcome this?

    • @Dev-sf3pz
      @Dev-sf3pz Месяц назад

      Do you have debug mode enabled? Does the debug readout say send success? It's easy to enable debug readout in PHPMailer so look that up and enable. Are you sending via SMTP? Getting PHPMailer working is 50% of it, having the SMTP mailbox for sending setup is the other 50%. Try sending to a temp-email box provider, and look in your spam folders.
      These days your mail can easily not be delivered if you haven't got the correct credentials setup like DKIM, DMARC and SPF, there's recently been a big clamp down on things like this with Gmail, Outlook etc. . Just recently our host enabled a new spam filter and that interfered with our sent mails, there's always little things like that which can trip you up.
      So if debug in PHPMailer is saying sent with no errors, then time to look for clues on your server or SMTP mailbox you are sending out on as to where these emails are ending up.

    • @NedumEze
      @NedumEze Месяц назад

      @@Dev-sf3pz
      Thank you very much.
      Debug is enabled. And, it's Success. Gotta look elsewhere then.
      Thanks again, Dave.

    • @dave-hollingworth
      @dave-hollingworth  Месяц назад

      @@NedumEze Check the spam folder, or try sending from or to a different email address

    • @NedumEze
      @NedumEze Месяц назад

      @@dave-hollingworth
      Yeah, Dave, I have.
      There isn't anything there.
      Thanks Dave.

    • @Dev-sf3pz
      @Dev-sf3pz Месяц назад

      @@dave-hollingworth why was my reply seemingly deleted?

  • @eratechsglobal
    @eratechsglobal Месяц назад +1

    I'm new on PHP, what special to learning fast?

    • @karameht
      @karameht Месяц назад +3

      Welcome to PHP 🙂 To learn quickly, focus on understanding the fundamentals such as variables, loops, and functions. Practice regularly by working on small projects and referring to online resources like tutorials and documentation. Don't hesitate to ask questions in PHP communities if you encounter any roadblocks. Consistent practice and exploration will help you progress rapidly. True to the motto: Try, fail, debug, coffee, repeat.

    • @efbYouTube
      @efbYouTube Месяц назад

      highly, HIGHLY recommend dave's udemy class "PHP for Beginners" thru Tim Buchalka's Learn Programming Academy which covers ALL the basics & was a GREAT prep for a college course i later took! it currently lists for $99 but if u have time to wait for a sale u MIGHT b able get it for

    • @eratechsglobal
      @eratechsglobal 29 дней назад

      Thank you. I have been trying to overcome that inconsistency, I believe take projects like you mentioned will help me a long may.

    • @efbYouTube
      @efbYouTube 28 дней назад

      highly recommend dave's ud3my class

  • @WoWUndad
    @WoWUndad Месяц назад

    Just use react