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

Martin Hujer:
Best PhpStorm plugins for Symfony development
Nov 28, 2018 @ 18:17:05

Martin Hujer has put together a new post to his site sharing some of the PhpStorm plugins he considers essential for Symfony development, making your life easier as you create applications with this popular framework.

I've been using PhpStorm for quite a while and I'm still surprised now and then when it suggests an auto-completion for something I thought that's not possible.

But there are still many things - usually framework- or library-specific - that PhpStorm cannot do on its own. But there are plugins that can step in place and do the magic for specific framework or library.

Several of the plugins are more for improving PHP development in general but others are more Symfony-specific:

  • PHP Annotations
  • PHP Toolbox
  • Symfony Plugin
  • PHPUnit Enhancement
  • PHP composer.json support
  • Php Inspections (EA Extended)
  • Twig Support
  • .env files support
  • .ignore

Each item in the list comes with a brief introduction to the plugin, links to find out more information, and, in some cases, animations of it in use in the editor.

tagged: best plugin phpstorm symfony development list ide

Link: https://blog.martinhujer.cz/best-phpstorm-plugins-for-symfony-development/

Tomas Votruba:
14 Tips to Write PHP Code that is Hard to Maintain and Upgrade
Nov 28, 2018 @ 15:17:38

In a new post to his site Tomas Votruba takes the opposite approach to writing good code by sharing bad examples in the form of fourteen tips to write bad code, practices that can make code hard to upgrade and difficult to maintain.

Today I'll show you how to own your company. All you need to do is write code that no-one can read, is hard to refactor and creates technical debt. It's not easy, because if other programmers spot you're writing legacy code, you're busted.

If you keep a low profile of very smart architect and do it right, you'll be the only one in the company who knows what is going on and you'll have a value of gold. Learn how to be successful living vendor lock!

He then goes through his list of poor practices to avoid including:

  • Use protected instead of private
  • Use Non-String Method Names
  • Don't Always use PSR-4
  • Hide Your Dependencies in Constructor
  • Use Annotations to Define Magic Methods
  • Use Traits with Annotations to Define Magic Methods
  • Use as Short Naming as Possible

...and many more. For each item in the list sample code is provided so you'll know exactly what to avoid.

tagged: practices to avoid top14 list development tutorial

Link: https://www.tomasvotruba.cz/blog/2018/11/26/14-tips-to-write-php-code-that-is-hard-to-maintain-and-upgrade/

CodeWall:
Best Visual Studio Code PHP Extensions for 2018
Nov 20, 2018 @ 16: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 @ 17: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 @ 15: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 @ 17: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 @ 16: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 @ 14: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 @ 14: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 @ 21: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


Trending Topics: