Skip to content

Commit

Permalink
disable version check in test
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Feb 27, 2024
1 parent 1ee5ecc commit 6ebf910
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
<php>
<server name="SYMFONY_PHPUNIT_REQUIRE" value="nikic/php-parser:^4" />
<server name="ENDPOINT" value="http://127.0.0.1:9955" />
<server name="DISABLE_VERSION_CHECK" value="true" />
</php>
</phpunit>
4 changes: 4 additions & 0 deletions src/Listener/UpdateCastorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Castor\Listener;

use Castor\Console\Application;
use Castor\PlatformUtil;
use JoliCode\PhpOsHelper\OsHelper;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -32,6 +33,9 @@ public function checkUpdate(ConsoleCommandEvent $event): void
if (class_exists(\RepackedApplication::class)) {
return;
}
if (PlatformUtil::getEnv('DISABLE_VERSION_CHECK')) {
return;
}

$command = $event->getCommand();
if (!$command) {
Expand Down

0 comments on commit 6ebf910

Please sign in to comment.