There are too many global variables, please include the backward compatibility toolkit in your module and replace calls to global variables with $this->context->...
Documentation : https://github.com/PrestaShop/PrestaShop-modules/pull/238