silverstripe-restfulserver/.travis.yml
Sander Hagenaars 0b734c21c6 NEW Aliases can now be defined for DataObject endpoints (#80)
* set endpoint_aliases on RestfulServer to specify fixed aliases for exposed dataobjects

* removed wrong use statements from older project

* better docblock

* use correct obj ClassName in RestfulServer::updateDataObject

* added findClassNameEndpoint method, replaced getEndpointAlias()

* getDataFormatter() - find correct endpoint instead of request param ClassName

* Better docblock

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>

* Better docblock

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>

* Return type hint in findClassNameEndpoint method

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>

* renamed endpoint method to resolveEndpoint

* unsanitiseClassName in resolveEndpoint method

* renamed resolveEndpoint to resolveClassName. Take $request as param instead of string

* better docbloc

* Remove unneccesary unsanitiseClassName call

Co-Authored-By: Guy Marriott <guy@scopey.co.nz>

* changed docblocks to satisfy codesniffer

* Drop PHP 5.6 and 7.0 from travis


Co-authored-by: Guy Marriott <guy@scopey.co.nz>
2019-07-15 10:03:51 +12:00

40 lines
1.2 KiB
YAML

language: php
dist: trusty
env:
global:
- COMPOSER_ROOT_VERSION=2.0.x-dev
matrix:
include:
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
- php: 7.2
env: DB=PGSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_COVERAGE_TEST=1
- php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
- php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.x-dev
before_script:
# Init PHP
- phpenv rehash
- phpenv config-rm xdebug.ini
# Install composer dependencies
- composer validate
- composer require --no-update silverstripe/recipe-core:"$RECIPE_VERSION"
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql 2.1.x-dev; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
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 src/ tests/ *.php; fi
after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi