소스 검색

Remove internal test classes from autoloader (#3992)

Christian Gripp 8 년 전
부모
커밋
f4317ee796
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  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.
 
+### 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
 =======================
 

+ 7 - 1
composer.json

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