From 0e5367dcee7bc993bc0f60b55d24da0dd3af82a2 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 10 Jun 2023 10:22:06 +0100 Subject: [PATCH] daily-email: add 2023-06-08 --- src/content/daily-email/2023-06-08.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/content/daily-email/2023-06-08.md diff --git a/src/content/daily-email/2023-06-08.md b/src/content/daily-email/2023-06-08.md new file mode 100644 index 000000000..786006f8d --- /dev/null +++ b/src/content/daily-email/2023-06-08.md @@ -0,0 +1,18 @@ +--- +title: > + Write less Drupal code +pubDate: 2023-06-08 +permalink: > + archive/2023/06/08/write-less-drupal-code +tags: + - drupal + - php +--- + +An approach I like to make my Drupal code more maintainable is to write less of it and move any generic PHP code into separate framework-agnostic libraries. + +These could be in open-sourced packages installed from Packagist or kept within the same repository. + +Having less Drupal-specific code keeps modules smaller and easier to maintain and upgrade. + +If I need to upgrade a module from Drupal 7 to Drupal 10, I can reuse the generic code and focus on changing its integration points with Drupal to make it compatible.