[horde] How to move forward with foreign code in wicked? (Text_Wiki, Text_Figlet)
Ralf Lang
ralf.lang at gmail.com
Sat May 24 12:34:36 UTC 2025
Text_Wiki is a real treasure trove. One version is internalized in wicked's
code base. Another version is forked as library horde/text_wiki and the
upstream version in pear/text_wiki is still separate packages per driver
and has slightly different updates since the split. There's also
pear/text_wiki2 which has been "don't use it" since inception a decade ago
or so.
The pear/text_wiki base package is on packagist but the individual drivers
seem to have fallen out.
I'd still love not to have this in horde/ but rather in upstream. A small
PR on license issues has been made to test if upstream will react at all.
Not like my own responses are fast all the time :-\
Ralf Lang <ralf.lang at ralf-lang.de> schrieb am Do., 15. Mai 2025, 17:06:
> Hello,
>
> recently T. Dannhauer approached me with a loading issue regarding the
> Text_Wiki components in Horde's wicked application.
>
> Turns out we have three different problems
>
> - File in two places: The class loader finds the same class twice in
> /vendor/ and in /web/ because of the symlinking we do. This can be
> solved by not including /web/ in the class loader and further be solved
> by upgrading the way we deliver the /web/ dir. I am still working on
> this but we will move away from symlinking whole apps into the web
> readable folder and instead create stubs which forward requests to the
> actual code in /vendor dir. More on this when it's ready and tested.
>
> - Repeated class names across different text_wiki styles. This is
> something we need to address and which really does not look like horde
> heritage.
> Warning: Ambiguous class resolution, "Text_Wiki_Parse_Wikilink2" was
> found 5x: in
> "/var/www/horde-dev/vendor/horde/wicked/lib/Text_Wiki/Text/Wiki/Parse/Creole/Wikilink2.php"
>
> and
> "/var/www/horde-dev/vendor/horde/wicked/lib/Text_Wiki/Text/Wiki/Parse/Tiki/Wikilink2.php",
>
> "/var/www/horde-dev/vendor/horde/wicked/lib/Text_Wiki/Text/Wiki/Parse/Mediawiki/Wikilink2.php",
>
> "/var/www/horde-dev/vendor/horde/wicked/lib/Text_Wiki/Text/Wiki/Parse/Cowiki/Wikilink2.php",
>
> "/var/www/horde-dev/vendor/horde/wicked/lib/Text_Wiki/Text/Wiki/Parse/Default/Wikilink2.php",
>
> the first will be used.
>
> - Internalized library code: Text_Wiki, Text_Wiki_* exist as separate
> composer packages pear/text_wiki, pear/text_wiki_* but we also have them
> in our application's code base. I personally would much prefer moving
> them out and either consuming them from upstream or give them a facelift
> as a separate package. We have the same issue with text_figlet. I am not
> sure how responsive upstream is and if they actually would appreciate a
> namespaced, php8.4 ready implementation. In the best case scenario we
> can reduce technical debt.
>
> We have a slightly similar issue with Text_Figlet: pear/Text_Figlet
> exists in github but not on packagist. Multiple clones of
> pear/text_figlet exist, often missing attribution to the original author
> (which I think is not only an unnecessary legal risk but also bad
> style). I really don't feel like we should adopt any random dependency
> into our own code base.
>
> Does anybody have a favorite battle tested figlet library which we can
> just consume instead?
>
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
More information about the horde
mailing list