Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a090710

Browse files
author
DKravtsov
committed
updated to php 8 and symfony 5
1 parent 8f8d9fa commit a090710

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4659
-2937
lines changed

‎.dockerignore‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
### User-specific stuff:
12
/.git*
23
/.idea*
34
.dockerignore
45
.editorconfig
56

7+
###> symfony/framework-bundle ###
68
/.env.local
79
/.env.*.local
8-
.env.local.php
10+
/.env.local.php
911
/public/bundles/
1012
/var/mysql-data
1113
/var/rabbitmq
1214
/vendor/
15+
###< symfony/framework-bundle ###
16+
17+
### Vendor bin dependencies
1318
/tools/*/vendor/
1419

20+
### Docker
1521
Dockerfile
1622
docker-compose.yml
1723
docker-compose-test-ci.yml

‎.env‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ MAILER_DSN=smtp://user:pass@smtp.example.com
4040
###> symfony/messenger ###
4141
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@rabbitmq:5672/%2f/messages
4242
###< symfony/messenger ###
43+
44+
###> symfony/lock ###
45+
# Choose one of the stores below
46+
# postgresql+advisory://db_user:db_password@localhost/db_name
47+
LOCK_DSN=semaphore
48+
###< symfony/lock ###

‎.php-cs-fixer.dist.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
// https://mlocati.github.io/php-cs-fixer-configurator/
46
$finder = PhpCsFixer\Finder::create()->in(__DIR__)->exclude('somedir');
57

@@ -17,16 +19,16 @@
1719
'blank_line_before_statement' => ['statements' => ['continue', 'declare', 'return', 'throw', 'try']],
1820
'single_blank_line_before_namespace' => true,
1921
'blank_line_after_namespace' => true,
20-
'blank_line_after_opening_tag' => true,
2122

2223
// skip list (see ecs.php)
2324
'no_multiline_whitespace_around_double_arrow' => false,
2425
'phpdoc_no_package' => false,
2526
'phpdoc_summary' => false,
2627
'phpdoc_separation' => false,
28+
'blank_line_after_opening_tag' => false,
2729
'class_attributes_separation' => false,
2830
'no_blank_lines_before_namespace' => false,
2931
'not_operator_with_successor_space' => false,
3032
'single_line_throw' => false,
31-
33+
'blank_line_after_strict_types' => false,
3234
])->setFinder($finder);

‎Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-apache
1+
FROM php:8.0-apache
22

33
# set main params
44
ARG BUILD_ARGUMENT_DEBUG_ENABLED=false
@@ -36,7 +36,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
3636
libzip-dev \
3737
wget \
3838
librabbitmq-dev \
39-
&& pecl install amqp \
39+
&& pecl install amqp-1.11.0beta \
4040
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
4141
&& docker-php-ext-configure intl \
4242
&& docker-php-ext-install \

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ phpcpd:
184184

185185
###> php mess detector ###
186186
phpmd:
187-
@make exec cmd="php ./vendor/bin/phpmd src text phpmd_ruleset.xml --suffixes php --exclude *src/Migrations/*"
187+
@make exec cmd="php ./vendor/bin/phpmd src text phpmd_ruleset.xml --suffixes php"
188188
###< php mess detector ###
189189

190190
###> PHPStan static analysis tool ###

‎bin/console‎

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,19 @@
11
#!/usr/bin/env php
22
<?php
3-
declare(strict_types = 1);
3+
4+
declare(strict_types=1);
45

56
use App\Kernel;
67
use Symfony\Bundle\FrameworkBundle\Console\Application;
7-
use Symfony\Component\Console\Input\ArgvInput;
8-
use Symfony\Component\Dotenv\Dotenv;
9-
use Symfony\Component\ErrorHandler\Debug;
10-
11-
set_time_limit(0);
128

13-
if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
14-
echo'Warning: The console should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL;
9+
if (!is_file(dirname(__DIR__) . '/vendor/autoload_runtime.php')) {
10+
thrownewLogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
1511
}
1612

17-
require dirname(__DIR__) . '/vendor/autoload.php';
18-
19-
if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
20-
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
21-
}
22-
23-
$input = new ArgvInput();
24-
$env = $input->getParameterOption(['--env', '-e'], null, true);
25-
26-
if ($env) {
27-
putenv('APP_ENV=' . $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
28-
}
29-
30-
if ($input->hasParameterOption('--no-debug', true)) {
31-
putenv('APP_DEBUG=' . $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
32-
}
33-
34-
require dirname(__DIR__) . '/config/bootstrap.php';
35-
36-
if ($_SERVER['APP_DEBUG']) {
37-
umask(0000);
38-
39-
if (class_exists(Debug::class)) {
40-
Debug::enable();
41-
}
42-
}
13+
require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
4314

44-
$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
15+
return static function (array $context): Application {
16+
$kernel = new Kernel($context['APP_ENV'], (bool)$context['APP_DEBUG']);
4517

46-
/** @noinspection PhpUnhandledExceptionInspection */
47-
(newApplication($kernel))->run($input);
18+
returnnewApplication($kernel);
19+
};

‎composer.json‎

Lines changed: 63 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"RabbitMQ"
1313
],
1414
"homepage": "https://github.com/dimadeush/docker-apache-php-symfony",
15-
"version": "1.0.0",
16-
"license": "proprietary",
15+
"version": "0.0.0",
16+
"license": "MIT",
1717
"authors": [
1818
{
1919
"name": "Dmitriy Kravtsov",
@@ -23,60 +23,74 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^7.4.0",
26+
"php": "^8.0.0",
2727
"ext-amqp": "*",
2828
"ext-ctype": "*",
2929
"ext-iconv": "*",
3030
"ext-json": "*",
3131
"ext-mbstring": "*",
3232
"ext-pdo": "*",
3333
"ext-pdo_mysql": "*",
34+
"doctrine/annotations": "^1.13",
35+
"doctrine/doctrine-bundle": "^2.4",
3436
"doctrine/doctrine-migrations-bundle": "^3.1",
35-
"systemsdk/easy-log-bundle": "1.10.*",
36-
"jmose/command-scheduler-bundle": "^3.0",
37+
"doctrine/orm": "^2.9",
38+
"dukecity/command-scheduler-bundle": "^4.0",
3739
"sensio/framework-extra-bundle": "^6.1",
3840
"symfony/apache-pack": "^1.0",
39-
"symfony/asset": "4.4.*",
40-
"symfony/config": "4.4.*",
41-
"symfony/console": "4.4.*",
42-
"symfony/dotenv": "4.4.*",
43-
"symfony/expression-language": "4.4.*",
44-
"symfony/flex": "^1.12",
45-
"symfony/form": "4.4.*",
46-
"symfony/framework-bundle": "4.4.*",
47-
"symfony/http-client": "4.4.*",
48-
"symfony/intl": "4.4.*",
49-
"symfony/mailer": "4.4.*",
50-
"symfony/messenger": "4.4.*",
41+
"symfony/asset": "5.3.*",
42+
"symfony/config": "5.3.*",
43+
"symfony/console": "5.3.*",
44+
"symfony/dotenv": "5.3.*",
45+
"symfony/expression-language": "5.3.*",
46+
"symfony/flex": "^1.13",
47+
"symfony/form": "5.3.*",
48+
"symfony/framework-bundle": "5.3.*",
49+
"symfony/http-client": "5.3.*",
50+
"symfony/intl": "5.3.*",
51+
"symfony/mailer": "5.3.*",
52+
"symfony/messenger": "5.3.*",
53+
"symfony/mime": "5.3.*",
5154
"symfony/monolog-bundle": "^3.7",
52-
"symfony/orm-pack": "*",
53-
"symfony/process": "4.4.*",
54-
"symfony/routing": "4.4.*",
55-
"symfony/security-bundle": "4.4.*",
56-
"symfony/serializer-pack": "*",
57-
"symfony/translation": "4.4.*",
58-
"symfony/twig-bundle": "4.4.*",
59-
"symfony/validator": "4.4.*",
60-
"symfony/web-link": "4.4.*",
61-
"symfony/yaml": "4.4.*"
55+
"symfony/notifier": "5.3.*",
56+
"symfony/process": "5.3.*",
57+
"symfony/property-access": "5.3.*",
58+
"symfony/property-info": "5.3.*",
59+
"symfony/proxy-manager-bridge": "5.3.*",
60+
"symfony/runtime": "5.3.*",
61+
"symfony/routing": "5.3.*",
62+
"symfony/security-bundle": "5.3.*",
63+
"symfony/serializer": "5.3.*",
64+
"symfony/translation": "5.3.*",
65+
"symfony/twig-bundle": "5.3.*",
66+
"symfony/validator": "5.3.*",
67+
"symfony/web-link": "5.3.*",
68+
"symfony/yaml": "5.3.*",
69+
"twig/extra-bundle": "^2.12|^3.0",
70+
"twig/twig": "^2.12|^3.0"
6271
},
6372
"conflict": {
64-
"symfony/symfony": "*"
73+
"symfony/debug": "<3.3",
74+
"symfony/symfony": "*",
75+
"symfony/twig-bundle": "<3.3"
6576
},
6677
"require-dev": {
6778
"bamarni/composer-bin-plugin": "^1.4",
6879
"doctrine/doctrine-fixtures-bundle": "^3.4",
69-
"ergebnis/composer-normalize": "^2.13",
80+
"systemsdk/easy-log-bundle": "1.10.*",
81+
"ergebnis/composer-normalize": "^2.15",
7082
"roave/security-advisories": "dev-latest",
71-
"symfony/debug-bundle": "4.4.*",
72-
"symfony/maker-bundle": "^1.31",
83+
"symfony/browser-kit": "5.3.*",
84+
"symfony/debug-bundle": "5.3.*",
85+
"symfony/maker-bundle": "^1.33",
7386
"symfony/requirements-checker": "^2.0",
74-
"symfony/var-dumper": "4.4.*",
75-
"symfony/web-profiler-bundle": "4.4.*"
87+
"symfony/stopwatch": "5.3.*",
88+
"symfony/var-dumper": "5.3.*",
89+
"symfony/web-profiler-bundle": "5.3.*"
7690
},
7791
"config": {
7892
"platform": {
79-
"php": "7.4.0"
93+
"php": "8.0.0"
8094
},
8195
"preferred-install": {
8296
"*": "dist"
@@ -88,26 +102,29 @@
88102
"target-directory": "tools"
89103
},
90104
"symfony": {
91-
"allow-contrib": true,
92-
"require": "4.4.*"
105+
"allow-contrib": true
93106
}
94107
},
95108
"autoload": {
96109
"psr-4": {
97110
"App\\": "src/"
98-
}
111+
},
112+
"classmap": [],
113+
"exclude-from-classmap": []
99114
},
100115
"autoload-dev": {
101116
"psr-4": {
102117
"App\\Tests\\": "tests/",
103118
"PHPUnit\\": "tools/01_phpunit/vendor/phpunit/phpunit/src",
104-
"Symfony\\Component\\BrowserKit\\": "tools/01_phpunit/vendor/symfony/browser-kit",
105119
"Symfony\\Bridge\\PhpUnit\\": "tools/01_phpunit/vendor/symfony/phpunit-bridge",
106120
"PHPMD\\": "tools/06_phpmd/vendor/phpmd/phpmd/src/bin",
107-
"PhpCsFixer\\": "tools/03_ecs/vendor/friendsofphp/php-cs-fixer/src",
108-
"SlevomatCodingStandard\\": "tools/03_ecs/vendor/slevomat/coding-standard/SlevomatCodingStandard",
109-
"Symplify\\CodingStandard\\": "tools/03_ecs/vendor/symplify/coding-standard/src",
121+
"PhpCsFixer\\": "tools/03_ecs/vendor/symplify/easy-coding-standard/vendor/friendsofphp/php-cs-fixer/src",
122+
"Symplify\\CodingStandard\\": "tools/03_ecs/vendor/symplify/easy-coding-standard/vendor/symplify/coding-standard/src",
123+
"Symplify\\RuleDocGenerator\\": "tools/03_ecs/vendor/symplify/easy-coding-standard/vendor/symplify/rule-doc-generator-contracts/src",
124+
"PHPStan\\PhpDoc\\PHPUnit\\": "tools/02_phpstan/vendor/phpstan/phpstan-phpunit/src/PhpDoc/PHPUnit",
125+
"PHPStan\\Rules\\PHPUnit\\": "tools/02_phpstan/vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit",
110126
"PHPStan\\Symfony\\": "tools/02_phpstan/vendor/phpstan/phpstan-symfony/src/Symfony",
127+
"PHPStan\\Type\\PHPUnit\\": "tools/02_phpstan/vendor/phpstan/phpstan-phpunit/src/Type/PHPUnit",
111128
"PHPStan\\Type\\Symfony\\": "tools/02_phpstan/vendor/phpstan/phpstan-symfony/src/Type/Symfony"
112129
}
113130
},
@@ -117,17 +134,20 @@
117134
"if test -d vendor/symfony/requirements-checker; then ./vendor/bin/requirements-checker; fi",
118135
"if test -d vendor/bamarni/composer-bin-plugin; then composer bin all install; fi",
119136
"if which local-php-security-checker; then local-php-security-checker --update-cache && local-php-security-checker; fi",
120-
"@auto-scripts"
137+
"@auto-scripts",
138+
"@composer dump-autoload"
121139
],
122140
"post-update-cmd": [
123141
"if test -d vendor/symfony/requirements-checker; then ./vendor/bin/requirements-checker; fi",
124142
"if test -d vendor/bamarni/composer-bin-plugin; then composer bin all update; fi",
125143
"if which local-php-security-checker; then local-php-security-checker --update-cache && local-php-security-checker; fi",
126-
"@auto-scripts"
144+
"@auto-scripts",
145+
"@composer dump-autoload"
127146
],
128147
"auto-scripts": {
129148
"cache:clear": "symfony-cmd",
130149
"cache:warmup": "symfony-cmd",
150+
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd",
131151
"assets:install %PUBLIC_DIR%": "symfony-cmd"
132152
}
133153
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /