Skip to content

Commit

Permalink
Merge pull request #11 from belgattitude/japha-3
Browse files Browse the repository at this point in the history
Support for soluble-japha 3.0.0
  • Loading branch information
belgattitude authored Apr 25, 2021
2 parents ff69696 + 13ea0c3 commit 819f66d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 32 deletions.
68 changes: 41 additions & 27 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -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


2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion src/PjbServer/Tools/StandaloneServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ public function testBasicUsage(): void

$jString = $ba->java('java.lang.String', 'hello');
self::assertEquals('hello', (string) $jString);
//die();
}
}

0 comments on commit 819f66d

Please sign in to comment.