This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new 701a8447b AVRO-4013: [PHP] PHP 8 deprecations (#3000)
701a8447b is described below

commit 701a8447bae4cf259e1269a793ac83ddd4d45aab
Author: Thiago Romão Barcala <[email protected]>
AuthorDate: Sun Jul 7 19:33:31 2024 +0200

    AVRO-4013: [PHP] PHP 8 deprecations (#3000)
---
 lang/php/lib/DataFile/AvroDataIOWriter.php    | 4 ++++
 lang/php/lib/Protocol/AvroProtocol.php        | 1 +
 lang/php/lib/Protocol/AvroProtocolMessage.php | 2 ++
 lang/php/test/DataFileTest.php                | 3 ++-
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lang/php/lib/DataFile/AvroDataIOWriter.php 
b/lang/php/lib/DataFile/AvroDataIOWriter.php
index d6914257b..730a2ef2d 100644
--- a/lang/php/lib/DataFile/AvroDataIOWriter.php
+++ b/lang/php/lib/DataFile/AvroDataIOWriter.php
@@ -66,6 +66,10 @@ class AvroDataIOWriter
      * @var string compression codec
      */
     private $codec;
+    /**
+     * @var string sync marker
+     */
+    private $sync_marker;
 
     /**
      * @param AvroIO $io
diff --git a/lang/php/lib/Protocol/AvroProtocol.php 
b/lang/php/lib/Protocol/AvroProtocol.php
index c05b2eab0..a1be7b79b 100644
--- a/lang/php/lib/Protocol/AvroProtocol.php
+++ b/lang/php/lib/Protocol/AvroProtocol.php
@@ -29,6 +29,7 @@ use Apache\Avro\Schema\AvroSchema;
  */
 class AvroProtocol
 {
+    public $protocol;
     public $name;
     public $namespace;
     public $schemata;
diff --git a/lang/php/lib/Protocol/AvroProtocolMessage.php 
b/lang/php/lib/Protocol/AvroProtocolMessage.php
index 7068efad6..186e3ce5e 100644
--- a/lang/php/lib/Protocol/AvroProtocolMessage.php
+++ b/lang/php/lib/Protocol/AvroProtocolMessage.php
@@ -27,6 +27,8 @@ use Apache\Avro\Schema\AvroSchema;
 
 class AvroProtocolMessage
 {
+    public $name;
+
     /**
      * @var AvroRecordSchema $request
      */
diff --git a/lang/php/test/DataFileTest.php b/lang/php/test/DataFileTest.php
index d40ca641f..d962866a8 100644
--- a/lang/php/test/DataFileTest.php
+++ b/lang/php/test/DataFileTest.php
@@ -20,6 +20,7 @@
 namespace Apache\Avro\Tests;
 
 use Apache\Avro\DataFile\AvroDataIO;
+use DateTime;
 use PHPUnit\Framework\TestCase;
 
 class DataFileTest extends TestCase
@@ -61,7 +62,7 @@ class DataFileTest extends TestCase
 
     public static function current_timestamp()
     {
-        return strftime("%Y%m%dT%H%M%S");
+        return date_format(new DateTime, 'Y-m-d H:i:s');
     }
 
     public function test_write_read_null_round_trip()

Reply via email to