Skip to content

Commit

Permalink
Fix Pimcore X support
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser committed Feb 26, 2024
1 parent a3e29f5 commit 78cba8a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
- phpstan-bootstrap.php
excludePaths:
- src/Tests/*
- src/LogHandler/Filter404Handler.php # TODO remove when remove support for Pimcore 10

includes:
- phpstan-baseline.neon
1 change: 1 addition & 0 deletions src/LogHandler/Filter404Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Monolog\LogRecord;
use Pimcore\Version;

// TODO remove if when remove support for Pimcore 10
if(Version::getMajorVersion() >= 11) {

/**
Expand Down
1 change: 1 addition & 0 deletions src/OpenSearchClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static function createOpenSearchClient(LoggerInterface $logger, array $co
$clientBuilder = new ClientBuilder();
$clientBuilder->setHosts($config['hosts']);

// TODO remove if when remove support for Pimcore 10
if (Version::getMajorVersion() >= 11) {
if (!$config['log_404_errors'] && $logger instanceof Logger) {
$logger->pushHandler(new Filter404Handler());
Expand Down

0 comments on commit 78cba8a

Please sign in to comment.