Skip to content

Commit

Permalink
Merge 7af91d2 into 9c669d7
Browse files Browse the repository at this point in the history
  • Loading branch information
mhujer committed Oct 31, 2021
2 parents 9c669d7 + 7af91d2 commit 53db202
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 34 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI build
on: [ push, pull_request ]
jobs:
build:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} ${{ matrix.extra-label }} ${{ matrix.composer-dependencies }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.0' ]
composer-dependencies: [ '', '--prefer-lowest' ]
symfony-version: [ '' ]
extra-label: [ '' ]
include:

# Windows
- php-versions: '8.0'
operating-system: windows-latest
coverage: xdebug

steps:
# see https://github.com/actions/checkout/issues/226#issue-606867805
- name: Prepare git
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
ini-values: memory_limit=-1
tools: composer:${{ matrix.composer-version }}
coverage: ${{ matrix.coverage }}

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

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

- name: Install Composer dependencies
run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ matrix.composer-dependencies }}

- name: Run Build
run: composer run build

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls --no-progress --prefer-dist --optimize-autoloader
php-coveralls --coverage_clover=build/logs/clover.xml -v
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Author
Changelog
----------

## 3.4.0 (2021-??-??)
- [#15](../../pull/15) Drop support for PHP < 8.0

## 3.3.0 (2020-12-31)
- [#12](../../pull/12) Drop support for PHP < 7.4
- [#11](../../pull/11) Add support for PHP 8.0 (thank you @ahilles107!)
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
}
],
"require": {
"php": "~7.4 | ~8.0",
"jms/serializer": "~3.2",
"php": "~8.0",
"jms/serializer": "~3.14",
"ramsey/uuid": "~3.0|~4.0"
},
"require-dev": {
"consistence/coding-standard": "3.10.1",
"php-parallel-lint/php-parallel-lint": "1.2.0",
"php-coveralls/php-coveralls": "2.4.1",
"phpunit/phpunit": "9.5.0"
"consistence-community/coding-standard": "3.11.1",
"php-parallel-lint/php-parallel-lint": "1.3.1",
"php-coveralls/php-coveralls": "2.4.3",
"phpunit/phpunit": "9.5.10"
},
"autoload": {
"psr-4": { "Mhujer\\JmsSerializer\\": [ "src" ] },
Expand All @@ -43,7 +43,7 @@
],
"coveralls": "coveralls -v",
"lint": "parallel-lint src tests",
"phpcs": "phpcs --standard=vendor/consistence/coding-standard/Consistence/ruleset.xml src tests",
"phpcs": "phpcs --standard=vendor/consistence-community/coding-standard/Consistence/ruleset.xml src tests",
"test": "phpunit"
}
}
4 changes: 2 additions & 2 deletions src/Uuid/UuidSerializerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function getSubscribingMethods(): array
* @param \JMS\Serializer\Context $context
* @return \Ramsey\Uuid\UuidInterface
*/
public function deserializeUuid(DeserializationVisitorInterface $visitor, $data, array $type, Context $context): UuidInterface
public function deserializeUuid(DeserializationVisitorInterface $visitor, $data, array $type, Context $context): UuidInterface // phpcs:ignore
{
try {
return $this->deserializeUuidValue((string) $data);
Expand All @@ -81,7 +81,7 @@ private function deserializeUuidValue(string $uuidString): UuidInterface
* @param mixed[] $type
* @return string|object
*/
public function serializeUuid(SerializationVisitorInterface $visitor, UuidInterface $uuid, array $type)
public function serializeUuid(SerializationVisitorInterface $visitor, UuidInterface $uuid, array $type): mixed
{
return $visitor->visitString($uuid->toString(), $type);
}
Expand Down

0 comments on commit 53db202

Please sign in to comment.