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

DEP PHP Support in CMS5 #497

Merged
merged 1 commit into from
Jan 10, 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
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.

6 changes: 3 additions & 3 deletions tests/behat/features/insert-content-link.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ 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
And I click on the "#Form_editorInternalLink_action_insert" element
Then the "Content" HTML field should contain "<a title="my desc" href="[sitetree_link"
And the "Content" HTML field should contain "My page</a>"
# Required to avoid "unsaved changes" browser dialog
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