Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ActiveRecord issues and other Yii-specific issues being picked up

オープン
#1 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
php
領域
tooling

調査の方向性

Craft PHPStan 設定と文書化された PHPStan の呼び出しから始め、要求されている PHPStan 2.x 互換性と、報告された未定義の ActiveRecord プロパティのケースを確認します。PHPStan 2.x で動作する設定、または例のエラーに対処するための stub ベースの方法が文書化されていれば、完了とします。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

Hello, we have inherited a codebase and added PHPStan to it. There are lots of very specific YIi/ActiveRecord issues being picked up that we think this PHPStan extension might fix: https://github.com/erickskrauch/phpstan-yii2, but it depends on PHPStan 2.0^.

For example, we get errors like this where CrmContact extends ActiveRecord:

 69     Access to an undefined property modules\modulename\records\CrmContact::$id.

The record doesn't explicitly have an $id parameter set, which would solve this, but there is a lot of code to cover and we're trying to focus on the important areas to resolve first.

Is there a way to either upgrade this to PHPStan 2.X so we can experiment with the Yii2 extension, or perhaps a stub you could add/suggest for us?

Steps to reproduce
  1. Include the craftcms PHPStan config
  2. Run PHPStan
Additional info
  • Craft version:4
  • PHP version: 8.2.X
主要言語
言語のデータがありません
スター
12
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。