-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from alleyinteractive/1.0
Add initial functionality and tests
- Loading branch information
Showing
18 changed files
with
1,488 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Exclude these files from release archives. | ||
# | ||
# This will also make the files unavailable when using Composer with `--prefer-dist`. | ||
# If you develop using Composer, use `--prefer-source`. | ||
# | ||
# Via WPCS. | ||
# | ||
/.php_cs-fixer.dist.php export-ignore | ||
/phpcs.xml export-ignore | ||
/phpunit.xml export-ignore | ||
/.github export-ignore | ||
/tests export-ignore | ||
|
||
# | ||
# Auto detect text files and perform LF normalization. | ||
# | ||
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ | ||
# | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files not found below. | ||
# | ||
*.md text | ||
*.php text | ||
*.inc text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Summary | ||
|
||
As titled. | ||
|
||
## Notes for reviewers | ||
|
||
None. | ||
|
||
## Changelog entries | ||
|
||
### Added | ||
|
||
- Initial release. | ||
|
||
### Changed | ||
|
||
### Deprecated | ||
|
||
### Removed | ||
|
||
### Fixed | ||
|
||
### Security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: PHPCS | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
coding-standards: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.1] | ||
|
||
name: Coding Standards | ||
steps: | ||
- name: Cancel previous runs of this workflow (pull requests only) | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: styfle/cancel-workflow-action@0.5.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Validate Composer config | ||
run: composer validate --strict | ||
|
||
- name: Install composer dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer install | ||
|
||
- name: Run PHPCS | ||
run: composer run phpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: PHPUnit | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.1, 8.0, 7.4] | ||
can_fail: [false] | ||
|
||
name: PHP ${{ matrix.php }} | ||
env: | ||
CACHEDIR: /tmp/test-cache | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install Composer dependencies | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer install | ||
|
||
- name: Run PHPUnit | ||
shell: bash | ||
run: composer run phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vendor | ||
composer.lock | ||
.php_cs.cache | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the traverse/reshape package. | ||
* | ||
* (c) Alley <info@alley.co> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
$finder = PhpCsFixer\Finder::create()->in([ | ||
__DIR__ . '/src/', | ||
__DIR__ . '/tests/', | ||
]); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
$config->setRules([ | ||
'@PSR12' => true, | ||
'@PHP81Migration' => true, | ||
|
||
'native_constant_invocation' => true, | ||
'native_function_casing' => true, | ||
'native_function_invocation' => true, | ||
'native_function_type_declaration_casing' => true, | ||
]); | ||
$config->setFinder($finder); | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/en/1.0.0/). | ||
|
||
## 1.0.0 | ||
|
||
Initial release. |
Oops, something went wrong.