Skip to content

Commit 1e6528f

Browse files
committed
Migrated from phpspec to phpunit, added integration with aeon-php/automation
1 parent 5eab40b commit 1e6528f

35 files changed

+2330
-1019
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [norberttech]

.github/PULL_REQUEST_TEMPLATE.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Bellow section will be used to automatically generate changelog, please do not modify HTML code structure -->
2+
<h2>Change Log</h2>
3+
<div id="change-log">
4+
<h4>Added</h4>
5+
<ul id="added">
6+
<!-- <li>Feature making everything better</li> -->
7+
</ul>
8+
<h4>Fixed</h4>
9+
<ul id="fixed">
10+
<!-- <li>Behavior that was incorrect</li> -->
11+
</ul>
12+
<h4>Changed</h4>
13+
<ul id="changed">
14+
<!-- <li>Something into something new</li> -->
15+
</ul>
16+
<h4>Removed</h4>
17+
<ul id="removed">
18+
<!-- <li>Something</li> -->
19+
</ul>
20+
<h4>Deprecated</h4>
21+
<ul id="deprecated">
22+
<!-- <li>Something is from now deprecated</li> -->
23+
</ul>
24+
<h4>Security</h4>
25+
<ul id="security">
26+
<!-- <li>Something that was security issue, is not an issue anymore</li> -->
27+
</ul>
28+
</div>
29+
<hr/>
30+
31+
<h2>Description</h2>
32+
33+
<!-- Please provide a shore description of changes in this section, feel free to use markdown syntax -->

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Changelog - Release Unreleased"
2+
3+
###################################################################
4+
# WARNING - THIS ACTION WILL PUSH COMMIT DIRECTLY INTO REPOSITORY #
5+
###################################################################
6+
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
12+
jobs:
13+
changelog-release-unreleased:
14+
name: "Update Changelog - Release Unreleased"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- name: "Get tag name"
20+
id: "tag-name"
21+
run: |
22+
tag=$(echo ${{ github.event.ref }} | cut -c11-)
23+
echo "::set-output name=tag::$tag"
24+
25+
- name: "Update CHANGELOG"
26+
uses: "docker://aeonphp/automation:latest"
27+
env:
28+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
29+
with:
30+
entrypoint: "/composer/vendor/bin/automation"
31+
args: "changelog:release:unreleased ${{ github.repository }} CHANGELOG.md ${{ steps.tag-name.outputs.tag }} --github-file-changelog-update"
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Changelog - Update Unreleased"
2+
3+
###################################################################
4+
# WARNING - THIS ACTION WILL PUSH COMMIT DIRECTLY INTO REPOSITORY #
5+
###################################################################
6+
7+
on:
8+
push:
9+
branches:
10+
- 3.x
11+
12+
jobs:
13+
changelog-update-unreleased:
14+
name: "Changelog - Update Unreleased"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- name: "Checkout"
20+
uses: "actions/checkout@v2"
21+
22+
- name: "Restore Automation cache"
23+
uses: "actions/cache@v2"
24+
with:
25+
path: |
26+
cache
27+
key: "${{ runner.os }}-automation-${{ hashFiles('**/CHANGELOG.md') }}"
28+
restore-keys: |
29+
${{ runner.os }}-automation-
30+
31+
- name: "Update CHANGELOG"
32+
uses: "docker://aeonphp/automation:latest"
33+
env:
34+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
35+
EON_AUTOMATION_CACHE_DIR: "/github/workspace/cache"
36+
with:
37+
entrypoint: "/composer/vendor/bin/automation"
38+
args: "changelog:generate ${{ github.repository }} --github-file-update-path=CHANGELOG.md --skip-from=\"dependabot[bot]\" --skip-from=\"aeon-automation\""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Pull Request Description Check"
2+
3+
on:
4+
pull_request:
5+
types: ["opened", "edited", "reopened", "ready_for_review"]
6+
7+
jobs:
8+
pull-request-description-check:
9+
name: "Pull Request Description"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Pull Request Description - Check"
15+
uses: "docker://aeonphp/automation:latest"
16+
env:
17+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18+
with:
19+
entrypoint: "/composer/vendor/bin/automation"
20+
args: "pull-request:description:check ${{ github.repository }} ${{ github.event.pull_request.number }} --skip-from=\"dependabot[bot]\""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Release - Description Update"
2+
3+
#########################################################
4+
# WARNING - THIS ACTION WILL UPDATE RELEASE DESCRIPTION #
5+
#########################################################
6+
7+
on:
8+
release:
9+
types:
10+
- created
11+
12+
jobs:
13+
release-description-update:
14+
name: "Release - Description Update"
15+
16+
runs-on: "ubuntu-latest"
17+
18+
steps:
19+
- name: "Update CHANGELOG"
20+
uses: "docker://aeonphp/automation:latest"
21+
env:
22+
AEON_AUTOMATION_GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
23+
with:
24+
entrypoint: "/composer/vendor/bin/automation"
25+
args: "changelog:generate ${{ github.repository }} --tag=${{ github.event.release.tag_name }} --github-release-update --skip-from=\"dependabot[bot]\" --skip-from=\"aeon-automation\""

.github/workflows/static-analyze.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- "master"
7+
- "3.x"
88
schedule:
99
- cron: '* 8 * * *'
1010

.github/workflows/testsuite.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- "master"
7+
- "3.x"
88
schedule:
99
- cron: '* 8 * * *'
1010

@@ -42,28 +42,22 @@ jobs:
4242

4343
- name: "Install tools"
4444
run: "phive install --trust-gpg-keys E82B2FB314E9906E"
45-
continue-on-error: ${{ matrix.php-version == '8.0' }}
4645

4746
- name: "Install lowest dependencies"
4847
if: ${{ matrix.dependencies == 'lowest' }}
4948
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
50-
continue-on-error: ${{ matrix.php-version == '8.0' }}
5149

5250
- name: "Install highest dependencies"
5351
if: ${{ matrix.dependencies == 'highest'}}
5452
run: "composer update --no-interaction --no-progress --no-suggest"
55-
continue-on-error: ${{ matrix.php-version == '8.0' }}
5653

5754
- name: "Install locked dependencies"
5855
if: ${{ matrix.dependencies == 'locked' && matrix.php-version == '7.4' }}
5956
run: "composer install --no-interaction --no-progress --no-suggest"
60-
continue-on-error: ${{ matrix.php-version == '8.0' }}
6157

6258
- name: "Install highest dependencies"
6359
if: ${{ matrix.dependencies == 'locked' && matrix.php-version != '7.4' }}
6460
run: "composer update --no-interaction --no-progress --no-suggest"
65-
continue-on-error: ${{ matrix.php-version == '8.0' }}
6661

6762
- name: "Tests"
68-
run: "composer test"
69-
continue-on-error: ${{ matrix.php-version == '8.0' }}
63+
run: "composer test"

.php_cs

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ $finder = PhpCsFixer\Finder::create()
44
->files()
55
->in([
66
__DIR__ . '/src',
7-
__DIR__ . '/spec',
8-
]);
7+
__DIR__ . '/tests'
8+
])
9+
->notName('*.phpt');
910

1011
if (!\file_exists(__DIR__ . '/var')) {
1112
\mkdir(__DIR__ . '/var');
1213
}
1314

15+
/**
16+
* This configuration was taken from https://github.com/sebastianbergmann/phpunit/blob/master/.php_cs.dist
17+
* and slightly adjusted.
18+
*/
1419
return PhpCsFixer\Config::create()
1520
->setRiskyAllowed(true)
1621
->setCacheFile(__DIR__.'/var/.php_cs.cache')
@@ -81,7 +86,7 @@ return PhpCsFixer\Config::create()
8186
'magic_constant_casing' => true,
8287
'magic_method_casing' => true,
8388
'method_argument_space' => ['ensure_fully_multiline' => true],
84-
'modernize_types_casting' => true,
89+
'modernize_types_casting' => false,
8590
'multiline_comment_opening_closing' => true,
8691
'multiline_whitespace_before_semicolons' => true,
8792
'native_constant_invocation' => false,

CHANGELOG.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
## [3.1.0] - 2020-09-27
2+
3+
### Added
4+
- [4c3902](https://github.com/coduo/php-to-string/commit/4c39029921aa1ead4d156e81dc9eac4dfc121e11) - **poser.pugx.org badges** - [@norberttech](https://github.com/norberttech)
5+
6+
### Changed
7+
- [#14](https://github.com/coduo/php-to-string/pull/14) - **dependencies** - [@norberttech](https://github.com/norberttech)
8+
- [37176c](https://github.com/coduo/php-to-string/commit/37176cfff780473b5aedd89f5734d7cad6c7588e) - **master branch alias** - [@norberttech](https://github.com/norberttech)
9+
10+
## [3.0.0] - 2019-11-23
11+
12+
### Added
13+
- [#11](https://github.com/coduo/php-to-string/pull/11) - **missing dependency and moved from travis to github actions** - [@norberttech](https://github.com/norberttech)
14+
15+
### Changed
16+
- [6ee3db](https://github.com/coduo/php-to-string/commit/6ee3dbd06fbff934673f2e59094158cf187400b2) - **Update README.md** - [@norberttech](https://github.com/norberttech)
17+
- [d8b1dd](https://github.com/coduo/php-to-string/commit/d8b1dd1986b2da58dbdd83f19a910229c0802bf3) - **Run testsuite also on pushes to master** - [@norberttech](https://github.com/norberttech)
18+
- [#12](https://github.com/coduo/php-to-string/pull/12) - **Switch to short array notation** - [@norberttech](https://github.com/norberttech)
19+
20+
### Removed
21+
- [#13](https://github.com/coduo/php-to-string/pull/13) - **php 7.0 & 7.1 support** - [@norberttech](https://github.com/norberttech)
22+
23+
## [2.0.2] - 2019-08-09
24+
25+
### Added
26+
- [#8](https://github.com/coduo/php-to-string/pull/8) - **intl extension as required dependency** - [@teklakct](https://github.com/teklakct)
27+
28+
### Fixed
29+
- [#7](https://github.com/coduo/php-to-string/pull/7) - **minor typo** - [@sdaoudi](https://github.com/sdaoudi)
30+
31+
### Removed
32+
- [#9](https://github.com/coduo/php-to-string/pull/9) - **non supported php versions from Travis build** - [@norberttech](https://github.com/norberttech)
33+
34+
## [2.0.1] - 2016-01-20
35+
36+
### Changed
37+
- [4c1d7e](https://github.com/coduo/php-to-string/commit/4c1d7e2e76017719edc70e944ace0ec570748a78) - **Merge pull request #6 from jakzal/symfony-intl-3** - [@norzechowicz](https://github.com/norzechowicz)
38+
- [#6](https://github.com/coduo/php-to-string/pull/6) - **Remove an optional dependency on symfony/intl** - [@jakzal](https://github.com/jakzal)
39+
40+
## [2.0.0] - 2015-12-13
41+
42+
### Added
43+
- [#5](https://github.com/coduo/php-to-string/pull/5) - **support for php7** - [@norberttech](https://github.com/norberttech)
44+
45+
### Changed
46+
- [5a55f3](https://github.com/coduo/php-to-string/commit/5a55f3bd3af772175b458ce48648a36a1d15b54a) - **Merge pull request #5 from norzechowicz/php7-support** - [@norzechowicz](https://github.com/norzechowicz)
47+
48+
## [1.0.2] - 2015-12-13
49+
50+
### Changed
51+
- [#4](https://github.com/coduo/php-to-string/pull/4) - **travis.ci configuration file** - [@norberttech](https://github.com/norberttech)
52+
- [fb3f87](https://github.com/coduo/php-to-string/commit/fb3f879af3878310bd05c35fbec7256b4aeaf58c) - **Merge pull request #4 from norzechowicz/travis** - [@norzechowicz](https://github.com/norzechowicz)
53+
54+
## [1.0.1] - 2014-10-18
55+
56+
### Added
57+
- [a92b47](https://github.com/coduo/php-to-string/commit/a92b47db643541baa7ea9c61ea427a6896676685) - **symfony2/intl fixed phpspec extensions** - [@norberttech](https://github.com/norberttech)
58+
59+
### Changed
60+
- [a24f4c](https://github.com/coduo/php-to-string/commit/a24f4c97278fafa69cea2c180a036b2b207ab204) - **Update composer.json** - [@norberttech](https://github.com/norberttech)
61+
- [5ad9be](https://github.com/coduo/php-to-string/commit/5ad9be49ecfe0e832066bf86dca65ea9a197891e) - **Update README.md** - [@norberttech](https://github.com/norberttech)
62+
63+
## [v0.1.0] - 2014-05-08
64+
65+
### Changed
66+
- [420928](https://github.com/coduo/php-to-string/commit/42092807d4efab4c0c6c7782ab085978de4f4ce9) - **Travis.yml CS fix** - [@norberttech](https://github.com/norberttech)
67+
- [616f6f](https://github.com/coduo/php-to-string/commit/616f6f7dfd47056f39d332d34d9ade395715e6fd) - **Use PhpSpecDataProviderExtension to improve specs readabilty** - [@norberttech](https://github.com/norberttech)
68+
- [f519ef](https://github.com/coduo/php-to-string/commit/f519ef20ec15ba7030daa6315a3090e2a8964efa) - **Update README.md** - [@norberttech](https://github.com/norberttech)
69+
- [dc133b](https://github.com/coduo/php-to-string/commit/dc133bcded367ab1495846d934ef003f92143ee8) - **Update README.md** - [@norberttech](https://github.com/norberttech)
70+
- [f6034a](https://github.com/coduo/php-to-string/commit/f6034a859c7ce9e3b98521df7d27779cccfe7b01) - **Initial commit** - [@norberttech](https://github.com/norberttech)
71+
72+
### Fixed
73+
- [7e29aa](https://github.com/coduo/php-to-string/commit/7e29aa926156d7952ea070af19066eac830192a2) - **travis configuration** - [@norberttech](https://github.com/norberttech)
74+
75+
Generated by [Automation](https://github.com/aeon-php/automation)

LICENCE LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 Michal Dabrowski, Norbert Orzechowicz
1+
Copyright (c) 2014-2021 Michal Dabrowski, Norbert Orzechowicz
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Simple library that converts PHP values into strings.
44

55
Status:
66

7-
* ![Build Status](https://github.com/coduo/php-to-string/workflows/Tests/badge.svg?branch=master) - master
8-
7+
![Build Status](https://github.com/coduo/php-to-string/workflows/Tests/badge.svg?branch=3.x)
98
[![Latest Stable Version](https://poser.pugx.org/coduo/php-to-string/v/stable)](https://packagist.org/packages/coduo/php-to-string)
109
[![Total Downloads](https://poser.pugx.org/coduo/php-to-string/downloads)](https://packagist.org/packages/coduo/php-to-string)
1110
[![Latest Unstable Version](https://poser.pugx.org/coduo/php-to-string/v/unstable)](https://packagist.org/packages/coduo/php-to-string)

composer.json

+12-5
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,31 @@
1919
"symfony/intl": "^3.4|^4.0|^5.0"
2020
},
2121
"require-dev": {
22-
"phpspec/phpspec": "^6"
22+
"phpunit/phpunit": "^9.5"
2323
},
2424
"autoload": {
2525
"psr-4": {
2626
"Coduo\\ToString\\" : "src/Coduo/ToString"
2727
}
2828
},
29-
"extra": {
30-
"branch-alias": {
31-
"dev-master": "4.0-dev"
29+
"autoload-dev": {
30+
"psr-4": {
31+
"Coduo\\ToString\\": "tests/Coduo/ToString"
3232
}
3333
},
34+
"suggest": {
35+
"ext-intl": "Required if you are going to use humanizer with locales different than en_EN"
36+
},
3437
"scripts": {
38+
"build": [
39+
"@static:analyze",
40+
"@test"
41+
],
3542
"cs:php:fix": [
3643
"tools/php-cs-fixer fix --using-cache=no"
3744
],
3845
"test" : [
39-
"phpspec run --format=pretty"
46+
"phpunit"
4047
],
4148
"static:analyze": [
4249
"tools/php-cs-fixer fix --dry-run"

0 commit comments

Comments
 (0)