Skip to content

#41 Replace console commandline#42

Open
chilimatic wants to merge 13 commits intopear:masterfrom
chilimatic:replace-console-commandline
Open

#41 Replace console commandline#42
chilimatic wants to merge 13 commits intopear:masterfrom
chilimatic:replace-console-commandline

Conversation

@chilimatic
Copy link
Copy Markdown

@chilimatic chilimatic commented Feb 2, 2026

#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

}

if ($filename != '') {
if (($this->logFile = fopen($filename, 'w')) === false) {
Copy link
Copy Markdown
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.

. 'for writing.' . PHP_EOL,
self::VERBOSITY_ERRORS
);
exit(1);
Copy link
Copy Markdown
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.

@@ -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
Author

Choose a reason for hiding this comment

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

done

@alecpl
Copy link
Copy Markdown
Contributor

alecpl commented Feb 25, 2026

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
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.

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