@@ -74,69 +74,24 @@ php -S localhost:8888 -t web
7474
7575Open < http://localhost:8888 > with your preferred web browser.
7676
77- ### Development Environment
78-
79- #### Create Docker Image
80-
81- Create Docker image based on the latest supported PHP version
82-
83- docker build -t zack https://github.com/tbreuss/zack.git
84-
85- Optionally you can also use an older PHP version
86-
87- docker build --build-arg PHP_VERSION=8.2 -t zack https://github.com/tbreuss/zack.git
88- docker build --build-arg PHP_VERSION=8.3 -t zack https://github.com/tbreuss/zack.git
89-
90- #### Run Website
91-
92- Clone project
93-
94- git clone https://github.com/tbreuss/zack.git
95-
96- Change directory
97-
98- cd zack
99-
100- Install packages
101-
102- docker run --rm -it -v .:/app zack composer install
103-
104- Run website
105-
106- docker run --rm -v .:/app -p 8888:8888 zack php -S 0.0.0.0:8888 -t /app/website/web
107-
108- ### Testing
109-
110- #### PHP-CS-Fixer
111-
112- Fix code style issue using [ PHP-CS-Fixer] ( https://github.com/PHP-CS-Fixer/PHP-CS-Fixer )
113-
114- ./bin/coding-style.sh
115-
116- #### Functional Tests
117-
118- Run functional tests using [ Hurl] ( https://hurl.dev/ )
119-
120- ./bin/functional.sh localhost:9330
121-
12277### Project Folder Structure
12378
12479A typical project folder structure looks like the following:
12580
12681~~~ text
127- project/ <- Project root folder on your server
128- ├─ cache/ <- Folder with cached files
129- ├─ config/ <- Folder with config files
130- ├─ logs/ <- Folder with log files
131- ├─ routes/ <- Folder with routes for your website
132- │ └─ index.get.html <- The only route in this example
133- ├─ vendor/ <- Folder with Composer dependencies
134- ├─ views/ <- Folder with twig templates
135- │ ├─ base.html.twig <- Twig base layout file
136- │ └─ error.html.twig <- Twig file for displaying errors
137- └─ web/ <- Web server public folder
138- ├─ assets/ <- Folder with asset files like css or js
139- └─ index.php <- Website bootstrap file
82+ project/ # Project root folder on your server
83+ ├─ cache/ # Folder with cached files
84+ ├─ config/ # Folder with config files
85+ ├─ logs/ # Folder with log files
86+ ├─ routes/ # Folder with routes for your website
87+ │ └─ index.get.html # The only route in this example
88+ ├─ vendor/ # Folder with Composer dependencies
89+ ├─ views/ # Folder with twig templates
90+ │ ├─ base.html.twig # Twig base layout file
91+ │ └─ error.html.twig # Twig file for displaying errors
92+ └─ web/ # Web server public folder
93+ ├─ assets/ # Folder with asset files like css or js
94+ └─ index.php # Website bootstrap file
14095~~~
14196
14297Normally you only work in the ` routes ` and ` views ` folders.
@@ -153,10 +108,10 @@ If no method is specified, the route applies to all methods.
153108~~~ text
154109routes/
155110├─ api/
156- │ └─ test.patch.php <- PATCH /api/test
157- ├─ index.php <- ANY /
158- ├─ contact.get.php <- GET /contact
159- └─ contact.post.php <- POST /contact
111+ │ └─ test.patch.php # PATCH /api/test
112+ ├─ index.php # ANY /
113+ ├─ contact.get.php # GET /contact
114+ └─ contact.post.php # POST /contact
160115~~~
161116
162117You can nest routes by creating subdirectories.
@@ -364,3 +319,48 @@ Zack! supports the following Symfony HttpKernel events:
364319- ** kernel.exception** : This event is dispatched as soon as an error occurs during the handling of the HTTP request.
365320
366321Read [ Built-in Symfony Events] ( https://symfony.com/doc/current/reference/events.html#kernel-events ) for more information.
322+
323+ ### Development Environment
324+
325+ #### Create Docker Image
326+
327+ Create Docker image based on the latest supported PHP version
328+
329+ docker build -t zack https://github.com/tbreuss/zack.git
330+
331+ Optionally you can also use an older PHP version
332+
333+ docker build --build-arg PHP_VERSION=8.2 -t zack https://github.com/tbreuss/zack.git
334+ docker build --build-arg PHP_VERSION=8.3 -t zack https://github.com/tbreuss/zack.git
335+
336+ #### Run Website
337+
338+ Clone project
339+
340+ git clone https://github.com/tbreuss/zack.git
341+
342+ Change directory
343+
344+ cd zack
345+
346+ Install packages
347+
348+ docker run --rm -it -v .:/app zack composer install
349+
350+ Run website
351+
352+ docker run --rm -v .:/app -p 8888:8888 zack php -S 0.0.0.0:8888 -t /app/website/web
353+
354+ ### Testing
355+
356+ #### PHP-CS-Fixer
357+
358+ Fix code style issue using [ PHP-CS-Fixer] ( https://github.com/PHP-CS-Fixer/PHP-CS-Fixer )
359+
360+ ./bin/coding-style.sh
361+
362+ #### Functional Tests
363+
364+ Run functional tests using [ Hurl] ( https://hurl.dev/ )
365+
366+ ./bin/functional.sh localhost:9330
0 commit comments