101 lines
4.3 KiB
YAML
101 lines
4.3 KiB
YAML
uuid:
|
|
- value: d4beee99-ab37-4663-b331-4de9f42ec333
|
|
langcode:
|
|
- value: en
|
|
type:
|
|
- target_id: daily_email
|
|
target_type: node_type
|
|
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
|
|
revision_timestamp:
|
|
- value: '2025-05-11T09:00:26+00:00'
|
|
revision_uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
revision_log: { }
|
|
status:
|
|
- value: true
|
|
uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
title:
|
|
- value: |
|
|
Reviving an old PHP project
|
|
created:
|
|
- value: '2023-12-13T00:00:00+00:00'
|
|
changed:
|
|
- value: '2025-05-11T09:00:26+00:00'
|
|
promote:
|
|
- value: false
|
|
sticky:
|
|
- value: false
|
|
default_langcode:
|
|
- value: true
|
|
revision_translation_affected:
|
|
- value: true
|
|
path:
|
|
- alias: /daily/2023/12/13/reviving-an-old-php-project
|
|
langcode: en
|
|
body:
|
|
- value: |
|
|
<p>I use Gmail/Google Apps for my email address, and I used to use a LOT of filters.</p>
|
|
|
|
<p>Inspired by a Ruby gem, I created a PHP library that allows me to declare my filters in PHP and create them in XML.</p>
|
|
|
|
<p>I could import the generated XML into Gmail to create the filters.</p>
|
|
|
|
<h2 id="gmail-filter-buider">Gmail Filter Buider</h2>
|
|
|
|
<p>The project is <a href="https://github.com/opdavies/gmail-filter-builder/tree/3.x">Gmail Filter Builder</a>, and the last commit was in July 2020.</p>
|
|
|
|
<p>It was based on PHP 7 (unsupported since November 2022) and uses five Symfony components and several other packages.</p>
|
|
|
|
<p>Today, as I looked at my current Gmail filters, I decided to revisit and update Gmail Filter Builder.</p>
|
|
|
|
<h2 id="updating-the-project">Updating the project</h2>
|
|
|
|
<p>I set PHP 8.1 as the minimum required version and used a Nix Flake to ensure this was available.</p>
|
|
|
|
<p>I updated the Symfony components from the 3.x versions to 6.x, the latest versions compatible with PHP 8.1. I also updated the other PHP packages to their compatible versions.</p>
|
|
|
|
<p>After some small changes to the application's code, it worked with PHP 8.1 and generated filters.</p>
|
|
|
|
<p>Once it worked, I updated <a href="https://github.com/opdavies/gmail-filter-builder/tree/3.x/examples">the examples</a>.</p>
|
|
|
|
<p>Whilst it wasn't a difficult process in this instance, having a test suite I could rely on helped me to know it worked as expected during the upgrade.</p>
|
|
|
|
<p>I don't know if I'll continue to use or maintain Gmail Filter Builder again, but it was an interesting exercise to do this morning.</p>
|
|
|
|
|
|
format: full_html
|
|
processed: |
|
|
<p>I use Gmail/Google Apps for my email address, and I used to use a LOT of filters.</p>
|
|
|
|
<p>Inspired by a Ruby gem, I created a PHP library that allows me to declare my filters in PHP and create them in XML.</p>
|
|
|
|
<p>I could import the generated XML into Gmail to create the filters.</p>
|
|
|
|
<h2 id="gmail-filter-buider">Gmail Filter Buider</h2>
|
|
|
|
<p>The project is <a href="https://github.com/opdavies/gmail-filter-builder/tree/3.x">Gmail Filter Builder</a>, and the last commit was in July 2020.</p>
|
|
|
|
<p>It was based on PHP 7 (unsupported since November 2022) and uses five Symfony components and several other packages.</p>
|
|
|
|
<p>Today, as I looked at my current Gmail filters, I decided to revisit and update Gmail Filter Builder.</p>
|
|
|
|
<h2 id="updating-the-project">Updating the project</h2>
|
|
|
|
<p>I set PHP 8.1 as the minimum required version and used a Nix Flake to ensure this was available.</p>
|
|
|
|
<p>I updated the Symfony components from the 3.x versions to 6.x, the latest versions compatible with PHP 8.1. I also updated the other PHP packages to their compatible versions.</p>
|
|
|
|
<p>After some small changes to the application's code, it worked with PHP 8.1 and generated filters.</p>
|
|
|
|
<p>Once it worked, I updated <a href="https://github.com/opdavies/gmail-filter-builder/tree/3.x/examples">the examples</a>.</p>
|
|
|
|
<p>Whilst it wasn't a difficult process in this instance, having a test suite I could rely on helped me to know it worked as expected during the upgrade.</p>
|
|
|
|
<p>I don't know if I'll continue to use or maintain Gmail Filter Builder again, but it was an interesting exercise to do this morning.</p>
|
|
|
|
|
|
summary: null
|
|
field_daily_email_cta: { }
|