There is no problem not worth solving, and no technology not worth learning!

In phpstorm, hint: base class referenced by subclass\common\models\conventionparticipantsharerecipientconstant in the constant. How to cancel the prompt?

在 PhpStorm 中,提示:通过子类引用的基类 '\common\models\ConventionParticipantShareRecipient' 中的常量

1. In phpstorm, the prompt: the base class referenced by the subclass\common\models\conventionparticipantsharerecipientconstant in the constant. as shown in Figure 1

在 PhpStorm 中,提示:通过子类引用的基类 '\common\models\ConventionParticipantShareRecipient' 中的常量
Figure 1

2. The code is implemented as follows

common/models/conventionparticipantsharerecipient.php


class ConventionParticipantShareRecipient extends ActiveRecord
{
    const STATUS_NORMAL = 1; // 状态:正常
    const STATUS_SUSPENDED = 2; // 状态:停止分享
    const STATUS_DELETED = 3; // 状态:删除
    public static array $statusLabels = [
        self::STATUS_NORMAL => '正常',
        self::STATUS_SUSPENDED => '停止分享',
        self::STATUS_DELETED => '删除',
    ];


api/models/conventionparticipantsharerecipient.php


class ConventionParticipantShareRecipient extends \common\models\ConventionParticipantShareRecipient


API/Controllers/ConventionParticipantShareRecipientController.php


$conventionParticipantShareRecipient->status = ConventionParticipantShareRecipient::STATUS_DELETED;


3. The adjustment code is implemented as follows, no longer prompted. as shown in Figure 2

调整代码实现如下,不再提示
Figure 2

use common\models\ConventionParticipantShareRecipient as CommonConventionParticipantShareRecipient;

$conventionParticipantShareRecipient->status = CommonConventionParticipantShareRecipient::STATUS_DELETED;


 

PHP / Laravel / Yii2 Legacy Project Maintenance & Long-Term Technical Support

If your PHP / Laravel / Yii2 project is already in production but needs bug fixing, API troubleshooting, performance optimization, developer handover support, or long-term maintenance, feel free to contact me for remote technical support.

Ideal For:
✅ PHP legacy systems without active maintenance
✅ Laravel / Yii2 project bug fixes
✅ Admin panel feature iterations
✅ RESTful API troubleshooting
✅ MySQL / Redis / Nginx performance issues
✅ Long-term remote part-time maintenance

We can start with a small task:
✅ Production error troubleshooting
✅ API issue analysis
✅ Slow query and performance bottleneck diagnosis
✅ Initial code structure review
✅ Deployment environment and log inspection

If you would like to discuss your project, please contact me and mention: PHP Maintenance Consultation.

Contact Me:
Telegram: @shuijingwan
WeChat: 13980074657
Email: shuijingwanwq@gmail.com

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.