Closed tomasfejfar closed 5 years ago
@odin, tohle jsem objevil, když jsem ještě upravoval ten PR do generátoru. Určitě by se to nemělo chovat jako teď (tj. Keboola\Component\Exception\BaseComponentException:Unknown sync action "", method does not exist in class
). Buďto by to mělo vykysat na exception, že je to neplatný config nebo by to mělo mít default run
.
seriozne nevim, mam z toho ambivalentni pocity - na jednu stranu je to prijemny pro testy, na druhou stranu je to nerealisticka konfigurace, tak proc se s ni zaobirat?
Tak v tom případě by to mělo padat pokud ten "action" chybí. Ale teď že to vrátí ''
je imho blbě a bylo to OK dřív tím,ž e se s tím nikde nepracovalo.
no tak pak by tam nemelo byt return $this->getValue(['action'], '');
ale jen return $this->getValue(['action']);
Jo, přesně tak. Ten default je tam historicky už od začátku prázdný string.
ale klidne se pojdme zeptat jeste nekoho jinyho jestli jit cestou a nebo b, protoze ja si fakt nejsem jistej
btw, vsim jsem si, ze https://github.com/keboola/php-component#migration-from-version-6-to-version-7 tady zustal run misto execute
Jo, přilepím fix k tomu, díky 👍
In 7.0
run()
is no longer ran from index.php, so it needs to be a default value if it is to work with empty config{}
.