Can nulab/scala-oauth2-provider library on github be used with play! 2.0.4 framework - scala

I am trying to use a library for implementing a OAuth2 server in play! 2.0.4 framework using this repo https://github.com/nulab/scala-oauth2-provider
I want to know if there is any way that I can use this library with play-2.0.4 by changing play version or sbt version. I do not want to break compile time or run time dependencies.
From what I have figured out. I think its not possible because the DataHandler trait in the library expects scala.concurrent.Future return type for some methods which were introduced with a later version of scala than the one play! 2.0.4 runs on.

Nope, this is not possible. Play 2.0.4 isn't built for Scala 2.10 or later, and scala-oauth2-provider requires Scala 2.10 or later. Even if you could get Play 2.0.x compiled on Scala 2.10.x, you'd probably still run into some API compatibility problems, as that library is geared towards Play 2.2.x and 2.3.x. Between Play 2.0.x and 2.2.x, there have been many breaking API changes you'd have to reconcile.
There hasn't been support for Play 2.0.x for almost two years now. It may be the time to upgrade. Migration breaks things, yes, but in the long run you're better off staying up-to-date.

Related

Is there a Scala ES SDK that will let me run the ES Client on my own maintained instances and connect to AWS ES as well?

I'm trying to use a Scala Client/SDK that will help me access ES endpoints/libraries both when maintaining my own instances and when maintained by AWS. I found a bunch of them online but they all conflict with the current sbt versions that I use for my project.
Some of the SDKs that I already tried are:
https://elastic4s.readthedocs.io/en/latest/src/main/tut/docs/
Issue: Elastic4s needed a higher version of Jackson whereas my application needs a lower version of Jackson to access Finatra.
https://github.com/SumoLogic/elasticsearch-client
Issue: Works with Scala 2.11 and my application runs on Scala 2.12
https://index.scala-lang.org/bizreach/elastic-scala-httpclient/elastic-scala-httpclient/
Issue: The version of ES used here is pretty outdated. It uses ES 5.2.x. I'm looking at a more recent version of ES, something like ES 6.3 because AWS ES supports upto ES 6.3 for now.
https://github.com/seratch/AWScala
Issue: This library is a Scala Client SDK for AWS ES but not for a self-maintained instance of ES.
The versions that I use are:
Scala - 2.12
Finatra - 18.6.0
Jackson - 2.8.4 because Finatra requires this instead of 2.9.4

Is latest version of jar support older version jar

Is httpclient-4.5.2.jar backward compatible with httpclient-4.3.6.jar?
Same question also for httpcore-4.4.4.jar with httpcore-4.3.3.jar?
I have to use a newer version for supporting some functionality. but is there any impact of my older code?
Is those jar version controlling working conventional way for backward compatibility support like java JDK?
Short answer no. For minor upgrades (4.3.3 to 4.3.4) things usually work, but when you go from 4.3 to 4.5 you can expect changes. See release notes for hints about what you can expect.
Having said that, if you can compile without errors you are usually safe!

It is possible to run recent version of ScalaPB (0.6.x) with protobuf 2.5.0?

did anyone try it? I need to generate scala classes for protobuf 2.5.0
Seems like ScalaPB supports protobuf 3.x and not 2.5.0
So... Nadav Samet answered to me in google group. it's impossible.
Quoting his answer:
The problem is that the different versions of protobuf-java are not
binary compatible. So if it would work with 2.5.0 it wouldn't work
with 3.4.0. If the reason you need protobuf 2.5.x support is because
there's some other library that is stuck on that version, consider
asking them to move forward, or use a shaded version of protobuf-java
so the versions won't conflict.

Where can I download the latest beta of PlayFramework 2.6 so that I can use it with Scala 2.12?

Where can I download the latest beta of PlayFramework 2.6 so that I can use it with Scala 2.12? Is one available? All the links from documentation, e.g. https://www.playframework.com/documentation/2.6.x/Highlights26 seem to lead to dead-ends when I actually try to download. If it is not available, should the documentation not at least state that? Why no branches or tags corresponding to 2.6 in Github? Why is there a migration guide for 2.6 if it cant' yet be downloaded?
You can try building the framework from source.
The github master branch should contain the latest developments.
https://www.playframework.com/documentation/2.5.x/BuildingFromSource
Be careful though, it may be unusable.

Which version of PHPUnit for zf-1 and zf-2 applications

I am using zf-1.12 with phpunit 4.0 and dbunit package. I got some issues while running test cases. it was regarding to redeclaration of some dbunit classes
After doing some troubleshot i noticed that these classes are available within phpunit itself and some 'require_once' lines in zend_test component were re-including same dbunit extension classes. I commented the lines to resolve the issue but I also come to know that ZF1 only support phpunit 3.4 or lesser version. So now I have some questions.
Which version of phpunit i should use with zf-1.12 and what new feature I won't be able to use with older version of phpunit.
If I upgrade my code to ZF2 then what version of phpunit I would be able to use.
Please also let me know if there is better other way to unit test zf application than using phpunit.
Thanks
Which version of phpunit i should use with zf-1.12 and what new
feature I won't be able to use with older version of phpunit.
You said your research came up with phpunit 3.4 with zf 1.12. I don't think you will notice much difference, all the main asserts will be there.
If I upgrade my code to ZF2 then what version of phpunit I would be
able to use.
If this is an option, do it! Not just for a newer version of phpunit, but for a newer version Zend. Also you will be able to use composer to manage your dependencies.
Please also let me know if there is better other way to unit test zf
application than using phpunit.
Phpunit is the standard & recommended way. For mocking, you could use Mockery with phpunit.
However, as an alternative, you could use phpspec.