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 - Наука
Thank you for watching! Please consider supporting my channel: ☕ ko-fi.com/davehollingworth
You are the best PHP teacher on YT. Thank you!
This is guide from a Pro. Thank you.
Thank you. - Rolfe
Great tutorial again, thanks Dave
🙂
Dave, could you please make a tutorial like this for using PDO with SQLite3? Would be nice
Short yet very informative,
Thanks Dave!
Thanks for this great tutorial.
Another brilliant video
Hi, can you make video on how to implement rate limiting OTP/Verification Link request for verifying account in PHP?
OT - any chance that XAMPP would replace MySQL with Postgres?
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.
4:46 I don't know why my vendor files not appear, can you help me?
What happens when you run it? Do you get any errors?
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?
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.
@@Dev-sf3pz
Thank you very much.
Debug is enabled. And, it's Success. Gotta look elsewhere then.
Thanks again, Dave.
@@NedumEze Check the spam folder, or try sending from or to a different email address
@@dave-hollingworth
Yeah, Dave, I have.
There isn't anything there.
Thanks Dave.
@@dave-hollingworth why was my reply seemingly deleted?
I'm new on PHP, what special to learning fast?
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.
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
Thank you. I have been trying to overcome that inconsistency, I believe take projects like you mentioned will help me a long may.
highly recommend dave's ud3my class
Just use react