Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Craft5 #76

Merged
merged 2 commits into from
Apr 18, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ composer.lock
/node_modules/*
/build/*
/yarn-error.log
/tests/_craft/storage/*

# MISC FILES
.cache
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [3.2.0] - 2024-04-18

- Craft 5 compatibility

## [3.1.1] - 2023-01-04

- composer housekeeping, thanks @markhuot
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"require": {
"php": "^8.0",
"craftcms/cms": "^4.0.0",
"craftcms/cms": "^4.0|^5.0",
"symfony/process": "^5.0|^6.0"
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions src/QueueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function getPreparedCommand(callable $wrapper = null): string
throw new PhpExecutableNotFound('Unable to find php executable.');
}

$php = str_replace(' ', '\ ', $php);
$path = realpath(CRAFT_BASE_PATH);
$script = $path . DIRECTORY_SEPARATOR . $this->scriptName;
$commandLine = implode(" ", [$php, $script, $this->scriptArgs]);
Expand Down
2 changes: 1 addition & 1 deletion src/TestUtility/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function setup(Plugin $plugin): void
// Register the Utility
Event::on(
Utilities::class,
Utilities::EVENT_REGISTER_UTILITY_TYPES, function (RegisterComponentTypesEvent $event): void {
Utilities::EVENT_REGISTER_UTILITIES, function (RegisterComponentTypesEvent $event): void {
$event->types[] = Utility::class;
});

Expand Down
1 change: 1 addition & 0 deletions tests/BackgroundProcessRunTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function test_start_default_dummy_script_success(): void
// give it some time to write the test file
usleep(150000);


$this->assertEquals(0, $process->getExitCode());
$this->assertTrue($process->isSuccessful());
$this->assertEquals(\Symfony\Component\Process\Process::STATUS_TERMINATED, $process->getStatus());
Expand Down
2 changes: 1 addition & 1 deletion tests/RateLimiterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class RateLimiterTest extends TestCase
{
public $plugin;
public \ostark\AsyncQueue\Plugin $plugin;

public function setUp(): void
{
Expand Down
4 changes: 4 additions & 0 deletions tests/_craft/storage/logs/console-2024-04-18.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2024-04-18 08:49:46 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712496}
2024-04-18 08:49:46 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":9824936}
2024-04-18 08:50:06 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712488}
2024-04-18 08:50:06 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712488}
11,305 changes: 0 additions & 11,305 deletions tests/_craft/storage/logs/console.log

This file was deleted.

1 change: 1 addition & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
$configService->appDefaultsDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'defaults';
$generalConfig = $configService->getConfigFromFile('general');

/** @var array{class: class-string, array<string, mixed>} $config */
$config = \craft\helpers\ArrayHelper::merge(
[
'vendorPath' => CRAFT_VENDOR_PATH,
Expand Down