Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
094fad9
Returns bool from Sapi::setTimeLimit()
Sesquipedalian May 12, 2025
6eea6d4
Makes a couple tweaks to Config::updateSettingsFile()
Sesquipedalian May 15, 2025
27e4055
Allows Lang::get() to work while installing
Sesquipedalian Apr 27, 2025
ed85743
Fixes Db::$db->detect_charset() for tables with no string columns
Sesquipedalian May 19, 2025
2977b67
Adds $reset param to Db::$db->detect_charset() method
Sesquipedalian May 11, 2025
0492bae
Renames Install language file to Maintenance
Sesquipedalian Apr 27, 2025
8909b0c
Adds SMF\Db\Schema and descendants
Sesquipedalian Apr 24, 2025
697732f
Adds new methods to DatabaseApiInterface
Sesquipedalian Apr 25, 2025
5727046
Rewrites installer
Sesquipedalian Apr 28, 2025
99321ba
Rewrites upgrader
Sesquipedalian May 19, 2025
56f0939
Updates composer.lock to point to new version of SMF BuildTools
Sesquipedalian May 19, 2025
ab28698
Tweaks .editorconfig to use spaces for indentation in composer.lock
Sesquipedalian May 19, 2025
fdc21c1
Fixes content of Sources/Maintenance/*/index.php files
Sesquipedalian May 19, 2025
3c4049b
Allows explicit handling of row format in MySQL::create_table()
Sesquipedalian May 19, 2025
555a7e5
Includes row format and collation in MySQL::table_sql() output
Sesquipedalian May 19, 2025
d48f71d
Updates version numbers
Sesquipedalian May 20, 2025
fc82f9b
Fixes logic in Table::alterIndex()
Sesquipedalian May 20, 2025
3312c03
PHP's safe_mode was deprecated long ago
Sesquipedalian May 20, 2025
f048b40
Fixes a bug in SMF\Tasks\Utf8EntityDecode::updateDirectly()
Sesquipedalian May 20, 2025
a36098e
Merge branch 'release-3.0' into 3.0/installer_and_upgrader
Sesquipedalian May 27, 2025
924b6c1
Bulletproofing for TasksDirCase::execute()
Sesquipedalian May 27, 2025
f7a6c91
Fixes language file name in installer
Sesquipedalian May 27, 2025
1b5f7bc
Fixes 'Undefined array key' in Utf8ConverterStep::convertDatabase()
Sesquipedalian May 27, 2025
05adf5b
Fixes 'Undefined array key' in Upgrade::backupDatabase()
Sesquipedalian May 28, 2025
640e261
Improves parsing in Maintenance::parseCliArguments()
Sesquipedalian May 28, 2025
7e55644
Improves error handling when updating the settings file in upgrader
Sesquipedalian May 27, 2025
862da9a
Uses Lang::getTxt() for all localized strings in the upgrader
Sesquipedalian May 27, 2025
d0c8f2d
Adds some methods to Maintenance\Tools\ToolsInterface
Sesquipedalian May 27, 2025
3daf906
Code deduplication
Sesquipedalian May 27, 2025
e963318
Improves logging in maintenance tools
Sesquipedalian May 27, 2025
223e3b9
Improves username validation in installer
Sesquipedalian May 28, 2025
683485e
Implements SMF\Migration\v3_0\PermissionChanges
Sesquipedalian May 28, 2025
a539ad0
Removes obsolete other/*.sql files
Sesquipedalian May 28, 2025
4305a83
Implements SMF\Migration\v3_0\IndexUpdates
Sesquipedalian May 28, 2025
2cff8a6
Adds PackageVersion to list of migration steps for 2.1 → 3.0
Sesquipedalian May 30, 2025
baf2e21
Revert "Fixes logic in Table::alterIndex()"
Sesquipedalian May 30, 2025
d56597b
Saves maintenance logs in Config::$boarddir . '/logs'
Sesquipedalian May 30, 2025
b2a365f
Ensures we only pass strings, not nulls, to Utf8EntityDecode::decode()
Sesquipedalian May 30, 2025
54c268a
Simplifies code to get substep names
Sesquipedalian May 30, 2025
4933416
Removes useless ToolsBase::quickFileWritable() method
Sesquipedalian Jun 1, 2025
76cb6fb
Handles missing directories better in ToolsBase::makeFilesWritable()
Sesquipedalian Jun 1, 2025
4efdaa6
Simplifies the code in Settings.php that redirects to the installer
Sesquipedalian Jun 1, 2025
db3b518
Prevent creating duplicate entries of `$upgradeData` in Settings.php
Sesquipedalian Jun 1, 2025
2c709ef
Always log 'welcome' step of installer
Sesquipedalian Jun 1, 2025
7996cd9
Improves Installer::determineTimezone()
Sesquipedalian Jun 1, 2025
32a63c4
Fixes glob pattern in SMF\Db\Schema\Table::getAll()
Sesquipedalian Jun 1, 2025
1e80b07
Moves initial data for smileys into table definitions
Sesquipedalian Jun 1, 2025
a742717
Fixes issues populating database in installer
Sesquipedalian Jun 1, 2025
9a63445
Adds support to installer for 'debug' URL param
Sesquipedalian Jun 1, 2025
1deb47a
Don't error in Security::secureDirectory() if dir is already secure
Sesquipedalian Jun 1, 2025
e359ab6
More logging improvements for installer and upgrader
Sesquipedalian Jun 2, 2025
4e182f9
Renames `$upgradeData` to `$maintenance_tool_progress`
Sesquipedalian Jun 2, 2025
b6ef9b9
Removes empty $initial_data property from db schema table classes
Sesquipedalian Jun 2, 2025
807fabd
Fixes indexes in SMF\Db\Schema\v2_1\LogFloodcontrol
Sesquipedalian Jun 2, 2025
3952c2d
Fixes indexes in SMF\Db\Schema\v2_1\LogOnline
Sesquipedalian Jun 2, 2025
69c2f0c
Fixes columns and indexes in SMF\Db\Schema\v2_1\LogPackages
Sesquipedalian Jun 2, 2025
ac7de6e
Fixes indexes in SMF\Db\Schema\v2_1\LogSpiderHits
Sesquipedalian Jun 2, 2025
f11a255
Fixes indexes in SMF\Db\Schema\v2_1\LogSubscribed
Sesquipedalian Jun 2, 2025
1367f09
Adds missing SMF\Db\Schema\v2_1\Settings class
Sesquipedalian Jun 2, 2025
490f530
Fixes indexes in SMF\Db\Schema\v2_1\Spiders
Sesquipedalian Jun 2, 2025
c6bdacf
Don't automatically continue upgrader when debug mode is enabled
Sesquipedalian Jun 4, 2025
e275e16
Fixes type detection for unsigned ints in MySql::list_columns()
Sesquipedalian Jun 3, 2025
add0b7b
Sets not_null to true on auto-increment columns in table definitions
Sesquipedalian Jun 3, 2025
0b9d018
Adds missing column properties in SMF\Db\Schema\v3_0\*
Sesquipedalian Jun 3, 2025
d4999a4
Fixes issue altering primary key when column auto-increments
Sesquipedalian Jun 3, 2025
5ad0935
Implements SMF\Db\Schema\Table::normalize()
Sesquipedalian Jun 4, 2025
4dc99dd
Adds table normalization substeps to upgrader
Sesquipedalian Jun 4, 2025
c46cf5b
Improves column type casting in SMF\Db\Schema\Column
Sesquipedalian Jun 4, 2025
11fc75f
Fixes a few cases where version_compare() was given malformed inputs
Sesquipedalian Jun 6, 2025
1470155
Improves handling of unexpected primary keys in Table::normalize()
Sesquipedalian Jun 6, 2025
b040a46
Merge branch 'release-3.0' into 3.0/installer_and_upgrader
Sesquipedalian Jun 9, 2025
41d4e81
Fixes a query identifier in Upgrade::upgradeOptions()
Sesquipedalian Jun 9, 2025
40f0a95
Perform all expected steps when re-running the upgrader
Sesquipedalian Jun 9, 2025
dd42711
Resolved a identifier issue from merging #8664
jdarwood007 Jun 9, 2025
a4dae5f
Fixes some mistakes in SMF\Db\Schema\v2_1\* classes
Sesquipedalian Jun 14, 2025
9625f8c
Fixes calls to MigrationBase::query()
Sesquipedalian Jun 11, 2025
febf589
Fixes broken query in Migration\v2_1\MembersLangUTF8::execute()
Sesquipedalian Jun 11, 2025
69bdea7
Does a better job defining the default charset in Table::__construct()
Sesquipedalian Jun 13, 2025
34a3e37
Allows Table::dropColumn() & Table::dropIndex() to accept string input
Sesquipedalian Jun 13, 2025
626606a
Implements Table::populate() method
Sesquipedalian Jun 13, 2025
877f075
Merge branch 'release-3.0' into 3.0/installer_and_upgrader
Sesquipedalian Jun 18, 2025
09828a9
Improves file checks in Upgrade::welcomeLogin()
Sesquipedalian Jun 20, 2025
1666c06
Adds missing use statements to Table class
Sesquipedalian Jun 22, 2025
d566eb2
Fixes a copy-paste mistake in Table::normalize()
Sesquipedalian Jun 22, 2025
0eb04de
Improves methods that define and create database indexes
Sesquipedalian Jun 21, 2025
b3c9577
Adds methods to rename database indexes
Sesquipedalian Jun 22, 2025
22889d7
Documentation fixes
Sesquipedalian Jun 22, 2025
4c3c906
Standardize case of 'PostgreSql' in class names, part 1
Sesquipedalian Jun 22, 2025
2d4a3d6
Standardize case of 'PostgreSql' in class names, part 2
Sesquipedalian Jun 22, 2025
b99e480
Standardizes code patterns in migration steps
Sesquipedalian Jun 21, 2025
9750c64
Improves efficiency in v2_1 migration steps
Sesquipedalian Jun 22, 2025
ddbd36e
Deletes unneeded schema & maintenance files after install/upgrade
Sesquipedalian Jun 23, 2025
5447981
Disable background tasks while installing, upgrading, etc.
Sesquipedalian Jun 26, 2025
f0c1dca
Merge branch 'release-3.0' into 3.0/installer_and_upgrader
Sesquipedalian Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ tab_width = 4
trim_trailing_whitespace = true
charset = utf-8

[*.lock]
indent_style = space

[*.yml]
indent_style = space
indent_size = 2
indent_size = 2
4 changes: 2 additions & 2 deletions .github/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ files: [
translation: "Languages/%locale_with_underscore%/Help.php",
},
{
source: "Languages/en_US/Install.php",
translation: "Languages/%locale_with_underscore%/Install.php",
source: "Languages/en_US/Maintenance.php",
translation: "Languages/%locale_with_underscore%/Maintenance.php",
},
{
source: "Languages/en_US/Login.php",
Expand Down
2 changes: 1 addition & 1 deletion .github/phpcs/SectionComments.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @copyright 2025 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 3.0 Alpha 2
* @version 3.0 Alpha 3
*/

declare(strict_types=1);
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Settings.php
Settings_bak.php
Settings_org.php
!Sources/Db/Schema/*/Settings.php
db_last_error.php
cache/*
Packages/backups/*
Expand Down Expand Up @@ -81,4 +82,4 @@ upgrade-helper.php
.php-cs-fixer.cache
vendor/
.phplint-cache
.phplint.cache
.phplint.cache
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @copyright 2025 Simple Machines and individual contributors
* @license https://www.simplemachines.org/about/smf/license.php BSD
*
* @version 3.0 Alpha 2
* @version 3.0 Alpha 3
*/
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
Expand Down
492 changes: 310 additions & 182 deletions Languages/en_US/Install.php → Languages/en_US/Maintenance.php

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions Sources/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,12 +808,18 @@ class Config
'auto_delete' => 2,
'type' => 'boolean',
],
// Temporary variable used during the upgrade process.
'upgradeData' => [
// Temporary variable used during install, upgrade, etc.
'maintenance_tool_progress' => [
'default' => '',
'auto_delete' => 1,
'type' => 'string',
],
// Temporary variable used while installing or uninstalling packages.
'package_installing' => [
'default' => false,
'auto_delete' => 1,
'type' => 'boolean',
],
// These should be removed if found.
'tasksdir' => [
'default' => '',
Expand All @@ -835,6 +841,11 @@ class Config
'auto_delete' => 3,
'type' => 'integer',
],
'upgradeData' => [
'default' => '',
'auto_delete' => 3,
'type' => 'string',
],
];

/**
Expand Down Expand Up @@ -1417,11 +1428,6 @@ public static function updateSettingsFile(array $config_vars, ?bool $keep_quotes
$config_vars['db_last_error'] = 0;
}

// Rebuilding should not be undertaken lightly, so we're picky about the parameter.
if (!is_bool($rebuild)) {
$rebuild = false;
}

$mtime = isset($mtime) ? (int) $mtime : (defined('TIME_START') ? TIME_START : $_SERVER['REQUEST_TIME']);

/*****************
Expand Down Expand Up @@ -1454,6 +1460,7 @@ public static function updateSettingsFile(array $config_vars, ?bool $keep_quotes
}

// When was Settings.php last changed?
clearstatcache();
$last_settings_change = filemtime($settingsFile);

// Get the current values of everything in Settings.php.
Expand Down Expand Up @@ -1553,7 +1560,7 @@ public static function updateSettingsFile(array $config_vars, ?bool $keep_quotes
],
// Remove the code that redirects to the installer.
$neg_index-- => [
'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?' . '>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m',
'search_pattern' => '~^if\s*\(file_exists\((?:dirname\(__FILE__\)|__DIR__)\s*\.\s*\'/install\.php\'\)(?:\s+&&\s+basename\(\$_SERVER\[\'PHP_SELF\'\]\) != \'install.php\')?\)\s*(?:({(?' . '>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m',
'placeholder' => '',
],
// Remove the old path correction code. Config::set() now handles that.
Expand Down Expand Up @@ -1919,7 +1926,7 @@ function ($a, $b) {
}
// Admin is explicitly trying to set this one, so we'll handle
// it as if it were a new custom setting being added.
elseif ($in_c) {
elseif ($in_c && !isset($settings_defs[$var])) {
$new_settings_vars[$var] = $config_vars[$var];
}

Expand Down Expand Up @@ -2230,7 +2237,7 @@ function ($a, $b) {
$success = self::safeFileWrite($settingsFile, $settingsText, $backupFile, $last_settings_change);

// Remember this in case updateSettingsFile is called twice.
$mtime = filemtime($settingsFile);
$mtime = microtime(true);

return $success;
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static function setLoginCookie(int $cookie_length, int $id, string $passw
// Backup and remove the old session.
$oldSessionData = $_SESSION;
$_SESSION = [];
session_destroy();
@session_destroy();

// Recreate and restore the new session.
Session::load();
Expand Down
Loading