Skip to content

Commit 28ce82d

Browse files
authored
feat: php8.4 support (#18)
* chore: update code * dev: add devcontainers * chore: update lockfile * chore: update scrutinizer
1 parent c839a82 commit 28ce82d

File tree

10 files changed

+244
-166
lines changed

10 files changed

+244
-166
lines changed

.devcontainer/php73/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM php:7.3-fpm
2+
3+
# Install dependencies
4+
RUN apt-get update && apt-get install -y \
5+
git \
6+
curl \
7+
zip \
8+
unzip
9+
10+
# Install PHP extensions
11+
RUN docker-php-ext-install pdo pdo_mysql
12+
13+
# Install Composer
14+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
15+
16+
WORKDIR /workspace
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "PHP 7.3 Environment",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
"xdebug.php-debug",
8+
"bmewburn.vscode-intelephense-client",
9+
"mikestead.dotenv"
10+
]
11+
}
12+
},
13+
"forwardPorts": [8073],
14+
"postCreateCommand": "composer install"
15+
}

.devcontainer/php84/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM php:8.4-fpm
2+
3+
# Install dependencies
4+
RUN apt-get update && apt-get install -y \
5+
git \
6+
curl \
7+
zip \
8+
unzip
9+
10+
# Install PHP extensions
11+
RUN docker-php-ext-install pdo pdo_mysql
12+
13+
# Install Composer
14+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
15+
16+
WORKDIR /workspace
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "PHP 8.4 Environment",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
"xdebug.php-debug",
8+
"bmewburn.vscode-intelephense-client",
9+
"mikestead.dotenv"
10+
]
11+
}
12+
},
13+
"forwardPorts": [8084],
14+
"postCreateCommand": "composer install"
15+
}

.scrutinizer.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
build:
2-
image: default-jammy
3-
42
nodes:
5-
build:
3+
tests:
4+
environment:
5+
php: 7.3
66
tests:
77
override:
88
- command: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
99
coverage:
1010
file: coverage.clover
1111
format: clover
12-
1312
analysis:
13+
environment:
14+
php: 7.3
1415
tests:
1516
override:
1617
- php-scrutinizer-run
1718

1819
filter:
19-
excluded_paths: [tests/*]
20+
excluded_paths: [tests/*, examples/*]
2021

2122
checks:
22-
php:
23-
remove_extra_empty_lines: true
24-
remove_php_closing_tag: true
25-
remove_trailing_whitespace: true
26-
fix_use_statements:
27-
remove_unused: true
28-
preserve_multiple: false
29-
preserve_blanklines: true
30-
order_alphabetically: true
31-
fix_php_opening_tag: true
32-
fix_linefeed: true
33-
fix_line_ending: true
34-
fix_identation_4spaces: true
35-
fix_doc_comments: true
23+
php:
24+
code_rating: true
25+
duplication: true
26+
remove_extra_empty_lines: true
27+
remove_php_closing_tag: true
28+
remove_trailing_whitespace: true
29+
fix_use_statements:
30+
remove_unused: true
31+
preserve_multiple: false
32+
fix_php_opening_tag: true
33+
fix_linefeed: true
34+
fix_line_ending: true
35+
fix_identation_4spaces: true
36+
fix_doc_comments: true
37+
no_trailing_whitespace: true
38+
avoid_unnecessary_concatenation: true
39+
prefer_while_loop_over_for_loop: true
40+
parameter_doc_comments: true
41+
no_empty_statements: true
42+
no_debug_code: true
43+
no_commented_out_code: true
44+
newline_at_end_of_file: true

0 commit comments

Comments
 (0)