As a developer, I strive to deliver high-quality code that is understandable for other developers and is as future proof as it can be. For me, this is an ongoing learning process in the way code is written, and tools that can be used to assist me. Many different sources can be found with opinionated instructions on how to write "perfect" code.
By now, every Drupal developer should know that it's a bad idea to overwrite core and contributed code. Especially when using Composer correctly and, therefore, only store the
composer.lock file to the version control system. It should be imminent that changing files containing core code is a no-brainer (don't hack core!).
Drupal's core options module provides fields to create a select list (existing of integers, floats, or strings).
Like contributed modules, dependencies of a custom module can also be installed by providing a
composer.json file in the directory of the custom module.
When writing custom forms, you are often asked to add an extra paragraph of text between input fields. A solution that is used a lot is:
When you're, like me, using Windows as your development environment, letting your Drupal environment send mails can be a big challenge. In contrast to a Linux/Mac OS X based system, where it is much easier to send mails.