`Utopia\Database\Adapter::getIntLimit()` is not enforced
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 74
- Forks
- 59
- Merge medio
- 10 h 45 min
- PR fusionados (30 d)
- 20
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de utopia-php/database
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
utopia-php/database#939 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
utopia-php/database#923 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
utopia-php/database#328 · 1 comentario ·
Todos los issues de utopia-php/database
Issues similares
-
tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug customer-reported
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MagnaCapax/PMSS#949 ·
-
responsive-media kses allow-list strips clipPathUnits, collapsing objectBoundingBox clip paths Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Automattic/static-site-importer#1829 ·