Skip to content

Release#6

Merged
D3strukt0r merged 13 commits into
masterfrom
develop
Jun 30, 2026
Merged

Release#6
D3strukt0r merged 13 commits into
masterfrom
develop

Conversation

@D3strukt0r

Copy link
Copy Markdown
Member

No description provided.

Apply the PHP-CS-Fixer ruleset across src/ (Yoda conditions removed, fully-qualified built-in functions and classes, import cleanups, PHPDoc ordering, concatenation spacing). No behaviour changes; the actual bug fixes follow in their own commits so they aren't buried in reformatting.
Classic Votifier encryption used OPENSSL_SSLV23_PADDING, a constant OpenSSL 3.0 removed and that is undefined on PHP 8, so encryption failed on modern stacks. Encrypt with openssl_public_encrypt's default PKCS#1 v1.5 padding instead, which is exactly what Votifier decrypts with (Cipher.getInstance("RSA") resolves to PKCS#1 v1.5 via the JDK's SunJCE provider).

The public key is now parsed with openssl_pkey_get_public up front, so an invalid key throws an InvalidArgumentException instead of silently producing an empty packet, and the PEM body is wrapped at 64 characters.
Replace the deprecated call_user_func_array([$this, 'parent::sendVote'], ...) parent-call form, which no longer works as a callable on newer PHP, with parent::sendVote(...$votes).
fsockopen only set a connect timeout, so the first read blocked for php.ini's default_socket_timeout (60s) before failing with the vague "package not received". Set an explicit read timeout via stream_set_timeout and, when a read times out, throw a PackageNotReceivedException explaining that the server accepted the connection but sent nothing and that the host and Votifier port (default 8192, not the Minecraft port 25565) should be checked.

Closes #5
…e opened

When fsockopen fails, the OS-level reason (connection refused, timed out, no route to host, DNS failure) was discarded and the caller only saw a generic "could not create a connection". Surface that reason, along with the host and port, in the NoConnectionException message so the cause is visible.

Closes #4
Generate the CC BY-NC-SA license page from the official source, pull the community-health files from the Team-MaRo/.github submodule instead of duplicating them, and drop the committed phpDocumentor API dump.
Migrate the test metadata to PHP attributes while keeping the annotations so the suite runs on PHPUnit 7 to 13 (PHP 7.1 to 8.5), type the mock properties as Socket&Stub intersections so static analysis resolves the stubbed methods, and add a test covering an invalid public key.
…ames

Move .github/workflows/ci-cd.yml to ci.yml and .php_cs.dist to .php-cs-fixer.dist.php with their contents unchanged, so the history records a rename; the rebuilt pipeline and v3 config land in the following commit.
Split the workflow into a style/compatibility job on a modern PHP and a PHP 7.1 to 8.5 test matrix, reduce PHP_CodeSniffer to the PHPCompatibility gate while PHP-CS-Fixer owns style, add PHPStan at level 6 with a baseline, drive coverage from the CLI so the config stays valid across PHPUnit versions, and adopt release-please for releases.
Add a standalone PHP app under public/ that drives the library against a real server, a compose.yml with spigot and web services, and a classic-Votifier feedback listener under tools/ for confirming that votes are received.
Relicense the code from GNU GPL v3 to MIT, update the file headers and repository links to the Team-MaRo organization, refresh the README and project metadata, and stop tracking IDE and editor configuration.
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for taking your precious time to create a pull request on this repository for the first time. Your work might actually benefit many others.

@github-actions

Copy link
Copy Markdown
Contributor

✅dependabot config looks good 👍

Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Add an explicit least-privilege permissions block (contents: read) so the style and test jobs run with a read-only token, resolving the CodeQL "workflow does not contain permissions" finding. The jobs only read the repo and upload coverage to external services, so no write scopes are needed.
@D3strukt0r D3strukt0r merged commit b2efc1e into master Jun 30, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants