KnpLabs / KnpLabs/php-github-api

Do not "help" the user by changing parameters

Abierto
#566 2 comentarios 4 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
PHP
Estrellas
2.2k
Forks
587
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

On 30+ places we have code like this:

```php
if (!in_array($state, array('open', 'closed'))) {
$state = 'open';
}
```

If the user misspelled the `$state` we should not help them. That may cause unpredicted actions. We should throw an exception or let the API call fail.

This is a BC break. I've marked it in milestone 3.0.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Search the PHP source for the repeated in_array parameter-normalization pattern and review how invalid API parameters currently fail. Determine the consistent failure behavior and identify all affected locations; done means misspelled parameters are no longer silently changed and the existing test suite passes.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
php
Área
api, backend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.