Symfony3.1 no handle void

61 views Asked by At

I have one class writed on Symfony 3.1 with php 7.1 and when i decide add return type as void then symfony throw exception. Method look's like:

private function log(): void {
//body

}

"Not found App\TestBundle\Listener\void, none returned" .

How can i set return typing void for method?

1

There are 1 answers

0
sensorario On BEST ANSWER

Update php to version 7.1. That error means that you believe to work with 7.1 but you are not.