Developers contribute. We work on teams and/or give our time to open source projects. In order to contribute, you need to be comfortable with git, GitHub, and the workflow process. In this hands-on coding, you will learn how to wire everything up, use branching, keep everything in sync and up-to-date, handle merge or commit issues, create issues, create pull requests (PR), and more. Let’s git you contributing.
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.
Local Development Environment Setup for Windows
Your local web development environment is critical to your ability to efficiently produce high quality and well-tested software projects. This environment should be incredibly easy to use. It should support the way you work, making you better and faster while demanding very little of your time. In this hands-on lab, you will setup your local web development environment. It will include version control with Git, helper apps, package managers (Composer, Node, and npm), task runner with Gulp, local webserver, and a professional editor.
Function DocBlock Template
PhpStorm allows you to pre-define how you want to document your functions. Using templates, you layout the DocBlock format and structure for things like the revision number, parameters, return value, etc. Why? Why would you want to do this? It saves you time and promotes a standard approach for documentation. Let’s define the template together in this episode.
Autocompletions. Inline and Online Documentation.
Intelligence is built into PhpStorm in order to help you as you are working on your project. In this episode, I’ll show you how PhpStorm helps you discover different functions and then the arguments that each needs in order to be used. It provides a list plus autocompletion plus inline documentation, not only for PHP functions, but also for WordPress Core, any theme or plugin you have in your project, Sass, LESS, JavaScript, and more. Plus, I’ll show you how you can quickly find online documentation and help for a particular function, i.e. an option that is built into PhpStorm.
Active Code Inspection to WPCS
Wouldn’t it be nice if your editor would tell you that you are not being compliant to the coding standard? Imagine the editor highlighting a piece of code, as you are developing it, and giving you the reason why it broke a rule. Wouldn’t that save you time and frustration later? Sure it would. We can configure PhpStorm to use our project’s PHPCS XML file to do active code inspection. Here, let me show you. Here are the composer.json and phpcs.xml.dist files from Beans.
Enable WordPress & Jump to Hook
To take full advantage of what PhpStorm has to offer, we need to enable WordPress integration. Once we do, then we get features like: Jump to where a hook (event) is being fired. Autocompletes for hook names. Filtering lookup for hooks.
Refactoring Tools
The refactoring tools in PhpStorm are awesome! I use them all the time to automate my workflow and get rid of some of the steps/tasks. Let me show you.
Jump to the Function
In one keystroke, you can quickly jump right to the source function (or class, trait, or interface). This feature is one of my favorites. Here, let me show you.
Selecting Multiple Instances (Multi-Cursor)
File Header Template
In this episode, let’s continue configuring our coding standard template by doing the file header for PHP and JavaScript.