Closed hunter-and1 closed 1 year ago
update
src/Commands/Publish.php
protected function publishFilters() { $filters = ['LoginFilter', 'PermissionFilter', 'RoleFilter']; foreach ($filters as $filter) { $path = "{$this->sourcePath}/Filters/{$filter}.php"; $content = file_get_contents($path); $content = $this->replaceNamespace($content, 'Myth\Auth\Filters', 'Filters'); $usingClasses = "use CodeIgniter\HTTP\ResponseInterface;\n"; $newusingClasses = $usingClasses."use \Myth\Auth\Filters\BaseFilter;\n"; $content = str_replace($usingClasses, $newusingClasses, $content); $this->writeFile("Filters/{$filter}.php", $content); } }
Please fork the develop branch and make your PR from there.
And replacement code not working.
Closing as fixed by #575
update
src/Commands/Publish.php