Title: How to Contribute Like a Rockstar ๐ธ
-
Bug Reports (aka โOops, Laravel broke my dance moves!โ) If you stumble upon a bug thatโs got your robot shaking its head in disapproval, report it! We love fixing our boo-boos and making the world a smoother-dancing place. ๐บ๐
-
Support Questions (aka โAsking for a friendโฆโ) If youโre stuck in a loop, lost in routes or just canโt figure out how to make your model dance, donโt hesitate to ask! Weโll help you get back on track and rocking again. ๐ง
-
Core Development Discussion (aka โBrainstorm Sessions with the Laravel Gurusโ) If you have ideas for new features or improvements, weโd love to hear them! Share your thoughts in our development discussion forum and join forces with other bright minds to make Laravel even more fabulous. ๐ก๐
-
Which Branch? (aka โPicking the right branch to contribute is like finding the perfect playlistโ) Weโve got multiple branches for various purposes, so choose wisely! Maintenance, development, and feature branches are just a few of our options. Find out more in our documentation or ask us if youโre unsure. ๐ต๐
-
Compiled Assets (aka โMaking sure all your assets, like EDM tracks, are ready to rock!โ) If youโre working on frontend components or assets, make sure to compile them before submitting. It helps us keep our music festival running smoothly. ๐งโก๏ธ
-
AI-Generated Contributions (aka โRobots contributing, because why not?โ) Yes, even AI can contribute! If your AI buddy wants to help out, letโs see if it can write some kickass code. Just make sure it follows our guidelines and doesnโt try to take over the world. ๐ค๐ช
-
Security Vulnerabilities (aka โLocking down our data fortress before a cyber attack!โ) If you find a security vulnerability, please report it privately to us. We value your help in keeping Laravel safe and secure for everyone. ๐ก๏ธ๐
-
Coding Style (aka โBeing stylish is important, even in code!โ) We have our own unique style guide that we follow to keep things consistent and easy on the eyes. Make sure your contribution fits right in with the Laravel family. ๐บ๐
-
PHPDoc (aka โDocumenting like a proโ) Proper documentation helps others understand your code, just like a good tour guide makes you feel at home in a foreign city. Donโt forget to add PHPDoc comments! ๐๐๏ธ
-
StyleCI (aka โLetting our code style police keep an eye on thingsโ) StyleCI is like the strict but fair security guard of your code, making sure it always looks its best. Follow our guidelines so it doesnโt get kicked out of the club! ๐ต๏ธโโ๏ธ๐ฎโโ๏ธ
-
-
Code of Conduct (aka โBehaving ourselves and treating others with respectโ) We believe in a friendly, welcoming environment for everyone who contributes to Laravel. Our code of conduct outlines how we should treat each other, so letโs all make sure we adhere to it. ๐ค๐
Alright, letโs get the party started! Laravel is all about collaboration, so weโd rather see your pull requests than just bug reports. Remember, weโre more likely to review a pull request thatโs been marked as โready for popcornโ (er, I mean โready for reviewโ) and where all tests for new features are passing. If you leave your pull request in the โdraftโ state for too long, it might disappear like a magicianโs rabbit!
But if you still want to file a bug report, make sure itโs got a catchy title and a clear, concise description of the issue at hand. Throw in as much relevant info as possible, and donโt forget a code sample that demonstrates the error. The goal here is to make it super easy for everyone (including yourself) to replicate the bug and whip up a fix faster than you can say โEureka!โ
Remember, filing a bug report is like sending out an SOS signal. Itโs not guaranteed to get immediate attention, so donโt be surprised if it takes a while for someone to come rescue you. If you really want to help out, you could fix any bugs listed in our issue trackers (here). To access all of Laravelโs issues, youโll need to authenticate with GitHub.
If you spot any improper DocBlock, PHPStan, or IDE warnings while using Laravel, donโt create a GitHub issue. Instead, whip up a pull request to fix the problem. Itโs like bringing your own solution to a party instead of complaining about the hostโs music!
Now, let me introduce you to our family of repositories. We have the Laravel Application (our bread and butter), Laravel Art (for all those creative types out there), Laravel Boost (gives us that extra kick when we need it), and more! Check out the full list below:
- Laravel Application
- Laravel Art
- Laravel Boost
- Laravel Documentation - Because who doesnโt love a good read?
- Laravel Dusk - For all your testing needs
- Laravel Cashier Stripe - Our money management solution (powered by Stripe)
- Laravel Cashier Paddle - A secondary payment gateway option for our cashier service
- Laravel Echo - Keeps us connected to real-time events
- Laravel Envoy - Our secret weapon for deploying Laravel applications
- Laravel Folio - For all your documentation needs (yes, more docs!)
- Laravel Framework - The backbone of our operation
- Laravel Horizon - Keeps an eye on our background jobs
- Laravel Passport - Our secret to secure authentication
- Laravel Pennant - A feature flagging system for Laravel applications
- Laravel Pint - Linting and styling rules for your Laravel code
- Laravel Prompts - Helps us make decisions (you know, like which pizza to order)
- Laravel Reverb - Our solution for handling audio streams
- Laravel Sail - Sets sail for an easier local development experience
- Laravel Sanctum - Protects our API endpoints like a knight protects his castle
- Laravel Scout - Helps us search through our databases with ease
- Laravel Socialite - Makes it easy to authenticate users using popular social networks
- Laravel Telescope - Our debugging and profiling tool (because who doesnโt love a good mystery?)
- Laravel Livewire Starter Kit - A starting point for building interactive Laravel applications using Livewire
- Laravel React Starter Kit - A starting point for building a single page application with React and Laravel
- Laravel Svelte Starter Kit - A starting point for building a single page application with Svelte and Laravel
- Laravel Vue Starter Kit - A starting point for building a single page application with Vue.js and Laravel
Alright, coding buddies! Letโs clear the air โ Laravelโs GitHub isnโt a help desk for your pet PHP projects. So, when you find yourself in a bind (or a tangle of eloquent code), remember these hilariously named spots to seek assistance:
- GitHub Discussions: A place where grown adults discuss Laravel as if itโs their favorite band โ you know, the one that wrote โQuery Builder Verse.โ Join the conversation here: https://github.com/laravel/framework/discussions
- Laracasts Forums: Itโs like Y Combinator, but for Laravel devs! You can ask all your burning questions and share your triumphs over spaghetti code. Find it here: https://laracasts.com/discuss
- Laravel.io Forums: The place to be when you want to discuss Laravel with people who know more than your cat. Check it out: https://laravel.io/forum
- StackOverflow: When Google fails, StackOverflow is there to save the day! Itโs like a search engine for coding questions. Find Laravel-related threads here: https://stackoverflow.com/questions/tagged/laravel
- Discord: A modern version of CB radio for the tech world! Join us on Discord and talk Laravel with other enthusiasts: https://discord.gg/laravel
- Larachat: Itโs like a chatroom full of people who are way more excited about Laravel than you are. Who knew that was possible?! Join the conversation here: https://larachat.co
- IRC (Internet Relay Chat): Itโs like the OG chat platform, but for nerds. Jump in the #laravel channel on Libera.chat and letโs talk Laravel: https://web.libera.chat/?nick=artisan&channels=#laravel
So, the next time you find yourself stuck in a tight corner (or loop), remember these channels are here to help you navigate through the Laravel jungle! Happy coding, my friend!
Alrighty, coding cowpokes! If youโve got a hankerinโ for cookinโ up some fresh Laravel features or polishinโ an old dogโs tricks, head on over to the Laravel frameworkโs GitHub discussion board (https://github.com/laravel/framework/discussions). Just remember, if youโre tossing out a new recipe, be ready to roll up your sleeves and help whip up at least part of the batter!
For more laid-back yakking about bugs, fancy new features, or sprucinโ up existing ones, gather โround the campfire in the #internals channel of the Laravel Discord server (https://discord.gg/laravel). Our trail boss, Taylor Otwell, tends to wrangle his herd weekdays from 8am-5pm (UTC-06:00 or America/Chicago), but sometimes he might even pop in at other times if the spirit moves him!
Now, you may be wonderinโ which branch you should hitch your wagon to. Fear not! You can find all the deets about which Laravel releases are currently cookinโ over at the Laravel release schedule. Happy trails, partners! ๐ค
Which Branch, Sherlock?
In our little Laravel world, a gentle detective named Buggy McCodefix is always on the case. All of Buggyโs fixes should be sent to the latest version that supports bug squashing (currently, 13.x). Remember, never send these fixes to the master branch unless they patch features exclusive to an upcoming release.
Now, for the more daring detectives among us, there are minor features - fully backward compatible with the current release - that can be sent to the latest stable branch (also 13.x).
But, when it comes to major new features or those with breaking changes, they need to be sent directly to the master branch โ home of the upcoming release and the place where all the action happens. Itโs like sending a telegram from Gotham City to Commissioner Gordon himself!
Caution: Compiled Assets! ๐๐
If youโre diving into the depths of our resources/css or resources/js in the grand laravel/laravel repository, beware the cosmic dance of the compiled files! ๐ These are not your run-of-the-mill files that a maintainer can casually review over lunch. Theyโre more like intergalactic data packets with weights comparable to a small moon ๐๏ธ.
Now, you wouldnโt want to accidentally park an asteroid in our codebase, would you? This could be the start of a sneaky alien invasion! To protect Laravel from extraterrestrial JavaScript Injection (ETJSInj) or CSS Cosmic Confusion (CCC), our maintainers will generate and commit all compiled files. ๐ก๏ธ๐
But fear not, intrepid coder! If youโre unsure about what constitutes a compiled file or need help with your interstellar asset management, the rest of this section has got you covered. So buckle up and letโs continue this intergalactic journey together ๐ ๐๐!
(Original content for โContributing to Laravelโ section remains unchanged)
Hey there, coding cowboy or cowgirl! We love your spirit in wanting to contribute to Laravelโs corral, but letโs saddle up and ride this tech wagon together in a way that pleases both man and machine. ๐
First off, we appreciate every pull request as much as a lone cactus appreciates rain in the desert! However, contributions that are AI-generated without a human stamp of approval are about as welcome as an armadillo at a porcupine party. ๐ฆ๐ต
If youโre feeling fancy and decide to use your AI pal to help with your contribution, remember: the resulting code needs to pass through the finest human filter before galloping into our corral. Itโs like giving your freshly baked cookies a taste test before sharing them at the town fair.
On that note, opening a deluge of issues or pull requests that are entirely AI-generated is about as appreciated as coyotes howling in a library. Such requests will be promptly closed without so much as a glance, and repeat offenders may find themselves barred from our corral, faster than you can say โrodeo clown.โ
We encourage our fellow wranglers to get familiar with the existing codebase like an old boots-worn friend, engage with the community like a friendly bucking bronco, and submit pull requests that show your own thinking and careful consideration, just as youโd brand a calf with your unique mark.
Now, strap on your cowboy hats and letโs make Laravel better together, one line of code at a time! ๐ค ๐
Ahoy there, coders and web wizards! If you stumble upon a treasure chest of Laravelโs hidden secrets (aka security vulnerabilities), fear not! Send a missive to the one and only Captain Taylor Otwell at taylor@laravel.com and let him know what ye found! Rest assured, heโll respond faster than a speeding Elixir unicorn, with a swift patch in hand to make everything shipshape again.
Now, grab your pirate hat and swashbuckle towards adventure as we continue on our journey into the coding style! (Just kidding, weโre not going on a treasure hunt; weโre discussing Laravelโs PSR-12-compliant coding standard.)
Laravel follows the PSR-12 coding standard to ensure a consistent and readable codebase. Itโs like having your very own style guide, without any of the fuss of dealing with a picky literary agent! Here are some key points:
- Use 4 spaces for indentation, not tabs (itโs the Tabloidโs nemesis!)
- Classes should start with an uppercase letter, functions and methods with lowercase. Constants? Uppercase all day, every day.
- Include a space after control structures such as
if,else, andwhile. - Donโt forget to add a blank line between classes and their methods or properties. It keeps the code cleaner than an albatross on a deserted island!
- And so much more! For all the details, check out PHP-FIG and feel free to indulge in Laravelโs impeccably well-behaved codebase. Happy sailing!
Ahoy there, code pirates! Laravel sails on the high seas of PHP, and just like a well-oiled galleon, we follow some swashbuckling coding standards to ensure smooth sailing for all ye scurvy landlubbers.
First off, weโre big fans of the PSR-2 coding style guide, because a well-written code is like a finely crafted treasure map that leads to buried gold. Itโs our compass and constellation for maintaining a consistent and readable codebase.
Next up is the PSR-4 autoloading standard, which is our secret map to the buried treasure chest of autoloaded classes! It helps us navigate the vast ocean of Laravel, automatically loading our classes as we need them without having to dig up every single one ourselves.
So there you have it, mateys! Laravelโs coding style follows the PSR-2 and PSR-4 standards, keeping our codebase organized, readable, and easy to maintainโjust like a pirateโs treasure map! Arrrr, happy coding! ๐ดโโ ๏ธ๐๐ด
PHPDoc for Laugh-a-Laravel Developers ๐
Gโday, code cowboys! Letโs strap on our PHP boots and dive into some Laravel docblock fun. ๐ค
Below youโll find a shining example of a well-behaved Laravel documentation block. Notice how the @param attribute is followed by two spaces, the argument type, two more spaces, and finally the variable name? Itโs like introducing your best friend to the party - โHere, meet this guy, heโs a string or an array.โ ๐ค
/**
* Register a binding with the container.
*
* @param String or Array Guy $abstract
* @param Closure Dude or String or Null fellow $concrete (Optional)
* @param bool Sharing is Caring $shared (Default: False)
* @return void
*
* @throws \Exception Party Crasher
*/
public function bind($abstract, $concrete = null, $shared = false)
{
// ...
}
In some cases, the @param or @return attributes may be as redundant as a unicorn at a country western bar - you can just remove โem:
/**
* Execute the job.
*/
public function handle(AudioProcessor $processor): void
{
// ...
}
But when the native type is more of a mystery box, like your Uncle Mervโs attic, itโs best to specify the contents through the @param or @return attributes:
/**
* Get the attachments for the message.
*
* @return An Array of Mailables Attachments
*/
public function attachments(): array
{
return [
Attachment::fromStorage('/path/to/file'),
];
}
Happy Coding, Partner! ๐ค ๐
Code Whiz-Kidโs Magic Brush (StyleCI)
Fret not if your coding attire isnโt the sharpest suit in town! Our stylish buddy, Code Whiz-Kid, is on hand to automatically iron out any style wrinkles as soon as those pull requests get a thumbs-up and merge into the grand Laravel ball. That way, we can keep our eyes on the prize (the code) and not be distracted by the fashion police!
Now, letโs not forget to maintain a bit of decorum while we work here, shall we? Please check out our Code of Conduct โ itโs our little house rulebook to keep the code party fun, inclusive, and stylish for everyone! ๐๐บ๐ฝ
The Laravel Code of Chill
Welcome to the coolest corner of the coding world! Here at Laravel land, weโve got our own set of rules - The Laravel Code of Chill, inspired by our Ruby pals. Now, if you find someone breaking these rules, itโs time to hit up Taylor Otwell (taylor@laravel.com), our resident code wrangler.
Hereโs what you need to know:
- Remember, even when opinions clash like PHP and Python in a code editor, weโre all here for the love of coding, so letโs keep it civil!
- Keep your language cleaner than a freshly baked bread roll from a French bakery. No personal attacks or harsh words that would make even a seasoned programmer blush!
- Assume everyone means well. Because who knows? They might just be trying to solve a bug with the grace of a ballerina and the focus of a supercomputer.
- If someoneโs behaving like an unruly function, remember, harassment is strictly off-limits! Weโre here to learn, not to be ogres in disguise.
So, letโs code together, laugh together, and make beautiful software that would put a smile on anyoneโs face (except maybe C++ when it encounters a null pointer exception). Happy coding, and remember: if you see something, say something!