Skip to content

Commit

Permalink
DEP PHP Support in CMS5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jan 12, 2023
1 parent 1e7ad33 commit 1d70aa5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"guzzlehttp/guzzle": "^7.3",
"silverstripe/cms": "^4.4",
"silverstripe/admin": "^1.4",
"silverstripe/vendor-plugin": "^1",
"symbiote/silverstripe-gridfieldextensions": "^3.2",
"php": "^8.1",
"guzzlehttp/guzzle": "^7.5",
"silverstripe/cms": "^5",
"silverstripe/admin": "^2",
"silverstripe/vendor-plugin": "^2",
"symbiote/silverstripe-gridfieldextensions": "^4",
"ext-json": "*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ResourceField.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getCMSFields()
$fields->removeByName(['ShowInResultsView', 'ShowInDetailView', 'RemoveDuplicates']);
$visibilityOptions = FieldGroup::create('Visibility', [$summary, $detail, $duplicates])
->addExtraClass('visibility-options');
$fields->insertBefore($visibilityOptions, 'Position');
$fields->insertBefore('Position', $visibilityOptions);

$fields->removeByName('ResourceID');

Expand Down
8 changes: 4 additions & 4 deletions tests/php/Page/CKANRegistryPageControllerFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class CKANRegistryPageControllerFunctionalTest extends FunctionalTest
{
protected static $fixture_file = 'CKANRegistryPageControllerTest.yml';

protected static $use_draft_site = true;

protected function setUp(): void
{
// Mock the field populator, in case an action we perform in a unit test tries to contact the mock API.
Expand All @@ -24,15 +22,17 @@ protected function setUp(): void

public function testGetSchemaFromPageUrl()
{
$response = $this->get('animal-centers/schema');
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
$response = $this->get('animal-centers/schema?stage=Stage');

$this->assertSame(200, $response->getStatusCode());
$this->assertJson($response->getBody());
}

public function testGetSchemaFromPageSubUrl()
{
$response = $this->get('animal-centers/view/123/schema');
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
$response = $this->get('animal-centers/view/123/schema?stage=Stage');

$this->assertSame(200, $response->getStatusCode());
$this->assertJson($response->getBody());
Expand Down

0 comments on commit 1d70aa5

Please sign in to comment.