Useful tools for PHP developers

if (sad() === true) { sad().stop() ; beAwesome(); }

André Hoffmann
Ob Frontend, ob Backend, ob Javascript, ob PHP er findet immer einen Weg zu ihrem Erfolg.
Reading duration: approx. 3 Minutes

Every developer has their own set of tools and applications that they feel comfortable with. But in the fast-paced and ever-changing world of software development, it never hurts to leave your comfort zone and try something new. Here is a small list of useful tools and little helpers that we use here at punkt.de.

fzf - fuzzy search for the command line

fzf brings fuzzy search into the terminal. As can be read on the Github page, installation is possible on a variety of operating systems. In addition to Apple Mac and Linux, installation on Windows is also no great challenge. It is also highly recommended to install the key bindings and the fuzzy completion in order to be able to use all the functions of fzf. After successful installation, you can use fzf to start the fuzzy search for files within the current directory and all subdirectories. It is best to combine this with calling an editor such as Visual Studio Code in order to be able to open the found file immediately:

code $(fzf)

Another very helpful function is the fuzzy search in the terminal history. If you have installed the fzf key bindings, you can start the fuzzy search with the usual history search key combination. On the Mac, this is ctrl+r and the interactive fuzzy search opens with all history entries. This feature is most useful if the terminal history is as large as possible. The best way to do this is to increase the number of history entries to the maximum or to the largest possible number so that commands from days or weeks ago can still be found. As described on the Github page, fzf can be adapted to your own preferences and wishes and can also be combined with other tools such as bat:

code $(fzf)

bat - the better cat

bat is a drop-in replacement for the well-known cat, which should appeal primarily to developers with a need for more color in the terminal. bat is similar in handling to cat, but offers some useful features. Probably the most striking is the introduction of syntax highlighting and line numbering:

bat - Code in PHP Storm

The bat view also offers git integration to see at a glance where changes have been made in the file being viewed. Another great function appears when you open a particularly long file in the terminal. Instead of writing the entire file content into the terminal like cat, bat opens an interactive view of the files in the available viewport, within which you can navigate using the mouse or arrow keys. This is particularly advantageous when working in a terminal with a split-screen view. bat can be installed on all common desktop and server operating systems, as can be read on the Github page. Bat also offers a wide range of customization options.

Both fzf and bat increase comfort and productivity when working on the terminal. It is therefore planned to pre-install both tools on our proServers. As always, we want to use these little helpers to further improve work with our hosting offer and make it as convenient and productive as possible for our customers.

Please insert a heading here

Php Inspections (EA Extended) is an intelligent plugin for the PHP-Storm IDE. It extends the error and warning messages known from PHP-Storm with suggestions for restructuring the code, code duplication, information on security and performance problems and much more. Some of the suggested changes can also be applied immediately using a key combination, which greatly speeds up the correction of many minor problems. The notes are detailed and help to better understand the problem that is being noted. However, not only errors are generally noted. As a developer, you also receive tips on how to improve the code style and thus continuous feedback on how you can improve.

PHP composer.json support - interactive composer.json in PHP-Storm

The PHP composer.json support plugin extends the capabilities of PHP-Storm in dealing with the composer.json with an autocomplete for packages and package versions as well as a syntax check for the composer.json file. The interactive autocomplete feature makes it very easy to edit the composer.json and allows you to install the desired PHP package in the desired version with just a few keystrokes. Thanks to this plugin, you can also execute composer commands with a mouse click via a menu in the top bar. The autocomplete function prevents errors, which in turn increases productivity. You also don't have to leave the IDE to search for the desired package. A very nice feature is also the display of the actually installed version of a package when you place the cursor in the line of the package.

These are some of the tools that we use in the development of our projects and have a positive influence on our work.

Share:

More articles

router bgp 16188
Patrick M. Hausen, Technik at punkt.de
Working at punkt.de