Browse Source

Remove internal test classes from autoloader (#3992)

Christian Gripp 8 years ago
parent
commit
f4317ee796
2 changed files with 13 additions and 1 deletions
  1. 6 0
      UPGRADE-3.x.md
  2. 7 1
      composer.json

+ 6 - 0
UPGRADE-3.x.md

@@ -7,6 +7,12 @@ The `Sonata\AdminBundle\Form\Type\ModelTypeList` class is now deprecated.
 
 
 Use `Sonata\AdminBundle\Form\Type\ModelListType` instead.
 Use `Sonata\AdminBundle\Form\Type\ModelListType` instead.
 
 
+### Tests
+
+All files under the ``Tests`` directory are now correctly handled as internal test classes. 
+You can't extend them anymore, because they are only loaded when running internal tests. 
+More information can be found in the [composer docs](https://getcomposer.org/doc/04-schema.md#autoload-dev).
+
 UPGRADE FROM 3.2 to 3.3
 UPGRADE FROM 3.2 to 3.3
 =======================
 =======================
 
 

+ 7 - 1
composer.json

@@ -61,8 +61,14 @@
         "sonata-project/intl-bundle": "Add localized date and number into the list"
         "sonata-project/intl-bundle": "Add localized date and number into the list"
     },
     },
     "autoload": {
     "autoload": {
-        "psr-4": { "Sonata\\AdminBundle\\": "" }
+        "psr-4": { "Sonata\\AdminBundle\\": "" },
+        "exclude-from-classmap": [
+            "Tests/"
+        ]
     },
     },
+    "autoload-dev": {
+        "psr-4": { "Sonata\\AdminBundle\\Tests\\": "Tests/" }
+     },
     "config": {
     "config": {
         "sort-packages": true
         "sort-packages": true
     },
     },