1- UPGRADE TO 3.6
2- ======================= 
1+ # UPGRADE TO 3.7  
32
4- Import data to array
5- -------------- 
3+ ### Preset entity id before updating - [ go to the documentation] ( README.md#updating-entities )   
64
7- *  By default, allowed file extensions are set to ` 'csv', 'xls', 'xlsx', 'ods' ` .
8- However, if you want to change it, you can override this method in your import configuration.
5+ # UPGRADE TO 3.6  
96
10- ``` php 
11- public function getAllowedFileExtensions(): array
12- {
13-     return ['csv', 'xls', 'xlsx', 'ods'];
14- }
15- ``` 
7+ ### Set allowed file extensions - [ go to the documentation] ( README.md#set-allowed-file-extensions )   
168
17- UPGRADE TO 3.5
18- ======================= 
19- 
20- Import data to array
21- -------------- 
22- *  If your entity has an array field, and you want to import data from CSV file to it, it is now possible.
23- 
24- ``` php 
25- use JG\BatchEntityImportBundle\Form\Type\ArrayTextType;
26- use JG\BatchEntityImportBundle\Model\Form\FormFieldDefinition;
27- 
28- public function getFieldsDefinitions(): array
29- {
30-     return [
31-         'roles' => new FormFieldDefinition(
32-             ArrayTextType::class,
33-             [
34-                 'separator' => '& ',
35-             ]
36-         ),
37-     ];
38- }
39- ``` 
9+ # UPGRADE TO 3.5  
4010
11+ ### Import data to array - [ go to the documentation] ( README.md#importing-data-to-array-field )   
4112
42- UPGRADE TO 3.1
43- ======================= 
13+ # UPGRADE TO 3.1  
4414
45- CSV File
46- -------------- 
47- *  Now CSV file can contain spaces and dashes as a header name, for example "my column name" or "my-column-name".
15+ ## CSV File  
16+ -  Now CSV file can contain spaces and dashes as a header name, for example "my column name" or "my-column-name".
4817
49- Import Configuration class
50- -------------- 
51- *  When header name contains spaces we should use underscores instead of spaces when defining fields names in fields definitions and in constraints.
18+ ## Import Configuration class  
19+ -  When header name contains spaces we should use underscores instead of spaces when defining fields names in fields definitions and in constraints.
5220
5321
54- UPGRADE TO 3.0
55- ======================= 
22+ # UPGRADE TO 3.0  
5623
57- Controller
58- -------------- 
24+ ## Controller  
5925*  Passing configuration class by ` getSubscribedServices() `  was removed. Now it is only possible by autoconfiguration.
6026
6127
62- UPGRADE TO 2.5
63- ======================= 
28+ # UPGRADE TO 2.5  
6429
65- Import Configuration class
66- -------------- 
67- *  Added new validator to check matrix record data uniqueness in database.
30+ ## Import Configuration class  
31+ -  Added new validator to check matrix record data uniqueness in database.
6832``` php 
6933use JG\BatchEntityImportBundle\Validator\Constraints\DatabaseEntityUnique;
7034
@@ -76,12 +40,10 @@ public function getMatrixConstraints(): array
7640}
7741``` 
7842
79- UPGRADE TO 2.4
80- ======================= 
43+ # UPGRADE TO 2.4  
8144
82- Import Configuration class
83- -------------- 
84- *  Added new validator to check matrix record data uniqueness.
45+ ## Import Configuration class  
46+ -  Added new validator to check matrix record data uniqueness.
8547``` php 
8648use JG\BatchEntityImportBundle\Validator\Constraints\MatrixRecordUnique;
8749
@@ -93,33 +55,27 @@ public function getMatrixConstraints(): array
9355}
9456``` 
9557
96- Controller
97- -------------- 
98- *  List of options passed to form in ` createMatrixForm() `  method, should contain new ` constraints `  element:
58+ ## Controller  
59+ -  List of options passed to form in ` createMatrixForm() `  method, should contain new ` constraints `  element:
9960` 'constraints' => $importConfiguration->getMatrixConstraints() ` 
10061
101- UPGRADE TO 2.3
102- ======================= 
62+ # UPGRADE TO 2.3  
10363
104- Controller
105- -------------- 
106- *  Passing configuration class by ` getSubscribedServices() `  method is not needed anymore and will be removed in the future.
107- *  To make sure that configuration class will be injected automatically:
108-   *  Interface ` JG\BatchEntityImportBundle\Controller\ImportConfigurationAutoInjectInterface `  should be implemented.
109-   *  Trait ` JG\BatchEntityImportBundle\Controller\ImportConfigurationAutoInjectTrait `  should be used to add needed methods.
64+ ## Controller  
65+ -  Passing configuration class by ` getSubscribedServices() `  method is not needed anymore and will be removed in the future.
66+ -  To make sure that configuration class will be injected automatically:
67+   -  Interface ` JG\BatchEntityImportBundle\Controller\ImportConfigurationAutoInjectInterface `  should be implemented.
68+   -  Trait ` JG\BatchEntityImportBundle\Controller\ImportConfigurationAutoInjectTrait `  should be used to add needed methods.
11069
11170
112- UPGRADE TO 2.2
113- ======================= 
71+ # UPGRADE TO 2.2  
11472
115- Import Configuration class
116- -------------- 
117- *  Now configuration class should be always registered as a service:
73+ ## Import Configuration class  
74+ -  Now configuration class should be always registered as a service:
11875``` yaml 
11976services :
12077    App\Model\ImportConfiguration\UserImportConfiguration : ~ 
12178` ` ` 
12279
123- Controller 
124- -------------- 
125- * Entity Manager is no longer passed as an argument of actions. 
80+ ## Controller 
81+ - Entity Manager is no longer passed as an argument of actions. 
0 commit comments