Automattic / Automattic/VIP-Coding-Standards
Sniff for using PDO to connect to DB
オープン
Good First Issue
Type: Enhancement
- 主要言語
- PHP
- スター
- 261
- フォーク
- 44
- 平均マージ
- 19分
- マージ済み PR(30日)
- 1
説明
## What problem would the enhancement address for VIP?
The PDO_MYSQL module is not enabled on VIP. Plugins reliant on PDO like MailPoet are therefore currently not compatible with VIP.
## Describe the solution you'd like
An error should be thrown on an attempt to create a PDO connection.
## What code should be reported as a violation?
`$db = new PDO();`
## What code should *not* be reported as a violation?
Any attempt to use PDO should be reported.
コントリビューションガイド
調査の方向性
Issue ではファイルやテストは指定されていません。まず、リポジトリに既に存在する PHP_CodeSniffer の sniff とそのテストを見つけ、次にデータベース API の使用を検出するエントリーポイントを特定します。PDO を使用しようとする試みが報告され、テストスイートが記載された違反をカバーすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100