Revize 1f77dd64
Přidáno uživatelem Tomáš Ballák před téměř 5 roky(ů)
.docker-compose-dev.yml | ||
---|---|---|
25 | 25 |
ports: |
26 | 26 |
- "80:80" |
27 | 27 |
volumes: |
28 |
- ./logs:/var/nginx/log
|
|
28 |
- ./logs/nginx:/var/log/nginx
|
|
29 | 29 |
- ./website/:/var/www/symfony |
30 | 30 |
container_name: "heatmap_nginx" |
31 | 31 |
database: |
README.md | ||
---|---|---|
6 | 6 |
|
7 | 7 |
## 🔩 Development env |
8 | 8 |
|
9 |
* Install **[🐳 docker](https://www.docker.com/)** and **[📝 vscode](https://code.visualstudio.com/)** |
|
9 |
* Install **latest php**, **[🐳 docker](https://www.docker.com/)** and **[📝 vscode](https://code.visualstudio.com/)**
|
|
10 | 10 |
* Then run `./scripts/dev/build.sh` or `scripts/dev/build.bat` in the root of the project |
11 | 11 |
* When you run `docker ps` you should see these containers: **heatmap_nginx**, **heatmap_php-fpm** and **heatmap_mongodb** |
12 | 12 |
* Symfony project should be available on http://localhost:80 |
... | ... | |
18 | 18 |
* require `./scripts/composer.sh require package_name` |
19 | 19 |
### PHP Linter in vscode |
20 | 20 |
* If you want check your code style is in the right format press <kbd>F1</kbd> choose `Tasks: Run Task` and `PHP Linter` |
21 |
* If you want to format the current file you use <kbd>CTRL+Shift+I</kbd> or <kbd>🖱️ RightClick</kbd> + `Format Document`
|
|
21 |
* If you want to format the current file just press <kbd>F1</kbd> choose `Tasks: Run Task` and `Format`
|
|
22 | 22 |
## 🚀 Production env |
23 | 23 |
* To run production env on your local machine execute this `./scripts/build.sh` |
build/php-fpm/Dockerfile | ||
---|---|---|
2 | 2 |
RUN apk update; \ |
3 | 3 |
apk upgrade; \ |
4 | 4 |
apk add autoconf openssl-dev g++ make && \ |
5 |
echo "**** install MongoDB ****\n" && \ |
|
5 | 6 |
pecl install mongodb && \ |
6 | 7 |
docker-php-ext-enable mongodb; \ |
7 | 8 |
apk del --purge autoconf openssl-dev g++ make; |
8 |
RUN echo "**** install Python ****" && \ |
|
9 |
RUN echo "**** install Python ****\n" && \
|
|
9 | 10 |
apk add --no-cache python3 && \ |
10 | 11 |
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \ |
11 | 12 |
\ |
12 |
echo "**** install pip ****" && \ |
|
13 |
echo "**** install pip ****\n" && \
|
|
13 | 14 |
python3 -m ensurepip && \ |
14 | 15 |
rm -r /usr/lib/python*/ensurepip && \ |
15 | 16 |
pip3 install --no-cache --upgrade pip setuptools wheel && \ |
16 |
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi |
|
17 |
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi |
|
18 |
RUN echo "**** install PHP Composer ****\n" && \ |
|
19 |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer |
build/php-fpm/dev/Dockerfile | ||
---|---|---|
24 | 24 |
pecl install -f xdebug-2.9.4 && \ |
25 | 25 |
docker-php-ext-enable xdebug && \ |
26 | 26 |
apk del --purge autoconf g++ make |
27 |
RUN echo zend_extension="$(find / -name 'xdebug.so')" >> /etc/php7/conf.d/xdebug.ini |
|
27 |
RUN echo zend_extension="$(find / -name 'xdebug.so')" >> /etc/php7/conf.d/xdebug.ini |
|
28 |
RUN echo "**** install PHP Composer ****\n" && \ |
|
29 |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer |
scripts/build.sh | ||
---|---|---|
1 | 1 |
#!/bin/bash |
2 | 2 |
#Build development environment |
3 | 3 |
docker-compose down |
4 |
docker-compose build |
|
5 |
docker-compose up -d |
|
6 |
docker run --rm --interactive --volume $PWD/website:/app composer install --no-dev |
|
4 |
docker-compose up --build -d |
|
5 |
docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony --no-dev |
scripts/composer.sh | ||
---|---|---|
7 | 7 |
\ \_____\ \_____\ \_\ \ \_\ \_\ \ \_____\/\_____\ \_____\ \_\ \_\ |
8 | 8 |
\/_____/\/_____/\/_/ \/_/\/_/ \/_____/\/_____/\/_____/\/_/ /_/ |
9 | 9 |
EOF |
10 |
docker run --rm --interactive --volume $PWD:/app composer $@ |
|
10 |
docker-compose exec php-fpm composer --working-dir=/var/www/symfony $@ |
scripts/dev/build.bat | ||
---|---|---|
1 | 1 |
docker-compose down |
2 | 2 |
docker-compose -f .docker-compose-dev.yml up --build -d |
3 |
docker run --rm --interactive --tty --volume %CD%/website:/app composer install |
|
3 |
docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony |
scripts/dev/build.sh | ||
---|---|---|
9 | 9 |
\ \_____\ \_____\ \_\ \ \_\ \_\ \ \_____\/\_____\ \_____\ \_\ \_\ \ \_\ \_\\"\_\/\_____\ \ \_\\ \_\ \_\ \_____\ \_____\ |
10 | 10 |
\/_____/\/_____/\/_/ \/_/\/_/ \/_____/\/_____/\/_____/\/_/ /_/ \/_/\/_/ \/_/\/_____/ \/_/ \/_/\/_/\/_____/\/_____/ |
11 | 11 |
EOF |
12 |
docker run --rm --interactive --volume $PWD/website:/app composer install
|
|
12 |
docker-compose exec php-fpm composer install --no-interaction --working-dir=/var/www/symfony
|
website/composer.json | ||
---|---|---|
7 | 7 |
"php": "^7.2.5", |
8 | 8 |
"ext-ctype": "*", |
9 | 9 |
"ext-iconv": "*", |
10 |
"sensio/framework-extra-bundle": "^5.5", |
|
10 | 11 |
"symfony/console": "5.0.*", |
11 | 12 |
"symfony/dotenv": "5.0.*", |
12 | 13 |
"symfony/flex": "^1.3.1", |
website/composer.lock | ||
---|---|---|
4 | 4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
5 | 5 |
"This file is @generated automatically" |
6 | 6 |
], |
7 |
"content-hash": "492faf1d6a3fd9107c34dc79aa1566be",
|
|
7 |
"content-hash": "032bc0061131fefa9b8aebddb553037c",
|
|
8 | 8 |
"packages": [ |
9 |
{ |
|
10 |
"name": "doctrine/annotations", |
|
11 |
"version": "1.10.1", |
|
12 |
"source": { |
|
13 |
"type": "git", |
|
14 |
"url": "https://github.com/doctrine/annotations.git", |
|
15 |
"reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" |
|
16 |
}, |
|
17 |
"dist": { |
|
18 |
"type": "zip", |
|
19 |
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", |
|
20 |
"reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", |
|
21 |
"shasum": "" |
|
22 |
}, |
|
23 |
"require": { |
|
24 |
"doctrine/lexer": "1.*", |
|
25 |
"ext-tokenizer": "*", |
|
26 |
"php": "^7.1" |
|
27 |
}, |
|
28 |
"require-dev": { |
|
29 |
"doctrine/cache": "1.*", |
|
30 |
"phpunit/phpunit": "^7.5" |
|
31 |
}, |
|
32 |
"type": "library", |
|
33 |
"extra": { |
|
34 |
"branch-alias": { |
|
35 |
"dev-master": "1.9.x-dev" |
|
36 |
} |
|
37 |
}, |
|
38 |
"autoload": { |
|
39 |
"psr-4": { |
|
40 |
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" |
|
41 |
} |
|
42 |
}, |
|
43 |
"notification-url": "https://packagist.org/downloads/", |
|
44 |
"license": [ |
|
45 |
"MIT" |
|
46 |
], |
|
47 |
"authors": [ |
|
48 |
{ |
|
49 |
"name": "Guilherme Blanco", |
|
50 |
"email": "guilhermeblanco@gmail.com" |
|
51 |
}, |
|
52 |
{ |
|
53 |
"name": "Roman Borschel", |
|
54 |
"email": "roman@code-factory.org" |
|
55 |
}, |
|
56 |
{ |
|
57 |
"name": "Benjamin Eberlei", |
|
58 |
"email": "kontakt@beberlei.de" |
|
59 |
}, |
|
60 |
{ |
|
61 |
"name": "Jonathan Wage", |
|
62 |
"email": "jonwage@gmail.com" |
|
63 |
}, |
|
64 |
{ |
|
65 |
"name": "Johannes Schmitt", |
|
66 |
"email": "schmittjoh@gmail.com" |
|
67 |
} |
|
68 |
], |
|
69 |
"description": "Docblock Annotations Parser", |
|
70 |
"homepage": "http://www.doctrine-project.org", |
|
71 |
"keywords": [ |
|
72 |
"annotations", |
|
73 |
"docblock", |
|
74 |
"parser" |
|
75 |
], |
|
76 |
"time": "2020-04-02T12:33:25+00:00" |
|
77 |
}, |
|
78 |
{ |
|
79 |
"name": "doctrine/lexer", |
|
80 |
"version": "1.2.0", |
|
81 |
"source": { |
|
82 |
"type": "git", |
|
83 |
"url": "https://github.com/doctrine/lexer.git", |
|
84 |
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" |
|
85 |
}, |
|
86 |
"dist": { |
|
87 |
"type": "zip", |
|
88 |
"url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", |
|
89 |
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", |
|
90 |
"shasum": "" |
|
91 |
}, |
|
92 |
"require": { |
|
93 |
"php": "^7.2" |
|
94 |
}, |
|
95 |
"require-dev": { |
|
96 |
"doctrine/coding-standard": "^6.0", |
|
97 |
"phpstan/phpstan": "^0.11.8", |
|
98 |
"phpunit/phpunit": "^8.2" |
|
99 |
}, |
|
100 |
"type": "library", |
|
101 |
"extra": { |
|
102 |
"branch-alias": { |
|
103 |
"dev-master": "1.2.x-dev" |
|
104 |
} |
|
105 |
}, |
|
106 |
"autoload": { |
|
107 |
"psr-4": { |
|
108 |
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" |
|
109 |
} |
|
110 |
}, |
|
111 |
"notification-url": "https://packagist.org/downloads/", |
|
112 |
"license": [ |
|
113 |
"MIT" |
|
114 |
], |
|
115 |
"authors": [ |
|
116 |
{ |
|
117 |
"name": "Guilherme Blanco", |
|
118 |
"email": "guilhermeblanco@gmail.com" |
|
119 |
}, |
|
120 |
{ |
|
121 |
"name": "Roman Borschel", |
|
122 |
"email": "roman@code-factory.org" |
|
123 |
}, |
|
124 |
{ |
|
125 |
"name": "Johannes Schmitt", |
|
126 |
"email": "schmittjoh@gmail.com" |
|
127 |
} |
|
128 |
], |
|
129 |
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", |
|
130 |
"homepage": "https://www.doctrine-project.org/projects/lexer.html", |
|
131 |
"keywords": [ |
|
132 |
"annotations", |
|
133 |
"docblock", |
|
134 |
"lexer", |
|
135 |
"parser", |
|
136 |
"php" |
|
137 |
], |
|
138 |
"time": "2019-10-30T14:39:59+00:00" |
|
139 |
}, |
|
9 | 140 |
{ |
10 | 141 |
"name": "psr/cache", |
11 | 142 |
"version": "1.0.1", |
... | ... | |
194 | 325 |
], |
195 | 326 |
"time": "2020-03-23T09:12:05+00:00" |
196 | 327 |
}, |
328 |
{ |
|
329 |
"name": "sensio/framework-extra-bundle", |
|
330 |
"version": "v5.5.4", |
|
331 |
"source": { |
|
332 |
"type": "git", |
|
333 |
"url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", |
|
334 |
"reference": "d0585d4825a87a5030ca8cd34adb4a17e1066c17" |
|
335 |
}, |
|
336 |
"dist": { |
|
337 |
"type": "zip", |
|
338 |
"url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/d0585d4825a87a5030ca8cd34adb4a17e1066c17", |
|
339 |
"reference": "d0585d4825a87a5030ca8cd34adb4a17e1066c17", |
|
340 |
"shasum": "" |
|
341 |
}, |
|
342 |
"require": { |
|
343 |
"doctrine/annotations": "^1.0", |
|
344 |
"php": ">=7.1.3", |
|
345 |
"symfony/config": "^4.4|^5.0", |
|
346 |
"symfony/dependency-injection": "^4.4|^5.0", |
|
347 |
"symfony/framework-bundle": "^4.4|^5.0", |
|
348 |
"symfony/http-kernel": "^4.4|^5.0" |
|
349 |
}, |
|
350 |
"conflict": { |
|
351 |
"doctrine/doctrine-cache-bundle": "<1.3.1" |
|
352 |
}, |
|
353 |
"require-dev": { |
|
354 |
"doctrine/doctrine-bundle": "^1.11|^2.0", |
|
355 |
"doctrine/orm": "^2.5", |
|
356 |
"nyholm/psr7": "^1.1", |
|
357 |
"symfony/browser-kit": "^4.4|^5.0", |
|
358 |
"symfony/dom-crawler": "^4.4|^5.0", |
|
359 |
"symfony/expression-language": "^4.4|^5.0", |
|
360 |
"symfony/finder": "^4.4|^5.0", |
|
361 |
"symfony/monolog-bridge": "^4.0|^5.0", |
|
362 |
"symfony/monolog-bundle": "^3.2", |
|
363 |
"symfony/phpunit-bridge": "^4.3.5|^5.0", |
|
364 |
"symfony/psr-http-message-bridge": "^1.1", |
|
365 |
"symfony/security-bundle": "^4.4|^5.0", |
|
366 |
"symfony/twig-bundle": "^4.4|^5.0", |
|
367 |
"symfony/yaml": "^4.4|^5.0", |
|
368 |
"twig/twig": "^1.34|^2.4|^3.0" |
|
369 |
}, |
|
370 |
"type": "symfony-bundle", |
|
371 |
"extra": { |
|
372 |
"branch-alias": { |
|
373 |
"dev-master": "5.5.x-dev" |
|
374 |
} |
|
375 |
}, |
|
376 |
"autoload": { |
|
377 |
"psr-4": { |
|
378 |
"Sensio\\Bundle\\FrameworkExtraBundle\\": "src/" |
|
379 |
}, |
|
380 |
"exclude-from-classmap": [ |
|
381 |
"/tests/" |
|
382 |
] |
|
383 |
}, |
|
384 |
"notification-url": "https://packagist.org/downloads/", |
|
385 |
"license": [ |
|
386 |
"MIT" |
|
387 |
], |
|
388 |
"authors": [ |
|
389 |
{ |
|
390 |
"name": "Fabien Potencier", |
|
391 |
"email": "fabien@symfony.com" |
|
392 |
} |
|
393 |
], |
|
394 |
"description": "This bundle provides a way to configure your controllers with annotations", |
|
395 |
"keywords": [ |
|
396 |
"annotations", |
|
397 |
"controllers" |
|
398 |
], |
|
399 |
"time": "2020-04-06T12:20:39+00:00" |
|
400 |
}, |
|
197 | 401 |
{ |
198 | 402 |
"name": "symfony/cache", |
199 | 403 |
"version": "v5.0.7", |
... | ... | |
2175 | 2379 |
], |
2176 | 2380 |
"time": "2020-03-01T12:26:26+00:00" |
2177 | 2381 |
}, |
2178 |
{ |
|
2179 |
"name": "doctrine/annotations", |
|
2180 |
"version": "1.10.1", |
|
2181 |
"source": { |
|
2182 |
"type": "git", |
|
2183 |
"url": "https://github.com/doctrine/annotations.git", |
|
2184 |
"reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb" |
|
2185 |
}, |
|
2186 |
"dist": { |
|
2187 |
"type": "zip", |
|
2188 |
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5eb79f3dbdffed6544e1fc287572c0f462bd29bb", |
|
2189 |
"reference": "5eb79f3dbdffed6544e1fc287572c0f462bd29bb", |
|
2190 |
"shasum": "" |
|
2191 |
}, |
|
2192 |
"require": { |
|
2193 |
"doctrine/lexer": "1.*", |
|
2194 |
"ext-tokenizer": "*", |
|
2195 |
"php": "^7.1" |
|
2196 |
}, |
|
2197 |
"require-dev": { |
|
2198 |
"doctrine/cache": "1.*", |
|
2199 |
"phpunit/phpunit": "^7.5" |
|
2200 |
}, |
|
2201 |
"type": "library", |
|
2202 |
"extra": { |
|
2203 |
"branch-alias": { |
|
2204 |
"dev-master": "1.9.x-dev" |
|
2205 |
} |
|
2206 |
}, |
|
2207 |
"autoload": { |
|
2208 |
"psr-4": { |
|
2209 |
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" |
|
2210 |
} |
|
2211 |
}, |
|
2212 |
"notification-url": "https://packagist.org/downloads/", |
|
2213 |
"license": [ |
|
2214 |
"MIT" |
|
2215 |
], |
|
2216 |
"authors": [ |
|
2217 |
{ |
|
2218 |
"name": "Guilherme Blanco", |
|
2219 |
"email": "guilhermeblanco@gmail.com" |
|
2220 |
}, |
|
2221 |
{ |
|
2222 |
"name": "Roman Borschel", |
|
2223 |
"email": "roman@code-factory.org" |
|
2224 |
}, |
|
2225 |
{ |
|
2226 |
"name": "Benjamin Eberlei", |
|
2227 |
"email": "kontakt@beberlei.de" |
|
2228 |
}, |
|
2229 |
{ |
|
2230 |
"name": "Jonathan Wage", |
|
2231 |
"email": "jonwage@gmail.com" |
|
2232 |
}, |
|
2233 |
{ |
|
2234 |
"name": "Johannes Schmitt", |
|
2235 |
"email": "schmittjoh@gmail.com" |
|
2236 |
} |
|
2237 |
], |
|
2238 |
"description": "Docblock Annotations Parser", |
|
2239 |
"homepage": "http://www.doctrine-project.org", |
|
2240 |
"keywords": [ |
|
2241 |
"annotations", |
|
2242 |
"docblock", |
|
2243 |
"parser" |
|
2244 |
], |
|
2245 |
"time": "2020-04-02T12:33:25+00:00" |
|
2246 |
}, |
|
2247 |
{ |
|
2248 |
"name": "doctrine/lexer", |
|
2249 |
"version": "1.2.0", |
|
2250 |
"source": { |
|
2251 |
"type": "git", |
|
2252 |
"url": "https://github.com/doctrine/lexer.git", |
|
2253 |
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" |
|
2254 |
}, |
|
2255 |
"dist": { |
|
2256 |
"type": "zip", |
|
2257 |
"url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", |
|
2258 |
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", |
|
2259 |
"shasum": "" |
|
2260 |
}, |
|
2261 |
"require": { |
|
2262 |
"php": "^7.2" |
|
2263 |
}, |
|
2264 |
"require-dev": { |
|
2265 |
"doctrine/coding-standard": "^6.0", |
|
2266 |
"phpstan/phpstan": "^0.11.8", |
|
2267 |
"phpunit/phpunit": "^8.2" |
|
2268 |
}, |
|
2269 |
"type": "library", |
|
2270 |
"extra": { |
|
2271 |
"branch-alias": { |
|
2272 |
"dev-master": "1.2.x-dev" |
|
2273 |
} |
|
2274 |
}, |
|
2275 |
"autoload": { |
|
2276 |
"psr-4": { |
|
2277 |
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" |
|
2278 |
} |
|
2279 |
}, |
|
2280 |
"notification-url": "https://packagist.org/downloads/", |
|
2281 |
"license": [ |
|
2282 |
"MIT" |
|
2283 |
], |
|
2284 |
"authors": [ |
|
2285 |
{ |
|
2286 |
"name": "Guilherme Blanco", |
|
2287 |
"email": "guilhermeblanco@gmail.com" |
|
2288 |
}, |
|
2289 |
{ |
|
2290 |
"name": "Roman Borschel", |
|
2291 |
"email": "roman@code-factory.org" |
|
2292 |
}, |
|
2293 |
{ |
|
2294 |
"name": "Johannes Schmitt", |
|
2295 |
"email": "schmittjoh@gmail.com" |
|
2296 |
} |
|
2297 |
], |
|
2298 |
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", |
|
2299 |
"homepage": "https://www.doctrine-project.org/projects/lexer.html", |
|
2300 |
"keywords": [ |
|
2301 |
"annotations", |
|
2302 |
"docblock", |
|
2303 |
"lexer", |
|
2304 |
"parser", |
|
2305 |
"php" |
|
2306 |
], |
|
2307 |
"time": "2019-10-30T14:39:59+00:00" |
|
2308 |
}, |
|
2309 | 2382 |
{ |
2310 | 2383 |
"name": "friendsofphp/php-cs-fixer", |
2311 | 2384 |
"version": "v2.16.1", |
... | ... | |
2612 | 2685 |
], |
2613 | 2686 |
"description": "Symfony Process Component", |
2614 | 2687 |
"homepage": "https://symfony.com", |
2615 |
"funding": [ |
|
2616 |
{ |
|
2617 |
"url": "https://symfony.com/sponsor", |
|
2618 |
"type": "custom" |
|
2619 |
}, |
|
2620 |
{ |
|
2621 |
"url": "https://github.com/fabpot", |
|
2622 |
"type": "github" |
|
2623 |
}, |
|
2624 |
{ |
|
2625 |
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony", |
|
2626 |
"type": "tidelift" |
|
2627 |
} |
|
2628 |
], |
|
2629 | 2688 |
"time": "2020-03-27T16:56:45+00:00" |
2630 | 2689 |
}, |
2631 | 2690 |
{ |
website/config/bundles.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
return [ |
4 | 4 |
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
5 |
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], |
|
5 | 6 |
]; |
website/config/packages/sensio_framework_extra.yaml | ||
---|---|---|
1 |
sensio_framework_extra: |
|
2 |
router: |
|
3 |
annotations: false |
website/config/routes.yaml | ||
---|---|---|
1 |
#index: |
|
2 |
# path: / |
|
3 |
# controller: App\Controller\DefaultController::index |
|
1 |
index: |
|
2 |
path: / |
|
3 |
controller: App\Controller\DefaultController::index |
website/src/Controller/DefaultController.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App\Controller; |
|
4 |
|
|
5 |
use Symfony\Component\HttpFoundation\Response; |
|
6 |
|
|
7 |
class DefaultController { |
|
8 |
public function index(): Response { |
|
9 |
$number = random_int(0, 100); |
|
10 |
|
|
11 |
return new Response( |
|
12 |
'<html><body>'.$number.'</body></html>' |
|
13 |
); |
|
14 |
} |
|
15 |
} |
website/symfony.code-workspace | ||
---|---|---|
7 | 7 |
"settings": { |
8 | 8 |
"php.suggest.basic":false, |
9 | 9 |
"files.autoSave": "afterDelay", |
10 |
"php-cs-fixer.onsave": false, |
|
11 |
"php-cs-fixer.rules": "@PSR2", |
|
12 |
"php-cs-fixer.config": ".php_cs", |
|
13 |
"php-cs-fixer.executablePath": "${workspaceRoot}/vendor/bin/php-cs-fixer", |
|
14 |
"php-cs-fixer.executablePathWindows": "${workspaceRoot}\\vendor\\bin\\php-cs-fixer" |
|
15 | 10 |
}, |
16 | 11 |
"extensions": { |
17 | 12 |
"recommendations": [ |
18 | 13 |
"vscode-icons-team.vscode-icons", |
19 |
"felixfbecker.php-intellisense", |
|
20 |
"junstyle.php-cs-fixer" |
|
14 |
"felixfbecker.php-intellisense" |
|
21 | 15 |
] |
22 | 16 |
}, |
23 | 17 |
"tasks": { |
24 | 18 |
"version": "2.0.0", |
25 | 19 |
"tasks": [{ |
26 | 20 |
"label": "PHP Linter", |
27 |
"command": "${workspaceRoot}/vendor/bin/php-cs-fixer",
|
|
28 |
"args": ["fix", "--dry-run", "--config", ".php_cs", "--stop-on-violation", "--using-cache=no"],
|
|
21 |
"command": "docker-compose",
|
|
22 |
"args": ["exec", "php-fpm", "/var/www/symfony/vendor/bin/php-cs-fixer","fix", "--dry-run", "--config", "/var/www/symfony/.php_cs", "--stop-on-violation", "--using-cache=no"],
|
|
29 | 23 |
"windows":{ |
30 |
"command": "${workspaceRoot}\\vendor\\bin\\php-cs-fixer", |
|
31 |
"args": ["fix", "--dry-run", "--config", ".php_cs", "--stop-on-violation", "--using-cache=no"], |
|
24 |
"command": "docker-compose", |
|
25 |
"args": ["exec", "php-fpm", "/var/www/symfony/vendor/bin/php-cs-fixer", "fix", "--dry-run", "--config", "/var/www/symfony/.php_cs", "--stop-on-violation", "--using-cache=no"], |
|
26 |
} |
|
27 |
}, |
|
28 |
{ |
|
29 |
"label": "Format", |
|
30 |
"command": "docker-compose", |
|
31 |
"args": ["exec", "php-fpm", "/var/www/symfony/vendor/bin/php-cs-fixer","fix", "--config", "/var/www/symfony/.php_cs", "--stop-on-violation"], |
|
32 |
"windows":{ |
|
33 |
"command": "docker-compose", |
|
34 |
"args": ["exec", "php-fpm", "/var/www/symfony/vendor/bin/php-cs-fixer", "fix", "--config", "/var/www/symfony/.php_cs", "--stop-on-violation"], |
|
32 | 35 |
} |
33 | 36 |
}] |
34 | 37 |
}, |
... | ... | |
37 | 40 |
"name": "Listen for XDebug", |
38 | 41 |
"type": "php", |
39 | 42 |
"request": "launch", |
40 |
"port": 9000, |
|
41 |
"pathMappings": { |
|
42 |
"/var/www/symfony/public": "${workspaceRoot}/public" |
|
43 |
}}] |
|
43 |
"port": 9000 |
|
44 |
}] |
|
44 | 45 |
} |
45 | 46 |
} |
website/symfony.lock | ||
---|---|---|
50 | 50 |
"psr/log": { |
51 | 51 |
"version": "1.1.3" |
52 | 52 |
}, |
53 |
"sensio/framework-extra-bundle": { |
|
54 |
"version": "5.2", |
|
55 |
"recipe": { |
|
56 |
"repo": "github.com/symfony/recipes", |
|
57 |
"branch": "master", |
|
58 |
"version": "5.2", |
|
59 |
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b" |
|
60 |
}, |
|
61 |
"files": [ |
|
62 |
"config/packages/sensio_framework_extra.yaml" |
|
63 |
] |
|
64 |
}, |
|
53 | 65 |
"squizlabs/php_codesniffer": { |
54 | 66 |
"version": "3.0", |
55 | 67 |
"recipe": { |
Také k dispozici: Unified diff
Bug #7865 Issue with cache in Symfony