Przeglądaj źródła

Mark elasticaFormatters $type arg as deprecated

Jordi Boggiano 5 lat temu
rodzic
commit
ff4378dfbe
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      src/Monolog/Formatter/ElasticaFormatter.php

+ 4 - 4
src/Monolog/Formatter/ElasticaFormatter.php

@@ -26,15 +26,15 @@ class ElasticaFormatter extends NormalizerFormatter
     protected $index;
 
     /**
-     * @var string Elastic search document type
+     * @var ?string Elastic search document type
      */
     protected $type;
 
     /**
-     * @param string $index Elastic Search index name
-     * @param string $type  Elastic Search document type
+     * @param string  $index Elastic Search index name
+     * @param ?string $type  Elastic Search document type, deprecated as of Elastica 7
      */
-    public function __construct(string $index, string $type)
+    public function __construct(string $index, ?string $type)
     {
         // elasticsearch requires a ISO 8601 format date with optional millisecond precision.
         parent::__construct('Y-m-d\TH:i:s.uP');