diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 60d3993..45c97ff 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,7 +4,12 @@ on:
push:
branches: [ "develop" ]
pull_request:
- branches: [ "develop" ]
+ types:
+ - opened
+ - reopened
+ - synchronize
+ - ready_for_review
+ - review_requested
permissions:
contents: write
@@ -16,7 +21,7 @@ jobs:
build:
runs-on: ubuntu-latest
-
+ if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps:
- name: Preparing timer
id: timer_start
@@ -83,7 +88,7 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Run php-actions/composer@v6
uses: php-actions/composer@v6
with:
@@ -96,7 +101,7 @@ jobs:
with:
version: "10.1"
php_version: "8.2"
- php_extensions: xdebug
+ php_extensions: intl xdebug
coverage_clover: clover.xml
coverage_text: true
- name: Make code coverage badge
@@ -112,6 +117,12 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
+ - uses: php-actions/phpstan@v3
+ with:
+ level: 9
+ php_version: "8.2"
+ path: config/ database/ src/ tests/Unit/ tests/Feature/
+ args: --verbose --debug
- name: Stopping timer
if: ${{ !cancelled() }}
id: timer_end
diff --git a/.php-cs-fixer.dist b/.php-cs-fixer.dist.php
similarity index 98%
rename from .php-cs-fixer.dist
rename to .php-cs-fixer.dist.php
index 801450d..7c2849b 100644
--- a/.php-cs-fixer.dist
+++ b/.php-cs-fixer.dist.php
@@ -213,10 +213,10 @@
$finder = PhpCsFixer\Finder::create()
->in([
- __DIR__ . '/config',
- __DIR__ . '/database',
- __DIR__ . '/src',
- __DIR__ . '/tests/Feature',
+ __DIR__.'/config',
+ __DIR__.'/database',
+ __DIR__.'/src',
+ __DIR__.'/tests/Feature',
__DIR__ . '/tests/Unit',
])
->name('*.php')
diff --git a/README.md b/README.md
index 9266bfd..bfaa479 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
[![Playground CI Workflow](https://github.com/gammamatrix/playground-matrix/actions/workflows/ci.yml/badge.svg?branch=develop)](https://raw.githubusercontent.com/gammamatrix/playground-matrix/testing/develop/testdox.txt)
[![Test Coverage](https://raw.githubusercontent.com/gammamatrix/playground-matrix/testing/develop/coverage.svg)](tests)
+[![PHPStan Level 9](https://img.shields.io/badge/PHPStan-level%209-brightgreen)](.github/workflows/ci.yml#L120)
The Playground Matrix is a package for [Laravel](https://laravel.com/docs/10.x) applications.
@@ -15,6 +16,12 @@ You can install the package via composer:
composer require gammamatrix/playground-matrix
```
+## `artisan:about`
+
+Playground Matrix provides information in the `artisan about` command.
+
+
+
## Configuration
Migrations are disabled by default. This package may sometimes be installed where another system handles the migrations.
@@ -23,7 +30,7 @@ See the contents of the published config file: [config/playground-matrix.php](co
You can publish the config file with:
```bash
-php artisan vendor:publish --provider="GammaMatrix\Playground\Matrix\ServiceProvider" --tag="playground-config"
+php artisan vendor:publish --provider="Playground\Matrix\ServiceProvider" --tag="playground-config"
```
### Environment Variables
@@ -61,16 +68,29 @@ See the contents of the published config file: [database/migrations](database/mi
You can publish the migrations file with:
```bash
-php artisan vendor:publish --provider="GammaMatrix\Playground\Matrix\ServiceProvider" --tag="playground-migrations"
+php artisan vendor:publish --provider="Playground\Matrix\ServiceProvider" --tag="playground-migrations"
```
-## About
+## PHPStan
-Playground Matrix provides information in the `artisan about` command.
+Tests at level 9 on:
+- `config/`
+- `database/`
+- `src/`
+- `tests/Feature/`
+- `tests/Unit/`
-
+```sh
+composer analyse
+```
-## Tests
+## Coding Standards
+
+```sh
+composer format
+```
+
+## Testing
```sh
composer test
@@ -79,3 +99,11 @@ composer test
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
+
+## Credits
+
+- [Jeremy Postlethwaite](https://github.com/gammamatrix)
+
+## License
+
+The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
diff --git a/composer.json b/composer.json
index 65cc153..45a50ad 100644
--- a/composer.json
+++ b/composer.json
@@ -20,10 +20,10 @@
],
"require": {
"php": "^8.1",
- "gammamatrix/playground": "dev-develop|dev-master|^73.0"
+ "gammamatrix/playground": "dev-develop|dev-master|dev-feature/*|^73.0"
},
"require-dev": {
- "gammamatrix/playground-test": "dev-develop|dev-master|^73.0"
+ "gammamatrix/playground-test": "dev-develop|dev-master|dev-feature/*|^73.0"
},
"suggest": {
"gammamatrix/playground-matrix-resource": "Provides a resource API and optional Blade UI to interact with the models provided in this package."
@@ -32,14 +32,14 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
- "Database\\Factories\\GammaMatrix\\Playground\\Matrix\\Models\\": "database/factories/",
- "GammaMatrix\\Playground\\Matrix\\": "src/"
+ "Database\\Factories\\Playground\\Matrix\\Models\\": "database/factories/",
+ "Playground\\Matrix\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "Tests\\Feature\\GammaMatrix\\Playground\\Matrix\\": "tests/Feature/",
- "Tests\\Unit\\GammaMatrix\\Playground\\Matrix\\": "tests/Unit/"
+ "Tests\\Feature\\Playground\\Matrix\\": "tests/Feature/",
+ "Tests\\Unit\\Playground\\Matrix\\": "tests/Unit/"
}
},
"config": {
@@ -56,13 +56,13 @@
},
"laravel": {
"providers": [
- "GammaMatrix\\Playground\\Matrix\\ServiceProvider"
+ "Playground\\Matrix\\ServiceProvider"
]
}
},
"scripts": {
- "test": "phpunit",
- "format": "php-cs-fixer fix --allow-risky=yes",
- "analyse": "phpstan analyse"
+ "test": "vendor/bin/phpunit",
+ "format": "vendor/bin/php-cs-fixer fix",
+ "analyse": "vendor/bin/phpstan analyse --verbose --debug --level max"
}
}
diff --git a/database/factories/BacklogFactory.php b/database/factories/BacklogFactory.php
index 9268e4a..232326d 100644
--- a/database/factories/BacklogFactory.php
+++ b/database/factories/BacklogFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class BacklogFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Backlog::class;
+ protected $model = Backlog::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class BacklogFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/BoardFactory.php b/database/factories/BoardFactory.php
index 234f8fa..b9dc19e 100644
--- a/database/factories/BoardFactory.php
+++ b/database/factories/BoardFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class BoardFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Board::class;
+ protected $model = Board::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class BoardFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/EpicFactory.php b/database/factories/EpicFactory.php
index 3e9d8a9..8e2a3da 100644
--- a/database/factories/EpicFactory.php
+++ b/database/factories/EpicFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class EpicFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Epic::class;
+ protected $model = Epic::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class EpicFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/FlowFactory.php b/database/factories/FlowFactory.php
index 342c76e..6a334e1 100644
--- a/database/factories/FlowFactory.php
+++ b/database/factories/FlowFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class FlowFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Flow::class;
+ protected $model = Flow::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class FlowFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/MilestoneFactory.php b/database/factories/MilestoneFactory.php
index 693dd45..73c7f35 100644
--- a/database/factories/MilestoneFactory.php
+++ b/database/factories/MilestoneFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class MilestoneFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Milestone::class;
+ protected $model = Milestone::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class MilestoneFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/NoteFactory.php b/database/factories/NoteFactory.php
index 029d11b..041c68b 100644
--- a/database/factories/NoteFactory.php
+++ b/database/factories/NoteFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class NoteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Note::class;
+ protected $model = Note::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class NoteFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/ProjectFactory.php b/database/factories/ProjectFactory.php
index f170cb2..ed1704a 100644
--- a/database/factories/ProjectFactory.php
+++ b/database/factories/ProjectFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class ProjectFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Project::class;
+ protected $model = Project::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class ProjectFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/ReleaseFactory.php b/database/factories/ReleaseFactory.php
index 011007d..b10d1b7 100644
--- a/database/factories/ReleaseFactory.php
+++ b/database/factories/ReleaseFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class ReleaseFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Release::class;
+ protected $model = Release::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class ReleaseFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/RoadmapFactory.php b/database/factories/RoadmapFactory.php
index 6929b3d..15f3e6f 100644
--- a/database/factories/RoadmapFactory.php
+++ b/database/factories/RoadmapFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory
*/
class RoadmapFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
- * @var string
+ * @var class-string
*/
- protected $model = \GammaMatrix\Playground\Matrix\Models\Roadmap::class;
+ protected $model = Roadmap::class;
/**
* Define the model's default state.
@@ -29,9 +29,10 @@ class RoadmapFactory extends Factory
*/
public function definition(): array
{
- $title = $this->faker->bs;
+ $title = $this->faker->sentence(3);
+
return [
- 'label' => fake()->bs,
+ 'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'description' => $this->faker->sentence(3),
diff --git a/database/factories/SourceFactory.php b/database/factories/SourceFactory.php
index 3f1c560..1d876a5 100644
--- a/database/factories/SourceFactory.php
+++ b/database/factories/SourceFactory.php
@@ -1,26 +1,26 @@
+ * @extends Factory