Skip to content

Conversation

@Universal-Omega
Copy link
Owner

@Universal-Omega Universal-Omega commented Jul 11, 2025

See CHANGELOG.md for all (at least major) changes.

@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update the GitHub Actions workflow to run on both main and pre-release branches, advance the extension version to "4.0.0-alpha.4", rename namespaces and references from DynamicPageList3 to DynamicPageList4, refactor configuration management to use a singleton MultiConfig, add a new display title property to Article, simplify SQL view creation by always using COALESCE, enhance parameter handling with strict typing, introduce new Constants and Utils classes for error codes and helper methods, remove deprecated maintenance script and UpdateArticle class, modularize heading formatting with improved encapsulation, replace the deprecated Hooks class with new hook handler classes, and extend test coverage with new link-related tests.

Changes

File(s) Change Summary
.github/workflows/mediawiki-tests.yml Updated workflow triggers to include both main and pre-release branches.
extension.json, composer.json, README.md, i18n/en.json, i18n/qqq.json Updated extension version from 3.6.4 to 4.0.0-alpha.4; renamed namespaces and references from DynamicPageList3 to DynamicPageList4; updated textual references, URLs, tracking categories, and hook registration format; removed group permissions.
maintenance/CreateView.php Refactored SQL view creation to use COALESCE consistently; added private dropView() and createView() methods with error handling; updated namespace and update keys.
maintenance/CreateTemplate.php Removed entire CreateTemplate maintenance script.
includes/Config.php Refactored Config class from static array to singleton subclass of MultiConfig using layered configuration sources; removed static init method.
includes/Article.php Added public string property $mDisplayTitle; assigned from database row if present; updated namespace and typed properties; refactored constructor and static factory method.
includes/Lister/Lister.php Added support for %DISPLAYTITLE% placeholder in tag parameter replacement; updated namespace.
includes/Parameters.php, includes/ParametersData.php Refactored Parameters class with strict typing, improved validation, and added 'displaytitle' parameter and ordermethod value; updated namespace; adjusted default values and valid options; added new gallery parameters.
includes/LST.php Removed entire LST class file and functionality; replaced with new SectionTranscluder class.
includes/Parse.php Added readonly typed properties for Config, Logger, Parameters, and WebRequest; replaced static Config calls with instance calls; updated logger constants to use new Constants class; treated 'missing' string as conflicting value for openreferences parameter; updated namespace and imports; replaced static hook methods with new hook handler classes.
includes/Hooks.php Removed entire deprecated Hooks class and all its methods and constants.
includes/Logger.php Updated namespace; replaced Hooks constants and methods with Utils and Constants classes; updated log message prefix to DynamicPageList4; added typed method signatures.
includes/Constants.php Added new Constants class defining error, warning, and debug code constants for the extension.
includes/Utils.php Added new Utils class with static methods managing debug level, intersection mode flag, fixed categories, created links, and extension version retrieval.
includes/Heading/*.php (DefinitionHeading.php, Heading.php, OrderedHeading.php, TieredHeading.php, UnorderedHeading.php) Updated namespaces; changed visibility of properties and methods to protected/private with strict typing; refactored Heading class for modular formatting; added static factory method; improved encapsulation and type safety.
includes/Lister/*.php (CategoryList.php, DefinitionList.php, GalleryList.php, InlineList.php, OrderedList.php, SubPageList.php, UnorderedList.php, UserFormatList.php) Updated namespaces and imports from DynamicPageList3 to DynamicPageList4; no logic changes except for Lister.php adding %DISPLAYTITLE% support; added type declarations and visibility changes.
includes/UpdateArticle.php Removed entire UpdateArticle.php file and class with all its methods and logic.
includes/Variables.php Updated namespace; removed array-related methods; simplified variable storage to a private array with typed methods.
includes/HookHandlers/Installer.php, includes/HookHandlers/Main.php, includes/HookHandlers/Reset.php, includes/HookHandlers/Eliminate.php Added new hook handler classes replacing deprecated Hooks class; manage extension schema updates, parser hook registrations, parser output resets, and elimination of created links/templates/categories/images.
includes/SectionTranscluder.php Added new SectionTranscluder class replacing LST functionality; provides advanced section and template transclusion with recursion control and text limiting.
tests/phpunit/DPLExternalDomainPatternParserTest.php, DPLIntegrationTestCase.php, DPLQueryIntegrationTest.php Updated namespaces and annotations to DynamicPageList4; added new integration tests covering link-based queries with ordering and combined filters; updated expected test results; modernized data providers to generators.
tests/seed-data.xml Modified page contents to add links, templates, and categories for test coverage.
.github/workflows/dependencies Added new top-level configuration entry for PageImages with branch and repo set to auto.
.phan/config.php Added ../../extensions/PageImages to both directory list and exclude analysis list.

Poem

🐇
From three to four, we leap with glee,
Names and namespaces all set free.
COALESCE guides the SQL way,
Configs now layered, bright as day.
Display titles shine anew,
Tests extended, fresh and true.
In code’s garden, change is key! 🌿✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pre-release

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

static function ( $oldVal, &$ttl, &$setOpts ) use ( $worker, $dbr ){
$setOpts += Database::getCacheSetOptions( $dbr );
function ( $oldVal, &$ttl, &$setOpts ) use ( $worker ){
$setOpts += Database::getCacheSetOptions( $this->dbr );

Check warning

Code scanning / Phpmd (reported by Codacy)

This rule discourages the use of static access in code.

Avoid using static access to class '\Wikimedia\Rdbms\Database' in method 'buildAndSelect'.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phpmd (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@Universal-Omega
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jul 12, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Universal-Omega
Copy link
Owner Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jul 12, 2025

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/mediawiki-tests.yml (1)

5-8: Minor YAML duplication – consider DRY’ing the branch list

The same two-item list is repeated for both push and pull_request. You can keep them in sync with an anchor/alias:

on:
  _branches: &branches [ main, pre-release ]
  push:
    branches: *branches
  pull_request:
    branches: *branches

Purely cosmetic, but lowers maintenance friction when the branch set changes.

maintenance/CreateView.php (1)

61-66: Safer identifier quoting & optional alias clarification

Good call replacing the custom $sqlNullMethod logic with standard COALESCE. Two quick follow-ups for robustness:

  1. Quoting / prefixing
    Building identifiers manually ({$dbw->tablePrefix()}page) bypasses the DB abstraction’s quoting helpers. Using tableName() avoids accidental breakage with exotic prefixes:
- "CREATE VIEW {$dbw->tablePrefix()}dpl_clview AS SELECT " .
+ "CREATE VIEW " . $dbw->tableName( 'dpl_clview' ) . " AS SELECT " .

…and similarly for page and categorylinks.

  1. Explicit alias for cl_sortkey
    To keep column names uniform you may want AS cl_sortkey after the third select item.

Neither is blocking, but they harden the view for multi-DB setups.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a57378e and 09f733d.

📒 Files selected for processing (3)
  • .github/workflows/mediawiki-tests.yml (1 hunks)
  • extension.json (1 hunks)
  • maintenance/CreateView.php (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.php

Instructions used from:

Sources:
⚙️ CodeRabbit Configuration File

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
extension.json (1)

3-3: Use a semantic-version–compatible prerelease string

"PRE.3" does not follow the usual MAJOR.MINOR.PATCH[-prerelease[.N]] pattern (e.g. 3.6.5-pre.3). Some packaging tools, ExtensionDistributor and third-party deploy scripts assume numeric prefixes for correct sort order; a non-numeric leading token may break upgrade detection.

Please double-check that:

  1. MediaWiki’s ExtensionRegistry happily parses this value.
  2. Any deployment scripts comparing versions still work.

If the check fails, consider something like "3.6.5-pre.3" instead.

Repository owner deleted a comment from coderabbitai bot Jul 12, 2025
Also fixes "column reference "page_title" is ambiguous" as well as the uses parameter when combined with a few other parameters.
Ensure conflict error is still given when using `openreferences = missing`.
Support case insensitive `main` or `(main)` for main namespace as well as support using namespace IDs for all namespaces.
@Universal-Omega Universal-Omega changed the title Merge pre release version into main Release/rebrand as DPL4 Jul 12, 2025
* **Significantly** improves security around the usage of `LIKE` and many other areas
* Adds support for postgresql when using `REGEXP`
@Universal-Omega Universal-Omega added this to the v4.0.0 milestone Jan 2, 2026
@Universal-Omega Universal-Omega marked this pull request as ready for review January 4, 2026 17:44
@Universal-Omega Universal-Omega merged commit c50712c into main Jan 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants