Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1']
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']
db-type: ['sqlite', 'mysql', 'pgsql']
prefer-lowest: ['']
include:
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="CakePHP DebugKit">
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" />

<rule ref="CakePHP" />
<file>src/</file>
<file>tests/</file>
Comment on lines +4 to +5
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: lines 4-5 use spaces for indentation while the rest of the file uses tabs. For consistency with the existing file style (lines 3, 6-9), these lines should use tabs instead of spaces.

Suggested change
<file>src/</file>
<file>tests/</file>
<file>src/</file>
<file>tests/</file>

Copilot uses AI. Check for mistakes.
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="150"/>
Expand Down
19 changes: 2 additions & 17 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,9 @@

namespace ViteHelper;

use Cake\Core\BasePlugin;
use Cake\Core\Configure;
use Cake\Core\PluginApplicationInterface;

/**
* Plugin for ViteHelper
* @deprecated 2.4.1 Use ViteHelperPlugin instead
*/
class Plugin extends BasePlugin
class Plugin extends ViteHelperPlugin
{
/**
* @inheritDoc
*/
public function bootstrap(PluginApplicationInterface $app): void
{
parent::bootstrap($app);

if (file_exists(ROOT . DS . 'config' . DS . 'app_vite.php')) {
Configure::load('app_vite');
}
}
}
2 changes: 1 addition & 1 deletion src/Utilities/ViteManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function getRecords(ViteHelperConfig $config): ManifestRecords
"\u0000",
],
'',
$json
$json,
);

$manifest = json_decode($json, false, 512, JSON_THROW_ON_ERROR);
Expand Down
4 changes: 2 additions & 2 deletions src/View/Helper/ViteScriptsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private function devScript(array $options, ViteHelperConfig $config): void
[
'type' => 'module',
'block' => $options['cssBlock'],
]
],
);

$files = $this->getFilesForDevelopment($options, $config, 'scriptEntries');
Expand Down Expand Up @@ -289,7 +289,7 @@ private function getFilesForDevelopment(array $options, ViteHelperConfig $config
if (empty($files)) {
throw new ConfigurationException(
'There are no valid entry points for the dev server. '
. 'Be sure to set the ViteHelper.development.' . $configOption . ' config or pass entries to the helper.'
. 'Be sure to set the ViteHelper.development.' . $configOption . ' config or pass entries to the helper.',
);
}

Expand Down
26 changes: 26 additions & 0 deletions src/ViteHelperPlugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);

namespace ViteHelper;

use Cake\Core\BasePlugin;
use Cake\Core\Configure;
use Cake\Core\PluginApplicationInterface;

/**
* Plugin for ViteHelper
*/
class ViteHelperPlugin extends BasePlugin
{
/**
* @inheritDoc
*/
public function bootstrap(PluginApplicationInterface $app): void
{
parent::bootstrap($app);

if (file_exists(ROOT . DS . 'config' . DS . 'app_vite.php')) {
Configure::load('app_vite');
}
}
}