Skip to content

Commit

Permalink
Merge pull request #18 from altwohill/master
Browse files Browse the repository at this point in the history
Support Silverstripe 5
  • Loading branch information
dhensby authored Aug 31, 2023
2 parents d421574 + bdc05b3 commit 6293527
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use PHP 7.1
- name: Use PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: 7.1
php-version: 8.1
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
Expand All @@ -51,8 +51,8 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-php7.1-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-php7.1-
key: ${{ runner.os }}-composer-php8.1-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-php8.1-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-scripts --no-plugins
- name: Lint code
Expand All @@ -67,7 +67,7 @@ jobs:
DB: mysql
strategy:
matrix:
php_version: ['7.1']
php_version: ['8.1']
services:
mysql:
image: mysql:5.7-debian
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"description": "SilverStripe module to allow you to masquerade as other users",
"type": "silverstripe-vendormodule",
"require": {
"silverstripe/framework": "^4"
"silverstripe/framework": "^5"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"phpunit/phpunit": "*",
"squizlabs/php_codesniffer": "^3.7"
},
"config": {
Expand Down Expand Up @@ -42,6 +42,14 @@
"dev-master": "0.x-dev"
}
},
"config": {
"allow-plugins": {
"composer/installers": true,
"silverstripe/recipe-plugin": true,
"silverstripe/vendor-plugin": true,
"php-http/discovery": true
}
},
"prefer-stable": true,
"minimum-stability": "dev"
}
2 changes: 1 addition & 1 deletion src/Extensions/SecurityAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SecurityAdminExtension extends Extension
public function updateEditForm(Form $form)
{
/** @var GridField $gridField */
$gridField = $form->Fields()->dataFieldByName('Members');
$gridField = $form->Fields()->dataFieldByName('users');
$gridField->getConfig()
->addComponent(new GridFieldMasqueradeButton());
}
Expand Down

0 comments on commit 6293527

Please sign in to comment.