[core] Deprecations improvement for PHP 5.5 and fixing non-static issues