Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ permissions:

jobs:
testsuite:
uses: ADmad/.github/.github/workflows/testsuite-without-db.yml@master
uses: ADmad/.github/.github/workflows/testsuite-without-db.yml@cake6
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

cs-stan:
uses: cakephp/.github/.github/workflows/cs-stan.yml@5.x
uses: cakephp/.github/.github/workflows/cs-stan.yml@6.x
secrets: inherit
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="2.0.2" installed="2.0.2" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.26.1" installed="5.26.1" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="2.3.1" installed="2.3.1" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="7.0.0-rc2" installed="7.0.0-rc2" location="./tools/psalm" copy="false"/>
</phive>
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
}
],
"require": {
"php": ">=8.2",
"cakephp/cakephp": "^5.1.4"
"php": ">=8.5",
"cakephp/cakephp": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "^11.5.3 || ^12.4 || ^13.0",
"cakephp/bake": "^3.0",
"cakephp/cakephp-codesniffer": "^5.1"
"phpunit/phpunit": "^13.0",
"cakephp/bake": "^4.0",
"cakephp/cakephp-codesniffer": "^6.0"
},
"support": {
"issues": "http://github.com/friendsofcake/bootstrap-ui/issues",
Expand Down Expand Up @@ -60,5 +60,7 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset name="BUI">
<arg value="s"/>
<arg value="ps"/>

<file>src/</file>
<file>tests/</file>
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" stopOnFailure="false" bootstrap="./tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" stopOnFailure="false" bootstrap="./tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="bootstrap">
<directory>tests/TestCase/</directory>
Expand Down
6 changes: 6 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MissingOverrideAttribute errorLevel="suppress"/>
<MissingPureAnnotation errorLevel="suppress"/>
<MissingAbstractPureAnnotation errorLevel="suppress"/>
<MissingInterfaceImmutableAnnotation errorLevel="suppress"/>
</issueHandlers>
</psalm>
20 changes: 9 additions & 11 deletions src/Command/BootstrapCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
namespace BootstrapUI\Command;

use Cake\Command\Command;
use Cake\Console\Arguments;
use Cake\Console\CommandCollection;
use Cake\Console\CommandCollectionAwareInterface;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Utility\Text;

Expand Down Expand Up @@ -42,30 +40,30 @@ public function setCommandCollection(CommandCollection $commands): void
/**
* @inheritDoc
*/
public function execute(Arguments $args, ConsoleIo $io): ?int
public function execute(): ?int
{
$io->warning('No command provided. Run `bootstrap --help` to get a list of commands.');
$this->io->warning('No command provided. Run `bootstrap --help` to get a list of commands.');

return static::CODE_ERROR;
}

/**
* @inheritDoc
*/
protected function displayHelp(ConsoleOptionParser $parser, Arguments $args, ConsoleIo $io): void
protected function displayHelp(ConsoleOptionParser $parser): void
{
$io->out(Text::wrap($parser->getDescription(), 72), 2);
$io->info('Available Commands:', 2);
$this->io->out(Text::wrap($parser->getDescription(), 72), 2);
$this->io->info('Available Commands:', 2);

foreach ($this->commands as $command => $class) {
if (substr($command, 0, 10) === 'bootstrap ') {
$io->out("- $command");
$this->io->out("- $command");
}
}

$io->out();
$io->out('To run a command, type <info>`bootstrap command_name [args|options]`</info>');
$io->out('To get help on a specific command, type <info>`bootstrap command_name --help`</info>', 2);
$this->io->out();
$this->io->out('To run a command, type <info>`bootstrap command_name [args|options]`</info>');
$this->io->out('To get help on a specific command, type <info>`bootstrap command_name --help`</info>', 2);
}

/**
Expand Down
19 changes: 7 additions & 12 deletions src/Command/CopyLayoutsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
namespace BootstrapUI\Command;

use Cake\Command\Command;
use Cake\Console\Arguments;
use Cake\Console\ConsoleIo;
use Cake\Console\ConsoleOptionParser;
use Cake\Core\Plugin;
use Cake\Utility\Filesystem;
Expand All @@ -26,21 +24,18 @@ public static function getDescription(): string
/**
* @inheritDoc
*/
public function execute(Arguments $args, ConsoleIo $io): ?int
public function execute(): ?int
{
$io->info('Copying sample layouts...');

$target = $args->getArgument('target');
$this->io->info('Copying sample layouts...');
$target = $this->args->getArgument('target');
if ($target === null) {
$target = $this->_getDefaultTargetPath();
}

if (!$this->_copyLayouts($target)) {
$io->error("Sample layouts could not be copied to `$target`.");
if (!$this->copyLayouts($target)) {
$this->io->error("Sample layouts could not be copied to `$target`.");
$this->abort();
}

$io->success("Sample layouts copied successfully to `$target`.");
$this->io->success("Sample layouts copied successfully to `$target`.");

return static::CODE_SUCCESS;
}
Expand All @@ -51,7 +46,7 @@ public function execute(Arguments $args, ConsoleIo $io): ?int
* @param string $targetPath The path where to copy the files to.
* @return bool
*/
protected function _copyLayouts(string $targetPath): bool
protected function copyLayouts(string $targetPath): bool
{
$source = Plugin::path('BootstrapUI') . 'templates' . DS . 'layout' . DS . 'examples';

Expand Down
Loading
Loading