Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » [Solved] PHPUnit PHAR Invalid(Getting invalid phar for anything post phpunit 7)
[Solved] PHPUnit PHAR Invalid [message #1856194] Fri, 25 November 2022 12:12 Go to next message
Pete Norton is currently offline Pete NortonFriend
Messages: 2
Registered: April 2022
Junior Member
Hi, I must be missing something as I can't find anything about this.

I'm trying to upgrade to phpunit 9 but I get the phar marked as invalid when I try to add it to the PHP Include path.

I'm using Eclipse 2022-09 (4.25.0), Eclipse PDT v7.2.1.202112011741.

I have PHP 7.4.27 as my one and only installed PHP, and I've got the phar added in the Workspace PHPUnit Settings.

I can get the phpunit-7.5.20.phar added to the include path but nothing later than that.

Any help would be greatly appreciated.

Many thanks,
Pete

[Updated on: Mon, 28 November 2022 19:41]

Report message to a moderator

Re: PHPUnit PHAR Invalid [message #1856202 is a reply to message #1856194] Sat, 26 November 2022 18:02 Go to previous message
Pete Norton is currently offline Pete NortonFriend
Messages: 2
Registered: April 2022
Junior Member
I've figured it out. It appears that PDT doesn't handle SHA-512 signed phars. I re-signed the phar to use SHA-1 (the PHPUnit v7 was SHA-1), and PDT now loads it in properly.

I'm using EasyPHP-devserver-17 which provides phar.phar.bat and pharcommand.phar to simplify manipulating phars (maybe others do as well). I had to disable phar.readonly in the php.ini:

[Phar]
; http://php.net/phar.readonly
;phar.readonly = On
phar.readonly = Off


and the command I used was:

"C:\Program Files\EasyPHP-Devserver-17\eds-binaries\php\php7427vc15x64x221125102427\php.exe" "C:\Program Files\EasyPHP-Devserver-17\eds-binaries\php\php7427vc15x64x221125102427\pharcommand.phar" sign -h sha1 -f phpunit-9.5.26.phar
Previous Topic:LAMP and XDebug/Eclipse-PDT on the same machine.
Next Topic:Error installing PDT from Help -> Install new software
Goto Forum:
  


Current Time: Fri Apr 26 00:29:08 GMT 2024

Powered by FUDForum. Page generated in 0.03018 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top