Skip to main content

TorrentPier Upgrade Guide

This guide helps you upgrade your TorrentPier installation to the latest version, covering breaking changes, new features, and migration strategies.

What's New in 3.0

TorrentPier 3.0 is a complete architectural overhaul, moving from legacy PHP to modern Laravel-inspired patterns.

Key Modernizations

ComponentBeforeAfter
ArchitectureProcedural, global stateDI Container, Service Providers
Entry PointsMultiple filesUnified public/index.php with routing
CLILoose PHP scriptsModern bull CLI with 50+ commands
DatabaseGlobal DB() singletonDependency-injected Database
CachingGlobal CACHE() singletonDI-enabled CacheManager
TemplateseXtreme Styles .tplTwig .twig with extensions
RoutingFile-based controllersPSR-7/PSR-15 middleware stack
ConfigurationStatic filesEnvironment + service providers
Error HandlingPHP's defaultWhoops + Tracy with custom handlers

Migration Topics

This guide covers migration for each subsystem:

Backward Compatibility

Important: All existing helper function calls continue to work exactly as before:

// These all still work unchanged
$user = DB()->fetch_row("SELECT * FROM users WHERE id = ?", 123);
$value = CACHE('bb_cache')->get('key');
$siteName = config()->get('sitename');
global $lang; echo $lang['FORUM'];

This is an internal modernization that requires zero code changes for standard usage.

Getting Started

  1. For New Installations: Use the modern migration system automatically
  2. For Existing Installations: Continue working without changes, adopt modern patterns gradually
  3. For Developers: Leverage new DI container and service provider patterns
Recommended Reading Order

Start with Application Container to understand the new architecture, then explore specific subsystems as needed.

Production Upgrades

Always test upgrades in a staging environment before applying to production. Keep backups of your database and files.

Support

For additional support: