Skip to content

Commit d31a870

Browse files
authored
Merge pull request #7 from clarkeash/master
PHP 8 Support
2 parents e99a5f7 + 0bd7f37 commit d31a870

File tree

8 files changed

+1056
-745
lines changed

8 files changed

+1056
-745
lines changed

.github/workflows/tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
pull_request:
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
tests:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
php: [7.3, 7.4, 8.0]
21+
stability: [prefer-lowest, prefer-stable]
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
28+
- name: Cache dependencies
29+
uses: actions/cache@v1
30+
with:
31+
path: ~/.composer/cache/files
32+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
33+
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
39+
tools: composer:v2
40+
coverage: xdebug
41+
42+
- name: Install dependencies
43+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
44+
45+
- name: Execute tests
46+
run: vendor/bin/phpunit --coverage-text

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/vendor
22
/.idea
33
coverage.xml
4+
.phpunit.result.cache

.scrutinizer.yml

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

.travis.yml

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

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@
33
Validates 2 & 3 character country codes.
44

55
<p align="center">
6-
<a href="https://travis-ci.org/laravel-validation-rules/country-codes">
7-
<img src="https://img.shields.io/travis/laravel-validation-rules/country-codes.svg?style=flat-square">
8-
</a>
9-
<a href="https://scrutinizer-ci.com/g/laravel-validation-rules/country-codes/code-structure/master/code-coverage">
10-
<img src="https://img.shields.io/scrutinizer/coverage/g/laravel-validation-rules/country-codes.svg?style=flat-square">
11-
</a>
12-
<a href="https://scrutinizer-ci.com/g/laravel-validation-rules/country-codes">
13-
<img src="https://img.shields.io/scrutinizer/g/laravel-validation-rules/country-codes.svg?style=flat-square">
6+
<a href="https://github.com/laravel-validation-rules/country-codes/actions">
7+
<img src="https://img.shields.io/github/workflow/status/laravel-validation-rules/country-codes/CI?style=flat-square">
148
</a>
159
<a href="https://github.com/laravel-validation-rules/country-codes/blob/master/LICENSE">
1610
<img src="https://img.shields.io/github/license/laravel-validation-rules/country-codes.svg?style=flat-square">

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"type": "library",
55
"keywords": [ "laravel", "validation", "country" ],
66
"require": {
7+
"php": "^7.3|^8.0",
78
"illuminate/contracts": "^5.5|^6.0|^7.0|^8.0",
8-
"league/iso3166": "^2.0"
9+
"league/iso3166": "^3.0"
910
},
1011
"require-dev": {
1112
"orchestra/testbench": "^3.5|^4.0|^5.0",

0 commit comments

Comments
 (0)