Skip to content

Commit

Permalink
chore: prep for flarum/gdpr (#85)
Browse files Browse the repository at this point in the history
* chore: prep for flarum/gdpr

* Apply fixes from StyleCI

* drop php 7.3 support

* optional-deps

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Nov 2, 2024
1 parent 423028e commit a9646d2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
with:
enable_backend_testing: true
enable_phpstan: true
php_versions: '["7.4", "8.0, "8.1", "8.2", "8.3"]'

backend_directory: .
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"flarum/core": "^1.8.1",
"league/oauth1-client": "^1.10.1",
"league/oauth2-facebook": "^2.2.0",
Expand Down Expand Up @@ -71,7 +72,10 @@
"name": "fas fa-sign-in-alt",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
},
"optional-dependencies": [
"flarum/gdpr"
]
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/25182"
Expand Down
8 changes: 8 additions & 0 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@

(new Extend\SimpleFlarumSearch(UserSearcher::class))
->addGambit(Query\SsoIdFilterGambit::class),

(new Extend\Conditional())
->whenExtensionEnabled('flarum-gdpr', fn () => [
(new Extend\ApiSerializer(ForumSerializer::class))
->attribute('passwordlessSignUp', function (ForumSerializer $serializer) {
return !$serializer->getActor()->isGuest() && $serializer->getActor()->loginProviders()->count() > 0;
}),
]),
];

0 comments on commit a9646d2

Please sign in to comment.