File tree Expand file tree Collapse file tree 8 files changed +307
-115
lines changed Expand file tree Collapse file tree 8 files changed +307
-115
lines changed Original file line number Diff line number Diff line change
1
+ language : php
2
+
3
+ env :
4
+ global :
5
+ - COMPOSER_ROOT_VERSION=4.0.x-dev
6
+ - CODECOV_TOKEN=
7
+ - SCRUT_TOKEN=
8
+
9
+ matrix :
10
+ include :
11
+ - php : 7.1
12
+ env : DB=MYSQL PHPUNIT_TEST=1
13
+ - php : 7.2
14
+ env : DB=MYSQL PHPUNIT_COVERAGE_TEST=1
15
+ - php : 7.3
16
+ env : DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
17
+
18
+ before_script :
19
+ # Init PHP
20
+ - phpenv rehash
21
+ - phpenv config-rm xdebug.ini
22
+ - echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
23
+
24
+ # Install composer dependencies
25
+ - composer require --prefer-dist --no-update silverstripe-themes/simple:~3.2
26
+ - composer update --no-suggest --prefer-dist
27
+
28
+ script :
29
+ - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
30
+ - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml && wget https://scrutinizer-ci.com/ocular.phar; fi
31
+ - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi
32
+
33
+ after_success :
34
+ - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -t $CODECOV_TOKEN && travis_retry php ocular.phar code-coverage:upload --format=php-clover --access-token=$SCRUT_TOKEN coverage.xml; fi
Original file line number Diff line number Diff line change 1
1
# SilverStripe GridField Groupable
2
+ [ ![ Build Status] ( https://travis-ci.org/micschk/silverstripe-groupable-gridfield.svg?branch=master )] ( https://travis-ci.org/micschk/silverstripe-groupable-gridfield )
3
+ [ ![ codecov.io] ( https://codecov.io/github/micschk/silverstripe-groupable-gridfield/coverage.svg?branch=master )] ( https://codecov.io/github/micschk/silverstripe-groupable-gridfield?branch=master )
2
4
3
5
This module allows drag & drop grouping of items in a GridField.
4
6
It bolts on top of- and depends on GridFieldOrderableRows for the drag & drop sorting functionality
@@ -17,7 +19,7 @@ Example application (Block Enhancements module): assign content blocks to block-
17
19
18
20
### Requirements (all pulled in by composer)
19
21
20
- * SilverStripe CMS ~ 3.1
22
+ * SilverStripe Framework ~ 4.0
21
23
* SilverStripe GridFieldExtensions
22
24
23
25
## Usage:
Original file line number Diff line number Diff line change 1
1
<?php
2
-
3
- if (!defined ('GROUPABLE_DIR ' )) {
4
- define ('GROUPABLE_DIR ' , rtrim (basename (dirname (__FILE__ ))));
5
- }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " micschk/silverstripe-groupable-gridfield" ,
3
3
"description" : " This module allows drag & drop grouping of items in a GridField" ,
4
- "type" : " silverstripe-module " ,
4
+ "type" : " silverstripe-vendormodule " ,
5
5
"keywords" : [
6
6
" silverstripe" ,
7
7
" gridfield" ,
16
16
],
17
17
"license" : " MIT" ,
18
18
"require" : {
19
- "symbiote/silverstripe-gridfieldextensions" : " ^2.1"
19
+ "silverstripe/vendor-plugin" : " ^1.0" ,
20
+ "symbiote/silverstripe-gridfieldextensions" : " ^3"
21
+ },
22
+ "require-dev" : {
23
+ "phpunit/phpunit" : " ^5.7" ,
24
+ "squizlabs/php_codesniffer" : " *"
20
25
},
21
26
"suggest" : {
22
27
"micschk/silverstripe-block_enhancements" : " Enhancements to the Silverstripe Blocks module"
23
28
},
29
+ "autoload" : {
30
+ "psr-4" : {
31
+ "micschk\\ GroupableGridfield\\ " : " src/" ,
32
+ "micschk\\ GroupableGridfield\\ Test\\ " : " tests/"
33
+ }
34
+ },
35
+ "minimum-stability" : " dev" ,
36
+ "prefer-stable" : true ,
24
37
"extra" : {
25
- "installer-name" : " gridfield_groupable"
38
+ "expose" : [
39
+ " css" ,
40
+ " js"
41
+ ],
42
+ "branch-alias" : {
43
+ "dev-master" : " 2.0.x-dev"
44
+ }
26
45
}
27
46
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <ruleset name =" SS4" >
3
+ <description >Coding standard for SilverStripe 4.x</description >
4
+
5
+ <!-- Don't sniff third party libraries -->
6
+ <exclude-pattern >*/vendor/*</exclude-pattern >
7
+ <exclude-pattern >*/thirdparty/*</exclude-pattern >
8
+
9
+ <!-- Show progress and output sniff names on violation, and add colours -->
10
+ <arg value =" sp" />
11
+ <arg name =" colors" />
12
+
13
+ <!-- Use PSR-2 as a base standard -->
14
+ <rule ref =" PSR2" >
15
+ <!-- Allow classes to not declare a namespace -->
16
+ <exclude name =" PSR1.Classes.ClassDeclaration.MissingNamespace" />
17
+
18
+ <!-- Allow underscores in class names -->
19
+ <exclude name =" Squiz.Classes.ValidClassName.NotCamelCaps" />
20
+
21
+ <!-- Allow non camel cased method names -->
22
+ <exclude name =" PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
23
+ </rule >
24
+ </ruleset >
Original file line number Diff line number Diff line change
1
+ <phpunit bootstrap =" vendor/silverstripe/cms/tests/bootstrap.php" colors =" true" >
2
+ <testsuite name =" groupalble-gridfield" >
3
+ <directory >tests</directory >
4
+ </testsuite >
5
+
6
+ <filter >
7
+ <whitelist addUncoveredFilesFromWhitelist =" true" >
8
+ <directory suffix =" .php" >src/</directory >
9
+ <exclude >
10
+ <directory suffix =" .php" >tests/</directory >
11
+ </exclude >
12
+ </whitelist >
13
+ </filter >
14
+ </phpunit >
You can’t perform that action at this time.
0 commit comments