Skip to content

Commit 745cc92

Browse files
committed
Merge branch 'develop' into bugfix/FOUR-28520
2 parents f686269 + b1863e2 commit 745cc92

10 files changed

Lines changed: 331 additions & 662 deletions

File tree

ProcessMaker/Console/Commands/BuildScriptExecutors.php

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class BuildScriptExecutors extends Command
1818
*
1919
* @var string
2020
*/
21-
protected $signature = 'processmaker:build-script-executor {lang} {user?} {--rebuild}';
21+
protected $signature = 'processmaker:build-script-executor
22+
{lang : The ID or language of the script executor}
23+
{user? : The user ID to send the broadcast event to}
24+
{--rebuild : Rebuild the docker image}
25+
{--build-args= : The build arguments for the docker build command}';
2226

2327
/**
2428
* The console command description.
@@ -159,6 +163,12 @@ public function buildExecutor()
159163
$command = Docker::command() .
160164
" build --build-arg SDK_DIR=./sdk -t {$image} -f {$packagePath}/Dockerfile.custom {$packagePath}";
161165

166+
$buildArgs = $this->getBuildArgs();
167+
168+
foreach ($buildArgs as $buildArg) {
169+
$command .= ' ' . $buildArg;
170+
}
171+
162172
$this->execCommand($command);
163173

164174
$isNayra = $scriptExecutor->language === Base::NAYRA_LANG;
@@ -167,6 +177,29 @@ public function buildExecutor()
167177
}
168178
}
169179

180+
/**
181+
* Get the build arguments for the docker build command.
182+
*
183+
* @return array
184+
* - '--build-arg <key>=<value>'
185+
*/
186+
public function getBuildArgs(): array
187+
{
188+
$args = $this->option('build-args');
189+
190+
if ($args) {
191+
$buildArgs = [];
192+
193+
foreach (explode(',', $args) as $arg) {
194+
$buildArgs[] = '--build-arg ' . $arg;
195+
}
196+
197+
return $buildArgs;
198+
}
199+
200+
return [];
201+
}
202+
170203
public function getDockerfileContent(ScriptExecutor $scriptExecutor): string
171204
{
172205
$lang = $scriptExecutor->language;

ProcessMaker/Models/ScriptDockerNayraTrait.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ trait ScriptDockerNayraTrait
2323
{
2424

2525
private $schema = 'http';
26-
public static $nayraPort = 8080;
2726

2827
/**
2928
* Execute the script task using Nayra Docker.
@@ -82,7 +81,7 @@ public function handleNayraDocker(string $code, array $data, array $config, $tim
8281
private function getNayraInstanceUrl()
8382
{
8483
$servers = self::getNayraAddresses();
85-
return $this->schema . '://' . $servers[0] . ':' . static::$nayraPort;
84+
return $this->schema . '://' . $servers[0] . ':' . $this->getNayraPort();
8685
}
8786

8887
private function getDockerLogs($instanceName)
@@ -131,11 +130,14 @@ private function bringUpNayra($restart = false)
131130
if ($status) {
132131
$this->bringUpNayraContainer();
133132
} else {
134-
133+
$isHost = config('app.nayra_docker_network') === 'host';
134+
$portMapping = $isHost ? '-e PORT=' . $this->getNayraPort() . ' ' : '-p ' . $this->getNayraPort() . ':8080 ';
135135
exec($docker . " stop {$instanceName}_nayra 2>&1 || true");
136136
exec($docker . " rm {$instanceName}_nayra 2>&1 || true");
137137
exec(
138-
$docker . ' run -d --name ' . $instanceName . '_nayra '
138+
$docker . ' run -d '
139+
. ($this->getNayraPort() !== 8080 ? $portMapping : '')
140+
. '--name ' . $instanceName . '_nayra '
139141
. (config('app.nayra_docker_network')
140142
? '--network=' . config('app.nayra_docker_network') . ' '
141143
: '')
@@ -322,4 +324,9 @@ public static function initNayraPhpUnitTest()
322324
}
323325
}
324326
}
327+
328+
private function getNayraPort()
329+
{
330+
return config('app.nayra_port', 8080);
331+
}
325332
}

ProcessMaker/Multitenancy/SwitchTenant.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ private function overrideConfigs(Application $app, IsTenant $tenant)
111111
$config['root']
112112
));
113113
}
114+
// URLs
115+
if (isset($config['url'])) {
116+
$this->setConfig('filesystems.disks.' . $disk . '.url', str_replace(
117+
$this->landlordConfig('app.url'),
118+
$tenant->config['app.url'],
119+
$config['url']
120+
));
121+
}
114122
}
115123
$app->useStoragePath($newStoragePath);
116124

ProcessMaker/Traits/TaskResourceIncludes.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ private function includeDraft()
6464
// but drafts are disabled so we need to delete it now that
6565
// it's been accessed.
6666
$draft->delete();
67+
68+
// Return null to prevent the frontend from trying to load
69+
// files from the deleted draft
70+
return ['draft' => null];
6771
}
6872

6973
return ['draft' => $draft];

composer.json

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "processmaker/processmaker",
3-
"version": "4.15.11+mt",
3+
"version": "2026.1.2",
44
"description": "BPM PHP Software",
55
"keywords": [
66
"php bpm processmaker"
@@ -11,7 +11,6 @@
1111
"prefer-stable": true,
1212
"require": {
1313
"php": "^8.3",
14-
"aws/aws-sdk-php": "3.337.3",
1514
"babenkoivan/elastic-scout-driver": "^4.0",
1615
"bacon/bacon-qr-code": "^2.0",
1716
"codegreencreative/laravel-samlidp": "^5.2",
@@ -34,13 +33,12 @@
3433
"lavary/laravel-menu": "^1.8",
3534
"lcobucci/jwt": "^4.2",
3635
"league/commonmark": "^2.7",
37-
"league/flysystem-aws-s3-v3": "^3.29",
3836
"mateusjunges/laravel-kafka": "^2.4",
3937
"mittwald/vault-php": "^2.1",
40-
"moontoast/math": "^1.2",
4138
"mustache/mustache": "^2.14",
4239
"openai-php/client": "^0.10.3",
4340
"openai-php/laravel": "^0.10.2",
41+
"paragonie/sodium_compat": "^2.5",
4442
"php-amqplib/php-amqplib": "^3.7",
4543
"php-http/promise": "~1.2.0",
4644
"pion/laravel-chunk-upload": "^1.5",
@@ -109,11 +107,10 @@
109107
"Gmail"
110108
],
111109
"processmaker": {
112-
"build": "1a91bb61",
110+
"build": "607f0513",
113111
"cicd-enabled": true,
114112
"custom": {
115-
"package-ellucian-ethos": "1.19.7",
116-
"package-plaid": "1.6.0",
113+
"package-ellucian-ethos": "1.19.9",
117114
"paypal-package": "dev-fall",
118115
"pps-adsync": "dev-fall",
119116
"ps_ethos": "dev-main",
@@ -150,44 +147,44 @@
150147
"connector-idp": "1.14.0",
151148
"connector-pdf-print": "1.23.1",
152149
"connector-send-email": "1.32.13",
153-
"connector-slack": "1.9.3",
150+
"connector-slack": "1.9.4",
154151
"docker-executor-node-ssr": "1.7.2",
155152
"package-ab-testing": "1.4.0",
156153
"package-actions-by-email": "1.22.9",
157-
"package-advanced-user-manager": "1.13.1",
158-
"package-ai": "1.16.10",
159-
"package-analytics-reporting": "1.11.1",
160-
"package-auth": "1.24.10",
161-
"package-collections": "2.27.1",
154+
"package-advanced-user-manager": "1.13.2",
155+
"package-ai": "1.16.11",
156+
"package-analytics-reporting": "1.11.2",
157+
"package-auth": "1.24.11",
158+
"package-collections": "2.27.2",
162159
"package-comments": "1.16.2",
163160
"package-conversational-forms": "1.15.0",
164161
"package-data-sources": "1.34.3",
165162
"package-decision-engine": "1.16.1",
166163
"package-dynamic-ui": "1.28.3",
167164
"package-email-start-event": "1.0.8",
168-
"package-files": "1.23.3",
165+
"package-files": "1.23.4",
169166
"package-googleplaces": "1.12.0",
170167
"package-photo-video": "1.6.1",
171-
"package-pm-blocks": "1.12.6",
168+
"package-pm-blocks": "1.12.7",
172169
"package-process-documenter": "1.12.0",
173170
"package-process-optimization": "1.10.0",
174171
"package-product-analytics": "1.5.11",
175-
"package-projects": "1.12.5",
172+
"package-projects": "1.12.6",
176173
"package-rpa": "1.1.1",
177-
"package-savedsearch": "1.43.6",
174+
"package-savedsearch": "1.43.7",
178175
"package-slideshow": "1.4.3",
179-
"package-signature": "1.15.2",
176+
"package-signature": "1.15.3",
180177
"package-testing": "1.8.1",
181-
"package-translations": "2.14.4",
178+
"package-translations": "2.14.5",
182179
"package-versions": "1.13.0",
183-
"package-vocabularies": "2.17.0",
184-
"package-webentry": "2.29.11",
180+
"package-vocabularies": "2.17.1",
181+
"package-webentry": "2.29.12",
185182
"package-api-testing": "1.3.1",
186183
"package-variable-finder": "1.0.5",
187184
"packages": "^0"
188185
},
189186
"docker-executors": {
190-
"docker-executor-java": "1.0.4",
187+
"docker-executor-java": "1.0.5",
191188
"docker-executor-python": "1.0.1",
192189
"docker-executor-csharp": "1.0.2"
193190
},

0 commit comments

Comments
 (0)