FWIW: https://github.com/bitcoin/bitcoin/blob/master/src/test/script_tests.cpp#L857 this might also be useful if you don't test against it already. It's mainly for verification purposes, but may turn up bugs outside of this PR.
When working on signing, it's best to define your standard types (p2pk/p2pkh/multisig) and be able to deal with them anywhere P2SH, P2WSH comes in, since both of these can be used in tandem. An example of things maybe going awry is this file: https://github.com/bitpay/bitcore-lib/blob/master/lib/transaction/input/multisigscripthash.js & the multisig.js that was added after. P2SH & P2WSH require general modifications to a plain script-in-txout-script style transaction. AFAICT Bitcoin Core does this as well.
I would submit a patch, but it's not a trivial refactoring.. just my two cents worth! See serializeSimpleSig / serializeSignatures https://github.com/Bit-Wasp/bitcoin-php/blob/master/src/Transaction/Factory/InputSigner.php#L460-544. The if branches for P2SH, then witness, are repeated anywhere in that file that deals with possible combinations of P2SH | P2WSH.