Remove deprecated callable on gacela.php
Chemaclass opened this issue · comments
Jose M. Valera Reales commented
Current behaviour
On gacela.php you can return a callable. See: is_callable($setupGacelaFile)
final class GacelaConfigUsingGacelaPhpFileFactory
{
// ...
public function createGacelaFileConfig(): GacelaConfigFileInterface
{
/** @var SetupGacelaInterface|callable $setupGacelaFile */
$setupGacelaFile = $this->fileIo->include($this->gacelaPhpPath);
if (is_callable($setupGacelaFile)) {
trigger_deprecation('Gacela', '0.15', 'Return a SetupGacelaInterface instance directly. The callable option will be removed in the next version.');
}
/** @var object $setupGacela */
$setupGacela = is_callable($setupGacelaFile) ? $setupGacelaFile() : $setupGacelaFile;
// ...
Acceptance criteria
Remove that possibility of allowing a callable, because it's not useful at all.
Ensure the $this->fileIo->include($this->gacelaPhpPath);
returns a SetupGacelaInterface
or fail.
Jose M. Valera Reales commented
This new idea of simplifying the gacela.php content #146, makes this issue obsolete. I will close it now.