NEW Convert to vendor module, add table_name to test stubs and add PHP 7.2 to travis

This commit is contained in:
Robbie Averill 2017-12-12 17:03:04 +13:00
parent 8919f6da2a
commit c6f8973342
6 changed files with 15 additions and 9 deletions

1
.gitattributes vendored
View File

@ -4,3 +4,4 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore
/codecov.yml export-ignore

View File

@ -9,6 +9,8 @@ matrix:
env: DB=PGSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
- php: 7.2
env: DB=MYSQL PHPUNIT_TEST=1
before_script:
- phpenv rehash
@ -21,7 +23,7 @@ before_script:
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src/ tests/ ; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi
after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

View File

@ -1,14 +1,14 @@
{
"name": "silverstripe/comments",
"description": "This module provides commenting functionality for Pages and other DataObjects on your SilverStripe site.",
"type": "silverstripe-module",
"type": "silverstripe-vendormodule",
"keywords": ["silverstripe", "comments"],
"authors": [{
"name": "Will Rossiter",
"email": "will@fullscreen.io"
}],
"require": {
"silverstripe/framework": "^4.0@dev",
"silverstripe/framework": "^4.0",
"colymba/gridfield-bulk-editing-tools": "^3.0"
},
"suggest": {
@ -22,7 +22,11 @@
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"expose": [
"css",
"javascript"
]
},
"scripts": {
"lint": "vendor/bin/phpcs src/ tests/",

View File

@ -2,7 +2,6 @@
namespace SilverStripe\Comments\Tests\Stubs;
use SilverStripe\Comments\Tests\Stubs\CommentableItem;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;

View File

@ -2,8 +2,6 @@
namespace SilverStripe\Comments\Tests\Stubs;
use SilverStripe\Comments\Tests\Stubs\CommentableItem;
class CommentableItemDisabled extends CommentableItem
{
private static $defaults = array(
@ -11,4 +9,6 @@ class CommentableItemDisabled extends CommentableItem
'ModerationRequired' => 'None',
'CommentsRequireLogin' => false
);
private static $table_name = 'CommentableItemDisabled';
}

View File

@ -2,8 +2,6 @@
namespace SilverStripe\Comments\Tests\Stubs;
use SilverStripe\Comments\Tests\Stubs\CommentableItem;
class CommentableItemEnabled extends CommentableItem
{
private static $defaults = array(
@ -11,4 +9,6 @@ class CommentableItemEnabled extends CommentableItem
'ModerationRequired' => 'Required',
'CommentsRequireLogin' => true
);
private static $table_name = 'CommentableItemEnabled';
}