diff --git a/DependencyInjection/SonataCoreExtension.php b/DependencyInjection/SonataCoreExtension.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/SonataCoreExtension.php
+++ b/DependencyInjection/SonataCoreExtension.php
@@ -83,7 +83,9 @@ EOT
         $container->setParameter('sonata.core.form_type', $config['form_type']);
 
         $this->configureFormFactory($container, $config);
-        $this->configureClassesToCompile();
+        if (\PHP_VERSION_ID < 70000) {
+            $this->configureClassesToCompile();
+        }
 
         $this->deprecateSlugify($container);
Only add classes to compile on PHP < <I> (#<I>)

addClassesToCompile is deprecated and doesn't improve performances on PHP > <I>