Skip to content

Commit

Permalink
AVRO-4013: [PHP] PHP 8 deprecations (#3000)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagorb authored Jul 7, 2024
1 parent f6f3972 commit 701a844
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lang/php/lib/DataFile/AvroDataIOWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class AvroDataIOWriter
* @var string compression codec
*/
private $codec;
/**
* @var string sync marker
*/
private $sync_marker;

/**
* @param AvroIO $io
Expand Down
1 change: 1 addition & 0 deletions lang/php/lib/Protocol/AvroProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
class AvroProtocol
{
public $protocol;
public $name;
public $namespace;
public $schemata;
Expand Down
2 changes: 2 additions & 0 deletions lang/php/lib/Protocol/AvroProtocolMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

class AvroProtocolMessage
{
public $name;

/**
* @var AvroRecordSchema $request
*/
Expand Down
3 changes: 2 additions & 1 deletion lang/php/test/DataFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
namespace Apache\Avro\Tests;

use Apache\Avro\DataFile\AvroDataIO;
use DateTime;
use PHPUnit\Framework\TestCase;

class DataFileTest extends TestCase
Expand Down Expand Up @@ -61,7 +62,7 @@ protected function add_data_file($data_file)

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()
Expand Down

0 comments on commit 701a844

Please sign in to comment.