`Utopia\Database\Adapter::getIntLimit()` is not enforced
まだ誰も着手していません。
評価
調査の方向性
Start with the createAttribute() check in src/Database/Database.php at the linked lines, then trace how integer attributes currently set $size and how adapters implement getIntLimit(). Compare the two enforcement options described in the issue and define the expected behavior for create and update paths. Done means integer limits are enforced consistently without relying on an unhandled PDO database exception.
索引モデルが issue の本文から書いたものです。
説明
Each adapter must implement the getIntLimit() method, but it isn't enforced due to how we interpret $size for integer attributes.
In the case of strings, $size is pretty obvious - the length of the string. However, for integers (and before BIGINT), we just set $size = 0, so this check in createAttribute() would never actually prevent PDO from throwing the database exception:
Options to enforce int limit:
- Check values for
getIntLimit()as a filter when creating/updating documents - Get PDO error codes when size is exceeded and throw a custom
Utopia\Databaseexception
- 主要言語
- PHP
- スター
- 74
- フォーク
- 59
- 平均マージ
- 10時間 45分
- マージ済み PR(30日)
- 20
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
utopia-php/database のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
utopia-php/database#939 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
utopia-php/database#923 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
utopia-php/database#328 · コメント 1 件 ·
utopia-php/database の issue をすべて見る
似ている issue
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
UX
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MagnaCapax/PMSS#949 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Automattic/static-site-importer#1829 ·