antonioribeiro / firewall

Firewall package for Laravel applications
BSD 3-Clause "New" or "Revised" License
1.39k stars 163 forks source link

Incompatible syntax with php 5.6 in 1.x versions #102

Closed tolnaiz closed 6 years ago

tolnaiz commented 6 years ago

On PHP 5.6 this line gives a parse error because the assignment is not allowed in between the parentheses.

$success = ($updater = new GeoIpUpdater)->updateGeoIpFiles($this->config->get('geoip_database_path'));

I created a fix, but I cannot create a pull request for the 1.x version.

https://github.com/ferling/firewall/commit/ef93d5a4636a2f25f72937c4068df4ca41eb2b3f

antonioribeiro commented 6 years ago

This is not 1.x code, this is more like 2.x

antonioribeiro commented 6 years ago

This is probably why you cannot send a pull request to 1.x

tolnaiz commented 6 years ago

As I see, it is in v1.1.0: https://github.com/antonioribeiro/firewall/blob/v1.1.0/src/Firewall.php#L521

antonioribeiro commented 6 years ago

Should be fixed on v1.1.1. You just have to update. Thank you!