Skip to content

Commit

Permalink
Fixes, project is getting old
Browse files Browse the repository at this point in the history
- Updated old dependencies
- Project Tests Helper no longer exists, move package classes into the project
- Update php to 8.0
- Remove abandoned faker and introduce fakerphp/faker
- Remove grumphp

Signed-off-by: guido <[email protected]>
  • Loading branch information
widoz committed Nov 14, 2024
1 parent 7ee36fa commit 13186bd
Show file tree
Hide file tree
Showing 23 changed files with 2,405 additions and 1,825 deletions.
57 changes: 29 additions & 28 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,41 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1.33', '7.2', '7.3', '7.4', '8.0']
php-versions: ["8.0", "8.1", "8.2", "8.3"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Analising source code
run: find ./src/ ./inc/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l
- name: Analising source code
run: find ./src/ ./inc/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: PhpCS
run: ./vendor/bin/phpcs
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug

- name: Psalm
run: ./vendor/bin/psalm --show-info=false
- name: PhpCS
run: composer cs

- name: PhpUnit
run: ./vendor/bin/phpunit
- name: Psalm
run: composer analisys

- name: PhpUnit
run: composer tests
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,9 @@ package-lock.json

### Coverage ###
./tests/coverage

### Php Unit ###
.phpunit.result.cache

### Psalm ###
.psalm
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Guido Scialfa <[email protected]>
Copyright 2024 Guido Scialfa <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
Expand Down
24 changes: 14 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,24 @@
}
},
"require": {
"php": ">=7.1.33"
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"phpunit/phpunit": "^9",
"brain/monkey": "^2",
"inpsyde/php-coding-standards": "^0.13",
"widoz/project-tests-helper": "dev-phpunit-7",
"vimeo/psalm": "^3.8",
"phpro/grumphp": "^0.16.2",
"fzaninotto/faker": "^1.9"
"inpsyde/php-coding-standards": "^1",
"fakerphp/faker": "^1",
"vimeo/psalm": "^5.26"
},
"config": {
"platform": {
"php": "7.1.33"
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"cs": "@php ./vendor/bin/phpcs",
"cs:fix": "@php ./vendor/bin/phpcbf",
"tests": "@php ./vendor/bin/phpunit",
"analisys": "@php ./vendor/bin/psalm --show-info=false"
}
}
}
Loading

0 comments on commit 13186bd

Please sign in to comment.