Skip to content

Commit

Permalink
Fixes dynamic property deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejlew committed Nov 16, 2022
1 parent 2be565f commit 91cd562
Show file tree
Hide file tree
Showing 58 changed files with 129 additions and 4 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/tests.yml
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
tests:
name: PHP ${{ matrix.php }} / ${{ matrix.dependency-version }}
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -37,10 +37,41 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependency-version }}-${{ hashFiles('composer.json') }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer update --prefer-dist --no-interaction

- name: Running unit tests
run: php vendor/bin/phpunit --configuration tests-resources/phpunit.dist.xml --testsuite unit

tests-rc:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php:
- 8.2
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --ignore-platform-req=PHP

- name: Running unit tests
run: php vendor/bin/phpunit --configuration tests-resources/phpunit.dist.xml --testsuite unit
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- dynamic property deprecations

## [3.0.6] - 2022-03-28
### Fixed
Expand Down
3 changes: 3 additions & 0 deletions build/Makefile
Expand Up @@ -7,6 +7,7 @@ include $(CURDIR)/php-7.3/Makefile
include $(CURDIR)/php-7.4/Makefile
include $(CURDIR)/php-8.0/Makefile
include $(CURDIR)/php-8.1/Makefile
include $(CURDIR)/php-8.2/Makefile

help:
@grep -hE '^[a-zA-Z0-9_.-]+:.*?## .*$$' $(MAKEFILE_LIST) \
Expand All @@ -24,6 +25,7 @@ test: ## test all against all php images
$(MAKE) test-php-7.4
$(MAKE) test-php-8.0
$(MAKE) test-php-8.1
$(MAKE) test-php-8.2

test-unit: ## test unit suite against all php images
$(MAKE) test-suite-php-7.0 SUITE=unit
Expand All @@ -33,5 +35,6 @@ test-unit: ## test unit suite against all php images
$(MAKE) test-suite-php-7.4 SUITE=unit
$(MAKE) test-suite-php-8.0 SUITE=unit
$(MAKE) test-suite-php-8.1 SUITE=unit
$(MAKE) test-suite-php-8.2 SUITE=unit

.DEFAULT_GOAL := help
7 changes: 7 additions & 0 deletions build/docker-compose.yml
Expand Up @@ -49,4 +49,11 @@ services:
context: php-8.1
volumes:
- ..:/app
network_mode: host

php-8.2:
build:
context: php-8.2
volumes:
- ..:/app
network_mode: host
18 changes: 18 additions & 0 deletions build/php-8.2/Dockerfile
@@ -0,0 +1,18 @@
FROM composer:latest as composer
FROM php:8.2-rc-cli-alpine

RUN apk update && \
apk upgrade && \
apk add --no-cache \
autoconf \
g++ \
make \
linux-headers

RUN pecl install xdebug-3.2.0RC2 && \
pecl clear-cache && \
docker-php-ext-enable xdebug

COPY --from=composer /usr/bin/composer /usr/bin/composer

WORKDIR /app/
10 changes: 10 additions & 0 deletions build/php-8.2/Makefile
@@ -0,0 +1,10 @@
.PHONY: prepare-php-8.2 test-php-8.2 test-suite-php-8.2

prepare-php-8.2: ## load dependencies with php 8.2
docker-compose run -T php-8.2 /usr/bin/composer update --ignore-platform-req=PHP

test-php-8.2: prepare-php-8.2 ## run tests against php 8.2
docker-compose run -T php-8.2 php vendor/bin/phpunit --configuration tests-resources/phpunit.xml

test-suite-php-8.2: prepare-php-8.2 ## run suite tests against php 8.2, ex: make test-suite-php-8.2 SUITE="unit"
docker-compose run -T php-8.2 php vendor/bin/phpunit --configuration tests-resources/phpunit.xml --testsuite $(SUITE)
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,7 +16,7 @@
}
},
"require": {
"php": "^7 || ~8.0 || ~8.1",
"php": "^7 || ~8.0 || ~8.1 || ~8.2",
"ext-json": "*",
"psr/log": "^1 || ^2 || ^3",
"psr/http-message": "^1",
Expand Down
Expand Up @@ -10,6 +10,7 @@
* @api
* @property DateTimeInterface $expireAt
*/
#[\AllowDynamicProperties]
class CreateBlacklistedPhoneNumberBag
{
/** @var string */
Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class DeleteBlacklistedPhoneNumberBag
{
/** @var string */
Expand Down
Expand Up @@ -10,6 +10,7 @@
* @api
* @property string $q
*/
#[\AllowDynamicProperties]
class FindBlacklistedPhoneNumbersBag
{
use PaginationBag;
Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Bag/CreateContactBag.php
Expand Up @@ -16,6 +16,7 @@
* @property string $city
* @property string $source
*/
#[\AllowDynamicProperties]
class CreateContactBag
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Bag/DeleteContactBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class DeleteContactBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Bag/FindContactBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindContactBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Bag/FindContactsBag.php
Expand Up @@ -18,6 +18,7 @@
* @property string $gender
* @property string $birthdayDate
*/
#[\AllowDynamicProperties]
class FindContactsBag
{
use PaginationBag;
Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Bag/UpdateContactBag.php
Expand Up @@ -16,6 +16,7 @@
* @property string $city
* @property string $source
*/
#[\AllowDynamicProperties]
class UpdateContactBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Fields/Bag/CreateContactFieldBag.php
Expand Up @@ -8,6 +8,7 @@
* @api
* @property string $type
*/
#[\AllowDynamicProperties]
class CreateContactFieldBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Fields/Bag/DeleteContactFieldBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class DeleteContactFieldBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindContactFieldOptionsBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Fields/Bag/UpdateContactFieldBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class UpdateContactFieldBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class AssignContactToGroupBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/CreateGroupBag.php
Expand Up @@ -10,6 +10,7 @@
* @property string $idx
* @property integer $contactExpireAfter
*/
#[\AllowDynamicProperties]
class CreateGroupBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/DeleteGroupBag.php
Expand Up @@ -8,6 +8,7 @@
* @api
* @property bool $deleteContacts
*/
#[\AllowDynamicProperties]
class DeleteGroupBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/FindContactGroupBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindContactGroupBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/FindContactGroupsBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindContactGroupsBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/FindGroupBag.php
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindGroupBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class UnpinContactFromGroupBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Contacts/Groups/Bag/UpdateGroupBag.php
Expand Up @@ -10,6 +10,7 @@
* @property string $idx
* @property integer $contactExpireAfter
*/
#[\AllowDynamicProperties]
class UpdateGroupBag
{

Expand Down
Expand Up @@ -15,6 +15,7 @@
* @property string $gender
* @property string $birthdayDate
*/
#[\AllowDynamicProperties]
class AddContactToGroupByQueryBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindContactInGroupBag
{

Expand Down
Expand Up @@ -15,6 +15,7 @@
* @property string $gender
* @property string $birthdayDate
*/
#[\AllowDynamicProperties]
class MoveContactToGroupByQueryBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class PinContactToGroupBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class UnpinContactFromGroupBag
{

Expand Down
Expand Up @@ -15,6 +15,7 @@
* @property string $gender
* @property string $birthdayDate
*/
#[\AllowDynamicProperties]
class UnpinContactFromGroupByQueryBag
{

Expand Down
Expand Up @@ -10,6 +10,7 @@
* @property string $write
* @property string $send
*/
#[\AllowDynamicProperties]
class CreateGroupPermissionBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class DeleteGroupPermissionBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindGroupPermissionBag
{

Expand Down
Expand Up @@ -7,6 +7,7 @@
/**
* @api
*/
#[\AllowDynamicProperties]
class FindGroupPermissionsBag
{

Expand Down
Expand Up @@ -10,6 +10,7 @@
* @property string $write
* @property string $send
*/
#[\AllowDynamicProperties]
class UpdateGroupPermissionBag
{

Expand Down
1 change: 1 addition & 0 deletions src/Feature/Hlr/Bag/SendHlrBag.php
Expand Up @@ -8,6 +8,7 @@
* @api
* @property string $idx
*/
#[\AllowDynamicProperties]
class SendHlrBag
{

Expand Down

0 comments on commit 91cd562

Please sign in to comment.