mirror of
https://github.com/silverstripe/silverstripe-restfulserver
synced 2024-10-22 14:05:58 +02:00
BUG Restoring PHP5.6 support
This commit is contained in:
parent
b3acde80f6
commit
ac0b263683
@ -8,6 +8,8 @@ env:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- php: 5.6
|
||||||
|
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_TEST=1
|
||||||
- php: 7.1
|
- php: 7.1
|
||||||
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
|
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
|
||||||
- php: 7.1
|
- php: 7.1
|
||||||
@ -17,7 +19,7 @@ matrix:
|
|||||||
- php: 7.2
|
- php: 7.2
|
||||||
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
|
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
|
||||||
- php: 7.3
|
- php: 7.3
|
||||||
env: DB=MYSQL RECIPE_VERSION=4.x-dev
|
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# Init PHP
|
# Init PHP
|
||||||
|
@ -905,11 +905,11 @@ class RestfulServer extends Controller
|
|||||||
* @param HTTPRequest $request
|
* @param HTTPRequest $request
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function resolveClassName(HTTPRequest $request): string
|
protected function resolveClassName(HTTPRequest $request)
|
||||||
{
|
{
|
||||||
$className = $request->param('ClassName');
|
$className = $request->param('ClassName');
|
||||||
$aliases = self::config()->get('endpoint_aliases');
|
$aliases = self::config()->get('endpoint_aliases');
|
||||||
|
|
||||||
return $aliases[$className] ?? $this->unsanitiseClassName($className);
|
return empty($aliases[$className]) ? $this->unsanitiseClassName($className) : $aliases[$className];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user