Update Travis configuration, add PSR-4 autoloader, update composer requirements for SS4

This commit is contained in:
Robbie Averill 2017-09-06 09:51:41 +12:00
parent 5ae95eda35
commit 0f61b1286d
6 changed files with 64 additions and 40 deletions

View File

@ -1,36 +1,34 @@
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
sudo: false
language: php language: php
dist: precise dist: trusty
php:
- 5.3
- 5.4
- 5.5
env: env:
- DB=MYSQL CORE_RELEASE=3.5 global:
- COMPOSER_ROOT_VERSION=4.0.x-dev
matrix: matrix:
include: include:
- php: 5.6 - php: 5.6
env: DB=MYSQL CORE_RELEASE=3 env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 5.6 - php: 7.0
env: DB=MYSQL CORE_RELEASE=3.1 env: DB=MYSQL PHPUNIT_TEST=1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.2
- php: 7.1 - php: 7.1
env: DB=MYSQL CORE_RELEASE=3.6 env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
before_script: before_script:
- composer self-update || true # Init PHP
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support - phpenv rehash
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss - phpenv config-rm xdebug.ini
- cd ~/builds/ss
- composer install # Install composer dependencies
- composer install --prefer-dist
- composer require --prefer-dist --no-update silverstripe/recipe-cms:1.0.x-dev
- composer update
script: script:
- vendor/bin/phpunit contentreview/tests - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml tests/php; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi
after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

1
codecov.yml Normal file
View File

@ -0,0 +1 @@
comment: false

View File

@ -20,16 +20,28 @@
} }
], ],
"require": { "require": {
"composer/installers": "*", "silverstripe/framework": "^4@dev",
"silverstripe/framework": "~3.1", "silverstripe/cms": "^4@dev",
"silverstripe/cms": "~3.1" "silverstripe/reports": "^4@dev"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
}, },
"suggest": { "suggest": {
"silverstripe/queuedjobs": "Automatically schedules content review emails to be sent, only requiring one crontask to be created" "symbiote/silverstripe-queuedjobs": "Automatically schedules content review emails to be sent, only requiring one crontask to be created"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.0.x-dev" "dev-master": "4.0.x-dev"
} }
} },
"autoload": {
"psr-4": {
"SilverStripe\\ContentReview\\": "src/",
"SilverStripe\\ContentReview\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true
} }

View File

@ -1,4 +1,4 @@
Copyright (c) 2016, SilverStripe Limited Copyright (c) 2017, SilverStripe Limited
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

13
phpunit.xml.dist Normal file
View File

@ -0,0 +1,13 @@
<phpunit bootstrap="cms/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>tests/</directory>
</testsuite>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

View File

@ -1,33 +1,33 @@
# Content Review module # Content Review module
[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-contentreview.svg?style=flat-square)](https://travis-ci.org/silverstripe/silverstripe-contentreview) [![Build status](https://travis-ci.org/silverstripe/silverstripe-contentreview.png?branch=master)](https://travis-ci.org/silverstripe/silverstripe-contentreview)
[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/silverstripe-contentreview.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-contentreview) [![Code quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-contentreview/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-contentreview/?branch=master)
[![Version](http://img.shields.io/packagist/v/silverstripe/contentreview.svg?style=flat-square)](https://packagist.org/packages/silverstripe/contentreview) [![Code coverage](https://codecov.io/gh/silverstripe/silverstripe-contentreview/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-contentreview)
[![License](http://img.shields.io/packagist/l/silverstripe/contentreview.svg?style=flat-square)](license.md) [![Version](http://img.shields.io/packagist/v/silverstripe/contentreview.svg)](https://packagist.org/packages/silverstripe/contentreview)
![helpfulrobot](https://helpfulrobot.io/silverstripe/contentreview/badge) [![License](http://img.shields.io/packagist/l/silverstripe/contentreview.svg)](license.md)
This module helps keep your website content accurate and up-to-date, which keeps your users happy. This module helps keep your website content accurate and up-to-date, which keeps your users happy.
It does so by sending reviewers reminder emails to go in and check the content. For a reviewer this It does so by sending reviewers reminder emails to go in and check the content. For a reviewer this
often includes checking links, grammar, factual information and look and feel. often includes checking links, grammar, factual information and look and feel.
There are two types of roles with this module. There are two types of roles with this module.
* Website owner; (typically assigned to the Administrator group) ensures that a website is accurate and up-to-date, by delegating responsibility to content reviewers. * Website owner; (typically assigned to the Administrator group) ensures that a website is accurate and up-to-date, by delegating responsibility to content reviewers.
* Content reviewer; responsible for keeping a website or part of a website accurate and up-to-date. * Content reviewer; responsible for keeping a website or part of a website accurate and up-to-date.
## Requirements ## Requirements
* SilverStripe ^3.1 * SilverStripe ^4.0
## Features ## Features
* Content reviewer will receive an email notification when a page is due for review. * Content reviewer will receive an email notification when a page is due for review.
* Content reviewer can mark a page as 'reviewed', and provide review notes. * Content reviewer can mark a page as 'reviewed', and provide review notes.
* Website owner can assign content reviewers to a page and set when the content should be reviewed. * Website owner can assign content reviewers to a page and set when the content should be reviewed.
* Website owner can see a report of pages and their reviewed status. * Website owner can see a report of pages and their reviewed status.
* Content reviewers can be assigned to a page, a page and all sub-pages, or globally. * Content reviewers can be assigned to a page, a page and all sub-pages, or globally.
* The content review schedule can be automatic, e.g. every month, and/or a specific date. * The content review schedule can be automatic, e.g. every month, and/or a specific date.
## Wishlist features ## Wishlist features