1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

feat(core): PHP 8.2 Support (#3709)

* chore: test with php 8.2
* chore: bump httphandlerunnder
* chore: bump httphandlerunner
* chore: address php8.2 deprecation
* chore: php 8.2
* chore: bump less.php version
* avoid dynamic properties
* avoid another dynamic property
* Apply fixes from StyleCI
* tags php82
* php82
* fix: check for property existence
* Rerun checks after s9e/text-formatter update
* chore: disable deprecation warnings for php 8.2
* chore: PHP8.2 does not accept dynamic properties
* chore: temporarily disable package manager tests workflow

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
IanM
2023-02-14 18:09:56 +00:00
committed by GitHub
parent ced1c2d94f
commit 1ee5cf6ba9
13 changed files with 49 additions and 15 deletions

View File

@@ -19,7 +19,7 @@ return [
// do this manually because dbal doesn't recognize timestamp columns
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();
$connection->statement("ALTER TABLE `${prefix}post_mentions_post` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `{$prefix}post_mentions_post` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
},
'down' => function (Builder $schema) {

View File

@@ -19,7 +19,7 @@ return [
// do this manually because dbal doesn't recognize timestamp columns
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();
$connection->statement("ALTER TABLE `${prefix}post_mentions_user` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `{$prefix}post_mentions_user` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
},
'down' => function (Builder $schema) {

View File

@@ -18,5 +18,10 @@ abstract class AbstractActionCommand
*/
public $task = null;
/**
* @var string|null
*/
public $package = null;
abstract public function getOperationName(): string;
}

View File

@@ -20,8 +20,8 @@ return [
// do this manually because dbal doesn't recognize timestamp columns
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();
$connection->statement("ALTER TABLE `${prefix}tags` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `${prefix}tags` MODIFY updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `{$prefix}tags` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `{$prefix}tags` MODIFY updated_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP");
},
'down' => function (Builder $schema) {

View File

@@ -19,7 +19,7 @@ return [
// do this manually because dbal doesn't recognize timestamp columns
$connection = $schema->getConnection();
$prefix = $connection->getTablePrefix();
$connection->statement("ALTER TABLE `${prefix}discussion_tag` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
$connection->statement("ALTER TABLE `{$prefix}discussion_tag` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
},
'down' => function (Builder $schema) {

View File

@@ -55,7 +55,7 @@ class ScopeDiscussionVisibilityForAbility
})
->orWhere(function ($query) use ($actor, $permission) {
// Allow extensions a way to override scoping for any given permission.
$query->whereVisibleTo($actor, "${permission}InRestrictedTags");
$query->whereVisibleTo($actor, "{$permission}InRestrictedTags");
});
});