Commit graph

7 commits

Author SHA1 Message Date
alex4401 b73fe26c29 Extract description algorithm into a new class
Separating the extract algorithm from integration code. This results in a slightly cleaner code structure (at least in my opinion) and enables adding alternate algorithms without devolving into spaghetti.

The DescriptionProvider (name of the new base interface) is exposed as a service through dependency injection to avoid factories. The implementation can be swapped at service instantiation time.

Depends-On: I73c61ce045dcf31ac1ca5888f1548de8fd8b56ff
Change-Id: I97fd065c9554837747021ba9fff26005e33270f4
2024-01-12 08:24:19 +00:00
alex4401 43eb47183e Switch to hook handlers and inject ConfigFactory
Moving hooks into a separate class, and using dependency injection for configuration. Due to hook interfaces being added in MW 1.35, this change also raises the MediaWiki requirement to >1.35.0.

This patch is a part of my RemexHtml deriver chain (split into multiple patches to avoid a single commit altering almost the entirety of the codebase), which raises the floor to 1.38 later. There's not really a point in merging this if the rest of the patch chain is declined.

Depends-On: I484feeb51beab0c2e06c9f958a1c15c40853b967
Change-Id: I73c61ce045dcf31ac1ca5888f1548de8fd8b56ff
2024-01-11 22:44:02 +00:00
alex4401 15f2edbaee Use namespace autoloading instead of manually tracking classes
This extension's classes have already been namespaced. Perhaps wrongly, but I don't see any showstoppers against using PSR-4 autoloading here.

Change-Id: I484feeb51beab0c2e06c9f958a1c15c40853b967
2023-12-07 15:37:32 +00:00
Umherirrender 838ef90fe0 Set MediaWiki 1.31 as minimum requirement in extension.json
Added an old, but not to-outdated required version to keep a minimum
requirement

Change-Id: I7ffdf9c3246614521853c70fef6a2f0c105d7d3c
2021-12-10 13:18:23 +01:00
Kunal Mehta d4552f3dba Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: Iccd10bb2facec3698afb9d67cd533762a2e53275
2018-01-04 02:58:03 -08:00
Sam Wilson 74dfa5fdd9 Add composer for CI, and fix CS errors
Also move class to its own namespace.

Bug: T183532
Change-Id: I5a89efd3f162d73e247543c86967562a949a3bf4
2017-12-22 08:01:33 +00:00
Jack Phoenix 444f123a4a Version 0.4.0 -- cleanup, extension registration support, etc.
* Old i18n shim removed
* extension.json added
* PHP code moved into the new Description2 class
* Old PHP entry point still exists for b/c with older installations, but MW 1.25 or newer is now required

Change-Id: I0670c203b62dcf500ded1b82957e473edf864fb1
2017-07-11 16:21:18 -07:00