diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 80ba06a..8caed1a 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,29 +1,43 @@ -imports: - - php +checks: + php: + verify_property_names: true + verify_access_scope_valid: true + variable_existence: true + use_statement_alias_conflict: true + useless_calls: true + unused_variables: true + check_method_contracts: + verify_interface_like_constraints: true + verify_documented_constraints: true + verify_parent_constraints: true + parameters_in_camelcaps: true + no_long_variable_names: + maximum: '20' + no_goto: true + properties_in_camelcaps: true + overriding_parameter: true +build: + nodes: + analysis: + project_setup: + override: true + environment: + php: 8.0 + tests: + override: ['php-scrutinizer-run'] + filter: - paths: [src/*] - excluded_paths: [test/*, vendor/*, bin/*, doc/*] -before_commands: - - 'composer install --dev --prefer-source' + excluded_paths: + - "test/*" + - "doc/*" + # Everything in a root level "tests" directory will be excluded + dependency_paths: + - "vendor/" + # Everything in a root level "vendor" directory will be excluded from analysis + # but treated as a dependency + tools: - external_code_coverage: - timeout: 400 - php_cpd: - excluded_dirs: [vendor, test, bin, doc] - php_pdepend: - excluded_dirs: [vendor, test, bin, doc] - #php_code_sniffer: true - php_pdepend: - enabled: true - configuration_file: null - suffixes: - - php - excluded_dirs: { } - php_loc: - excluded_dirs: [vendor, test, bin, doc] - php_cs_fixer: - config: - level: psr2 - php_analyzer: true - php_hhvm: true - php_mess_detector: true + external_code_coverage: + timeout: 180 + + diff --git a/.travis.yml b/.travis.yml index 3ece874..4ae2297 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ env: before_script: - sudo apt-get install --yes ant - composer self-update - - composer install --ignore-platform-reqs + - composer install - mkdir -p test/logs script: diff --git a/CHANGELOG.md b/CHANGELOG.md index dd773ae..3a763dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 4.1.0 (2021-04-25) + +- Fix: for some slow CI, ensure the port is ready when starting +- Add support for soluble-japha ^3.0 + + ## 4.0.0 (2021-04-19) - Support for php 8.0 and php 7.4 diff --git a/composer.json b/composer.json index 8c6994e..7a7c759 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ } }, "require": { - "php": "7.4 || ^8.0", + "php": "^7.4 || ^8.0", "psr/log": "^1.0", "symfony/console": "^4.0 || ^5.0" }, @@ -38,7 +38,7 @@ "phpstan/phpstan-phpunit": "^0.12.18", "phpstan/phpstan-strict-rules": "^0.12.9", "composer/composer": "^2.0.12", - "soluble/japha": "^2.5.0", + "soluble/japha": "^2.5.0 || ^3.0.0", "captainhook/captainhook": "^5.7.0", "captainhook/plugin-composer": "^5.2.4" }, diff --git a/src/PjbServer/Tools/StandaloneServer.php b/src/PjbServer/Tools/StandaloneServer.php index 01f3a52..6497c10 100644 --- a/src/PjbServer/Tools/StandaloneServer.php +++ b/src/PjbServer/Tools/StandaloneServer.php @@ -148,7 +148,8 @@ public function start(int $timeout_ms = 3000): void } $log_file_content = file_get_contents($log_file); - if (preg_match('/JavaBridgeRunner started on/', $log_file_content)) { + if (preg_match('/JavaBridgeRunner started on/', $log_file_content) + && !$this->portTester->isAvailable('localhost', $port, 'http', 1)) { $started = true; } ++$iterations; diff --git a/test/src/PjbServerTest/Functionnal/BridgeConnectionTest.php b/test/src/PjbServerTest/Functionnal/BridgeConnectionTest.php index 43258fa..ab39493 100644 --- a/test/src/PjbServerTest/Functionnal/BridgeConnectionTest.php +++ b/test/src/PjbServerTest/Functionnal/BridgeConnectionTest.php @@ -40,6 +40,5 @@ public function testBasicUsage(): void $jString = $ba->java('java.lang.String', 'hello'); self::assertEquals('hello', (string) $jString); - //die(); } }