Skip to content

Commit 2d506c8

Browse files
committed
gitlab-ci environment setup is outsourced to common script
1 parent f53554e commit 2d506c8

File tree

6 files changed

+8
-46
lines changed

6 files changed

+8
-46
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
before_script:
2-
- bash ci/docker_install.sh
2+
- bash <(curl -s https://assets.icircle.xyz/gitlab-ci/v0.1.1/docker_install.sh)
33

44
test_5.4:
55
image : phpplatform/php-apache-xdebug-composer:5.4

ci/docker_install.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

ci/php-ci.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

ci/phpunit.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<phpunit colors="true" bootstrap="tests/autoload.php" >
44
<php>
55
<const name="APP_DOMAIN" value="http://localhost"/>
6-
<const name="APP_PATH" value="php-platform/restful"/>
6+
<const name="APP_PATH" value="restful"/>
77
<const name="APP_COVERAGE" value="true"/>
88
</php>
99
<testsuites>

src/RESTFul/Routing/Build.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ private static function writeConfig(){
5252
$config["routes"] = self::$routes;
5353
$configJson = json_encode($config,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
5454
file_put_contents($configFilePath, $configJson);
55-
SettingsCache::getInstance()->reset();
55+
self::refreshCache();
5656
}
5757
}
58+
59+
private static function refreshCache(){
60+
$settingsCache = SettingsCache::getInstance();
61+
$settingsCache->setData(["php-platform"=>["restful"=>["routes"=>self::$routes]]]);
62+
}
5863

5964
private static function processPSR4Dir($namespace,$path){
6065
foreach (self::$excludedNamespaces as $excludedNameSpace){

0 commit comments

Comments
 (0)