Skip to content

Commit 4777e60

Browse files
committed
Merge branch 'upgrade/php' into 'master'
Upgrade dependencies See merge request undabot/json-api-symfony!49
2 parents 9586d33 + 7e28a0e commit 4777e60

40 files changed

+4414
-2827
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/.php_cs.cache
55
/phpunit.xml
66
/ci_key*
7-
/tests/_reports
7+
/tests/_reports
8+
.phpunit.result.cache

Diff for: .php_cs.dist

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ declare(strict_types=1);
44

55
$finder = PhpCsFixer\Finder::create()
66
->exclude('vendor')
7-
->notPath('src/DependencyInjection/Configuration.php')
87
->in(__DIR__);
98

109
return PhpCsFixer\Config::create()
@@ -35,7 +34,7 @@ return PhpCsFixer\Config::create()
3534
'assertions' => [
3635
'assertAttributeEquals',
3736
'assertAttributeNotEquals',
38-
// 'assertEquals',
37+
// 'assertEquals', // This will replace all assertEquals with assertSame that can affect array comparisons
3938
'assertNotEquals',
4039
],
4140
],
@@ -56,9 +55,10 @@ return PhpCsFixer\Config::create()
5655
'php_unit_size_class' => true,
5756
'phpdoc_to_return_type' => true,
5857
'static_lambda' => true,
59-
'phpdoc_align' => '',
60-
'concat_space' => ['spacing' => 'one'],
61-
'phpdoc_to_comment' => false,
58+
'phpdoc_to_comment' => false, // This allows us some flexibility with PhpStan type resolution
59+
'concat_space' => [
60+
'spacing' => 'one',
61+
],
6262
]
6363
)
6464
->setFinder($finder);

Diff for: README.md

+32
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,35 @@ resource -> model [label="JSON:API denormalize"];
113113
model -> entity [label="Commands"];
114114
}
115115
'>
116+
117+
# Development
118+
119+
There is a custom docker image that can be used for development.
120+
This docker container should be used to run tests and check for any compatibility issues.
121+
122+
This repo is mounted inside of the container and any changes made to the files are automatically propagated into the container.
123+
There isnt any syncing, the filesystem is pointed to the 2 locations at the same time.
124+
125+
A script called dev.sh can be used to manage the image. Here are the avaliable commands:
126+
127+
- ./dev.sh build
128+
129+
used to build base dev docker image, and to install composer and dependencies at first run
130+
- ./dev.sh run
131+
132+
starts the dev container
133+
- ./dev.sh stop
134+
135+
stops the dev container
136+
- ./dev.sh ssh
137+
138+
attaches the container shell to the terminal so that you can execute commands inside of the container
139+
- ./dev.sh test
140+
141+
run php unit tests inside of the running container
142+
- ./dev.sh qc
143+
144+
executes qc tests
145+
146+
- ./dev.sh install
147+
executes composer install --optimize-autoloader

Diff for: composer.json

+60-58
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,63 @@
11
{
2-
"name": "undabot/json-api-symfony",
3-
"description": "",
4-
"type": "symfony-bundle",
5-
"license": "MIT",
6-
"require": {
7-
"php": "^7.4",
8-
"ext-json": "*",
9-
"undabot/json-api-core": "^2.0",
10-
"symfony/http-kernel": "^4.2 || ^5.0",
11-
"symfony/validator": "^4.2 || ^5.0",
12-
"symfony/orm-pack": "^1.0",
13-
"doctrine/annotations": "^1.6",
14-
"symfony/property-access": "^4.2 || ^5.0",
15-
"symfony/serializer": "^4.2 || ^5.0",
16-
"symfony/yaml": "^4.2 || ^5.0",
17-
"ramsey/uuid": "^3.8",
18-
"beberlei/assert": "^3.2",
19-
"zantolov/toolbelt": "^0.0.1",
20-
"sensio/framework-extra-bundle": "^5.4"
21-
},
22-
"require-dev": {
23-
"friendsofphp/php-cs-fixer": "^2.16",
24-
"phpstan/phpstan-phpunit": "^0.11.0",
25-
"phpstan/phpstan": "^0.11.1",
26-
"phpunit/phpunit": "^7.5",
27-
"zantolov/toolbelt-dev": "^0.0.2"
28-
},
29-
"repositories": [
30-
{
31-
"type": "vcs",
32-
"url": "[email protected]:undabot/json-api-core.git"
33-
}
34-
],
35-
"autoload": {
36-
"psr-4": {
37-
"Undabot\\SymfonyJsonApi\\": "src/"
38-
}
39-
},
40-
"autoload-dev": {
41-
"psr-4": {
42-
"Undabot\\SymfonyJsonApi\\Tests\\": "tests/"
43-
}
44-
},
45-
"scripts": {
46-
"lint": [
47-
"php-cs-fixer fix --diff --ansi --dry-run"
2+
"name": "undabot/json-api-symfony",
3+
"description": "",
4+
"type": "symfony-bundle",
5+
"license": "MIT",
6+
"require": {
7+
"php": "^8",
8+
"ext-json": "*",
9+
"undabot/json-api-core": "^2.1",
10+
"symfony/http-kernel": "^5.2",
11+
"symfony/validator": "^5.2",
12+
"symfony/orm-pack": "^2.1",
13+
"doctrine/annotations": "^1.12",
14+
"symfony/property-access": "^5.2",
15+
"symfony/serializer": "^5.2",
16+
"symfony/yaml": "^5.2",
17+
"ramsey/uuid": "^4.1",
18+
"beberlei/assert": "^3.3",
19+
"sensio/framework-extra-bundle": "^6.1"
20+
},
21+
"require-dev": {
22+
"roave/security-advisories": "dev-master",
23+
"phpstan/phpstan-phpunit": "^0.12",
24+
"phpunit/phpunit": "^9.5",
25+
"friendsofphp/php-cs-fixer": "^2.18",
26+
"phpstan/extension-installer": "^1.1",
27+
"phpstan/phpstan": "^0.12",
28+
"phpstan/phpstan-beberlei-assert": "^0.12",
29+
"thecodingmachine/phpstan-strict-rules": "^0.12"
30+
},
31+
"repositories": [
32+
{
33+
"type": "vcs",
34+
"url": "[email protected]:undabot/json-api-core.git"
35+
}
4836
],
49-
"phpstan": [
50-
"phpstan analyse -n --ansi --no-progress"
51-
],
52-
"test": [
53-
"phpunit"
54-
],
55-
"qc": [
56-
"@lint",
57-
"@phpstan",
58-
"@test"
59-
]
60-
}
37+
"autoload": {
38+
"psr-4": {
39+
"Undabot\\SymfonyJsonApi\\": "src/"
40+
}
41+
},
42+
"autoload-dev": {
43+
"psr-4": {
44+
"Undabot\\SymfonyJsonApi\\Tests\\": "tests/"
45+
}
46+
},
47+
"scripts": {
48+
"lint": [
49+
"php-cs-fixer fix --diff --ansi --dry-run"
50+
],
51+
"phpstan": [
52+
"php -d memory_limit=-1 vendor/bin/phpstan analyse -n --ansi --no-progress"
53+
],
54+
"test": [
55+
"php -d memory_limit=-1 vendor/bin/phpunit tests/"
56+
],
57+
"qc": [
58+
"@lint",
59+
"@phpstan",
60+
"@test"
61+
]
62+
}
6163
}

0 commit comments

Comments
 (0)