Skip to content

Commit

Permalink
Php82 (#19)
Browse files Browse the repository at this point in the history
* Rename Xdebug host config parameter
* Update PHP, composer and Xdebug
* Solve deprecated function
* Add AllowDynamicProperties attribute
* Solve AvroDataIOWriter dynamic creation
* Solve dynamic creation (protocol, messages) in AvroProtocol
* Solve dynamic creations in AvroSchema
* Solve dynamic creations in AvroProtocolMessage
  • Loading branch information
MaurizioMoreo authored Apr 19, 2023
1 parent 5936698 commit aaa4289
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
ARG PHP_VERSION=8.0
ARG PHP_VERSION=8.2

FROM php:${PHP_VERSION}-cli-alpine

ARG XDEBUG_VERSION=3.1.3

RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
ARG XDEBUG_VERSION=3.2.0
RUN apk add --update linux-headers \
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& apk add --no-cache --virtual .runtime-deps git libzip-dev gmp-dev \
&& docker-php-ext-install zip gmp \
&& pecl install xdebug-$XDEBUG_VERSION \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.max_nesting_level=15000" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
&& echo "xdebug.remote_host=localhost" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
&& echo "xdebug.client_host=localhost" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
&& echo "xdebug.idekey=PHPSTORM" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
&& echo "xdebug.remote_handler=dbgp" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
&& echo "xdebug.mode=develop" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" \
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ MAKEFLAGS =+ -rR --warn-undefined-variables
.PHONY: composer-install composer-update examples docker run

COMPOSER ?= bin/composer.phar
COMPOSER_VERSION ?= 2.2.7
COMPOSER_VERSION ?= 2.5.4
PHP ?= bin/php
PHP_VERSION ?= 8.0
XDEBUG_VERSION ?= 3.1.3
PHP_VERSION ?= 8.2
XDEBUG_VERSION ?= 3.2.0

export

Expand Down
2 changes: 2 additions & 0 deletions lib/avro/data_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ private static function generate_sync_marker()
*/
private $codec;

private $sync_marker;

/**
* @param AvroIO $io
* @param AvroIODatumWriter $datum_writer
Expand Down
4 changes: 4 additions & 0 deletions lib/avro/protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
*/
class AvroProtocol
{
private $protocol;
private $messages;
public $name;
public $namespace;
public $schemata;
Expand Down Expand Up @@ -82,6 +84,8 @@ class AvroProtocolMessage

public $response;

private $name;

/**
* AvroProtocolMessage constructor.
* @param $name
Expand Down
9 changes: 4 additions & 5 deletions lib/avro/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ class AvroSchema
*/
const LOGICAL_TYPE_ATTR = 'logicalType';

public $type;
protected $extra_attributes;
protected $logical_type;

/**
* @var array list of primitive schema type names
*/
Expand Down Expand Up @@ -1519,11 +1523,6 @@ private static function check_order_value($order)
*/
private $doc;

/**
* @var string logical type of this field
*/
private $logical_type;

/**
* @var int precision of the logical type
*/
Expand Down
2 changes: 1 addition & 1 deletion test/DataFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DataFileTest extends \PHPUnit\Framework\TestCase
/**
* @return string
*/
static function current_timestamp() { return strftime("%Y%m%dT%H%M%S"); }
static function current_timestamp() { return date("Ymd\THis"); }

/**
* @param $data_file
Expand Down

0 comments on commit aaa4289

Please sign in to comment.