All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- PHP 8.0 support in #60
- Dropped support for PHP versions below 7.4 in #60
- TimeZoneUtils: propertly casting timezone ids into string in #60
- [Q&A] update phpunit, phpstan and cs-fixer, in #60
- ArrayProxy, do not implement \ArrayAccess anymore, in #58
- [Q&A] update phpstan and cs-fixer, in #58
- Drop support for PHP7.1
- Doc improvements
- QA, CI fixes
- PHP 7.4 support
- Few phpdoc added
- Testing re-enabled with pjbserver-tools
- phpstan ^0.12
- Detection of broken socket connection during operation.
- Minor typehints
- Deps and q&a tools update (phpstan 0.11...)
- License year
- Cast port to integer in Protocol.php (minor)
- Tests for PHP 7.3, Q&A travis.
- Fix: Fix exception message for
SimpleHttpTunnelHandler
errors.error_get_last()
is now serialized. - Minor fix: interface
JavaExceptionInterface
now extends\Throwable
- Minor fix: possible type error in exception message in
Util\TimeZone
- Minor fix: use offsetExists instead of array_key_exists in
PjbProxyClient::getOption(string $name)
- Minor fix: use of
call_user_func
instead ofcall_user_func_array
inClient
.
- Q&A tools update: phpstan....
- Documenting
java_log_level
for debugging tomcat side..
- Minor: Fix a possible fwrite warning in SocketChannel (handled by an exception anyway).
- Added
use_persistent_connection
in adapter connection. By default tofalse
but can be enabled if connection times are problematic (not recommended if using basic auth).
- Updated to phpstan 0.9
- Some phpdocs fixes after introduction of phpstan 0.9 (intersections)
- Refactored some internal methods visibility (protected/private)
- Added mutation testing with infection/infection
- Regression with
https
connection introduced in 2.4.0
-
Added support for basic authentication in connection servlet_address.
<?php $ba = new BridgeAdapter([ 'servlet_address' => 'http://user:pass@localhost:8080/MyJavaBridge/servlet.phpjavabridge' ]);
-
Added
AuthenticationException
(ConnectionException). -
Logger now logs java exceptions (NoSuchProcedureException,... at error level).
- Notice and warnings when a BrokenConnection is encountered.
- More typehints in internal PJB62 driver.
- Catch
Throwable
instead ofException
in driver and client. - Dev updated to PHPUnit 6+
- Dev removed pjbserver-tools from require-dev
- Doc update: recipe for jasper reports
- Now
Adapter
defaults topjb62
driver. - Unit tests, preliminary work to update to phpunit 6+
- Unit tests, incorrect call
java.time.format.FormatStyle
fixed.
- Prevent loop when un-registering client after an error. Not a major issue, but help when unit testing.
- Support for PHP7.2 (tested against PHP7.2-beta2)
- More type checking for PHP7.1
- Internal socket api improvements.
- Upgraded to phpstan 0.8.2, with max level analysis
- Removed a
trigger_error
when using a php object as Java argument (aJavaException
is still thrown). - Missing
break
for$arg->setVoidSignature()
in Pjb62Client.php
.
- Some more polishing for types (PHP 7.1)
- Minor optimization, using
empty
instead ofcount
.
- Possibility to force usage of the php xml parser instead of the native dom xml, see #48
This release requires PHP7.1 !!!
While major version have been incremented, the api between v1.4.0
and 2.0.0
has remained the same.
In other words no breaking changes should happen (BC preserved).
- Support for PHP7.1 only
declare(strict_types=1)
.
- Minor bugfix with integer cookie encoding due to strict_types
- Fix call to
PjbProxyClient::getInstance()->destroy()
in favour ofPjbProxyClient::unregisterIntance()
.
- Ensure BrokenConnectionException if socket write/read fails (communication interrupted)
- Minor fix and cleanup in
SimpleHttpHandler
channel creation.
- Parser tests added for invalid xml errors
- Temporarily remove phpstan from require-dev. It will be re-added in 2.0 due
to possible issues with plaform requirements.
If you want to install, add to your require-dev:
"phpstan/phpstan": "^0.7.0"
- More typehints fixed or added
- Unit tests autoloading is now fixed.
- Fixed some invalid typehints thanks to phpstan !!!
- New composer scripts for checking source code.
- Created
Soluble\Japha\Bridge\Exception\BrokenConnectionException
to mask internal pjb62 drive BrokenConnectionException. Documented in DriverInterface as well.
- Minor issue with
$ba->isInstanceOf($object, $class)
when second argclass
is not a string neither anInterface\JavaObject
. The exceptionException\InvalidArgumentException
is now thrown (was masked before).
-
PHPDoc, improved documentation on Exception in DriveInterface and AbstractDriver.
-
PHPDoc, magic methods
__call()
,__get()
and__set()
nows inform about possible exception. Thanks @marcospassos for persisting on this.
Interfaces\JavaObject
exposes magic methods__call()
,__get()
and__set()
to better reflect that method calls and property accesses will be delegated to the remote Java object.
- Possible bc-break in undocumented feature. The
DB\DriverManager::getJdbcDSN()
has changed its signature and starts now with the driver name. An$options
array allows to pass extra options.
- Serialization with
__sleep()
and__wakeup()
has preliminary test support
This release has been tested with the latest official phpjavabridge 7.1.3.
- Pjb62\Driver added method
setExitCode(int $code)
from 7.1.3 upstream merge, requires PHP 7.1.3+ to be interpreted on the bridge side.
-
Interfaces\JavaObject
now implementsArrayAccess
the following code is possible without calling java methods:$hashMap = $ba->java('java.util.HashMap'); $hashMap['key'] = 'cool'; if (isset($hashMap['key']) { echo $hashMap['key']; unset $hashMap['key']; }
-
Added convenience exception:
NoSuchFieldException
- Possible bc-break in undocumented
Adapter
option:java_default_timezone
. It won't fall back to php default timezone if null. This feature is subject to caution. - Removed last
func_get_args
uses, replaced by PHP5.6 variadic notation inAbstractJava
andJavaException
. Interfaces\JavaObject
now implementsIteratorAggregate
, this behaviour was already working but not statically stated.
- Setting the default java timezone with
TimeZone.setDefault()
should be avoided as its value is global on the JVM.
- Improved messages on socket errors (errno and errstr)
- Added 'protected' members on relevant methods and attributes. (WIP)
- Improved PHPDoc comments with types (WIP)
- Added additional checks for errors in Client.php.
- Unit tests: Fixed minor issue with mariadb connector in JDBC tests (serverTimezone)
- Unit tests for inner classes and enumset.
- Removed Client::createParserString and moved the code into SimpleParser (only used by HHVM).
If you rely by mistake on this method, it can be replaced by
new ParserString()
, not considered as a bc-break because this method is only used by hhmv xml parser and was not documented.
- Added documentation for inner class support.
- Added recipes for gson, json-io serialization.
- Minor fix, wrong message referring to legacy
java_inspect
andjava_values
.
- New driver methods:
setFileEncoding()
andgetConnectionOptions()
currently internal use only. - Support for php-java-bridge 7.0.0.
- Possibility to call servlet methods from the driver
$ba->getDriver()->invoke(null, 'myMethod', [$params])
.
- Set utf-8 by default for html_special_chars (no need to set in php.ini)
- Replaces array_push($arr, $val) by $arr[] = $val for little perf improvement in Driver
- Removed devDependency on devster/ubench for simple benchmarks.
- Minor: JavaClass::getName() now return string instead og JavaObject(java.lang.String).
- Minor bugfixes with java_lifetime and java_truncate thanks to phpstan.
- Improving exception through JavaExceptionInterface, see #35
- Added
Adapter::values()
method, see #34
- Minor bug in JDBC unit tests when mysql-connector is >= 6.0
- Huge documentation update
DriverInterface::values()
method added.- Doc: considerations and best practices
- More JDBC tests some optimizations examples with
DriverInterface::values()
DriverInterface::values()
method added.- Doc: considerations and best practices
- More JDBC tests some optimizations examples with
DriverInterface::values()
- Documentation for context/sessions/...
- Compatibility with soluble php-java-bridge 6.2.11-rc-1
- Credits updated for the refactored Pjb62 client driver
- Minor improvement for timezone interop (code cleanup).
- Unit tests handles phpjavabridge 6.2.11-dev.
- Better detection of broken connections
BrokenConnectionException
- Improved tests suite for tomcat
-
From version 0.14+, minimum supported version is php 5.6. Support for PHP 5.5 has been dropped, due to usage of variadic functions. The API is still the same, and if you require PHP5.5 support, please install the v0.13.0 instead.
A branch have been saved for pre-5.6 support. It can be used to provide 0.13.x patches for php5.5.
- Better logging support and error reporting see #22.
- Support for variadic notation see #16.
- A lot a minor fixes (types, phpdoc...)
- Renamed
$driver->getJavaContext()
into$driver->getContext()
.
- Support for
$adapter->getDriver()->getContext()
. - Support for
$adapter->getDriver()->getJavaSession()
.
- Support for
getClassName()
in Adapter, Close #30 - Support for
invoke()
method in Driver. Close 28 - Support for
getClassName()
andinspect()
methods in DriverInterface. Close #29 - Added
JavaException::getJavaClassName()
method to improve exception handling. Close 31 - Support for
getJavaContext()
in Driver
- Update pjbserver-tools devDependencies to ^2.1.0
- [Unit tests] JDBC tests are now disabled by default in
phpunit.xml.dist
. - [Unit tests] Improved test suite, larger tests files have been splitted.
- Minor documentation changes.
- Nothing.
- Nothing.
- #24 fix an old issue preventing 'array' cookies to be correctly forwarded to java bridge. Thanks Diego Sainz for the fix.
- Intial support for PSR-3 logger interface
- Support for pjbserver-tools updated to ^2.0.4.
- Minor fixes in documentation
- Improved documentation
- Remove server autostart (obsolete code)
- Added
\Soluble\Japha\Bridge\Exception\ConnectionException
- Dropped support for PHP5.5 (should
- Support for pjbserver-tools updated to ^2.0.3.
- Updated documentation
- Support for pjbserver-tools updated to ^2.0.0.
- Support for pjbserver-tools updated to ^1.1.0.
- [Bug] Fix issue #17, constructor overloading
- [Cleanup] Removed obsolete connection error message
- [Cleanup] Cleanup some minor issues
- [BC-Break] Split legacy pjb62 compatibility layer in a separate repo If you still require the legacy compatibility mode you need to add the 'soluble\japha-pjb62-compat' to your composer deps
- [Enhancement] Removed all global constants
- [Enhancement] Fixed some scrutinizer issues
- [Enhancement] Removed obsolete autoloader code
- Drop PHP 5.3 support (use < 0.10.0 if 5.3 is required)