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

chore: build #42

Merged
merged 1 commit into from
Mar 26, 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
22 changes: 11 additions & 11 deletions src/Component/Http/AbstractKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ abstract class AbstractKernel implements TenantInterface
protected $args = [
'wp_dir_path' => 'wp',
'wordpress' => 'wp',
"directory" => [
"web_root_dir" => "public",
"content_dir" => "content",
"plugin_dir" => "content/plugins",
"mu_plugin_dir" => "content/mu-plugins",
"sqlite_dir" => "sqlitedb",
"sqlite_file" => ".sqlite-wpdatabase",
"theme_dir" => "templates",
"asset_dir" => "assets",
"publickey_dir" => "pubkeys",
],
'directory' => [
'web_root_dir' => 'public',
'content_dir' => 'content',
'plugin_dir' => 'content/plugins',
'mu_plugin_dir' => 'content/mu-plugins',
'sqlite_dir' => 'sqlitedb',
'sqlite_file' => '.sqlite-wpdatabase',
'theme_dir' => 'templates',
'asset_dir' => 'assets',
'publickey_dir' => 'pubkeys',
],
'default_theme' => 'twentytwentythree',
'disable_updates' => true,
'can_deactivate' => true,
Expand Down
7 changes: 4 additions & 3 deletions src/inc/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function env($name, $defaultOrEncrypt = null, $strtolower = false)

// Get the environment variable value
$env_var = null;

try {
$env_var = $env->get($name, $defaultOrEncrypt, $strtolower);
} catch (Exception $e) {
Expand All @@ -102,8 +103,8 @@ function env($name, $defaultOrEncrypt = null, $strtolower = false)
* execution with an error message if critical configurations are missing or if
* the tenant's domain is not recognized.
*
* @param string $app_path The base directory path of the application (e.g., __DIR__).
* @param string $options_file Optional. The configuration filename, defaults to 'app'.
* @param string $app_path The base directory path of the application (e.g., __DIR__).
* @param string $options_file Optional. The configuration filename, defaults to 'app'.
*
* @throws Exception If there are issues loading environment variables or initializing the App.
* @throws Exception If required multi-tenant environment variables are missing or if the tenant's domain is not recognized.
Expand Down Expand Up @@ -474,7 +475,7 @@ function _env_files_filter( array $env_files, string $app_path ): array
*
* @param string $app_path
* @param string $app_http_host
* @param array $available_files
* @param array $available_files
*/
function try_regenerate_env_file( string $app_path, string $app_http_host, array $available_files = [] ): void
{
Expand Down
22 changes: 11 additions & 11 deletions tests/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ public function default_args(): array
"web_root" => "public",
"wp_dir_path" => "wp",
"wordpress" => "wp",
"directory" => [
"web_root_dir" => "public",
"content_dir" => "content",
"plugin_dir" => "content/plugins",
"mu_plugin_dir" => "content/mu-plugins",
"sqlite_dir" => "sqlitedb",
"sqlite_file" => ".sqlite-wpdatabase",
"theme_dir" => "templates",
"asset_dir" => "assets",
"publickey_dir" => "pubkeys",
],
"directory" => [
"web_root_dir" => "public",
"content_dir" => "content",
"plugin_dir" => "content/plugins",
"mu_plugin_dir" => "content/mu-plugins",
"sqlite_dir" => "sqlitedb",
"sqlite_file" => ".sqlite-wpdatabase",
"theme_dir" => "templates",
"asset_dir" => "assets",
"publickey_dir" => "pubkeys",
],
"default_theme" => "twentytwentythree",
"disable_updates" => true,
"can_deactivate" => true,
Expand Down
24 changes: 12 additions & 12 deletions tests/Unit/Component/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ public function test_default_args(): void
"terminate" => [
'debugger' => false,
],
"directory" => [
"web_root_dir" => "public",
"content_dir" => "content",
"plugin_dir" => "content/plugins",
"mu_plugin_dir" => "content/mu-plugins",
"sqlite_dir" => "sqlitedb",
"sqlite_file" => ".sqlite-wpdatabase",
"theme_dir" => "templates",
"asset_dir" => "assets",
"publickey_dir" => "pubkeys",
],
"directory" => [
"web_root_dir" => "public",
"content_dir" => "content",
"plugin_dir" => "content/plugins",
"mu_plugin_dir" => "content/mu-plugins",
"sqlite_dir" => "sqlitedb",
"sqlite_file" => ".sqlite-wpdatabase",
"theme_dir" => "templates",
"asset_dir" => "assets",
"publickey_dir" => "pubkeys",
],
"security" => [
"encryption_key" => null,
"brute-force" => true,
Expand Down Expand Up @@ -107,7 +107,7 @@ public function test_default_args(): void
'sucuri_waf' => false,
];

//dump($this->http_app->get_args());
// dump($this->http_app->get_args());

$this->assertEquals( $default, $this->http_app->get_args());
}
Expand Down
Loading