Use the namespaced class for Scribunto as the alias was removed#24
Use the namespaced class for Scribunto as the alias was removed#24
Conversation
From ChatGPT via @LizzAlice Scribunto_LuaLibraryBase (the old underscore-style global class) was an alias for the namespaced class: MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase ([gerrit.wikimedia.org][1]) In current Scribunto, the alias line class_alias( LibraryBase::class, 'Scribunto_LuaLibraryBase' ); was removed (along with the autoload entry for Scribunto_LuaLibraryBase). ([gerrit.wikimedia.org][2]) [1]: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Scribunto/%2B/refs/heads/master/includes/Engines/LuaCommon/LibraryBase.php "includes/Engines/LuaCommon/LibraryBase.php - mediawiki/extensions/Scribunto - Gitiles" [2]: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Scribunto/%2B/a6dbdff2cd2a6d9b879be45f68b00d7770bf9c4d%5E%21/ "Diff - a6dbdff2cd2a6d9b879be45f68b00d7770bf9c4d^! - mediawiki/extensions/Scribunto - Gitiles"
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI Agents
In @src/SparqlLua.php:
- Line 11: SparqlLua extends the namespaced LibraryBase from Scribunto but
composer.json lacks the Scribunto dependency; add "mediawiki/scribunto" with a
minimum version (e.g. >=3.1) to the composer.json "require" section, then run
composer update/install to update composer.lock so the
MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase class is available
at runtime.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/SparqlLua.php
🧰 Additional context used
🪛 GitHub Actions: CI
src/SparqlLua.php
[error] 11-11: Class "MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase" not found.
🔇 Additional comments (1)
src/SparqlLua.php (1)
9-9: LGTM! Correct namespaced import.The use statement correctly imports the namespaced
LibraryBaseclass from Scribunto, replacing the deprecated global alias.
|
We will need to drop MW 1.39 support along with this. Which should be fine since that is EOL now anyway. |
From ChatGPT via @LizzAlice
Scribunto_LuaLibraryBase (the old underscore-style global class) was an alias for the namespaced class:
MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase (gerrit.wikimedia.org)
In current Scribunto, the alias line class_alias( LibraryBase::class, 'Scribunto_LuaLibraryBase' ); was removed (along with the autoload entry for Scribunto_LuaLibraryBase). (gerrit.wikimedia.org)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.