You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-68Lines changed: 5 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -441,77 +441,13 @@ interface WithPayload
441
441
}
442
442
```
443
443
444
-
## Testing
444
+
## Change log
445
445
446
-
If there is a need to check the source code of `Authsum`for development purposes (e.g., creating fixes, new features, etc.), kindly clone this repository first to a local machine:
446
+
Please see [CHANGELOG][link-changelog]for more recent changes.
After cloning, use `Composer` to install its required packages:
453
-
454
-
```bash
455
-
$ cd Sample
456
-
$ composer update
457
-
```
458
-
459
-
> [!NOTE]
460
-
> Please see also the [build.yml](https://github.com/rougin/authsum/blob/master/.github/workflows/build.yml) of `Authsum` to check any packages that needs to be installed based on the PHP version.
461
-
462
-
Once the required packages were installed, kindly check the following below on how to maintain the code quality and styling guide when interacting the source code of `Authsum`:
463
-
464
-
### Unit tests
465
-
466
-
`Authsum` also contains unit tests that were written in [PHPUnit](https://phpunit.de/index.html):
467
-
468
-
```bash
469
-
$ composer test
470
-
```
471
-
472
-
When creating fixes or implementing new features, it is recommended to run the above command to always check if the updated code introduces errors during development.
473
-
474
-
### Code quality
475
-
476
-
To retain the code quality of `Authsum`, a static code analysis code tool named [PHPStan](https://phpstan.org/) is being used during development. To start, kindly install the specified package in the global environment of `Composer`:
477
-
478
-
```bash
479
-
$ composer global require phpstan/phpstan --dev
480
-
```
481
-
482
-
Once installed, `PHPStan` can now be run using its namesake command:
483
-
484
-
```bash
485
-
$ cd Sample
486
-
$ phpstan
487
-
```
488
-
489
-
> [!NOTE]
490
-
> When running `phpstan`, it will use the `phpstan.neon` file which is already provided by `Authsum`.
491
-
492
-
### Coding style
493
-
494
-
Aside from code quality, `Authsum` also uses a tool named [PHP Coding Standards Fixer](https://cs.symfony.com/) for maintaining an opinionated style guide. To use this tooling, it needs also to be installed in the `Composer`'s global environment first:
495
-
496
-
```bash
497
-
$ composer global require friendsofphp/php-cs-fixer --dev
498
-
```
499
-
500
-
After its installation, kindly use the `php-cs-fixer` command in the same `Authsum` directory:
501
-
502
-
```bash
503
-
$ cd Sample
504
-
$ php-cs-fixer fix --config=phpstyle.php
505
-
```
506
-
507
-
The `phpstyle.php` file provided by `Authsum` currently follows the [PSR-12](https://www.php-fig.org/psr/psr-12/) standard as its baseline for the coding style and uses [Allman](https://en.wikipedia.org/wiki/Indentation_style#Allman_style) as its indentation style.
508
-
509
-
> [!NOTE]
510
-
> Installing both `PHPStan` and `PHP Coding Standards Fixer` requires a minimum version of PHP at least `7.4`.
511
-
512
-
## Changelog
448
+
## Contributing
513
449
514
-
Please see [CHANGELOG][link-changelog] for more information what has changed recently.
450
+
See [CONTRIBUTING][link-contributing] on how to contribute.
515
451
516
452
## License
517
453
@@ -525,6 +461,7 @@ The MIT License (MIT). Please see [LICENSE][link-license] for more information.
0 commit comments