Skip to content

Commit 285acaf

Browse files
committed
chore: Add GitHub Actions for Composer and update dependencies
Introduce PHP workflow for Composer tasks, including dependency updates, validation, and caching. Configure Dependabot for daily Composer updates. Update `composer.json` to require PHP 8.3 and newer versions of dependencies, and add a `.gitignore` file for common artifacts.
1 parent f37c0c3 commit 285acaf

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/php.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Update Composer dependencies
17+
run: composer update --no-interaction --no-progress
18+
19+
- name: Validate composer.json and composer.lock
20+
run: composer validate --strict
21+
22+
- name: Cache Composer packages
23+
id: composer-cache
24+
uses: actions/cache@v3
25+
with:
26+
path: vendor
27+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-php-
30+
31+
- name: Install dependencies
32+
run: composer install --prefer-dist --no-progress

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor
2+
./composer.lock
3+
.idea

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"license": "GPL-3.0-or-later",
1515
"authors": [
1616
{
17-
"name": "Efe Bagri",
17+
"name": "Efe Bağrı",
1818
"email": "[email protected]",
1919
"homepage": "https://www.exbil.net"
2020
}
@@ -24,12 +24,12 @@
2424
"source": "https://github.com/exbil/vpnresellers-php-api"
2525
},
2626
"require": {
27-
"php": ">=7.2",
28-
"guzzlehttp/guzzle": "^7.5",
27+
"php": ">=8.3",
28+
"guzzlehttp/guzzle": "^7.9.2",
2929
"ext-json": "*"
3030
},
3131
"require-dev": {
32-
"phpunit/phpunit": "^9.5.0"
32+
"phpunit/phpunit": "^12.0.10"
3333
},
3434
"autoload": {
3535
"psr-4": {

0 commit comments

Comments
 (0)