Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit deadcac

Browse files
authored
Merge pull request #136 from dshanske/phpcsgrunt
PHPCS and Travis Improvements
2 parents 4350e87 + 38de9b1 commit deadcac

File tree

9 files changed

+468
-289
lines changed

9 files changed

+468
-289
lines changed

.travis.yml

Lines changed: 91 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,105 @@
1+
sudo: false
2+
dist: trusty
13
language: php
2-
34
notifications:
45
email:
56
on_success: never
67
on_failure: change
7-
8-
php:
9-
- 5.6
10-
- 7
11-
8+
cache:
9+
directories:
10+
- vendor
11+
- $HOME/.composer/cache
1212
after_success: curl -L https://raw.githubusercontent.com/miya0001/travis2wpplugin/master/deploy.sh | bash
13-
1413
env:
1514
matrix:
16-
- WP_VERSION=latest WP_MULTISITE=0
17-
- WP_VERSION=nightly WP_MULTISITE=0
18-
15+
- WP_VERSION=latest WP_MULTISITE=0
1916
global:
20-
- SVN_REPO: https://plugins.svn.wordpress.org/semantic-linkbacks/
21-
- GH_REF: https://github.com/pfefferle/wordpress-semantic-linkbacks.git
22-
- secure: "4WcaCZP5VsKAYGvSZUR0vLIwzyU6qZ4VyAuMTZWJ9A/08MJtI81WJy355URU/HC5Jwt9qQ8ZyPOSpwo0XNaJsd/emqr5OsC3X1yaAn9lnfS+X8jdjRDsC5nWXGPb0KyX/hzVMtO2rxwo4k9WYdSEVz8m/iD0P8MIWOF5d1CS6ifBZ5HPiCh2s9okEdy4hnR78cEJXBgSR6jmxHSBKgzkR2otiuccy4ZoNk/050i5aRtLZFT4rgxAwqwzodUgOpq867V7hXw9MHfYRgwS1kRyZcst4YkVHPu8rXlhjKHLuVApHqyn5QYkqnBZuPA1ID+/7FEQn46F/EEiZXVO/RHe0Egq4gZdEHyqtjou4jjKhEgQAeEnlVPLI+8GmmYuls1YtXJsFMCGc8zlWMTlNIz+qjmJl1RxXM7fwC7OhXfvUqkFnT8KA+HeAeje1yOzIzyysXAqCFsfST81l/CtH4YyUwXHR1io+Qo9UErEWoW0UtJkoK7OxkF4Bb6UzJQ5qZSU6OYBIghjMHaiwyu4+27UL5JRZRDfoRmxqz4KqSfsDL/97qsm6/F8a6hqf5IIK2kDKSyedZGED6t1WDotstcB7bXlhYgLv5be+Uselc0etMypcYzAvfkebDLCqKp+b9BEKJ4mT+K0VneeU9IKBRovMUSo6AHbChJtVQFTl580ODE="
23-
17+
- WP_TRAVISCI=travis:phpunit
18+
- SVN_REPO: https://plugins.svn.wordpress.org/semantic-linkbacks/
19+
- GH_REF: https://github.com/pfefferle/wordpress-semantic-linkbacks.git
20+
- secure: "4WcaCZP5VsKAYGvSZUR0vLIwzyU6qZ4VyAuMTZWJ9A/08MJtI81WJy355URU/HC5Jwt9qQ8ZyPOSpwo0XNaJsd/emqr5OsC3X1yaAn9lnfS+X8jdjRDsC5nWXGPb0KyX/hzVMtO2rxwo4k9WYdSEVz8m/iD0P8MIWOF5d1CS6ifBZ5HPiCh2s9okEdy4hnR78cEJXBgSR6jmxHSBKgzkR2otiuccy4ZoNk/050i5aRtLZFT4rgxAwqwzodUgOpq867V7hXw9MHfYRgwS1kRyZcst4YkVHPu8rXlhjKHLuVApHqyn5QYkqnBZuPA1ID+/7FEQn46F/EEiZXVO/RHe0Egq4gZdEHyqtjou4jjKhEgQAeEnlVPLI+8GmmYuls1YtXJsFMCGc8zlWMTlNIz+qjmJl1RxXM7fwC7OhXfvUqkFnT8KA+HeAeje1yOzIzyysXAqCFsfST81l/CtH4YyUwXHR1io+Qo9UErEWoW0UtJkoK7OxkF4Bb6UzJQ5qZSU6OYBIghjMHaiwyu4+27UL5JRZRDfoRmxqz4KqSfsDL/97qsm6/F8a6hqf5IIK2kDKSyedZGED6t1WDotstcB7bXlhYgLv5be+Uselc0etMypcYzAvfkebDLCqKp+b9BEKJ4mT+K0VneeU9IKBRovMUSo6AHbChJtVQFTl580ODE="
2421
matrix:
2522
include:
26-
- php: 5.6
27-
env: WP_VERSION=latest WP_MULTISITE=0 WP_PULUGIN_DEPLOY=1
28-
23+
- php: 7.2
24+
- php: 7.1
25+
- php: 7.0
26+
- php: 5.6
27+
- php: 5.6
28+
env: WP_PULUGIN_DEPLOY=1
29+
- php: 5.5
30+
- php: 5.4
31+
# - php: 5.3
32+
# dist: precise
2933
before_script:
30-
- export PATH="$HOME/.composer/vendor/bin:$PATH"
34+
- |
35+
# Remove Xdebug for a huge performance increase:
36+
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
37+
phpenv config-rm xdebug.ini
38+
else
39+
echo "xdebug.ini does not exist"
40+
fi
41+
- |
42+
# Export Composer's global bin dir to PATH:
43+
composer config --list --global
44+
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
45+
- |
46+
# Install the specified version of PHPUnit depending on the PHP version:
47+
if [[ "$WP_TRAVISCI" == "travis:phpunit" ]]; then
48+
case "$TRAVIS_PHP_VERSION" in
49+
7.2|7.1|7.0|nightly)
50+
echo "Using PHPUnit 6.x"
51+
composer global require "phpunit/phpunit:^6"
52+
;;
53+
5.6|5.5|5.4|5.3)
54+
echo "Using PHPUnit 4.x"
55+
composer global require "phpunit/phpunit:^4"
56+
;;
57+
5.2)
58+
# Do nothing, use default PHPUnit 3.6.x
59+
echo "Using default PHPUnit, hopefully 3.6"
60+
;;
61+
*)
62+
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
63+
exit 1
64+
;;
65+
esac
66+
fi
67+
if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then
68+
composer install
69+
fi
70+
71+
- mysql --version
72+
- phpenv versions
73+
- php --version
74+
- php -m
75+
- which phpunit
76+
- phpunit --version
77+
- curl --version
78+
- grunt --version
79+
- git --version
80+
- svn --version
81+
- locale -a
82+
before_install:
83+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
84+
- |
85+
if [[ ! -z "$WP_VERSION" ]] ; then
86+
set -e
87+
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
88+
set +e
89+
fi
90+
script:
3191
- |
32-
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
33-
composer global require "phpunit/phpunit=5.7.*"
34-
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
35-
composer global require "phpunit/phpunit=4.8.*"
92+
if [[ ! -z "$WP_VERSION" ]] ; then
93+
# Run the build because otherwise there will be a bunch of warnings about
94+
# failed `stat` calls from `filemtime()`.
95+
echo Running with the following versions:
96+
php -v
97+
phpunit --version
98+
# Run PHPUnit tests
99+
phpunit || exit 1
100+
WP_MULTISITE=1 phpunit || exit 1
101+
fi
102+
- |
103+
if [[ "$WP_TRAVISCI" == "travis:phpcs" ]] ; then
104+
./vendor/bin/phpcs -p -s -v -n --standard=./phpcs.ruleset.xml --extensions=php
36105
fi
37-
- bash bin/install-wp-tests.sh wordpress root '' localhost $WP_VERSION
38-
39-
script: phpunit

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Tags:** webmention, pingback, trackback, linkback, microformats, comments, indieweb
55
**Requires at least:** 4.8.2
66
**Requires PHP:** 5.3
7-
**Tested up to:** 4.8.3
7+
**Tested up to:** 4.9
88
**Stable tag:** 3.6.0
99
**License:** MIT
1010
**License URI:** http://opensource.org/licenses/MIT
@@ -15,7 +15,7 @@ Richer Comments and Linkbacks for WordPress!
1515

1616
Generates richer WordPress comments from linkbacks such as [Webmention](https://wordpress.org/plugins/webmention) or classic linkback protocols like Trackback or Pingback.
1717

18-
The limited display for trackbacks and linkbacks is replaced by a clean full sentence, such as "Bob mentioned this article on bob.com." If Bob's site uses markup that the plugin can interpret, it may add his profile picture or other parts of his page to display as a full comment.
18+
The limited display for trackbacks and linkbacks is replaced by a clean full sentence, such as "Bob mentioned this article on bob.com." If Bob's site uses markup that the plugin can interpret, it may add his profile picture or other parts of his page to display as a full comment. It will optionally show collections of profile pictures, known as Facepiles, instead of the full setences.
1919

2020
Semantic Linkbacks uses [Microformats 2](http://microformats.org/wiki/microformats2) to get information about the linked post and it is highly extensible to also add support for other forms of markup.
2121

@@ -173,7 +173,7 @@ rather than rerequesting this information.
173173
## Thanks to ##
174174

175175
* Pelle Wessman ([@voxpelli](https://github.com/voxpelli)) for his awesome [WebMention test-pinger](https://github.com/voxpelli/node-webmention-testpinger)
176-
* Ryan Barrett ([@snarfed](https://github.com/snarfed)) for his feedback
176+
* Ryan Barrett ([@snarfed](https://github.com/snarfed)) for his feedback and pull requests
177177
* Barnaby Walters ([@barnabywalters](https://github.com/barnabywalters)) for his awesome [mf2 parser](https://github.com/indieweb/php-mf2)
178178
* David Shanske ([@dshanske](https://github.com/dshanske)) for his feedback and a lot of pull requests
179179
* ([@acegiak](https://github.com/acegiak)) for the initial plugin

0 commit comments

Comments
 (0)