Skip to content

Commit ea60be9

Browse files
committed
[UPD] Core up to Laravel Zero 11.
1 parent d746b49 commit ea60be9

7 files changed

Lines changed: 110 additions & 60 deletions

File tree

core/artisan

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ if (!defined('IN_MANAGER_MODE')) {
2828
|
2929
*/
3030

31-
//$artisan = new EvolutionCMS\Console(evo(), evo()->events, evo()->version());
32-
$modx = evolutionCMS();
33-
34-
$artisan = new EvolutionCMS\Console($modx, $modx['events'], $modx->version());
31+
$artisan = new EvolutionCMS\Console(evo(), evo()->events, evo()->version());
32+
//$modx = evolutionCMS();
33+
//$artisan = new EvolutionCMS\Console($modx, $modx['events'], $modx->version());
3534

3635
$status = $artisan->run(
3736
$input = new Symfony\Component\Console\Input\ArgvInput,

core/composer.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@
4141
"ext-mbstring": "*",
4242
"ext-SimpleXML": "*",
4343
"guzzlehttp/guzzle": "^7.0.1",
44-
"illuminate/cache": "10.*",
45-
"illuminate/config": "10.*",
46-
"illuminate/console": "10.*",
47-
"illuminate/container": "10.*",
48-
"illuminate/database": "10.*",
49-
"illuminate/events": "10.*",
50-
"illuminate/filesystem": "10.*",
51-
"illuminate/http": "10.*",
52-
"illuminate/log": "10.*",
53-
"illuminate/pagination": "10.*",
54-
"illuminate/redis": "10.*",
55-
"illuminate/routing": "10.*",
56-
"illuminate/support": "10.*",
57-
"illuminate/translation": "10.*",
58-
"illuminate/validation": "10.*",
59-
"illuminate/view": "10.*",
44+
"illuminate/cache": "11.*",
45+
"illuminate/config": "11.*",
46+
"illuminate/console": "11.*",
47+
"illuminate/container": "11.*",
48+
"illuminate/database": "11.*",
49+
"illuminate/events": "11.*",
50+
"illuminate/filesystem": "11.*",
51+
"illuminate/http": "11.*",
52+
"illuminate/log": "11.*",
53+
"illuminate/pagination": "11.*",
54+
"illuminate/redis": "11.*",
55+
"illuminate/routing": "11.*",
56+
"illuminate/support": "11.*",
57+
"illuminate/translation": "11.*",
58+
"illuminate/validation": "11.*",
59+
"illuminate/view": "11.*",
6060
"james-heinrich/phpthumb": "*",
6161
"league/flysystem": "^3",
6262
"lib-iconv": "*",
@@ -66,10 +66,10 @@
6666
"predis/predis": "*",
6767
"rosell-dk/webp-convert": "*",
6868
"simplepie/simplepie": "1.*",
69-
"symfony/process": "^6.0",
69+
"symfony/process": "^7.2",
7070
"tracy/tracy": "2.10.*",
71-
"vlucas/phpdotenv": "^5.2",
72-
"wikimedia/composer-merge-plugin": "2.*"
71+
"vlucas/phpdotenv": "^5.5",
72+
"wikimedia/composer-merge-plugin": "2.1"
7373
},
7474
"require-dev": {
7575
"roave/security-advisories": "dev-master"
@@ -88,7 +88,7 @@
8888
},
8989
"extra": {
9090
"platform-packages": {
91-
"evolutioncms/evolution": "3.2.6"
91+
"evolutioncms/evolution": "3.2.7"
9292
},
9393
"merge-plugin": {
9494
"include": [

core/factory/version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php return [
2-
'version' => '3.2.6', // Current version number
3-
'release_date' => 'May 25, 2025', // Date of release
2+
'version' => '3.2.7', // Current version number
3+
'release_date' => 'Aug 03, 2025', // Date of release
44
'branch' => 'Evolution CMS', // Codebase name
5-
'full_appname' => 'Evolution CMS 3.2.6 (May 25, 2025)'
5+
'full_appname' => 'Evolution CMS 3.2.7 (Aug 03, 2025)'
66
];

core/src/Providers/ArtisanServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ protected function registerMigrateCommand()
178178
*/
179179
protected function registerMigrateFreshCommand()
180180
{
181-
$this->app->singleton('command.migrate.fresh', function () {
182-
return new MigrateFreshCommand;
181+
$this->app->singleton('command.migrate.fresh', function ($app) {
182+
return new MigrateFreshCommand($app['migrator']);
183183
});
184184
}
185185

install/cli-install.php

Lines changed: 80 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ public function install()
179179
$this->checkCmsAdminEmail();
180180
$this->checkCmsPassword();
181181
$this->checkLanguage();
182-
$this->composerUpdate();
183182
$this->realInstall();
183+
$this->composerUpdate();
184184
$this->checkRemoveInstall();
185185
$this->removeInstall();
186186
echo "\033[1;33;44mNow you use {$this->version}\033[0m" . PHP_EOL;
@@ -383,47 +383,97 @@ public function checkIssetTablePrefix()
383383
}
384384
}
385385

386+
public function composerInstall()
387+
{
388+
$composerBin = EVO_CORE_PATH . 'vendor/bin/composer';
389+
390+
if (is_file($composerBin)) {
391+
success("✔ Using local Composer");
392+
$this->runComposerCommand('install');
393+
} else {
394+
warning("⚠ Local Composer not found: {$composerBin} Please run composer install manually.");
395+
}
396+
}
397+
386398
public function composerUpdate()
387399
{
388400
$composerBin = EVO_CORE_PATH . 'vendor/bin/composer';
401+
402+
if (is_file($composerBin)) {
403+
success("✔ Running composer:update");
404+
$this->runComposerCommand('update');
405+
} else {
406+
warning("⚠ Local Composer not found: {$composerBin} Please run composer update manually.");
407+
}
408+
}
409+
410+
public function checkAndWait($command)
411+
{
412+
$criticalFiles = [
413+
'vendor/autoload.php',
414+
'vendor/symfony/finder/Comparator/NumberComparator.php',
415+
'vendor/symfony/polyfill-mbstring/bootstrap.php',
416+
'vendor/symfony/deprecation-contracts/function.php',
417+
];
418+
419+
foreach ($criticalFiles as $file) {
420+
$fullPath = EVO_CORE_PATH . $file;
421+
$tries = 0;
422+
423+
while (!is_file($fullPath) && $tries < 20) {
424+
$tries++;
425+
info("⏳ Waiting for {$file}... try {$tries}");
426+
usleep(3000000);
427+
}
428+
429+
if (!is_file($fullPath)) {
430+
error("✖ Required file missing after composer command: {$file}");
431+
warning('⚠ Please run "composer ' . $command . '" manually.');
432+
exit(1);
433+
}
434+
}
435+
}
436+
437+
protected function runComposerCommand($command)
438+
{
439+
$disabled = array_map('trim', explode(',', ini_get('disable_functions') ?: ''));
440+
$composerBin = EVO_CORE_PATH . 'vendor/bin/composer';
389441
$workingDir = EVO_CORE_PATH;
442+
390443
$cmd = sprintf(
391-
'php %s update --no-interaction --prefer-dist --working-dir=%s',
444+
'php %s %s --no-interaction --prefer-dist --working-dir=%s',
392445
escapeshellarg($composerBin),
446+
$command,
393447
escapeshellarg($workingDir)
394448
);
395449

396-
if (!is_file($composerBin)) {
397-
warning("⚠ Local Composer not found: {$composerBin} Please perform 'composer install' or 'composer update' manually.");
398-
return;
399-
}
400-
401-
success("✔ Usage local Composer");
402-
info(" Running: {$cmd}");
450+
$exitCode = null;
403451

404-
$disabled = array_map('trim', explode(',', ini_get('disable_functions') ?: ''));
452+
try {
453+
if (!in_array('passthru', $disabled, true)) {
454+
passthru($cmd, $exitCode);
455+
} elseif (!in_array('exec', $disabled, true)) {
456+
exec($cmd . ' 2>&1', $out, $exitCode);
457+
echo implode(PHP_EOL, $out), PHP_EOL;
458+
} elseif (!in_array('shell_exec', $disabled, true)) {
459+
$output = shell_exec($cmd . ' 2>&1');
460+
echo $output;
461+
$exitCode = (is_string($output) && $output !== '') ? 0 : 1;
462+
} else {
463+
warning('⚠ passthru/exec/shell_exec are disabled in php.ini');
464+
warning('⚠ Please run "composer ' . $command . '" manually.');
465+
return;
466+
}
405467

406-
$exitCode = null;
407-
if (!in_array('passthru', $disabled, true)) {
408-
passthru($cmd, $exitCode);
409-
} elseif (!in_array('exec', $disabled, true)) {
410-
exec($cmd . ' 2>&1', $out, $exitCode);
411-
echo implode(PHP_EOL, $out), PHP_EOL;
412-
} elseif (!in_array('shell_exec', $disabled, true)) {
413-
$output = shell_exec($cmd . ' 2>&1');
414-
$exitCode = (is_string($output) && $output !== '') ? 0 : 1;
415-
echo $output;
416-
} else {
417-
warning('⚠ The passthru/exec/shell_exec functions are disabled in php.ini.');
418-
warning(' Run "composer update" manually.');
419-
return;
420-
}
468+
$this->checkAndWait($command);
421469

422-
if ($exitCode === 0) {
423-
success('✔ Dependencies updated successfully.');
424-
} else {
425-
error("✖ Composer finished with the code {$exitCode}.");
426-
warning(' Make sure you have execute permissions and try "composer update" manually.');
470+
if ($exitCode === 0) {
471+
success("✔ Composer {$command} finished successfully.");
472+
} else {
473+
error("✖ Composer {$command} failed with code {$exitCode}.");
474+
}
475+
} catch (\Throwable $e) {
476+
error("✖ Exception while executing Composer {$command}: " . $e->getMessage());
427477
}
428478
}
429479

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)