Skip to content

Commit fa6f8eb

Browse files
authored
Merge pull request #56 from byjg/6.0
# PHP Migration Library v6.0
2 parents d06b6fb + 1cad454 commit fa6f8eb

Some content is hidden

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

42 files changed

+2199
-584
lines changed

.github/FUNDING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: byjg

.github/workflows/phpunit.yml

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ on:
88
pull_request:
99
branches:
1010
- master
11-
schedule:
12-
- cron: "0 9 * * 1"
1311

1412
jobs:
1513
Build:
1614
runs-on: 'ubuntu-latest'
17-
container: 'byjg/php:${{ matrix.php-version }}-cli'
15+
container:
16+
image: 'byjg/php:${{ matrix.php-version }}-cli'
17+
options: --user root --privileged
1818
strategy:
1919
matrix:
2020
php-version:
21+
- "8.5"
22+
- "8.4"
2123
- "8.3"
22-
- "8.2"
23-
- "8.1"
2424

2525
services:
2626
mysql:
@@ -64,22 +64,42 @@ jobs:
6464
MSSQL_TEST_HOST: sqlserver
6565

6666
steps:
67-
- uses: actions/checkout@v4
68-
# - name: Spin up databases
69-
# run: |
70-
# apk add --no-cache python3 python3-dev py3-pip build-base libffi-dev
71-
# pip3 install --upgrade pip
72-
# pip3 install docker-compose
73-
# apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community docker
74-
# docker-compose up -d postgres mysql
67+
- uses: actions/checkout@v5
7568
- run: composer install
76-
- run: ./vendor/bin/psalm
77-
- run: ./vendor/bin/phpunit
69+
- run: composer test
7870
- run: ./vendor/bin/phpunit tests/SqliteDatabase*
7971
- run: ./vendor/bin/phpunit tests/MysqlDatabase*
8072
- run: ./vendor/bin/phpunit tests/PostgresDatabase*
81-
# - run: ./vendor/bin/phpunit tests/SqlServerSqlsrv*
82-
# - run: ./vendor/bin/phpunit tests/SqlServerDblib*
73+
74+
Psalm:
75+
name: Psalm Static Analyzer
76+
runs-on: ubuntu-latest
77+
permissions:
78+
# for github/codeql-action/upload-sarif to upload SARIF results
79+
security-events: write
80+
container:
81+
image: byjg/php:8.4-cli
82+
options: --user root --privileged
83+
84+
steps:
85+
- name: Git checkout
86+
uses: actions/checkout@v4
87+
88+
- name: Composer
89+
run: composer install
90+
91+
- name: Psalm
92+
# Note: Ignoring error code 2, which just signals that some
93+
# flaws were found, not that Psalm itself failed to run.
94+
run: ./vendor/bin/psalm
95+
--show-info=true
96+
--report=psalm-results.sarif || [ $? = 2 ]
97+
98+
- name: Upload Analysis results to GitHub
99+
uses: github/codeql-action/upload-sarif@v4
100+
if: github.ref == 'refs/heads/master'
101+
with:
102+
sarif_file: psalm-results.sarif
83103

84104
Documentation:
85105
if: github.ref == 'refs/heads/master'
@@ -88,5 +108,6 @@ jobs:
88108
with:
89109
folder: php
90110
project: ${{ github.event.repository.name }}
91-
secrets: inherit
111+
secrets:
112+
DOC_TOKEN: ${{ secrets.DOC_TOKEN }}
92113

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ fabric.properties
5151
node_modules
5252
package-lock.json
5353
.usdocker
54+
phpunit.coverage.xml
55+
phpunit.report.xml
5456
.phpunit.result.cache
57+
*.bak

.gitpod.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
tasks:
2+
- name: Run Composer
3+
command: |
4+
composer install
5+
6+
image: byjg/gitpod-image:latest
7+
8+
jetbrains:
9+
phpstorm:
10+
vmoptions: '-Xmx4g'
11+
plugins:
12+
- com.github.copilot
13+
- com.intellij.kubernetes
14+
- com.intellij.mermaid
15+
- ru.adelf.idea.dotenv
16+
- org.toml.lang
17+
18+
vscode:
19+
extensions:
20+
- ikappas.composer
21+
- hbenl.test-adapter-converter
22+
- hbenl.vscode-test-explorer
23+
- felixfbecker.php-debug
24+
- neilbrayfield.php-docblocker
25+
- bmewburn.vscode-intelephense-client
26+
- getpsalm.psalm-vscode-plugin
27+
- SonarSource.sonarlint-vscode
28+
- recca0120.vscode-phpunit

.idea/runConfigurations/PHPUnit.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Psalm.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.idea/runConfigurations/Run_Databases.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/psalm.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.vscode/launch.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug current Script in Console",
6+
"type": "php",
7+
"request": "launch",
8+
"program": "${file}",
9+
"cwd": "${fileDirname}",
10+
"port": 9003,
11+
"runtimeArgs": [
12+
"-dxdebug.start_with_request=yes"
13+
],
14+
"env": {
15+
"XDEBUG_MODE": "debug,develop",
16+
"XDEBUG_CONFIG": "client_port=${port}"
17+
}
18+
},
19+
{
20+
"name": "PHPUnit Debug",
21+
"type": "php",
22+
"request": "launch",
23+
"program": "${workspaceFolder}/vendor/bin/phpunit",
24+
"cwd": "${workspaceFolder}",
25+
"port": 9003,
26+
"runtimeArgs": [
27+
"-dxdebug.start_with_request=yes"
28+
],
29+
"env": {
30+
"XDEBUG_MODE": "debug,develop",
31+
"XDEBUG_CONFIG": "client_port=${port}"
32+
}
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)