Move PHP-version-agnostic part to framework