Merge the standard packages into the core

Open
#6,771 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
backend, databases

Research direction

Start by mapping the four package repositories and their build setups, then trace how package installation metadata records ownership, especially wcf1_package_installation_sql_log. Plan the migration to transfer registered resources into the core while retaining empty stub packages for existing dependencies. Done means the core owns the listed resources, existing installations upgrade without reinstalling them, and the proposal's optional feature behavior remains available.

Written by the indexing model from the issue text.

Description

The four "standard" packages are installed on almost every WoltLab Suite installation, but they still live in separate packages:

  • com.woltlab.wcf.conversation (Conversations)
  • com.woltlab.wcf.infraction (Infractions)
  • com.woltlab.wcf.legalNotice (Legal Notice)
  • com.woltlab.wcf.moderatedUserGroup (Moderated User Groups)
  • com.woltlab.wcf.exporter

Every app ships conversations and infractions as required packages, and moderated user groups and the legal notice as optional packages. Infractions also depend on conversations. A setup without these packages exists in theory, but we hardly see it in practice, and the
split costs more than it gains:

  • Four extra repositories, each with its own build setup (PHPStan, TypeScript, npm, Composer), version bumps and update instructions for every release.
  • Every app has to bundle the archives in requirements/ and optionals/.
  • The core cannot reference these features directly. It needs workarounds such as event listeners, template listeners or package lookups by identifier, and some core code already knows about them anyway (e.g. the GDPR export references wcf1_conversation_message).
  • Third-party developers have to declare dependencies on the packages and cannot rely on them being present.
Proposal

Merge the four packages into com.woltlab.wcf. The features remain optional where it makes sense:

  • Conversations: MODULE_CONVERSATION
  • Infractions: MODULE_USER_INFRACTION
  • Legal notice: the page and its menu item can be disabled
  • Moderated user groups: only active for groups that are set up as moderated

Database tables, object type names, language item names, options and permissions keep their names. Only the owning package changes.

Migration

Existing installations have the packages installed, so the update must take over their data instead of reinstalling it:

  • Transfer ownership of everything the old packages registered to the core: database tables/columns (wcf1_package_installation_sql_log), files, templates, ACP templates, language items, options, user group options, user options, pages, menu items, object
    types/definitions, event/template listeners, cronjobs, clipboard actions, notification events, ACP menu items, user menu/profile menu items.
  • Keep the packages initially as a stub version, that contains nothing, so the upgrade don't break and third party dependencies still work.
Dominant language
PHP
Stars
248
Forks
147
Avg merge
17m
Merged PRs (30d)
21

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WoltLab/WCF

All issues in WoltLab/WCF

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.