LWT 3.0.0 — The Great Rewrite #230
HugoFara
announced in
Announcements
Replies: 1 comment 1 reply
-
|
latest points to 2.9.1 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is the largest release in LWT's history. The entire application has been restructured from the ground up — new architecture, new frontend, new database engine, new security model — while preserving full compatibility with your existing data.
Highlights
Completely new architecture
index.phpwith proper Controllers (17 classes), Services (35 classes), and Views. The root folder no longer contains dozens of PHP files. (Refactor PHP files in a manageable way #212, The root folder has too many files #213, Separate business and code logic #215). Contributing becomes easy!ParserInterfaceand registering inParserRegistry. We can now parse Chinese, Korean, and more!Modern frontend
IconHelperclass. Modern icons!Multi-user support (#221)
userstable with proper foreign key relationships.userstable with CASCADE delete.Database overhaul (#220)
Added
**bold**,*italic*,~~strikethrough~~, and[links](url). Rendered in word modals, annotations, word lists, test screens, and detail views. Custom lightweight parsers in both TypeScript and PHP with XSS protection.src/backend/Controllers/, Services insrc/backend/Services/, Views insrc/backend/Views/, Router insrc/backend/Router/. Then, the architecture was refactored as Modular Monolith.index.php. Onlyindex.phpandrouter.phpremain in the root folder..tsfiles insrc/frontend/js/with proper module structure (api/, core/, reading/, testing/, feeds/, languages/, etc.).ParserInterface,ParserRegistry,ParsingCoordinator, and value objects (Token,ParserResult,ParserConfig). Each language specifies its parser via theLgParserTypecolumn. Language edit form dynamically adjusts to the selected parser.userstable with foreign keys, authentication, registration, and role-based access (user/admin).Changed
20251221_120000_add_inter_table_foreign_keys.sql.IconHelperclass provides a unified rendering interface.Fixed
INSERT IGNOREfor race condition handling.annotationToJson()causing ~50% of annotations to fail.langFromDict()andtargetLangFromDict()(null checks beforeparse_str()).initWordCount()generating invalid SQL for CJK languages. Word count now defaults to 1 minimum.prefixQuery()to handleDROP TABLE IF EXISTSand case-insensitive SQL keywords.Security
validateLang(),validateText(),validateTag(), andvalidateArchTextTag()— all validation functions now properly sanitize non-numeric input.inc/tags.php:getTextTitle(),saveWordTags(),saveTextTags(), andsaveArchivedTextTags()now validate numeric input.Deprecated
$tbpref) is deprecated in favor of user-based multi-tenancy. Existing prefixed tables will be migrated automatically (if things go well). It has been a long way from Give each wordpress user their own database instance. #76 to Replace $tbpref #164Removed
initFrameResizable()TypeScript function.Breaking Changes
textitems2.Ti2WoIDnow uses NULL instead of 0 for unknown words (required for FK constraints).$tbpref) is deprecated — existing prefixed tables are migrated automatically.SYSTEM_VARIABLES_ADMIN) no longer required. (Remove SYSTEM_ADMIN_VARIABLES privilege #167)Upgrading
Contributors
Thanks to @ProgramComputer, @quopquai, @rahimnathwani and everyone who filed issues and participated in discussions. Particular thanks to @jzohrab, creator of Lute. Discussions with him, and his work on Lute, has been foundational to many of the DB changes. Have a look at his guide to managing database changes.
Full Changelog: 2.10.0...3.0.0
This discussion was created from the release LWT 3.0.0 — The Great Rewrite.
Beta Was this translation helpful? Give feedback.
All reactions