Context: in 3.1, it was possible to create two BBCodes using the same name; One without an attribute and the other with. This was presumably to handle polymorphic BBCodes such as [url] or [quote]. In 3.2.1, it is still possible to create two BBCodes in the ACP but only one of them will effectively work as intended. Starting with 3.2.2, only one BBCode can be created in the ACP but old definitions remain in the database and the behaviour remains unchanged: only one of them works.

Since the overwhelming majority of those BBCodes fall into one of two categories ([url]-style or [quote]-style) it is possible to merge them programmatically. A migration seems the right way to do that. I am not familiar with the migration system and I won't have time to learn it, that's why I'm looking for someone to handle this part.

On my end, I will create a text_formatter.s9e.bbcode_merger service that takes the two BBCode definitions as input and produces a single, merged definition as output:

The migration should read the phpbb_bbcodes table, find entries with the same case-insensitive name minus the equal sign in bbcode_tag (e.g. foo and foo=) then generate a merged definition, remove the entry with an equal sign and replace the remaining entry with the merged one. Maybe the BBCode's "help line" could be merged somehow, too.

I have already written the service part, it's available in Pull request #5038. It relies on a yet-to-be-released version of s9e\TextFormatter, that's why it's currently marked WIP.