diff --git a/CHANGELOG.md b/CHANGELOG.md index 4320660..02f7aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 0.5 (2026年??月??日) * OpenProviderライブラリ +* PHP 8.5以上が必須になった # ローリング・リリース (2025年01月01日) -* 最初プライベートリリース +* 最初プライベートリリース \ No newline at end of file diff --git a/README-JP.md b/README-JP.md index 17b3cd0..c3f640d 100644 --- a/README-JP.md +++ b/README-JP.md @@ -7,7 +7,7 @@ サンプル:[https://lbdemo.technicalsuwako.moe/](https://lbdemo.technicalsuwako.moe/) ## Little Beast とは? -Little Beast は PHP 8.3 以上向けのフレームワークで、076.moe(ゲーム開発会社)と technicalsuwako.moe(社長のブログ)向けに作られました。\ +Little Beast は PHP 8.5 以上向けのフレームワークで、076.moe(ゲーム開発会社)と technicalsuwako.moe(社長のブログ)向けに作られました。\ メイン考え方は「必要な物だけ拡張し、不要な物は削除する」です。\ 各コア機能はライブラリに分割されている為、必要な物だけを選び易い設計になっています。\ 全てのモジュールはゼロから書かれており、データベースは一切必要ありません。 @@ -68,9 +68,9 @@ HTTP サーバーを設定して `/public` をルートとして `php-fpm` で ### OpenBSD サーバー ```sh -pkg_add php-8.4.14 php-gmp-8.4.14 -rcctl enable php84_fpm httpd relayd -rcctl start php84_fpm httpd relayd +pkg_add php-8.5.5 php-gmp-8.5.5 +rcctl enable php85_fpm httpd relayd +rcctl start php85_fpm httpd relayd ``` #### httpd diff --git a/README.md b/README.md index 4ff927b..09438e8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Simple, Pragmatic, Anti-bloat Demo installation: [https://lbdemo.technicalsuwako.moe/](https://lbdemo.technicalsuwako.moe/) ## What is Little Beast? -Little Beast is a PHP 8.3 or above framework made for 076.moe (game developer company) and technicalsuwako.moe (CEO's blog).\ +Little Beast is a PHP 8.5 or above framework made for 076.moe (game developer company) and technicalsuwako.moe (CEO's blog).\ The core mentality is to extend what you need, and remove what you don't need.\ Each core feature is split into libraries, so it is easy to choose what you need.\ All modules are written from scratch, nothing is to be require a database. @@ -68,9 +68,9 @@ That's all! ### OpenBSD server ```sh -pkg_add php-8.4.14 php-gmp-8.4.14 -rcctl enable php84_fpm httpd relayd -rcctl start php84_fpm httpd relayd +pkg_add php-8.5.5 php-gmp-8.5.5 +rcctl enable php85_fpm httpd relayd +rcctl start php85_fpm httpd relayd ``` #### httpd diff --git a/route.php b/route.php index 9845a4d..0b75b57 100644 --- a/route.php +++ b/route.php @@ -66,7 +66,7 @@ $routes = [ ]; if (ACTIVITYPUB_ENABLED) { - $routes[] = Route::add('GET', '.well-known/webfinger', Home::class.'@apfinger'); + $routes[] = Route::add('GET', '.well-known/webfinger', Fediverse::class.'@apfinger'); $routes[] = Route::add('GET', 'ap/following', Fediverse::class.'@apfollowing'); $routes[] = Route::add('GET', 'ap/followers', Fediverse::class.'@apfollowers'); $routes[] = Route::add('GET', 'ap/outbox', Fediverse::class.'@apoutbox'); diff --git a/src/Std/Lib/Activitypub.php b/src/Std/Lib/Activitypub.php index 196bb63..e342c59 100644 --- a/src/Std/Lib/Activitypub.php +++ b/src/Std/Lib/Activitypub.php @@ -39,7 +39,7 @@ namespace Std\Lib; use Std\Lib\Curl; use LogType; -use Uri\Rfc3986; +use Uri\Rfc3986\Uri; /** * ActivityPubプロトコルの実装クラス @@ -299,14 +299,14 @@ class ActivityPub { */ public function getWebfinger(): string { if (!ACTIVITYPUB_ENABLED) return ''; - $domain = str_replace(['http://', 'https://'], '', $this->domain); + $uri = new Uri($this->domain); $webfinger = [ - 'subject' => "acct:{$this->actor}@{$domain}", + 'subject' => "acct:{$this->actor}@{$uri->getHost()}", 'links' => [ [ 'rel' => 'self', 'type' => 'application/activity+json', - 'href' => "{$domain}/ap/actor", + 'href' => "{$this->domain}/ap/actor", ], ], ]; diff --git a/src/Std/Lib/Curl.php b/src/Std/Lib/Curl.php index 043b77f..2cc088c 100644 --- a/src/Std/Lib/Curl.php +++ b/src/Std/Lib/Curl.php @@ -38,7 +38,7 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. namespace Std\Lib; use Result; -use Uri\Rfc3986; +use Uri\Rfc3986\Uri; /** * php_curlへの依存を排除するための独自のCURL実装 @@ -365,7 +365,7 @@ class Curl { $port = $uri->getPort() ?? ($scheme === 'https' ? 443 : 80); $path = $uri->getPath(); if ($path === '') $path = '/'; - if (isset($uri->getQuery())) { + if (NULL !== $uri->getQuery()) { $path .= '?'.$uri->getQuery(); } @@ -639,7 +639,7 @@ class Curl { if ($redirectUrl[0] === '/') { $uri = new Uri($currentUrl); $redirectUrl = $uri->getScheme().'://'.$uri->getHost() - .(isset($uri->getPort()) ? ':'.$uri->getPort() : '') + .(NULL !== $uri->getPort() ? ':'.$uri->getPort() : '') .$redirectUrl; } else { $redirectUrl = dirname($currentUrl).'/'.$redirectUrl; diff --git a/view/common/header.maron b/view/common/header.maron index 9b88a36..7d447bf 100644 --- a/view/common/header.maron +++ b/view/common/header.maron @@ -20,7 +20,7 @@ {@ endif @} {@ endif @} - +