ci: add newer PHP versions

Seems I had started this a while back and never actually finished.
Bumped the copyright years and added a funding and git ignore file.
Redid the Travis configuration based on my more recent experiences with
testing multiple PHP versions. Updated the development dependencies and
added a configuration file for PHPUnit.
This commit is contained in:
Josh Sherman 2020-01-26 17:23:06 -06:00
parent 805b303a04
commit 90ba4df308
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
6 changed files with 76 additions and 41 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
composer.lock
composer.phar
.phpunit.result.cache
/vendor/

View file

@ -1,5 +1,5 @@
language: php language: php
dist: trusty dist: bionic
sudo: required sudo: required
matrix: matrix:
@ -7,26 +7,34 @@ matrix:
- php: 5.3 - php: 5.3
dist: precise dist: precise
- php: 5.4 - php: 5.4
dist: trusty
- php: 5.5 - php: 5.5
dist: trusty
- php: 5.6 - php: 5.6
dist: trusty
- php: 7.0 - php: 7.0
dist: xenial
- php: 7.1 - php: 7.1
- php: 7.2 - php: 7.2
- php: hhvm - php: 7.3
env: HHVM=true - php: 7.4
env: COVERAGE=true
- php: nightly
allow_failures:
- php: nightly
install: install:
- php --version
- composer install - composer install
- if [[ $HHVM == true ]]; then composer require "phpunit/phpunit:5.7"; fi
before_script: before_script:
- mkdir -p build/logs - mkdir -p build/logs
- cd tests
script: script:
- if [[ $HHVM == true ]]; then ../vendor/bin/phpunit --colors --coverage-clover ../build/logs/clover.xml .; fi - vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- if [[ $HHVM != true ]]; then phpunit --colors --coverage-clover ../build/logs/clover.xml .; fi
after_success: after_success:
- cd .. - |
- php vendor/bin/coveralls --config .coveralls.yml -v if [[ $COVERAGE ]]; then
travis_retry php vendor/bin/php-coveralls --config .coveralls.yml -v
fi

1
FUNDING.yml Normal file
View file

@ -0,0 +1 @@
patreon: joshtronic

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2012, 2013, 2014, 2015, 2016, 2017, 2018 Josh Sherman Copyright (c) 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Josh Sherman
Permission is hereby granted, free of charge, to any person obtaining a copy of Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in this software and associated documentation files (the "Software"), to deal in

View file

@ -1,34 +1,33 @@
{ {
"name": "joshtronic/php-projecthoneypot", "name": "joshtronic/php-projecthoneypot",
"description": "PHP Wrapper for Project Honey Pot", "description": "PHP Wrapper for Project Honey Pot",
"version": "1.0.1", "version": "1.0.1",
"type": "library", "type": "library",
"keywords": [ "keywords": [
"project", "project",
"honey", "honey",
"pot", "pot",
"api", "api",
"spam", "spam",
"spammer" "spammer"
], ],
"homepage": "https://github.com/joshtronic/php-projecthoneypot", "homepage": "https://github.com/joshtronic/php-projecthoneypot",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [{
{ "name": "Josh Sherman",
"name": "Josh Sherman", "email": "hello@joshtronic.com",
"email": "hello@joshtronic.com", "homepage": "https://joshtronic.com"
"homepage": "https://joshtronic.com" }],
} "require": {
], "php": ">=5.3"
"require-dev": { },
"php": ">=5.3.0" "require-dev": {
}, "php-coveralls/php-coveralls": ">=1",
"require-dev": { "phpunit/phpunit": ">=4"
"satooshi/php-coveralls": "~1.0" },
}, "autoload": {
"autoload": { "psr-4": {
"psr-4": { "joshtronic\\": "src/"
"joshtronic\\": "src/"
}
} }
}
} }

23
phpunit.xml Normal file
View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
failOnRisky="true"
stopOnError="true"
stopOnFailure="true"
stopOnIncomplete="true"
verbose="true"
>
<testsuites>
<testsuite name="Project Honey Pot">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory>./src</directory>
</whitelist>
</filter>
</phpunit>