Skip to content

#41 Replace console commandline#42

Merged
alecpl merged 13 commits into
pear:masterfrom
chilimatic:replace-console-commandline
May 2, 2026
Merged

#41 Replace console commandline#42
alecpl merged 13 commits into
pear:masterfrom
chilimatic:replace-console-commandline

Conversation

@chilimatic

@chilimatic chilimatic commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

#41 replacing abandoned pear/console_commandline

  • add a minimal simple wrapper for the CLI which accepts log and verbosity as parameters
  • add basic testing for the CLI wrapper
  • adds PHP8.5 in the testing matrix
  • switches to GPG2 binary for testing
  • ups the php version to 5.6 from 5.4 since we officially use 5.6 internally for testing and a 10 year LTS should be enough
  • new composer version do automatically scan for vulnerabilities and phpunit is flagged in older php versions so a new "config" section is added to composer.json

Comment thread Crypt/GPG/PinEntry.php
}

if ($filename != '') {
if (($this->logFile = fopen($filename, 'w')) === false) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wb was one of the warning i have. i have a lot of inspections running and did not even react to most warnings.
i can revert this if wanted.

Comment thread Crypt/GPG/PinEntry.php
. 'for writing.' . PHP_EOL,
self::VERBOSITY_ERRORS
);
exit(1);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just removed the else. because object calistenics / google coding standard. if you are more a dijkstra fan i can add the else again.

you need to scroll a bit down and you see it was not removed just the "else clause" and the dead code.

Comment thread Crypt/Console/SimpleCliWrapper.php Outdated
@@ -0,0 +1,184 @@
<?php

namespace Console;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The namespace should probably be Crypt/Console.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@alecpl

alecpl commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

The only problem with it I have is that I have no easy way to test it. The CI is using GnuPG 2.4, but this console pin entry is used only with GnuPG 2.0 up to 2.1.12.

@chilimatic

Copy link
Copy Markdown
Contributor Author

Fair, i mean in theory this is a helper tool and we can just add it as an information ;D ... and for testing if you look at it i literally just changed the first parameters to be passed and replaced the output formatting.

so if it was broken before it remains broken and if not it's not. it is really mainly "pass those 2 params" and "echo that"
so worst case it remains as broken as it already were for now.

but if you find something I am swamped this week with work. so I have time next week to think about this earliest.

@chilimatic

Copy link
Copy Markdown
Contributor Author

so do we remove it? do we just add a comment? you know ... "works for"? I am willing to do the work if it's doable in a reasonable timeframe

@alecpl
alecpl merged commit 137dbfd into pear:master May 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants