mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #233 from creative-commoners/pulls/4/stop-depr
API Stop using deprecated API
This commit is contained in:
commit
7c1762b36f
@ -138,7 +138,7 @@ class ModuleInitialisationController implements Controller
|
||||
{
|
||||
// Create feature_path
|
||||
$features = $this->container->getParameter('silverstripe_extension.context.features_path');
|
||||
$fullPath = $module->getResourcePath($features);
|
||||
$fullPath = $module->getResource($features)->getPath();
|
||||
if (is_dir($fullPath ?? '')) {
|
||||
return;
|
||||
}
|
||||
@ -164,7 +164,7 @@ class ModuleInitialisationController implements Controller
|
||||
protected function initClassPath(OutputInterface $output, Module $module, $namespaceRoot)
|
||||
{
|
||||
$classesPath = $this->container->getParameter('silverstripe_extension.context.class_path');
|
||||
$dirPath = $module->getResourcePath($classesPath);
|
||||
$dirPath = $module->getResource($classesPath)->getPath();
|
||||
if (!is_dir($dirPath ?? '')) {
|
||||
mkdir($dirPath ?? '', 0777, true);
|
||||
}
|
||||
@ -193,7 +193,7 @@ class ModuleInitialisationController implements Controller
|
||||
);
|
||||
|
||||
// Add to composer json
|
||||
$composerFile = $module->getResourcePath('composer.json');
|
||||
$composerFile = $module->getResource('composer.json')->getPath();
|
||||
if (!file_exists($composerFile ?? '')) {
|
||||
return;
|
||||
}
|
||||
@ -251,7 +251,7 @@ class ModuleInitialisationController implements Controller
|
||||
*/
|
||||
protected function initConfig($output, $module, $namespaceRoot)
|
||||
{
|
||||
$configPath = $module->getResourcePath('behat.yml');
|
||||
$configPath = $module->getResource('behat.yml')->getPath();
|
||||
if (file_exists($configPath ?? '')) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user