Skip to content

Commit

Permalink
Prep 2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Sep 2, 2017
1 parent 466bafc commit 08c92c5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.x.x (unreleased)

## 2.2.4 (2017-09-02)

### Improved

- Catch `Throwable` instead of `Exception` in driver and client.
- Dev updated to PHPUnit 6+
- Dev removed pjbserver-tools from require-dev
- Doc update: recipe for jasper reports
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"require-dev" : {
"phpunit/phpunit": "^6.2",
"friendsofphp/php-cs-fixer": "^2.5.0",
"monolog/monolog": "^1.21.0",
"phpstan/phpstan": "^0.8.3"
"monolog/monolog": "^1.23.0",
"phpstan/phpstan": "^0.8.4"
},
"scripts": {
"check": [
Expand Down
2 changes: 1 addition & 1 deletion src/Soluble/Japha/Bridge/Driver/Pjb62/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ public function apply(ApplyArg $arg): void
$this->protocol->resultBegin();
$this->protocol->writeException($e->__java, $trace);
$this->protocol->resultEnd();
} catch (\Exception $ex) {
} catch (\Throwable $ex) {
$msg = 'Unchecked exception detected in callback (' . $ex->__toString() . ')';
$this->logger->error("[soluble-japha] $msg (" . __METHOD__ . ')');
trigger_error($msg, E_USER_WARNING);
Expand Down
8 changes: 3 additions & 5 deletions src/Soluble/Japha/Bridge/Driver/Pjb62/PjbProxyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ public static function getInstance(?array $options = null, ?LoggerInterface $log
*/
public static function isInitialized(): bool
{
$init = self::$instance !== null;

return (bool) $init;
return self::$instance !== null;
}

/**
Expand Down Expand Up @@ -508,7 +506,7 @@ public static function unregisterInstance(): void
try {
self::$client->sendBuffer .= self::$client->protocol->getKeepAlive();
self::$client->protocol->flush();
} catch (\Exception $e) {
} catch (\Throwable $e) {
}

// TODO MUST TEST, IT WAS REMOVED FROM FUNCTION
Expand All @@ -519,7 +517,7 @@ public static function unregisterInstance(): void
!preg_match('/EmptyChannel/', get_class(self::getClient()->protocol->handler->channel))) {
try {
self::$client->protocol->keepAlive();
} catch (\Exception $e) {
} catch (\Throwable $e) {
// silently discard exceptions when unregistering
}
}
Expand Down
7 changes: 4 additions & 3 deletions test/bench/simple_benchmarks.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
try {
$ba = new BridgeAdapter([
'driver' => 'Pjb62',
// 'servlet_address' => 'localhost:8090/servlet.phpjavabridge',
'servlet_address' => 'localhost:8080/JavaBridgeTemplate/servlet.phpjavabridge',
// 'servlet_address' => 'localhost:8080/JavaBridgeSpringboot/servlet.phpjavabridge',
//'servlet_address' => 'localhost:8090/servlet.phpjavabridge',
//'servlet_address' => 'localhost:8080/JavaBridgeTemplate/servlet.phpjavabridge',
'servlet_address' => 'localhost:8080/JasperReports/servlet.phpjavabridge',
//'servlet_address' => 'localhost:8080/JavaBridgeSpringboot/servlet.phpjavabridge',
'force_simple_xml_parser' => false,
'java_prefer_values' => true // the default and recommended way (possible to put at false for tests)
]);
Expand Down

0 comments on commit 08c92c5

Please sign in to comment.