mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
API Update composer requirements, Travis configuration, add phpcs/phpunit config and remove compass config
This commit is contained in:
parent
2e809de2ea
commit
e11cbc5cfc
41
.travis.yml
41
.travis.yml
@ -1,33 +1,32 @@
|
||||
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
|
||||
|
||||
sudo: false
|
||||
|
||||
language: php
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_ROOT_VERSION=4.0.x-dev
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.3
|
||||
env: DB=MYSQL CORE_RELEASE=3.4
|
||||
- php: 5.4
|
||||
env: DB=MYSQL CORE_RELEASE=3.5
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=3
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=3.5 SECUREASSETS=1
|
||||
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
|
||||
- php: 7.0
|
||||
env: DB=MYSQL PHPUNIT_TEST=1
|
||||
- php: 7.1
|
||||
env: DB=MYSQL CORE_RELEASE=3.6
|
||||
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
|
||||
|
||||
before_script:
|
||||
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
|
||||
- "if [ \"$SECUREASSETS\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
|
||||
- "if [ \"$SECUREASSETS\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/secureassets; fi"
|
||||
- cd ~/builds/ss
|
||||
# Init PHP
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini
|
||||
|
||||
# Install composer dependencies
|
||||
- composer install --prefer-dist
|
||||
- composer require --prefer-dist --no-update silverstripe/framework:4.0.x-dev silverstripe/cms:4.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/versioned:1.0.x-dev
|
||||
- composer update
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-clover coverage.clover userforms/tests
|
||||
- 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 code/ tests/; fi
|
||||
|
||||
after_success:
|
||||
- mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/
|
||||
- cd ~/build/$TRAVIS_REPO_SLUG
|
||||
- wget https://scrutinizer-ci.com/ocular.phar
|
||||
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
|
||||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
|
||||
|
@ -1,7 +1 @@
|
||||
<?php
|
||||
|
||||
if (!defined('USERFORMS_DIR')) {
|
||||
define('USERFORMS_DIR', basename(__DIR__));
|
||||
}
|
||||
|
||||
Deprecation::notification_version('3.0', 'userforms');
|
||||
|
12
config.rb
12
config.rb
@ -1,12 +0,0 @@
|
||||
require 'compass/import-once/activate'
|
||||
# Require any additional compass plugins here.
|
||||
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
sass_dir = "scss"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "javascript"
|
||||
|
||||
line_comments = false
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2016, SilverStripe Limited
|
||||
Copyright (c) 2017, SilverStripe Limited
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
21
phpcs.xml.dist
Normal file
21
phpcs.xml.dist
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="SilverStripe">
|
||||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
||||
|
||||
<!-- base rules are PSR-2 -->
|
||||
<rule ref="PSR2" >
|
||||
<!-- Current exclusions -->
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName" />
|
||||
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
|
||||
<exclude name="PSR2.Classes.PropertyDeclaration" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting -->
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" />
|
||||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
|
||||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
|
||||
<exclude name="Squiz.Scope.MethodScope" />
|
||||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
|
||||
<exclude name="Generic.Files.LineLength.TooLong" />
|
||||
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
|
||||
</rule>
|
||||
</ruleset>
|
13
phpunit.xml.dist
Normal file
13
phpunit.xml.dist
Normal 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">code/</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">tests/</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
@ -3,9 +3,9 @@
|
||||
UserForms enables CMS users to create dynamic forms via a drag and drop interface
|
||||
and without getting involved in any PHP code.
|
||||
|
||||
[](https://travis-ci.org/silverstripe/silverstripe-userforms)
|
||||
[](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms)
|
||||
[](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms)
|
||||
[](https://travis-ci.org/silverstripe/silverstripe-userforms)
|
||||
[](https://scrutinizer-ci.com/g/silverstripe/silverstripe-userforms/?branch=master)
|
||||
[](https://codecov.io/gh/silverstripe/silverstripe-userforms)
|
||||
[](https://packagist.org/packages/silverstripe/silverstripe-userforms)
|
||||
[](LICENSE.md)
|
||||

|
||||
|
Loading…
x
Reference in New Issue
Block a user