Skip to content

Commit

Permalink
feat: php8.4 support (#18)
Browse files Browse the repository at this point in the history
* chore: update code

* dev: add devcontainers

* chore: update lockfile

* chore: update scrutinizer
  • Loading branch information
tamtamchik authored Dec 9, 2024
1 parent c839a82 commit 28ce82d
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 166 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/php73/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM php:7.3-fpm

# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
zip \
unzip

# Install PHP extensions
RUN docker-php-ext-install pdo pdo_mysql

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

WORKDIR /workspace
15 changes: 15 additions & 0 deletions .devcontainer/php73/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "PHP 7.3 Environment",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"mikestead.dotenv"
]
}
},
"forwardPorts": [8073],
"postCreateCommand": "composer install"
}
16 changes: 16 additions & 0 deletions .devcontainer/php84/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM php:8.4-fpm

# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
zip \
unzip

# Install PHP extensions
RUN docker-php-ext-install pdo pdo_mysql

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

WORKDIR /workspace
15 changes: 15 additions & 0 deletions .devcontainer/php84/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "PHP 8.4 Environment",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"mikestead.dotenv"
]
}
},
"forwardPorts": [8084],
"postCreateCommand": "composer install"
}
47 changes: 28 additions & 19 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
build:
image: default-jammy

nodes:
build:
tests:
environment:
php: 7.3
tests:
override:
- command: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
coverage:
file: coverage.clover
format: clover

analysis:
environment:
php: 7.3
tests:
override:
- php-scrutinizer-run

filter:
excluded_paths: [tests/*]
excluded_paths: [tests/*, examples/*]

checks:
php:
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
php:
code_rating: true
duplication: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
no_trailing_whitespace: true
avoid_unnecessary_concatenation: true
prefer_while_loop_over_for_loop: true
parameter_doc_comments: true
no_empty_statements: true
no_debug_code: true
no_commented_out_code: true
newline_at_end_of_file: true
Loading

0 comments on commit 28ce82d

Please sign in to comment.