diff --git a/ProcessMaker/Application.php b/ProcessMaker/Application.php
index 2c7d4dc77e..023fc26c4f 100644
--- a/ProcessMaker/Application.php
+++ b/ProcessMaker/Application.php
@@ -3,7 +3,9 @@
namespace ProcessMaker;
use Igaster\LaravelTheme\Facades\Theme;
+use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\Application as IlluminateApplication;
+use Illuminate\Foundation\PackageManifest;
use Illuminate\Support\Facades\Auth;
/**
@@ -78,13 +80,14 @@ public function path($path = '')
return $this->basePath . DIRECTORY_SEPARATOR . 'ProcessMaker' . ($path ? DIRECTORY_SEPARATOR . $path : $path);
}
- public function setStoragePath($path)
+ public function registerConfiguredProviders()
{
- $this->storagePath = $path;
- }
+ // Must be rebound before registerConfiguredProviders() runs but after bootstrapping is done
+ // so we can access storage and cache facades.
+ $this->singleton(PackageManifest::class, fn () => new LicensedPackageManifest(
+ new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
+ ));
- public function getStoragePath()
- {
- return $this->storagePath;
+ parent::registerConfiguredProviders();
}
}
diff --git a/ProcessMaker/Console/Commands/TenantsList.php b/ProcessMaker/Console/Commands/TenantsList.php
index ddcfefead9..72b24b599d 100644
--- a/ProcessMaker/Console/Commands/TenantsList.php
+++ b/ProcessMaker/Console/Commands/TenantsList.php
@@ -43,6 +43,10 @@ public function handle()
$formattedTenants = $tenants->map(function ($tenant) {
$config = $tenant->config;
+ if (isset($config['app.key'])) {
+ $config['app.key'] = substr($config['app.key'], 0, 30);
+ }
+
// Json encode, pretty print without slashes
$config = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
diff --git a/ProcessMaker/LicensedPackageManifest.php b/ProcessMaker/LicensedPackageManifest.php
index 3fbc38b297..abed47193e 100644
--- a/ProcessMaker/LicensedPackageManifest.php
+++ b/ProcessMaker/LicensedPackageManifest.php
@@ -20,6 +20,20 @@ class LicensedPackageManifest extends PackageManifest
const LAST_PACKAGE_DISCOVERY = 0;
+ /**
+ * Consider this the beginning of licenesing refactor for multitenancy.
+ *
+ * For now, this will just move the Spatie MultitenancyServiceProvider to the beginning of the service providers.
+ */
+ protected function getManifest()
+ {
+ $manifest = parent::getManifest();
+ $multitenancyKey = 'spatie/laravel-multitenancy';
+
+ // Make sure the MultitenancyServiceProvider is at the beginning of the manifest
+ return [$multitenancyKey => $manifest[$multitenancyKey]] + $manifest;
+ }
+
protected function packagesToIgnore()
{
$packagesToIgnore = $this->loadPackagesToIgnore()->all();
diff --git a/ProcessMaker/Multitenancy/SwitchTenant.php b/ProcessMaker/Multitenancy/SwitchTenant.php
index 2ca2efc3ec..f8486cc791 100644
--- a/ProcessMaker/Multitenancy/SwitchTenant.php
+++ b/ProcessMaker/Multitenancy/SwitchTenant.php
@@ -39,7 +39,7 @@ public function makeCurrent(IsTenant $tenant): void
$tenantStoragePath = base_path('storage/tenant_' . $tenant->id);
$app = app();
- $app->setStoragePath($tenantStoragePath);
+ $app->useStoragePath($tenantStoragePath);
// Create the tenant storage directory if it doesn't exist
// TODO: Move these to somewhere else - should not be run on every request
diff --git a/ProcessMaker/Providers/AuthServiceProvider.php b/ProcessMaker/Providers/AuthServiceProvider.php
index 48a6ec1c2c..6f0572a392 100644
--- a/ProcessMaker/Providers/AuthServiceProvider.php
+++ b/ProcessMaker/Providers/AuthServiceProvider.php
@@ -85,6 +85,12 @@ public function boot()
public function defineGates()
{
+ // No need to run this in console and it generates
+ // errors in multitenancy mode
+ if (!app()->environment('testing') && app()->runningInConsole()) {
+ return;
+ }
+
try {
// Cache the permissions for a day to improve performance
$permissions = Cache::remember('permissions', 86400, function () {
diff --git a/ProcessMaker/Providers/LicenseServiceProvider.php b/ProcessMaker/Providers/LicenseServiceProvider.php
index d1549a35a4..d31e11d766 100644
--- a/ProcessMaker/Providers/LicenseServiceProvider.php
+++ b/ProcessMaker/Providers/LicenseServiceProvider.php
@@ -37,11 +37,4 @@ public function boot(): void
LicensedPackageManifest::discoverPackagesOnce();
}
}
-
- public function register(): void
- {
- $this->app->singleton(PackageManifest::class, fn () => new LicensedPackageManifest(
- new Filesystem, $this->app->basePath(), $this->app->getCachedPackagesPath()
- ));
- }
}
diff --git a/ProcessMaker/Providers/ProcessMakerServiceProvider.php b/ProcessMaker/Providers/ProcessMakerServiceProvider.php
index 1c18838a0d..0e2710709e 100644
--- a/ProcessMaker/Providers/ProcessMakerServiceProvider.php
+++ b/ProcessMaker/Providers/ProcessMakerServiceProvider.php
@@ -259,10 +259,6 @@ public function register(): void
// Miscellaneous vendor customization
static::configureVendors();
- $this->app->singleton(PackageManifest::class, fn () => new LicensedPackageManifest(
- new Filesystem, $this->app->basePath(), $this->app->getCachedPackagesPath()
- ));
-
$this->app->extend(MigrateCommand::class, function () {
return new ExtendedMigrateCommand(
app('migrator'),
diff --git a/composer.json b/composer.json
index 889610ecee..07c8cfddc5 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "processmaker/processmaker",
- "version": "4.15.7+beta-1",
+ "version": "4.15.7+beta-2",
"description": "BPM PHP Software",
"keywords": [
"php bpm processmaker"
@@ -106,7 +106,7 @@
"Gmail"
],
"processmaker": {
- "build": "8c08f440",
+ "build": "fd8586e5",
"cicd-enabled": true,
"custom": {
"package-ellucian-ethos": "1.19.7",
@@ -160,7 +160,7 @@
"package-data-sources": "1.34.1",
"package-decision-engine": "1.16.1",
"package-dynamic-ui": "1.28.2",
- "package-email-start-event": "1.0.3",
+ "package-email-start-event": "1.0.4",
"package-files": "1.23.0",
"package-googleplaces": "1.12.0",
"package-photo-video": "1.6.1",
@@ -229,4 +229,4 @@
"tbachert/spi": true
}
}
-}
+}
\ No newline at end of file
diff --git a/composer.lock b/composer.lock
index 0593929d14..9517c2f97a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1358d27dfb823a411e9c987b40c62cb7",
+ "content-hash": "115bd1a174dc467cd2337c50f943051c",
"packages": [
{
"name": "aws/aws-crt-php",
diff --git a/resources/js/processes/modeler/components/inspector/StageItem.vue b/resources/js/processes/modeler/components/inspector/StageItem.vue
index 7e12cc7396..a221af98ab 100644
--- a/resources/js/processes/modeler/components/inspector/StageItem.vue
+++ b/resources/js/processes/modeler/components/inspector/StageItem.vue
@@ -13,9 +13,6 @@
@input="onInput"
@paste="onPaste"
>
-
- {{ localName.length }}/200 {{ t('characters') }}
-