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 Dec 21, 2022
1 parent f45ccea commit 0ad5fc8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 42 deletions.
5 changes: 0 additions & 5 deletions _config.php

This file was deleted.

2 changes: 0 additions & 2 deletions _config/middleware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ SilverStripe\Core\Injector\Injector:
properties:
Middlewares:
SubsitesStateMiddleware: '%$SilverStripe\Subsites\Middleware\InitStateMiddleware'
SilverStripe\Dev\Tasks\MigrateFileTask:
class: SilverStripe\Subsites\Tasks\SubsiteMigrateFileTask
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"silverstripe/framework": "^4.10",
"silverstripe/cms": "^4.4@dev",
"silverstripe/admin": "^1.4@dev",
"silverstripe/asset-admin": "^1.4@dev",
"silverstripe/errorpage": "^1.4@dev",
"silverstripe/versioned": "^1.4@dev"
"php": "^8.1",
"silverstripe/framework": "^5",
"silverstripe/cms": "^5",
"silverstripe/admin": "^2",
"silverstripe/asset-admin": "^2",
"silverstripe/errorpage": "^2",
"silverstripe/versioned": "^2"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.0"
"squizlabs/php_codesniffer": "^3"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/SubsiteXHRController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SilverStripe\Subsites\Controller;

use SilverStripe\Admin\LeftAndMain;
use SilverStripe\Control\PjaxResponseNegotiator;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Subsites\Model\Subsite;
Expand Down Expand Up @@ -46,7 +47,7 @@ public function canAccess()
]);
}

public function getResponseNegotiator()
public function getResponseNegotiator(): PjaxResponseNegotiator
{
$negotiator = parent::getResponseNegotiator();

Expand Down
5 changes: 1 addition & 4 deletions src/Model/Subsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,11 +971,8 @@ public function getMembersByPermission($permissionCodes = ['ADMIN'])

/**
* Duplicate this subsite
* @param bool $doWrite
* @param string $manyMany
* @return DataObject
*/
public function duplicate($doWrite = true, $manyMany = 'many_many')
public function duplicate(bool $doWrite = true, ?array $manyMany = null): static
{
$duplicate = parent::duplicate($doWrite);

Expand Down
19 changes: 0 additions & 19 deletions src/Tasks/SubsiteMigrateFileTask.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/behat/features/insert-content-link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Feature: Insert an internal link into content
# See "insert-a-link.feature" from silverstripe/cms
When I select "My page" in the "Content" HTML field
And I press the "Insert link" HTML field button
And I click "Page on this site" in the ".mce-menu" element
And I click "Page on this site" in the ".tox-collection__group" element
Then I should see an "form#Form_editorInternalLink" element
When I click "(Search or choose Page)" in the ".Select-multi-value-wrapper" element
When I click on the ".treedropdownfield" element
And I click "Another page" in the ".treedropdownfield__menu" element
And I fill in "my desc" for "Link description"
And I press the "Insert" button
Expand Down
2 changes: 1 addition & 1 deletion tests/php/SubsitesVirtualPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Page;
use SilverStripe\Assets\File;
use SilverStripe\Assets\Filesystem;
use SilverStripe\Assets\Tests\Storage\AssetStoreTest\TestAssetStore;
use SilverStripe\Assets\Dev\TestAssetStore;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Control\Director;
use SilverStripe\Core\Config\Config;
Expand Down

0 comments on commit 0ad5fc8

Please sign in to comment.