diff --git a/.env.behat b/.env.behat
new file mode 100644
index 0000000..a80b1ab
--- /dev/null
+++ b/.env.behat
@@ -0,0 +1,71 @@
+APP_NAME=community-with-legends
+VITE_APP_NAME=community-with-legends
+APP_ENV=local
+APP_KEY=base64:sCsJw8z+d/4ymp0OvzSip2h4Vp2hZZhpV2uOxgTqP94=
+APP_DEBUG=true
+APP_URL=http://api.community-with-legends.mmr.localhost
+
+APP_LOCALE=en
+APP_FALLBACK_LOCALE=en
+APP_FAKER_LOCALE=en_US
+
+APP_MAINTENANCE_DRIVER=file
+APP_MAINTENANCE_STORE=database
+
+BCRYPT_ROUNDS=12
+
+LOG_CHANNEL=stack
+LOG_DEPRECATIONS_CHANNEL=null
+LOG_LEVEL=debug
+
+DB_CONNECTION=pgsql
+DB_HOST=community-with-legends-db-dev
+DB_PORT=5432
+DB_DATABASE=community-with-legends
+DB_USERNAME=community-with-legends
+DB_PASSWORD=password
+DB_ROOT_PASSWORD=example
+
+SESSION_DRIVER=redis
+SESSION_LIFETIME=120
+SESSION_ENCRYPT=false
+SESSION_PATH=/
+SESSION_DOMAIN=null
+
+BROADCAST_CONNECTION=log
+FILESYSTEM_DISK=local
+QUEUE_CONNECTION=redis
+
+CACHE_STORE=redis
+CACHE_PREFIX=
+
+MEMCACHED_HOST=127.0.0.1
+
+REDIS_CLIENT=phpredis
+REDIS_HOST=community-with-legends-redis-dev
+REDIS_PASSWORD=null
+REDIS_PORT=6379
+
+MAIL_MAILER=smtp
+MAIL_HOST=mailpit
+MAIL_PORT=1025
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+MAIL_ENCRYPTION=null
+MAIL_FROM_ADDRESS="hello@example.com"
+MAIL_FROM_NAME="${APP_NAME}"
+
+AWS_ACCESS_KEY_ID=
+AWS_SECRET_ACCESS_KEY=
+AWS_DEFAULT_REGION=us-east-1
+AWS_BUCKET=
+AWS_USE_PATH_STYLE_ENDPOINT=false
+
+# DOCKER
+DOCKER_APP_HOST_PORT=63861
+DOCKER_DATABASE_HOST_PORT=63863
+DOCKER_MAILPIT_DASHBOARD_HOST_PORT=63864
+DOCKER_REDIS_HOST_PORT=63862
+DOCKER_INSTALL_XDEBUG=true
+
+DOCKER_HOST_USER_ID=1000
diff --git a/.gitignore b/.gitignore
index 94071de..993310e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ google-credentials.json
.composer
/public/build/
supervisord.pid
+.php-cs-fixer.cache
diff --git a/Makefile b/Makefile
index c48f655..1627017 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ shell-root:
test:
@docker compose --file ${DOCKER_COMPOSE_FILE} exec --user "${CURRENT_USER_ID}:${CURRENT_USER_GROUP_ID}" ${DOCKER_COMPOSE_APP_CONTAINER} composer test
+ @docker compose --file ${DOCKER_COMPOSE_FILE} exec --user "${CURRENT_USER_ID}:${CURRENT_USER_GROUP_ID}" ${DOCKER_COMPOSE_APP_CONTAINER} composer test-features
fix:
@docker compose --file ${DOCKER_COMPOSE_FILE} exec --user "${CURRENT_USER_ID}:${CURRENT_USER_GROUP_ID}" ${DOCKER_COMPOSE_APP_CONTAINER} bash -c 'composer csf'
diff --git a/app/Enums/Role.php b/app/Enums/Role.php
new file mode 100644
index 0000000..053d9d0
--- /dev/null
+++ b/app/Enums/Role.php
@@ -0,0 +1,34 @@
+map(
+ fn(Role $enum): array => [
+ "label" => $enum->label(),
+ "value" => $enum->value,
+ ],
+ )->toArray();
+ }
+
+ public function label(): string
+ {
+ return __($this->value);
+ }
+
+ public function permissions(): array
+ {
+ return config("permission.permission_roles")[$this->value];
+ }
+}
diff --git a/app/Models/User.php b/app/Models/User.php
index 042a1ad..f29a1eb 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -9,6 +9,7 @@
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
+use Spatie\Permission\Traits\HasRoles;
/**
* @property string $name
@@ -23,6 +24,7 @@ class User extends Authenticatable
use HasApiTokens;
use HasFactory;
use Notifiable;
+ use HasRoles;
protected $fillable = [
"name",
diff --git a/composer.json b/composer.json
index 7acbe02..5946916 100644
--- a/composer.json
+++ b/composer.json
@@ -1,19 +1,28 @@
{
- "name": "blumilksoftware/community-with-legends",
+ "name": "mmr/community-with-legends",
"type": "project",
"description": "community-with-legends project.",
"keywords": ["framework", "laravel"],
"license": "MIT",
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/MRR-Group/blt"
+ }
+ ],
"require": {
"php": "^8.3.4",
"ext-pdo": "*",
"guzzlehttp/guzzle": "^7.9.2",
- "inertiajs/inertia-laravel": "^1.3.1",
- "laravel/framework": "^11.34.2",
- "laravel/sanctum": "^4.0.5",
- "laravel/tinker": "^2.10.0"
+ "laravel/framework": "^11.43.2",
+ "laravel/sanctum": "^4.0.8",
+ "laravel/tinker": "^2.10.1",
+ "spatie/laravel-activitylog": "^4.10",
+ "spatie/laravel-permission": "^6.15"
},
"require-dev": {
+ "behat/behat": "^3.19",
+ "blumilksoftware/blt": "^v0.1.1",
"blumilksoftware/codestyle": "^v3.3.0",
"fakerphp/faker": "^1.24.1",
"mockery/mockery": "^1.6.12",
@@ -52,6 +61,7 @@
"@putenv XDEBUG_MODE=off",
"@php artisan test"
],
+ "test-features": "./vendor/bin/behat",
"analyse": "./vendor/bin/phpstan analyse",
"cs": "./vendor/bin/php-cs-fixer fix --dry-run --diff --config codestyle.php",
"csf": "./vendor/bin/php-cs-fixer fix --diff --config codestyle.php"
diff --git a/composer.lock b/composer.lock
index 12e11d7..4d4b234 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "677e4812e2584d1324ec47894a919313",
+ "content-hash": "a6722513b8df501831e7cfb02d3ff5aa",
"packages": [
{
"name": "brick/math",
@@ -1054,82 +1054,6 @@
],
"time": "2025-02-03T10:55:03+00:00"
},
- {
- "name": "inertiajs/inertia-laravel",
- "version": "v1.3.2",
- "source": {
- "type": "git",
- "url": "https://github.com/inertiajs/inertia-laravel.git",
- "reference": "7e6a030ffab315099782a4844a2175455f511c68"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/7e6a030ffab315099782a4844a2175455f511c68",
- "reference": "7e6a030ffab315099782a4844a2175455f511c68",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "laravel/framework": "^8.74|^9.0|^10.0|^11.0",
- "php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0",
- "symfony/console": "^5.3|^6.0|^7.0"
- },
- "require-dev": {
- "mockery/mockery": "^1.3.3",
- "orchestra/testbench": "^6.45|^7.44|^8.25|^9.3",
- "phpunit/phpunit": "^8.0|^9.5.8|^10.4",
- "roave/security-advisories": "dev-master"
- },
- "suggest": {
- "ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command."
- },
- "type": "library",
- "extra": {
- "laravel": {
- "providers": [
- "Inertia\\ServiceProvider"
- ]
- },
- "branch-alias": {
- "dev-master": "1.x-dev"
- }
- },
- "autoload": {
- "files": [
- "./helpers.php"
- ],
- "psr-4": {
- "Inertia\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jonathan Reinink",
- "email": "jonathan@reinink.ca",
- "homepage": "https://reinink.ca"
- }
- ],
- "description": "The Laravel adapter for Inertia.js.",
- "keywords": [
- "inertia",
- "laravel"
- ],
- "support": {
- "issues": "https://github.com/inertiajs/inertia-laravel/issues",
- "source": "https://github.com/inertiajs/inertia-laravel/tree/v1.3.2"
- },
- "funding": [
- {
- "url": "https://github.com/reinink",
- "type": "github"
- }
- ],
- "time": "2024-12-05T14:52:50+00:00"
- },
{
"name": "laravel/framework",
"version": "v11.43.2",
@@ -3439,6 +3363,240 @@
],
"time": "2024-04-27T21:32:50+00:00"
},
+ {
+ "name": "spatie/laravel-activitylog",
+ "version": "4.10.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/laravel-activitylog.git",
+ "reference": "466f30f7245fe3a6e328ad5e6812bd43b4bddea5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/466f30f7245fe3a6e328ad5e6812bd43b4bddea5",
+ "reference": "466f30f7245fe3a6e328ad5e6812bd43b4bddea5",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/config": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
+ "illuminate/database": "^8.69 || ^9.27 || ^10.0 || ^11.0 || ^12.0",
+ "illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
+ "php": "^8.1",
+ "spatie/laravel-package-tools": "^1.6.3"
+ },
+ "require-dev": {
+ "ext-json": "*",
+ "orchestra/testbench": "^6.23 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
+ "pestphp/pest": "^1.20 || ^2.0 || ^3.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Spatie\\Activitylog\\ActivitylogServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/helpers.php"
+ ],
+ "psr-4": {
+ "Spatie\\Activitylog\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian De Deyne",
+ "email": "sebastian@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ },
+ {
+ "name": "Tom Witkowski",
+ "email": "dev.gummibeer@gmail.com",
+ "homepage": "https://gummibeer.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "A very simple activity logger to monitor the users of your website or application",
+ "homepage": "https://github.com/spatie/activitylog",
+ "keywords": [
+ "activity",
+ "laravel",
+ "log",
+ "spatie",
+ "user"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/laravel-activitylog/issues",
+ "source": "https://github.com/spatie/laravel-activitylog/tree/4.10.1"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2025-02-10T15:38:25+00:00"
+ },
+ {
+ "name": "spatie/laravel-package-tools",
+ "version": "1.19.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/laravel-package-tools.git",
+ "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa",
+ "reference": "1c9c30ac6a6576b8d15c6c37b6cf23d748df2faa",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/contracts": "^9.28|^10.0|^11.0|^12.0",
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "orchestra/testbench": "^7.7|^8.0|^9.0|^10.0",
+ "pestphp/pest": "^1.23|^2.1|^3.1",
+ "phpunit/phpunit": "^9.5.24|^10.5|^11.5",
+ "spatie/pest-plugin-test-time": "^1.1|^2.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\LaravelPackageTools\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Tools for creating Laravel packages",
+ "homepage": "https://github.com/spatie/laravel-package-tools",
+ "keywords": [
+ "laravel-package-tools",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/laravel-package-tools/issues",
+ "source": "https://github.com/spatie/laravel-package-tools/tree/1.19.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2025-02-06T14:58:20+00:00"
+ },
+ {
+ "name": "spatie/laravel-permission",
+ "version": "6.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/laravel-permission.git",
+ "reference": "86074fcfd127f9fa7bcdf550b7c938e3beb0d65f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/86074fcfd127f9fa7bcdf550b7c938e3beb0d65f",
+ "reference": "86074fcfd127f9fa7bcdf550b7c938e3beb0d65f",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0",
+ "illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0",
+ "illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0",
+ "illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0",
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "laravel/passport": "^11.0|^12.0",
+ "laravel/pint": "^1.0",
+ "orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0",
+ "phpunit/phpunit": "^9.4|^10.1|^11.5"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Spatie\\Permission\\PermissionServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-main": "6.x-dev",
+ "dev-master": "6.x-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/helpers.php"
+ ],
+ "psr-4": {
+ "Spatie\\Permission\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Permission handling for Laravel 8.0 and up",
+ "homepage": "https://github.com/spatie/laravel-permission",
+ "keywords": [
+ "acl",
+ "laravel",
+ "permission",
+ "permissions",
+ "rbac",
+ "roles",
+ "security",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/laravel-permission/issues",
+ "source": "https://github.com/spatie/laravel-permission/tree/6.15.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2025-02-17T19:18:01+00:00"
+ },
{
"name": "symfony/clock",
"version": "v7.2.0",
@@ -5941,36 +6099,62 @@
],
"packages-dev": [
{
- "name": "blumilksoftware/codestyle",
- "version": "v3.3",
+ "name": "behat/behat",
+ "version": "v3.19.0",
"source": {
"type": "git",
- "url": "https://github.com/blumilksoftware/codestyle.git",
- "reference": "aecc480cd600c91da459999685e54ba0f9821507"
+ "url": "https://github.com/Behat/Behat.git",
+ "reference": "6cf82375a88145e33e10a34b211a3f914cbd02ee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/blumilksoftware/codestyle/zipball/aecc480cd600c91da459999685e54ba0f9821507",
- "reference": "aecc480cd600c91da459999685e54ba0f9821507",
+ "url": "https://api.github.com/repos/Behat/Behat/zipball/6cf82375a88145e33e10a34b211a3f914cbd02ee",
+ "reference": "6cf82375a88145e33e10a34b211a3f914cbd02ee",
"shasum": ""
},
"require": {
- "friendsofphp/php-cs-fixer": "^3.59",
- "kubawerlos/php-cs-fixer-custom-fixers": "^3.21",
- "php": "^8.1"
+ "behat/gherkin": "^4.10.0",
+ "behat/transliterator": "^1.5",
+ "composer-runtime-api": "^2.2",
+ "composer/xdebug-handler": "^3.0",
+ "ext-mbstring": "*",
+ "php": "8.1.* || 8.2.* || 8.3.* || 8.4.* ",
+ "psr/container": "^1.0 || ^2.0",
+ "symfony/config": "^5.4 || ^6.4 || ^7.0",
+ "symfony/console": "^5.4 || ^6.4 || ^7.0",
+ "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0",
+ "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0",
+ "symfony/translation": "^5.4 || ^6.4 || ^7.0",
+ "symfony/yaml": "^5.4 || ^6.4 || ^7.0"
},
"require-dev": {
- "jetbrains/phpstorm-attributes": "^1.1",
- "phpunit/phpunit": "^10.0|^11.2",
- "symfony/console": "^6.0|^7.0"
+ "friendsofphp/php-cs-fixer": "^3.68",
+ "phpstan/phpstan": "^2.0",
+ "phpunit/phpunit": "^9.6",
+ "sebastian/diff": "^4.0",
+ "symfony/polyfill-php84": "^1.31",
+ "symfony/process": "^5.4 || ^6.4 || ^7.0"
+ },
+ "suggest": {
+ "ext-dom": "Needed to output test results in JUnit format."
},
"bin": [
- "bin/codestyle"
+ "bin/behat"
],
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
- "Blumilk\\Codestyle\\": "src/"
+ "Behat\\Hook\\": "src/Behat/Hook/",
+ "Behat\\Step\\": "src/Behat/Step/",
+ "Behat\\Behat\\": "src/Behat/Behat/",
+ "Behat\\Config\\": "src/Behat/Config/",
+ "Behat\\Testwork\\": "src/Behat/Testwork/",
+ "Behat\\Transformation\\": "src/Behat/Transformation/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -5979,40 +6163,288 @@
],
"authors": [
{
- "name": "Krzysztof Rewak",
- "email": "krzysztof.rewak@blumilk.pl"
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
}
],
- "description": "Blumilk codestyle configurator",
+ "description": "Scenario-oriented BDD framework for PHP",
+ "homepage": "https://behat.org/",
+ "keywords": [
+ "Agile",
+ "BDD",
+ "ScenarioBDD",
+ "Scrum",
+ "StoryBDD",
+ "User story",
+ "business",
+ "development",
+ "documentation",
+ "examples",
+ "symfony",
+ "testing"
+ ],
"support": {
- "issues": "https://github.com/blumilksoftware/codestyle/issues",
- "source": "https://github.com/blumilksoftware/codestyle/tree/v3.3"
+ "issues": "https://github.com/Behat/Behat/issues",
+ "source": "https://github.com/Behat/Behat/tree/v3.19.0"
},
- "time": "2024-08-02T05:18:46+00:00"
+ "time": "2025-02-13T09:07:11+00:00"
},
{
- "name": "clue/ndjson-react",
- "version": "v1.3.0",
+ "name": "behat/gherkin",
+ "version": "v4.11.0",
"source": {
"type": "git",
- "url": "https://github.com/clue/reactphp-ndjson.git",
- "reference": "392dc165fce93b5bb5c637b67e59619223c931b0"
+ "url": "https://github.com/Behat/Gherkin.git",
+ "reference": "32821a17b12620951e755b5d49328a6421a5b5b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0",
- "reference": "392dc165fce93b5bb5c637b67e59619223c931b0",
+ "url": "https://api.github.com/repos/Behat/Gherkin/zipball/32821a17b12620951e755b5d49328a6421a5b5b5",
+ "reference": "32821a17b12620951e755b5d49328a6421a5b5b5",
"shasum": ""
},
"require": {
- "php": ">=5.3",
- "react/stream": "^1.2"
+ "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*"
},
"require-dev": {
- "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35",
- "react/event-loop": "^1.2"
+ "cucumber/cucumber": "dev-gherkin-24.1.0",
+ "phpunit/phpunit": "^9.6",
+ "symfony/yaml": "^5.4 || ^6.4 || ^7.0"
},
- "type": "library",
+ "suggest": {
+ "symfony/yaml": "If you want to parse features, represented in YAML files"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Behat\\Gherkin": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ }
+ ],
+ "description": "Gherkin DSL parser for PHP",
+ "homepage": "http://behat.org/",
+ "keywords": [
+ "BDD",
+ "Behat",
+ "Cucumber",
+ "DSL",
+ "gherkin",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/Behat/Gherkin/issues",
+ "source": "https://github.com/Behat/Gherkin/tree/v4.11.0"
+ },
+ "time": "2024-12-06T10:07:25+00:00"
+ },
+ {
+ "name": "behat/transliterator",
+ "version": "v1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Transliterator.git",
+ "reference": "baac5873bac3749887d28ab68e2f74db3a4408af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Transliterator/zipball/baac5873bac3749887d28ab68e2f74db3a4408af",
+ "reference": "baac5873bac3749887d28ab68e2f74db3a4408af",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "chuyskywalker/rolling-curl": "^3.1",
+ "php-yaoi/php-yaoi": "^1.0",
+ "phpunit/phpunit": "^8.5.25 || ^9.5.19"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Behat\\Transliterator\\": "src/Behat/Transliterator"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Artistic-1.0"
+ ],
+ "description": "String transliterator",
+ "keywords": [
+ "i18n",
+ "slug",
+ "transliterator"
+ ],
+ "support": {
+ "issues": "https://github.com/Behat/Transliterator/issues",
+ "source": "https://github.com/Behat/Transliterator/tree/v1.5.0"
+ },
+ "time": "2022-03-30T09:27:43+00:00"
+ },
+ {
+ "name": "blumilksoftware/blt",
+ "version": "v0.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/MRR-Group/blt.git",
+ "reference": "b7341631674c50c7acdaa7606f5e70d1111aa548"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/MRR-Group/blt/zipball/b7341631674c50c7acdaa7606f5e70d1111aa548",
+ "reference": "b7341631674c50c7acdaa7606f5e70d1111aa548",
+ "shasum": ""
+ },
+ "require": {
+ "behat/behat": "^3.19",
+ "illuminate/console": "^10.0|^11.0|^11.43",
+ "illuminate/contracts": "^10.0|11.0|^11.43",
+ "illuminate/routing": "^10.0|^11.0|^11.43",
+ "illuminate/support": "^10.0|11.0|^11.43",
+ "illuminate/testing": "^10.0|^11.0|^11.43",
+ "php": "^8.3",
+ "phpunit/phpunit": "^10.1|^11.0.1|^11.4.4",
+ "symfony/css-selector": "^6.2|^7.1",
+ "symfony/dom-crawler": "^6.2|^7.1"
+ },
+ "require-dev": {
+ "blumilksoftware/codestyle": "^3.3.0",
+ "illuminate/http": "^10.0|11.0",
+ "symfony/http-foundation": "^6.2|^7.1"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Blumilk\\BLT\\BLTServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Blumilk\\BLT\\": "src/"
+ }
+ },
+ "scripts": {
+ "cs": [
+ "./vendor/bin/php-cs-fixer fix --dry-run --diff --config codestyle.php"
+ ],
+ "csf": [
+ "./vendor/bin/php-cs-fixer fix --diff --config codestyle.php"
+ ],
+ "test": [
+ "./vendor/bin/phpunit tests"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Krzysztof Rewak",
+ "email": "krzysztof.rewak@blumilk.pl"
+ }
+ ],
+ "description": "Behat + Laravel toolbox",
+ "support": {
+ "source": "https://github.com/MRR-Group/blt/tree/v0.1.1"
+ },
+ "time": "2025-02-24T03:54:45+00:00"
+ },
+ {
+ "name": "blumilksoftware/codestyle",
+ "version": "v3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/blumilksoftware/codestyle.git",
+ "reference": "aecc480cd600c91da459999685e54ba0f9821507"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/blumilksoftware/codestyle/zipball/aecc480cd600c91da459999685e54ba0f9821507",
+ "reference": "aecc480cd600c91da459999685e54ba0f9821507",
+ "shasum": ""
+ },
+ "require": {
+ "friendsofphp/php-cs-fixer": "^3.59",
+ "kubawerlos/php-cs-fixer-custom-fixers": "^3.21",
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.1",
+ "phpunit/phpunit": "^10.0|^11.2",
+ "symfony/console": "^6.0|^7.0"
+ },
+ "bin": [
+ "bin/codestyle"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Blumilk\\Codestyle\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Krzysztof Rewak",
+ "email": "krzysztof.rewak@blumilk.pl"
+ }
+ ],
+ "description": "Blumilk codestyle configurator",
+ "support": {
+ "issues": "https://github.com/blumilksoftware/codestyle/issues",
+ "source": "https://github.com/blumilksoftware/codestyle/tree/v3.3"
+ },
+ "time": "2024-08-02T05:18:46+00:00"
+ },
+ {
+ "name": "clue/ndjson-react",
+ "version": "v1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/clue/reactphp-ndjson.git",
+ "reference": "392dc165fce93b5bb5c637b67e59619223c931b0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0",
+ "reference": "392dc165fce93b5bb5c637b67e59619223c931b0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3",
+ "react/stream": "^1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35",
+ "react/event-loop": "^1.2"
+ },
+ "type": "library",
"autoload": {
"psr-4": {
"Clue\\React\\NDJson\\": "src/"
@@ -6722,6 +7154,73 @@
},
"time": "2025-02-15T09:15:56+00:00"
},
+ {
+ "name": "masterminds/html5",
+ "version": "2.9.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Masterminds/html5-php.git",
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Masterminds\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matt Butcher",
+ "email": "technosophos@gmail.com"
+ },
+ {
+ "name": "Matt Farina",
+ "email": "matt@mattfarina.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ }
+ ],
+ "description": "An HTML5 parser and serializer.",
+ "homepage": "http://masterminds.github.io/html5-php",
+ "keywords": [
+ "HTML5",
+ "dom",
+ "html",
+ "parser",
+ "querypath",
+ "serializer",
+ "xml"
+ ],
+ "support": {
+ "issues": "https://github.com/Masterminds/html5-php/issues",
+ "source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
+ },
+ "time": "2024-03-31T07:05:07+00:00"
+ },
{
"name": "mockery/mockery",
"version": "1.6.12",
@@ -9631,31 +10130,40 @@
"time": "2024-10-20T05:08:20+00:00"
},
{
- "name": "symfony/filesystem",
- "version": "v7.2.0",
+ "name": "symfony/config",
+ "version": "v7.2.3",
"source": {
"type": "git",
- "url": "https://github.com/symfony/filesystem.git",
- "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb"
+ "url": "https://github.com/symfony/config.git",
+ "reference": "7716594aaae91d9141be080240172a92ecca4d44"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb",
- "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb",
+ "url": "https://api.github.com/repos/symfony/config/zipball/7716594aaae91d9141be080240172a92ecca4d44",
+ "reference": "7716594aaae91d9141be080240172a92ecca4d44",
"shasum": ""
},
"require": {
"php": ">=8.2",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-mbstring": "~1.8"
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/filesystem": "^7.1",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/finder": "<6.4",
+ "symfony/service-contracts": "<2.5"
},
"require-dev": {
- "symfony/process": "^6.4|^7.0"
+ "symfony/event-dispatcher": "^6.4|^7.0",
+ "symfony/finder": "^6.4|^7.0",
+ "symfony/messenger": "^6.4|^7.0",
+ "symfony/service-contracts": "^2.5|^3",
+ "symfony/yaml": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
- "Symfony\\Component\\Filesystem\\": ""
+ "Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
@@ -9675,10 +10183,10 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Provides basic utilities for the filesystem",
+ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v7.2.0"
+ "source": "https://github.com/symfony/config/tree/v7.2.3"
},
"funding": [
{
@@ -9694,36 +10202,249 @@
"type": "tidelift"
}
],
- "time": "2024-10-25T15:15:23+00:00"
+ "time": "2025-01-22T12:07:01+00:00"
},
{
- "name": "symfony/options-resolver",
- "version": "v7.2.0",
+ "name": "symfony/dependency-injection",
+ "version": "v7.2.3",
"source": {
"type": "git",
- "url": "https://github.com/symfony/options-resolver.git",
- "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50"
+ "url": "https://github.com/symfony/dependency-injection.git",
+ "reference": "1d321c4bc3fe926fd4c38999a4c9af4f5d61ddfc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50",
- "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1d321c4bc3fe926fd4c38999a4c9af4f5d61ddfc",
+ "reference": "1d321c4bc3fe926fd4c38999a4c9af4f5d61ddfc",
"shasum": ""
},
"require": {
"php": ">=8.2",
- "symfony/deprecation-contracts": "^2.5|^3"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\OptionsResolver\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "psr/container": "^1.1|^2.0",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/service-contracts": "^3.5",
+ "symfony/var-exporter": "^6.4|^7.0"
},
- "notification-url": "https://packagist.org/downloads/",
+ "conflict": {
+ "ext-psr": "<1.1|>=2",
+ "symfony/config": "<6.4",
+ "symfony/finder": "<6.4",
+ "symfony/yaml": "<6.4"
+ },
+ "provide": {
+ "psr/container-implementation": "1.1|2.0",
+ "symfony/service-implementation": "1.1|2.0|3.0"
+ },
+ "require-dev": {
+ "symfony/config": "^6.4|^7.0",
+ "symfony/expression-language": "^6.4|^7.0",
+ "symfony/yaml": "^6.4|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\DependencyInjection\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Allows you to standardize and centralize the way objects are constructed in your application",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/dependency-injection/tree/v7.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-01-17T10:56:55+00:00"
+ },
+ {
+ "name": "symfony/dom-crawler",
+ "version": "v7.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/dom-crawler.git",
+ "reference": "700a880e5089280c7cf3ca1ccf9d9de6630f5d25"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/700a880e5089280c7cf3ca1ccf9d9de6630f5d25",
+ "reference": "700a880e5089280c7cf3ca1ccf9d9de6630f5d25",
+ "shasum": ""
+ },
+ "require": {
+ "masterminds/html5": "^2.6",
+ "php": ">=8.2",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "symfony/css-selector": "^6.4|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\DomCrawler\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases DOM navigation for HTML and XML documents",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/dom-crawler/tree/v7.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-01-27T11:08:17+00:00"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v7.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb",
+ "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.8"
+ },
+ "require-dev": {
+ "symfony/process": "^6.4|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides basic utilities for the filesystem",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/v7.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-10-25T15:15:23+00:00"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "v7.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50",
+ "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2",
+ "symfony/deprecation-contracts": "^2.5|^3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\OptionsResolver\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -9901,6 +10622,154 @@
],
"time": "2024-12-18T14:28:33+00:00"
},
+ {
+ "name": "symfony/var-exporter",
+ "version": "v7.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/var-exporter.git",
+ "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d",
+ "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2"
+ },
+ "require-dev": {
+ "symfony/property-access": "^6.4|^7.0",
+ "symfony/serializer": "^6.4|^7.0",
+ "symfony/var-dumper": "^6.4|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\VarExporter\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Allows exporting any serializable PHP data structure to plain PHP code",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "clone",
+ "construct",
+ "export",
+ "hydrate",
+ "instantiate",
+ "lazy-loading",
+ "proxy",
+ "serialize"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/var-exporter/tree/v7.2.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-10-18T07:58:17+00:00"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v7.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/ac238f173df0c9c1120f862d0f599e17535a87ec",
+ "reference": "ac238f173df0c9c1120f862d0f599e17535a87ec",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2",
+ "symfony/deprecation-contracts": "^2.5|^3.0",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "symfony/console": "<6.4"
+ },
+ "require-dev": {
+ "symfony/console": "^6.4|^7.0"
+ },
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Loads and dumps YAML files",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/yaml/tree/v7.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-01-07T12:55:42+00:00"
+ },
{
"name": "theseer/tokenizer",
"version": "1.2.3",
@@ -9954,13 +10823,13 @@
],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.3.4",
"ext-pdo": "*"
},
- "platform-dev": [],
- "plugin-api-version": "2.3.0"
+ "platform-dev": {},
+ "plugin-api-version": "2.6.0"
}
diff --git a/config/activitylog.php b/config/activitylog.php
new file mode 100644
index 0000000..fcaa79e
--- /dev/null
+++ b/config/activitylog.php
@@ -0,0 +1,16 @@
+ env("ACTIVITY_LOGGER_ENABLED", true),
+ "delete_records_older_than_days" => 365,
+ "default_log_name" => "default",
+ "default_auth_driver" => null,
+ "subject_returns_soft_deleted_models" => false,
+ "activity_model" => Activity::class,
+ "table_name" => env("ACTIVITY_LOGGER_TABLE_NAME", "activity_log"),
+ "database_connection" => env("ACTIVITY_LOGGER_DB_CONNECTION"),
+];
diff --git a/config/blt.php b/config/blt.php
new file mode 100644
index 0000000..9cb4d0f
--- /dev/null
+++ b/config/blt.php
@@ -0,0 +1,25 @@
+ [
+ "default" => "App\\",
+ "types" => [
+ "user" => "App\Models\User",
+ "role" => Role::class,
+ ],
+ ],
+ "helpers" => [
+ "array" => ArrayHelper::class,
+ "boolean" => BooleanHelper::class,
+ "class" => ClassHelper::class,
+ "nullable" => NullableHelper::class,
+ ],
+];
diff --git a/config/permission.php b/config/permission.php
new file mode 100644
index 0000000..acfd7b0
--- /dev/null
+++ b/config/permission.php
@@ -0,0 +1,59 @@
+ [
+ "permission" => Permission::class,
+ "role" => Spatie\Permission\Models\Role::class,
+ ],
+
+ "table_names" => [
+ "roles" => "roles",
+ "permissions" => "permissions",
+ "model_has_permissions" => "model_has_permissions",
+ "model_has_roles" => "model_has_roles",
+ "role_has_permissions" => "role_has_permissions",
+ ],
+
+ "column_names" => [
+ "role_pivot_key" => null,
+ "permission_pivot_key" => null,
+ "model_morph_key" => "model_id",
+ "team_foreign_key" => "team_id",
+ ],
+
+ "register_permission_check_method" => true,
+ "register_octane_reset_listener" => false,
+ "events_enabled" => false,
+ "teams" => false,
+ "team_resolver" => DefaultTeamResolver::class,
+ "use_passport_client_credentials" => false,
+ "display_permission_in_exception" => false,
+ "display_role_in_exception" => false,
+ "enable_wildcard_permission" => false,
+
+ "cache" => [
+ "expiration_time" => DateInterval::createFromDateString("24 hours"),
+ "key" => "spatie.permission.cache",
+ "store" => "default",
+ ],
+ "permissions" => [
+ "manageUsers",
+ "manageModerators",
+ ],
+ "permission_roles" => [
+ Role::Administrator->value => [
+ "manageUsers",
+ "manageModerators",
+ ],
+ Role::Moderator->value => [
+ "manageUsers",
+ ],
+ Role::User->value => [],
+ ],
+];
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index 690dfb1..9e978f8 100644
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -4,8 +4,10 @@
namespace Database\Factories;
+use CommunityWithLegends\Enums\Role;
use CommunityWithLegends\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
+use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
@@ -13,21 +15,47 @@
*/
class UserFactory extends Factory
{
+ protected $model = User::class;
+
public function definition(): array
{
return [
"name" => fake()->name(),
"email" => fake()->unique()->safeEmail(),
"email_verified_at" => now(),
- "password" => "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi",
+ "password" => Hash::make("password"),
"remember_token" => Str::random(10),
];
}
+ public function configure(): static
+ {
+ return $this->afterCreating(function (User $user): void {
+ $user->assignRole(Role::User);
+ $user->syncPermissions(Role::User->permissions());
+ });
+ }
+
public function unverified(): static
{
return $this->state(fn(array $attributes): array => [
"email_verified_at" => null,
]);
}
+
+ public function admin(): static
+ {
+ return $this->afterCreating(function (User $user): void {
+ $user->assignRole(Role::Administrator);
+ $user->syncPermissions(Role::Administrator->permissions());
+ });
+ }
+
+ public function moderator(): static
+ {
+ return $this->afterCreating(function (User $user): void {
+ $user->assignRole(Role::Moderator);
+ $user->syncPermissions(Role::Moderator->permissions());
+ });
+ }
}
diff --git a/database/migrations/2025_02_24_020829_create_permission_tables.php b/database/migrations/2025_02_24_020829_create_permission_tables.php
new file mode 100644
index 0000000..49670ce
--- /dev/null
+++ b/database/migrations/2025_02_24_020829_create_permission_tables.php
@@ -0,0 +1,145 @@
+bigIncrements("id"); // permission id
+ $table->string("name"); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
+ $table->string("guard_name"); // For MyISAM use string('guard_name', 25);
+ $table->timestamps();
+
+ $table->unique(["name", "guard_name"]);
+ });
+
+ Schema::create($tableNames["roles"], static function (Blueprint $table) use ($teams, $columnNames): void {
+ $table->bigIncrements("id"); // role id
+
+ if ($teams || config("permission.testing")) { // permission.testing is a fix for sqlite testing
+ $table->unsignedBigInteger($columnNames["team_foreign_key"])->nullable();
+ $table->index($columnNames["team_foreign_key"], "roles_team_foreign_key_index");
+ }
+ $table->string("name"); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
+ $table->string("guard_name"); // For MyISAM use string('guard_name', 25);
+ $table->timestamps();
+
+ if ($teams || config("permission.testing")) {
+ $table->unique([$columnNames["team_foreign_key"], "name", "guard_name"]);
+ } else {
+ $table->unique(["name", "guard_name"]);
+ }
+ });
+
+ Schema::create($tableNames["model_has_permissions"], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams): void {
+ $table->unsignedBigInteger($pivotPermission);
+
+ $table->string("model_type");
+ $table->unsignedBigInteger($columnNames["model_morph_key"]);
+ $table->index([$columnNames["model_morph_key"], "model_type"], "model_has_permissions_model_id_model_type_index");
+
+ $table->foreign($pivotPermission)
+ ->references("id") // permission id
+ ->on($tableNames["permissions"])
+ ->onDelete("cascade");
+
+ if ($teams) {
+ $table->unsignedBigInteger($columnNames["team_foreign_key"]);
+ $table->index($columnNames["team_foreign_key"], "model_has_permissions_team_foreign_key_index");
+
+ $table->primary(
+ [$columnNames["team_foreign_key"], $pivotPermission, $columnNames["model_morph_key"], "model_type"],
+ "model_has_permissions_permission_model_type_primary",
+ );
+ } else {
+ $table->primary(
+ [$pivotPermission, $columnNames["model_morph_key"], "model_type"],
+ "model_has_permissions_permission_model_type_primary",
+ );
+ }
+ });
+
+ Schema::create($tableNames["model_has_roles"], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams): void {
+ $table->unsignedBigInteger($pivotRole);
+
+ $table->string("model_type");
+ $table->unsignedBigInteger($columnNames["model_morph_key"]);
+ $table->index([$columnNames["model_morph_key"], "model_type"], "model_has_roles_model_id_model_type_index");
+
+ $table->foreign($pivotRole)
+ ->references("id") // role id
+ ->on($tableNames["roles"])
+ ->onDelete("cascade");
+
+ if ($teams) {
+ $table->unsignedBigInteger($columnNames["team_foreign_key"]);
+ $table->index($columnNames["team_foreign_key"], "model_has_roles_team_foreign_key_index");
+
+ $table->primary(
+ [$columnNames["team_foreign_key"], $pivotRole, $columnNames["model_morph_key"], "model_type"],
+ "model_has_roles_role_model_type_primary",
+ );
+ } else {
+ $table->primary(
+ [$pivotRole, $columnNames["model_morph_key"], "model_type"],
+ "model_has_roles_role_model_type_primary",
+ );
+ }
+ });
+
+ Schema::create($tableNames["role_has_permissions"], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission): void {
+ $table->unsignedBigInteger($pivotPermission);
+ $table->unsignedBigInteger($pivotRole);
+
+ $table->foreign($pivotPermission)
+ ->references("id") // permission id
+ ->on($tableNames["permissions"])
+ ->onDelete("cascade");
+
+ $table->foreign($pivotRole)
+ ->references("id") // role id
+ ->on($tableNames["roles"])
+ ->onDelete("cascade");
+
+ $table->primary([$pivotPermission, $pivotRole], "role_has_permissions_permission_id_role_id_primary");
+ });
+
+ app("cache")
+ ->store(config("permission.cache.store") !== "default" ? config("permission.cache.store") : null)
+ ->forget(config("permission.cache.key"));
+ }
+
+ public function down(): void
+ {
+ $tableNames = config("permission.table_names");
+
+ if (empty($tableNames)) {
+ throw new Exception("Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.");
+ }
+
+ Schema::drop($tableNames["role_has_permissions"]);
+ Schema::drop($tableNames["model_has_roles"]);
+ Schema::drop($tableNames["model_has_permissions"]);
+ Schema::drop($tableNames["roles"]);
+ Schema::drop($tableNames["permissions"]);
+ }
+};
diff --git a/database/migrations/2025_02_24_031506_create_activity_log_table.php b/database/migrations/2025_02_24_031506_create_activity_log_table.php
new file mode 100644
index 0000000..d07e03c
--- /dev/null
+++ b/database/migrations/2025_02_24_031506_create_activity_log_table.php
@@ -0,0 +1,29 @@
+create(config("activitylog.table_name"), function (Blueprint $table): void {
+ $table->bigIncrements("id");
+ $table->string("log_name")->nullable();
+ $table->text("description");
+ $table->nullableMorphs("subject", "subject");
+ $table->nullableMorphs("causer", "causer");
+ $table->json("properties")->nullable();
+ $table->timestamps();
+ $table->index("log_name");
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::connection(config("activitylog.database_connection"))->dropIfExists(config("activitylog.table_name"));
+ }
+}
diff --git a/database/migrations/2025_02_24_031507_add_event_column_to_activity_log_table.php b/database/migrations/2025_02_24_031507_add_event_column_to_activity_log_table.php
new file mode 100644
index 0000000..6209159
--- /dev/null
+++ b/database/migrations/2025_02_24_031507_add_event_column_to_activity_log_table.php
@@ -0,0 +1,24 @@
+table(config("activitylog.table_name"), function (Blueprint $table): void {
+ $table->string("event")->nullable()->after("subject_type");
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::connection(config("activitylog.database_connection"))->table(config("activitylog.table_name"), function (Blueprint $table): void {
+ $table->dropColumn("event");
+ });
+ }
+}
diff --git a/database/migrations/2025_02_24_031508_add_batch_uuid_column_to_activity_log_table.php b/database/migrations/2025_02_24_031508_add_batch_uuid_column_to_activity_log_table.php
new file mode 100644
index 0000000..d01a23e
--- /dev/null
+++ b/database/migrations/2025_02_24_031508_add_batch_uuid_column_to_activity_log_table.php
@@ -0,0 +1,24 @@
+table(config("activitylog.table_name"), function (Blueprint $table): void {
+ $table->uuid("batch_uuid")->nullable()->after("properties");
+ });
+ }
+
+ public function down(): void
+ {
+ Schema::connection(config("activitylog.database_connection"))->table(config("activitylog.table_name"), function (Blueprint $table): void {
+ $table->dropColumn("batch_uuid");
+ });
+ }
+}
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index de85323..8801225 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -4,11 +4,18 @@
namespace Database\Seeders;
+use CommunityWithLegends\Models\User;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
+ $this->call(RoleSeeder::class);
+ $this->call(PermissionsSeeder::class);
+
+ User::factory([
+ "email" => "admin@cwl.com",
+ ])->admin()->create();
}
}
diff --git a/database/seeders/PermissionsSeeder.php b/database/seeders/PermissionsSeeder.php
new file mode 100644
index 0000000..15072db
--- /dev/null
+++ b/database/seeders/PermissionsSeeder.php
@@ -0,0 +1,28 @@
+name, $configPermissions, strict: true)) {
+ $permission->delete();
+ }
+ }
+ }
+}
diff --git a/database/seeders/RoleSeeder.php b/database/seeders/RoleSeeder.php
new file mode 100644
index 0000000..c646af3
--- /dev/null
+++ b/database/seeders/RoleSeeder.php
@@ -0,0 +1,20 @@
+firstOrCreate(["name" => $role["label"]]);
+ }
+ }
+}
diff --git a/features/ExampleTest.feature b/features/ExampleTest.feature
new file mode 100644
index 0000000..929c351
--- /dev/null
+++ b/features/ExampleTest.feature
@@ -0,0 +1,5 @@
+Feature: Example test
+ Scenario: User can access to root page
+ Given a user is requesting "/" using GET method
+ When a request is sent
+ Then the response should have status 200 and contain JSON with key "message" and value "Welcome"
diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php
new file mode 100644
index 0000000..f9488ae
--- /dev/null
+++ b/features/bootstrap/FeatureContext.php
@@ -0,0 +1,16 @@
+boot();
+ }
+}
diff --git a/phpunit.xml b/phpunit.xml
index 79fe019..ddd3a76 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -8,9 +8,6 @@
./tests/Unit
-
- ./tests/Feature
-
diff --git a/routes/web.php b/routes/web.php
index 2301789..023c58f 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -2,7 +2,9 @@
declare(strict_types=1);
+use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Route;
-use Inertia\Response;
-Route::get("/", fn(): Response => inertia("Welcome"));
+Route::get("/", fn(): JsonResponse => response()->json([
+ "message" => "Welcome",
+]));
diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php
deleted file mode 100644
index 55a42c3..0000000
--- a/tests/Feature/ExampleTest.php
+++ /dev/null
@@ -1,17 +0,0 @@
-get("/");
-
- $response->assertStatus(200);
- }
-}