Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Silverstripe 5 #18

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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