#author("2023-01-17T18:12:49+09:00","","")
#author("2023-01-17T18:17:58+09:00","","")
* PHP 8.2 対応 [#x15e168b]

- ページ: [[BugTrack]]
- 投稿者: [[umorigu]]
- 優先順位: 低
- 状態: 提案
- カテゴリー: 本体新機能
- 投稿日: 2022-12-30 (金) 15:57:08
- バージョン: 1.5.4

** メッセージ [#u8ec52d3]
PHP 8.2 で動作確認を行い、動作しない部分があれば修正する。

- [[php.net:archive/2022.php#2022-12-08-1]] PHP 8.2 が 2022-12-08 にリリースされた
- [[php.net:manual/ja/migration82.deprecated.php#migration82.deprecated.core.dynamic-properties]] 動的プロパティが非推奨になった
- [[php.net:manual/ja/migration82.deprecated.php#migration82.deprecated.core.dollar-brace-interpolation]] 文字列中の "${var}" が非推奨に

**確認できた動的プロパティ [#r30caa25]
-lib/convert_html.php
--class ListElement extends Element
 $this->level
 $this->head
-lib/diff.php
--class line_diff
 $this->result
 $this->path
 $this->add_count
 $this->delete_count
-lib/make_link.php
--class InlineConverter
 $this->page
-plugin/attach.inc.php
--class AttachFile
 $this->exist
 $this->leafbasename
 $this->type
-plugin/tracker.inc.php
--class Config(別ファイル定義:plugin/config.inc.php)
 $config->config_name
--class Tracker_list
 $tracker_list->link_update_required
 $tracker_list->link_pages
 $this->items
 $this->pipe
-plugin/showrss.inc.php
--class ShowRSS_XML
 $this->time
-plugin/map.inc.php
--class MapNode
 $this->cache
 $this->mark
 $this->cache

**確認できた "${var}" [#g6710d24]
-plugin/counter.inc.php
 Counter: ${total_html},
 today: ${today_html},
 yesterday: ${yesterday_html}


*** 参照 [#d91ecaec]

- [[BugTrack/2521]] PHP 8.1 対応
- [[official:FAQ/45]] PukiWiki バージョンと PHP バージョンの関係

--------
- 「動的プロパティ」がDeprecatedになったので確認したいのですが動的プロパティが使われたときにエラーにする方法ありませんかね。調べましたがわかりませんでした -- [[umorigu]] &new{2023-01-04 (水) 22:21:12};
- https://qiita.com/rana_kualu/items/53012c8f84e0f92220c1&br;これでしょうか。 -- [[ぬぺぺ]] &new{2023-01-07 (土) 21:37:47};
- ど素人の考えなのですが、E_DEPRECATEを片っ端から表示するのではダメなのでしょうか? -- [[ぬぺぺ]] &new{2023-01-07 (土) 22:44:27};
- ありがとうございます。いいですね。index.php で error_reporting(E_ERROR | E_PARSE | E_DEPRECATED); とすると、 Deprecated エラーが出力されるようになりました -- [[umorigu]] &new{2023-01-08 (日) 18:53:50};
- お役に立てて良かったです! -- [[ぬぺぺ]] &new{2023-01-09 (月) 10:26:17};
- うちのVSCodeで /lib/*.php, /plugin/*.php, /*.php を全ファイル開いてエラーが出てないか確認したので結果を追記しました。邪魔でしたら消してください。 -- [[ぬぺぺ]] &new{2023-01-17 (火) 18:12:49};
- 動的プロパティは宣言を適当に追加するだけでいいので楽ですが、$config->config_name だけどういう扱いにするか考えないとダメそうです。 -- [[ぬぺぺ]] &new{2023-01-17 (火) 18:17:58};

#comment

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Site admin: PukiWiki Development Team

PukiWiki 1.5.4+ © 2001-2022 PukiWiki Development Team. Powered by PHP 8.2.12. HTML convert time: 0.113 sec.

SourceForge