Skip to content

Commit ecf5e3a

Browse files
author
Alcides Ramos
committed
fix: refactor
1 parent e0d779b commit ecf5e3a

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

src/.github/workflows/ci.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,44 @@ jobs:
2020
fail-fast: true
2121
matrix:
2222
os: [ubuntu-latest]
23-
php: ['8.3']
24-
dependency_version: [prefer-dist, prefer-source]
23+
php: ['8.4']
24+
composer-version: [v2]
25+
dependency-version: [prefer-lowest, prefer-stable]
2526

26-
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
27+
name: ${{ matrix.php }} - ${{ matrix.os }} - Composer ${{ matrix.composer-version }} --${{ matrix.dependency-version }}
2728

2829
steps:
2930
- name: Checkout
3031
uses: actions/checkout@v4
3132

32-
- name: Setup PHP & Enable Extensions
33+
- name: Cache dependencies
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.composer/cache/files
37+
key: dependencies-php-${{ matrix.php }}-composer-${{ matrix.composer-version }}-${{ hashFiles('composer.json') }}
38+
39+
- name: Setup PHP
3340
uses: shivammathur/setup-php@v2
3441
with:
35-
php-version: ${{ runner.php }}
36-
extensions: uopz
42+
php-version: ${{ matrix.php }}
43+
extensions: zip
3744
coverage: pcov
45+
tools: composer:${{ matrix.composer-version }}
3846

3947
- name: Validate composer.json and composer.lock
4048
run: composer validate --working-dir=. --strict
4149

42-
- name: Cache Composer packages
43-
id: composer-cache
44-
uses: actions/cache@v4
45-
with:
46-
path: ./src/vendor
47-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
48-
restore-keys: |
49-
${{ runner.os }}-php-
50-
5150
- name: Install PHP dependencies
52-
run: composer install --working-dir=. --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi
51+
run: composer update --${{ matrix.dependency-version }} --ansi --no-interaction --prefer-dist
5352

5453
- name: Check PHP Syntax
5554
run: composer check-syntax
5655

5756
- name: Check Coding Standards
5857
run: composer check-style
5958

60-
- name: Check with PHPStan
61-
run: composer phpstan
59+
# - name: Check with PHPStan
60+
# run: composer phpstan
6261

6362
- name: Check Test Cases
64-
run: composer paratest
63+
run: composer test

src/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# PHP Skeleton
44

55

6-
> An application skeleton for modern PHP projects.
6+
> An application skeleton for modern PHP projects, PoC, side-projects...
77
88

99
[TOC]
@@ -17,7 +17,7 @@ This repository contains an application skeleton following best practices.
1717
### Highlights
1818

1919
- Minimalist project
20-
- Includes frequently used tools such as a **Linter**, **PHPStan**, **PHPUnit**, **ClockMock**, **CodeSniffer** and **VarDumper**.
20+
- Includes frequently used tools such as a **Linter**, **PHPStan**, **PHPUnit**, **CodeSniffer** and **VarDumper**.
2121

2222

2323
## Requirements
@@ -68,15 +68,15 @@ Custom commands are added to `composer.json` under the `scripts` section.
6868

6969
##### Available commands
7070

71-
| Command | Description |
72-
| ---------- | ------------------------------------------------------------ |
73-
| `linter` | Runs the linter in parallel mode |
74-
| `phpcs` | Runs **PHP Check Style** command following the PSR-12 |
75-
| `phpcbf` | Runs **PHP Code Beautifier** and **Fixer** command following the PSR-12 |
71+
| Command | Description |
72+
| ---------- |------------------------------------------------------------------------------|
73+
| `linter` | Runs the linter in parallel mode |
74+
| `phpcs` | Runs **PHP Check Style** command following the PSR-12 |
75+
| `phpcbf` | Runs **PHP Code Beautifier** and **Fixer** command following the PSR-12 |
7676
| `phpstan` | Runs **PHPStan** with the specs defined at `phpstan.neon` configuration file |
77-
| `phpunit` | Runs **PHPUnit** with the specs defined at `phpunit.xml` configuration file |
78-
| `tests` | Runs **PHPUnit** without code coverage support |
79-
| `coverage` | Runs **PHPUnit** with **PCOV** code coverage support |
77+
| `phpunit` | Runs **PHPUnit** with the specs defined at `phpunit.xml` configuration file |
78+
| `tests` | Runs **PHPUnit** without code coverage support |
79+
| `coverage` | Runs **PHPUnit** with **PCOV** code coverage support |
8080

8181
#### Makefile
8282

0 commit comments

Comments
 (0)