Skip to content

Update for framework 0.7 and Tempest 3 - #3

Open
mikield wants to merge 1 commit into
masterfrom
feat/framework-0.7
Open

Update for framework 0.7 and Tempest 3#3
mikield wants to merge 1 commit into
masterfrom
feat/framework-0.7

Conversation

@mikield

@mikield mikield commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The skeleton could not boot. Depends on Tempcord/framework#8; constraint is tempcord/framework: ^0.7.

Verified by installing the framework and running ./tempcord boot --register — the application boots, registers, reports Command "ping" listened. and opens the gateway.

Version constraints

was now
php ^8.2 ^8.5 — what the framework requires
tempcord/framework dev-master ^0.7
phpunit/phpunit ^10.0 ^13.0
phpstan/phpstan ^1.10 ^2.1
pestphp/pest ^2.0 removed

Pest is dropped rather than upgraded: it pins phpunit ^10, so it cannot sit beside the ^13 the framework tests against, and nothing here uses it.

Tempest 3 breakages

LogConfig became an interface. log.config.php was doing new LogConfig(...), so the application died instantiating an interface before anything else ran. It now builds a MultipleChannelsLogConfig.

phpunit.xml pointed at the 10.5 schema and set requireCoverageMetadata="true", which fails on a skeleton whose test directories are empty.

A real bug in the example command

->setFlags(Bitwise::from(MessageFlag::EPHEMERAL)->getBitSet())

setFlags takes a decimal bit field; getBitSet() returns the binary representation. So asking for EPHEMERAL (64) sent 1000000. It happened to still be ephemeral — 64 divides 1000000 exactly — but it also set five bits nobody asked for. Now uses ->get().

This is the same class of bug as dc-Ragnarok/Fenrir#134, which fixes three payloads in Fenrir itself that send binary where Discord reads decimal.

Since PingCommand is the first thing anyone reads, it now also shows an option constraint (minValue/maxValue) — something the framework has always supported without the skeleton demonstrating it.

Better first-run experience

A missing DISCORD_TOKEN produced a TypeError from inside the framework's config object, which tells a newcomer nothing:

TempcordConfig::__construct(): Argument #1 ($token) must be of type string, null given

The config now says what to do about it instead.

Note

The three workflows still target PHP 8.2/8.3 and would fail against a framework needing 8.5. I could not update them — my token lacks the workflow scope, so the push was rejected. They need php-version: '8.5' in run-tests.yml, static-analysis.yml and fix-php-code-style-issues.yml.

The skeleton could not boot. PHP was constrained to ^8.2 where the framework
needs ^8.5, the framework itself was pinned to dev-master, and the development
dependencies were a Tempest 2 era set — phpunit ^10 alongside pest ^2, which
pins phpunit ^10 and so cannot sit beside the ^13 the framework tests against.
Pest is dropped rather than upgraded, since nothing here uses it.

Two things broke on Tempest 3 itself. LogConfig became an interface, so
log.config.php was instantiating an interface and dying before anything else
ran; it now builds a MultipleChannelsLogConfig. And phpunit.xml pointed at the
10.5 schema and demanded coverage metadata, which fails on a skeleton whose
test directories are empty.

A missing DISCORD_TOKEN produced a TypeError from inside the framework's
config object, which tells a newcomer nothing. The config now says what to do
about it.

PingCommand had a real bug. setFlags takes a decimal bit field and
Bitwise::getBitSet() returns the binary representation, so asking for EPHEMERAL
sent 1000000 rather than 64. It happened to still be ephemeral, because 64
divides 1000000 exactly, but it also set five bits nobody asked for. It uses
get() now. Since this file is the first thing anyone reads, it also shows an
option constraint, which the framework has supported all along without the
skeleton demonstrating it.

Verified by installing the framework and running ./tempcord boot --register:
the application boots, registers, reports `Command "ping" listened.` and opens
the gateway.
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.

1 participant