Skip to content

Commit 514b2df

Browse files
Copilotdd32
andcommitted
Remove composer; set up wp-env test environment
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
1 parent 871c9bc commit 514b2df

29 files changed

Lines changed: 5418 additions & 1796 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor/
2+
node_modules/
3+
.wp-env/

.wp-env.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": ["."],
3+
"mappings": {
4+
"wp-cli.yml": "./wp-cli.yml"
5+
}
6+
}

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,5 @@
1818
]
1919
},
2020
"minimum-stability": "dev",
21-
"prefer-stable": true,
22-
"require-dev": {
23-
"wp-cli/cron-command": "^2.3"
24-
}
21+
"prefer-stable": true
2522
}

cron-concurrent.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
/**
44
* WP-CLI Cron Concurrent – entry point.
55
*
6-
* Loaded automatically by WP-CLI when this package is installed.
6+
* Loaded automatically by WP-CLI when this package is installed via Composer,
7+
* or explicitly via `--require` / a `wp-cli.yml` require entry.
78
* Registers the `wp cron-concurrent` command group.
89
*
910
* @package dd32/wpcli-cron-concurrent
@@ -13,9 +14,11 @@
1314
return;
1415
}
1516

16-
$autoloader = __DIR__ . '/vendor/autoload.php';
17-
if ( file_exists( $autoloader ) ) {
18-
require_once $autoloader;
17+
// When installed as a Composer package the classmap autoloader already
18+
// handles this file; the direct require is only a safety-net for manual
19+
// --require usage (e.g. inside wp-env test containers).
20+
if ( ! class_exists( 'CronConcurrent' ) ) {
21+
require_once __DIR__ . '/src/CronConcurrent.php';
1922
}
2023

2124
WP_CLI::add_command( 'cron-concurrent', 'CronConcurrent' );

0 commit comments

Comments
 (0)