Skip to content

Commit

Permalink
Merge pull request #76 from ostark/craft5
Browse files Browse the repository at this point in the history
Craft5
  • Loading branch information
Oliver Stark authored Apr 18, 2024
2 parents 90e5ddd + ccb5988 commit 7d93e6a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 11,308 deletions.
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

0 comments on commit 7d93e6a

Please sign in to comment.