Skip to content

Commit 623cbfe

Browse files
authored
Added missing dependency and moved from travis to github actions (#11)
* Added missing dependency and moved from travis to github actions * Removed travis configuration file * Updated branch alias
1 parent b3f2aa9 commit 623cbfe

File tree

4 files changed

+63
-36
lines changed

4 files changed

+63
-36
lines changed

.github/workflows/testsuite.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: Tests
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
16+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4']
17+
18+
steps:
19+
- uses: actions/checkout@master
20+
-
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@master
23+
with:
24+
php-version: ${{ matrix.php-versions }}
25+
coverage: none
26+
27+
- name: Get Composer Cache Directory
28+
id: composer-cache
29+
run: |
30+
echo "::set-output name=dir::$(composer config cache-files-dir)"
31+
32+
- uses: actions/cache@v1
33+
with:
34+
path: ${{ steps.composer-cache.outputs.dir }}
35+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-composer-
38+
39+
- name: Install dependecies - lowest versions
40+
if: matrix.php-versions == '7.0'
41+
run: composer update --prefer-lowest
42+
43+
- name: Install dependecies
44+
if: matrix.php-versions != '7.0'
45+
run: composer update --prefer-lowest
46+
47+
- name: Run tests
48+
run: composer test
49+

.travis.yml

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

composer.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "coduo/php-to-string",
33
"type": "library",
4+
"description": "Simple library that converts PHP value into strings",
45
"keywords": ["string", "php", "to string", "to"],
5-
"license": "MIT",
6+
"license": "MIT",
67
"authors": [
78
{
89
"name": "Michał Dąbrowski",
@@ -14,22 +15,25 @@
1415
}
1516
],
1617
"require": {
17-
"php": ">=5.3.0",
18-
"ext-intl": "*"
18+
"php": "^7.0",
19+
"ext-intl": "*",
20+
"symfony/intl": "^3.4|^4.0|^5.0"
1921
},
2022
"require-dev": {
2123
"phpspec/phpspec": "^2",
22-
"coduo/phpspec-data-provider-extension": "^1"
24+
"coduo/phpspec-data-provider-extension": "^1.0.3"
2325
},
2426
"autoload": {
25-
"psr-0": {"" : "src"}
26-
},
27-
"config": {
28-
"bin-dir": "bin"
27+
"psr-4": {
28+
"Coduo\\ToString\\" : "src/Coduo/ToString"
29+
}
2930
},
3031
"extra": {
3132
"branch-alias": {
32-
"dev-master": "2.1-dev"
33+
"dev-master": "3.1-dev"
3334
}
35+
},
36+
"scripts": {
37+
"test": "phpspec run --format=pretty"
3438
}
3539
}

src/Coduo/ToString/StringConverter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ private function castBooleanToString()
6868
private function castDoubleToString()
6969
{
7070
$formatter = new \NumberFormatter($this->locale, \NumberFormatter::DEFAULT_STYLE);
71+
7172
return $formatter->format($this->value);
7273
}
7374
}

0 commit comments

Comments
 (0)