Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

CodeWall:
Best Visual Studio Code PHP Extensions for 2018
Nov 20, 2018 @ 10:46:06

On the CodeWall.co.uk blog Dan Englishby has shared his list of what he considers the "must have" extensions for the Visual Studio Code editor for PHP developers to help make them more productive and make their jobs simpler.

Microsoft’s Visual Studio Code is completely competent with the PHP language. It’s something that shocked me personally when it was released as I really didn’t expect it to come prepared for PHP developers. But yep, it is a valid development environment for PHP, and of course, there are plenty of extensions to be used with it.

In this article, I will go through the best available extensions that can be installed with your version of VSCode. With this list of essential extensions you can configure your Visual Studio Code IDE into a wizardry-code-environment.

His list includes tools for a wide range of tooling and helpful functions including:

Each item in the list has a link to the extension in the VSCode marketplace and a brief description of what it can do.

tagged: visualstudiocode editor extensions top9 list best

Link: https://www.codewall.co.uk/best-visual-studio-code-php-extensions/

Tomas Votruba:
7 Tips to Get the Most out of Travis CI
Oct 31, 2018 @ 12:13:59

Tomas Votruba has a new post to his site sharing some of the ways you can get the most out of Travis-CI, the popular build service, for your PHP applications.

Travis CI is the most spread CI in checking open-source projects.

Do you want to know how to use it 3x faster? How to make Travis generate code for you? And how to make your tokens safe?

He breaks down his suggestions into a set of seven tips:

  • Skip x-debug
  • Deliver PR Checks Fast
  • Use ENV vars
  • Use Travis to do More Just Watching
  • Rebuild your GitHub Pages Daily
  • Stay Secure
  • Make use of Composer Scripts

For each item in the list he includes an example of what's required, either a change in the Travis-CI configuration, code, or in the Composer configuration.

tagged: travisci tips top7 list tutorial build composer

Link: https://www.tomasvotruba.cz/blog/2018/10/29/7-tips-to-get-the-most-out-of-travis-ci/

Tomas Votruba:
Brief History of Tools Watching and Changing Your PHP Code
Oct 24, 2018 @ 10:52:23

Tomas Votruba has a new post to his site sharing a listing of some of the more useful and well-established development tooling for PHP and related technologies.

From coding standard tools, over static analysis to instant upgrade tools. This post is going to be a geeky history trip.

Which tool was first? How they build on shoulders of each other?

Are you a lazy programmer who wants to delegate as much work as possible to 3rd party code? Today, you'll become even lazier.

He breaks the article down into three sections, each with several tools linked under them:

  • Coding Standard Tools
  • Static Analysis Tools
  • Instant Upgrade Tools

The items under each link to more information about the tool and provides a brief summary of how it helps you and your code. There's not any examples of them in use, though. You'll need to visit the project's page for more information about that.

tagged: tools code quality standards upgrade summary list

Link: https://www.tomasvotruba.cz/blog/2018/10/22/brief-history-of-tools-watching-and-changing-your-php-code/

Symfony Blog:
New in Symfony 4.2
Oct 05, 2018 @ 12:06:50

Over the past several weeks the Symfony project blog has released a series of posts detailing new features in the 4.2 release of the framework. Here's the current listing of those posts:

Each post includes a summary of the changes or additions and some example code and configuration showing it in use.

tagged: symfony framework feature component update addition list

Link: https://symfony.com/blog/

Tomas Votruba:
7 Tips to Write Exceptions Everyone Will Love
Sep 24, 2018 @ 11:55:22

Tomas Votruba has a post to his site sharing his top seven tips for writing exceptions that "everyone will love" and how they could be considered a more than just a programming tool.

Do you ever had that feeling, that you've seen that exception before and you know what it means and how to solve? What if that would be clear even for those who see it for the first time? It would save yours and their time.

Exceptions are not just error state. Exceptions are the new documentation.

He starts off by describing a situation just about any developer would be familiar with, the "circle" where an exception is thrown when something breaks and there's no additional information so you're back to where you started. Based on his work in the EasyCodingStandard he's come up with seven tips to help prevent this in your applications:

  1. Make Exception Names for Humans
  2. Use " around" Statements
  3. What Exactly is Wrong?
  4. What is The Wrong Value?
  5. What File Exactly is Broken?
  6. What Options do I have?
  7. Link what You can't Fit 140 Chars

For each item on the list there's code snippets illustrating the suggestion and a brief description for more context.

tagged: exception suggestion top7 list love tutorial

Link: https://www.tomasvotruba.cz/blog/2018/09/17/7-tips-to-write-exceptions-everyone-will-love/

Tomas Votruba:
New in Symplify 5: 3 New Cool Features of PackageBuilder
Sep 21, 2018 @ 09:41:57

Tomas Vortuba has a new post on his site sharing information about one of the improvements that has been added to the Symplify, specifically in the PackageBuilder.

PackageBuilder was always sort of meta package with all the cool and shiny features anyone can use. After all, it's the most downloaded Symplify package hitting almost 1000 downloads a day.

In Symplify 5 now it allows you to drop manual binds from Symfony configs, separate files from directories in one method and merge nested YAML parameters with 1 service.

He lists out the three notable changes:

  1. Drop Manual Binds in Symfony configs
  2. Separate Files from Directories
  3. Merge Parameters without Leaving Any Behind

For each item in the list, he provides a link to the pull request that implemented it, a basic summary of the changes and code examples of what it enables.

tagged: symplify packagebuilder update feature top3 list

Link: https://www.tomasvotruba.cz/blog/2018/09/20/new-in-symplify-5-3-new-cool-features-of-package-builder/

Tomas Votruba:
5 Advices I Would Love to Get Before Starting to Maintain an Open Source
Sep 13, 2018 @ 09:48:23

In a new post to his site Tomas Votruba has shared a list of five things that he, as an open source package maintainer, had heard before getting started.

I wasn't always confident while making public every single line of PHP code I write. I had to take many blind paths, spend a night full of stress coding in unknown waters and make a lot of over-complicated code that backfired to me months later.

They say "experience cannot be passed and it must be experienced" and I agree with that, but still there are some shortcuts that would speed-up my path to joyful open-source coding I have today. Here are 5 of them.

He then shares his suggestions, each with a brief summary explaining what it means and how you can apply it:

  1. Be Open to Change any Package
  2. Don't Keep Every feature You Have
  3. Lock to LTS, Maintained Dependencies and green PHP
  4. All You Need to Maintain is 1 Repository
  5. Don't Take Advise as Granted, Experiment for Yourself

He includes some of his own backstory in several of the posts about his own development work and how he found out some of these "the hard way".

tagged: opensource advice maintainer package opinion top5 list

Link: https://www.tomasvotruba.cz/blog/2018/09/10/5-advices-i-would-love-to-get-before-starting-to-maintain-open-source/

Tomas Votruba:
9 Features of Symfony Plugin You Should Not Miss in Gifs
Aug 24, 2018 @ 16:17:54

In a new post to his site Tomas Votruba goes into a "deep dive" of the functionality that the Symfony plugin for PhpStorm provides and some of the functionality it provides.

After very successful PHP 7.3 diffs post, let's dive to gifs of Symfony Plugin. You might know them, but they might surprise you like they did surprise me. Let's go!

He then walks through the installation process and some of the features the plugin includes:

  • Enabling the plugin (via the PhpStorm configuration)
  • Faster Translation Autocreate (TWIG)
  • Autocomplete Translation Key (TWIG)
  • Instant Service Autocomplete in YAML (YAML)
  • Forget The Tag (YAML)
  • Jump from Href to Route (TWIG)
  • Instant Route in Controller (PHP)
  • Faster Queries in Doctrine Repository (PHP)
  • Template Autocomplete (PHP)

For each item in the list, there are animated gifs provided showing it in action. You can find out more about the plugin on the JetBrains site.

tagged: phpstorm symfony plugin feature list ide tutorial

Link: https://www.tomasvotruba.cz/blog/2018/08/23/9-features-of-symfony-plugin-you-should-not-miss-in-gifs/#6-jump-from-href-to-route-twig

Laravel News:
Books from Laracon 2018
Aug 21, 2018 @ 09:36:57

On the Laravel News site they've posted an interesting perspective that reflects on some of the speakers from this year's Laracon US (2018) sharing the books some of them have written.

We love books here at Laravel News! The Laracon US 2018 all-star lineup of speakers delivered stellar talks, and many of them have written best-selling books! We thought it would be a good idea to compile a list of books authored by Laracon speakers as well as other books mentioned during their talks.

Books mentioned include:

There are several others in the list, each with a brief summary of their contents and links to a few other related resources.

tagged: books laraconus18 conference speaker mention list

Link: https://laravel-news.com/books-from-laracon-2018

Tomas Votruba:
5 Gotchas of the Bin File in PHP CLI Applications
Aug 02, 2018 @ 12:47:03

Tomas Votruba has a new post to his site sharing five "gotchas" in CLI applications as it relates to the "bin" file.

This post from Master PHP CLI Apps with Symfony cluster will focus on bin files. It's the smallest part of PHP CLI Application, so I usually start with it.

Yet, there are still a few blind paths you can struggle with. I'll drop a few extra tricks to make your bin file clean and easy to maintain.

He starts with a brief definition of what a "bin" file is before getting into his list of "gotchas":

  • recommendations about naming and location of the file
  • setting it up to be autoloaded by Composer
  • including the right "shebang" to have it executed by the correct program
  • changing access rights
  • symlinking in Composer

The post ends with the complete code required to build a simple Symfony CLI application that will autoload libraries correctly and be executable by the system's php binary.

tagged: gotcha top5 list cli commandline application symfony tutorial

Link: https://www.tomasvotruba.cz/blog/2018/08/02/5-gotchas-of-the-bin-file-in-php-cli-applications/