Skip to content

Commit e0cfe3e

Browse files
authored
Regular repository update made (#26)
1 parent b8b075e commit e0cfe3e

File tree

9 files changed

+49
-105
lines changed

9 files changed

+49
-105
lines changed

.editorconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ indent_style = space
88
indent_size = 4
99
trim_trailing_whitespace = true
1010

11-
[*.md]
12-
trim_trailing_whitespace = false
13-
14-
[*.{yml,yaml,sh,conf,neon*}]
11+
[*.{yml, yaml, sh, conf, neon*}]
1512
indent_size = 2
1613

1714
[Makefile]

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Execute tests
1+
name: tests
22

33
on:
44
push:
@@ -7,83 +7,77 @@ on:
77
tags-ignore:
88
- '**'
99
pull_request:
10+
schedule:
11+
- cron: '0 0 * * 0' # once in a week, docs: <https://git.io/JvxXE#onschedule>
1012

11-
jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions>
12-
tests:
13+
jobs: # Docs: <https://git.io/JvxXE>
14+
php:
1315
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup
1416
runs-on: ubuntu-latest
1517
timeout-minutes: 10
1618
strategy:
1719
fail-fast: false
1820
matrix:
19-
setup: ['basic', 'lowest']
20-
php: ['7.1', '7.2', '7.3', '7.4']
21-
include:
22-
- php: '7.1'
23-
setup: 'basic'
24-
coverage: 'true'
25-
- php: '7.4'
26-
setup: 'basic'
27-
coverage: 'true'
21+
setup: [basic, lowest]
22+
coverage: [yes]
23+
php: ['7.2', '7.3', '7.4']
2824
steps:
2925
- name: Check out code
3026
uses: actions/checkout@v2
31-
with:
32-
fetch-depth: 1
3327

3428
- name: Setup PHP, with composer and extensions
35-
uses: shivammathur/setup-php@master # Action page: <https://github.com/shivammathur/setup-php>
29+
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
3630
with:
3731
php-version: ${{ matrix.php }}
38-
extensions: mbstring # definition is required for php 7.4
32+
extensions: mbstring
3933

40-
- name: Get Composer Cache Directory # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
34+
- name: Get Composer Cache Directory # Docs: <https://git.io/JfAKn#php---composer>
4135
id: composer-cache
4236
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4337

44-
- name: Cache dependencies # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
45-
uses: actions/cache@v1
38+
- name: Cache dependencies # Docs: <https://git.io/JfAKn#php---composer>
39+
uses: actions/cache@v2
4640
with:
4741
path: ${{ steps.composer-cache.outputs.dir }}
48-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
42+
key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }}
4943
restore-keys: ${{ runner.os }}-composer-
5044

5145
- name: Install Composer 'hirak/prestissimo' package
52-
run: composer global require hirak/prestissimo --update-no-dev
46+
run: composer global require hirak/prestissimo --update-no-dev --no-progress --ansi
5347

5448
- name: Install lowest Composer dependencies
5549
if: matrix.setup == 'lowest'
56-
run: composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest
50+
run: composer update --prefer-dist --no-suggest --prefer-lowest --ansi
5751

5852
- name: Install basic Composer dependencies
5953
if: matrix.setup == 'basic'
60-
run: composer update --prefer-dist --no-interaction --no-suggest
54+
run: composer update --prefer-dist --no-suggest --ansi
6155

6256
- name: Show most important packages versions
63-
run: composer info | grep -e phpunit/phpunit -e phpstan/phpstan
57+
run: composer info | grep -e phpunit -e phpstan
6458

6559
- name: Execute tests
66-
if: matrix.coverage != 'true'
60+
if: matrix.coverage != 'yes'
6761
run: composer test
6862

6963
- name: Execute tests with code coverage
70-
if: matrix.coverage == 'true'
64+
if: matrix.coverage == 'yes'
7165
run: composer test-cover
7266

7367
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
74-
if: matrix.coverage == 'true'
68+
if: matrix.coverage == 'yes'
7569
with:
7670
token: ${{ secrets.CODECOV_TOKEN }}
7771
file: ./sdk/php/coverage/clover.xml
72+
flags: php
73+
fail_ci_if_error: false
7874

7975
lint-changelog:
8076
name: Lint changelog file
8177
runs-on: ubuntu-latest
8278
steps:
8379
- name: Check out code
8480
uses: actions/checkout@v2
85-
with:
86-
fetch-depth: 1
8781

8882
- name: Lint changelog file
8983
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7+
## v3.1.0
8+
9+
### Changed
10+
11+
- CI completely moved from "Travis CI" to "Github Actions" _(travis builds disabled)_
12+
- Minimal required PHP version now is `7.2`
13+
14+
### Added
15+
16+
- PHP 7.4 is supported now
17+
718
## v3.0.0
819

920
### Added

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
FROM composer:1.8.6 AS composer
2-
3-
FROM php:7.1.3-alpine
1+
FROM php:7.2.5-alpine
42

53
ENV \
64
COMPOSER_ALLOW_SUPERUSER="1" \
75
COMPOSER_HOME="/tmp/composer"
86

9-
COPY --from=composer /usr/bin/composer /usr/bin/composer
7+
COPY --from=composer:1.10.7 /usr/bin/composer /usr/bin/composer
108

11-
RUN set -xe \
12-
&& apk add --no-cache binutils git curl \
13-
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc \
9+
RUN set -x \
10+
&& apk add --no-cache binutils git \
11+
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
1412
# install xdebug (for testing with code coverage), but do not enable it
15-
&& pecl install xdebug-2.9.1 \
13+
&& pecl install xdebug-2.9.1 1>/dev/null \
1614
&& apk del .build-deps \
1715
&& mkdir /src ${COMPOSER_HOME} \
1816
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \
@@ -23,5 +21,3 @@ RUN set -xe \
2321
&& php -m
2422

2523
WORKDIR /src
26-
27-
VOLUME ["/src"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Static references data
66

77
[![Version][badge_packagist_version]][link_packagist]
8-
[![Version][badge_php_version]][link_packagist]
8+
[![PHP Version][badge_php_version]][link_packagist]
99
[![Build Status][badge_build_status]][link_build_status]
1010
[![Coverage][badge_coverage]][link_coverage]
1111
[![Downloads count][badge_downloads_count]][link_packagist]
@@ -77,7 +77,7 @@ This is open-sourced software licensed under the [MIT License][link_license].
7777

7878
[badge_packagist_version]:https://img.shields.io/packagist/v/avto-dev/static-references-data.svg?maxAge=180
7979
[badge_php_version]:https://img.shields.io/packagist/php-v/avto-dev/static-references-data.svg?longCache=true
80-
[badge_build_status]:https://travis-ci.org/avto-dev/static-references-data.svg?branch=master
80+
[badge_build_status]:https://img.shields.io/github/workflow/status/avto-dev/static-references-data/tests/master
8181
[badge_coverage]:https://img.shields.io/codecov/c/github/avto-dev/static-references-data/master.svg?maxAge=60
8282
[badge_downloads_count]:https://img.shields.io/packagist/dt/avto-dev/static-references-data.svg?maxAge=180
8383
[badge_license]:https://img.shields.io/packagist/l/avto-dev/static-references-data.svg?longCache=true

composer.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,23 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.1.3",
18+
"php": "^7.2",
1919
"tarampampam/wrappers-php": "^1.2"
2020
},
2121
"require-dev": {
2222
"ext-json": "*",
2323
"opis/json-schema": "^1.0.8",
2424
"phpstan/phpstan": "~0.12",
25-
"phpunit/phpunit": "~7.5",
26-
"symfony/var-dumper": "~3.2 || ^4.0"
25+
"phpunit/phpunit": "~7.5"
2726
},
2827
"autoload": {
2928
"psr-4": {
30-
"AvtoDev\\StaticReferencesData\\": "sdk/php/src"
29+
"AvtoDev\\StaticReferencesData\\": "sdk/php/src/"
3130
}
3231
},
3332
"autoload-dev": {
3433
"psr-4": {
35-
"AvtoDev\\StaticReferencesData\\Tests\\": "sdk/php/tests"
34+
"AvtoDev\\StaticReferencesData\\Tests\\": "sdk/php/tests/"
3635
}
3736
},
3837
"scripts": {
@@ -54,9 +53,5 @@
5453
},
5554
"suggest": {
5655
"avto-dev/static-references-laravel": "Laravel package for a working with static references data."
57-
},
58-
"config": {
59-
"sort-packages": true
60-
},
61-
"prefer-stable": true
56+
}
6257
}

sdk/php/src/ReferencesData/StaticReference.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getFilePath(): string
6868
*
6969
* @throws JsonEncodeDecodeException
7070
*
71-
* @return array[]|object[]|array|object
71+
* @return array[]|object[]|array<mixed>|object
7272
*/
7373
public function getData(bool $as_array = true, int $options = 0)
7474
{

0 commit comments

Comments
 (0)