Compare commits

..

10 Commits

Author SHA1 Message Date
Steve Boyd
dc76ac2877
Merge d7c4b0c420 into 3eb61e353f 2024-09-27 02:59:59 +00:00
Steve Boyd
d7c4b0c420 FIX Ensure primary connection is updated with temporary database 2024-09-27 14:59:48 +12:00
Steve Boyd
8f4771385c ENH Use class name instead of self 2024-09-27 14:59:48 +12:00
Guy Sartorelli
3eb61e353f
API Update API to reflect changes to CLI interaction (#93) 2024-09-26 17:17:06 +12:00
Guy Sartorelli
a8efc75702
API Use new names for renamed classes (#94) 2024-09-23 14:33:08 +12:00
Guy Sartorelli
b966a32e0c
API Standardise extension hooks (#91) 2024-08-27 15:39:29 +12:00
Guy Sartorelli
c1cf2b4106
DEP Limit PHP support for CMS 6 (#92) 2024-08-22 12:14:07 +12:00
Steve Boyd
bc4cb87627 Merge branch '3' into 4 2024-05-07 15:49:25 +12:00
Guy Sartorelli
2a9fb2b1e3
Merge pull request #88 from creative-commoners/pulls/4/module-standardiser-1708317246
DEP Dependencies for CMS 6
2024-02-20 10:44:52 +13:00
Steve Boyd
b87e4d46d0 DEP Dependencies for CMS 6 2024-02-19 17:34:06 +13:00
3 changed files with 20 additions and 11 deletions

View File

@ -15,9 +15,9 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.3",
"composer/installers": "*",
"silverstripe/framework": "^5",
"silverstripe/framework": "^6",
"silverstripe/vendor-plugin": "^2"
},
"require-dev": {
@ -38,4 +38,4 @@
}
},
"minimum-stability": "dev"
}
}

View File

@ -16,14 +16,14 @@ use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\Connect\TempDatabase;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\Security\Permission;
use SilverStripe\Security\RandomGenerator;
use SilverStripe\Security\Security;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Requirements;
/**
@ -67,7 +67,7 @@ class TestSessionController extends Controller
{
parent::init();
$this->extend('init');
$this->extend('onInit');
$canAccess = (
!Director::isLive()

View File

@ -15,9 +15,10 @@ use SilverStripe\Core\Extensible;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\FixtureFactory;
use SilverStripe\PolyExecution\Command\DbBuild;
use SilverStripe\PolyExecution\PolyOutput;
use SilverStripe\Dev\YamlFixture;
use SilverStripe\ORM\Connect\TempDatabase;
use SilverStripe\ORM\DatabaseAdmin;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\Versioned\Versioned;
@ -372,9 +373,13 @@ class TestSessionEnvironment
}
// In case the dump involved CREATE TABLE commands, we need to ensure the schema is still up to date
$dbAdmin = new DatabaseAdmin();
$dbBuild = new DbBuild();
Versioned::set_reading_mode('');
$dbAdmin->doBuild(true, $requireDefaultRecords);
$output = new PolyOutput(
Director::is_cli() ? PolyOutput::FORMAT_ANSI : PolyOutput::FORMAT_HTML,
PolyOutput::VERBOSITY_QUIET
);
$dbBuild->doBuild($output, $requireDefaultRecords);
}
/**
@ -382,9 +387,13 @@ class TestSessionEnvironment
*/
public function requireDefaultRecords()
{
$dbAdmin = new DatabaseAdmin();
$dbBuild = new DbBuild();
Versioned::set_reading_mode('');
$dbAdmin->doBuild(true, true);
$output = new PolyOutput(
Director::is_cli() ? PolyOutput::FORMAT_ANSI : PolyOutput::FORMAT_HTML,
PolyOutput::VERBOSITY_QUIET
);
$dbBuild->doBuild($output, true);
}
/**