You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`transfer-generate`: generate transfer objects from configuration files
33
-
*`transfer-generate-bulk`: generate transfer objects by the list of configuration files
34
-
*`definition-generate`: generate definition files
35
-
36
-
> Installing the project by composer, the console commands are available in the vendor's bin directory.
28
+
*`transfer-generate`: generate transfer objects from a single configuration file
29
+
*`transfer-generate-bulk`: generate transfer objects from a list of configuration files
30
+
*`definition-generate`: generate definition files from JSON blueprints
37
31
38
32
### Config
39
33
@@ -53,10 +47,19 @@ Directory Structure
53
47
-`src/Dependency`: wrapper over third-party dependencies
54
48
-`src/Generated`: directory where generated transfer objects are saved
55
49
* should not contain any custom-written code
56
-
* each transfer object generator run overwrites all the files in the directory
57
-
* can be used across modules
58
-
-`src/Generated/_tmp`: temporary directory including newly generated transfer objects before they are finally moved to the `src/Generated`
50
+
* can be used across modules like `src/ModuleOne/Generated`, `src/ModuleTwo/Generated`, etc.
51
+
-`src/Generated/_tmp`: temporary directory to hold the transfer object generator's process directories
52
+
-`src/Generated/_tmp/{uuid}`: transfer object generator's process directory named by UUID.
53
+
The directory is created before the process starts and holds new transfer objects.
54
+
* only when the process is finished successfully, the transfer objects are moved to the `Generated` directory.
55
+
* each process directory is deleted after the process is finished
59
56
* in case of an unexpected error, the directory might not be deleted.
57
+
-`src/Generated/_tmp/{uuid}/{hash}.transfer.hash.csv`: hash file, each line of which contains comma-separated:
58
+
* transfer object class name
59
+
* transfer object content hash
60
+
-`src/Generated/{hash}.transfer.hash.csv`: hash file from previous transfer object generation run.
61
+
It is used to check for transfer object content changes as well as if some transfer objects should be deleted.
62
+
-`src/Generated/transfer.lock`: lock file used to prevent multiple processes from writing to the `Generated` directory at the same time.
60
63
-`src/Shared`: contains code shared across modules
61
64
* can be used across modules
62
65
-`src/Transfer`: transfer object module
@@ -65,7 +68,7 @@ Directory Structure
65
68
66
69
### Technical
67
70
68
-
-`.github`: GitHub CI actions, template and README.md images
71
+
-`.github`: GitHub CI actions, template, and README.md images
69
72
-`.xdebug`: Xdebug configuration for [Native Path Mapping](https://xdebug.org/funding/001-native-path-mapping)
70
73
-`docker`: [dockerized development environment](https://github.com/picamator/transfer-object/wiki/Development-Environment) configuration with shell helper commands
71
74
@@ -89,7 +92,7 @@ Code Style
89
92
- classes should be `readonly` when possible
90
93
- classes should use Constructor Property Promotion
91
94
- class properties should have `private` visibility unless one is a transfer object, or it is necessary for inheritance
92
-
- class method's and property's names should be similar across modules
95
+
- class methods and property names should be similar across modules
93
96
***expander** classes should have `public` methods prefixed by `expand`
94
97
***parser** classes should have `public` methods prefixed by `parse`
95
98
***builder** classes should have `public` methods prefixed by `create`
@@ -139,6 +142,7 @@ How To Install Project
139
142
----------------------
140
143
141
144
The project is installed by running the following command:
145
+
142
146
```console
143
147
docker/sdk install
144
148
```
@@ -147,16 +151,19 @@ How To Build/Start/Stop Docker Environment
147
151
-------------------------------------------
148
152
149
153
Docker Environment is built by running the following command:
154
+
150
155
```console
151
156
docker/sdk build
152
157
```
153
158
154
159
Docker Environment is started by running the following command:
160
+
155
161
```console
156
162
docker/sdk start
157
163
```
158
164
159
165
Docker Environment is stopped by running the following command:
166
+
160
167
```console
161
168
docker/sdk stop
162
169
```
@@ -165,101 +172,126 @@ How to Run PHP Script
165
172
---------------------
166
173
167
174
The PHP script runs by command:
175
+
168
176
```console
169
177
docker/sdk cli [path-to-script]
170
178
```
171
179
172
180
For instance, the `./examples/try-transfer-generator.php`:
0 commit comments