Skip to content

ci: adopt the Happenv package standard - #1

Merged
webard merged 6 commits into
1.xfrom
chore/happenv-standard
Sep 24, 2026
Merged

webard merged 6 commits into
1.xfrom
chore/happenv-standard

Conversation

@webard

@webard webard commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Brings the package in line with the Happenv package skeleton (happenv-com/plugin-skeleton, public Filament plugin, browser tests, no npm-built assets). No change to runtime behaviour or public API.

What changed

  • CI (the package had none): tests.yml, browser-tests.yml, phpstan.yml, quality.yml, composer-audit.yml, trufflehog.yml, zizmor.yml, pr-title.yml, update-changelog.yml, dependabot-auto-merge.yml, plus dependabot.yml (Actions, Composer, npm), release.yml, zizmor.yml, SECURITY.md, CONTRIBUTING.md, issue forms.
  • Test matrix: PHP 8.3–8.5 × Laravel 12, 13 × Filament 4, 5 × lowest/stable (PHP 8.5 lowest excluded). PHPStan runs once per Filament major. Browser tests run on PHP 8.4 with the latest dependencies. They load the real widget from challenges.cloudflare.com, so they need network access.
  • Not tested in CI, though composer.json allows them (explained in a comment in tests.yml):
    • PHP 8.2: Pest 4 needs PHP 8.3.
    • Laravel 11: every 11.x release is blocked by Composer's security-advisory check, so it cannot be installed (checked).
  • Tooling: pint.json, rector.php, phpstan.neon.dist (Larastan level 6 with deprecation rules, configDirectories: [config] so env() in the config file is allowed), .editorconfig, .gitattributes, .npmrc, .nvmrc. phpunit.xml.dist now uses the skeleton's strict settings (failOnDeprecation, ignoreIndirectDeprecations, random order, …) and keeps the package's env.
  • composer.json:
    • Authors: Happenv, webard, and Muazzam Builds as the original author.
    • Added support, branch-alias dev-1.x, and the skeleton's scripts. test now runs Unit and Feature, and test:browser is renamed to test-browser.
    • require-dev widened so the matrix can resolve: Pest ^4.0 || ^5.0, testbench ^10.0 || ^11.0. Added Larastan, Rector, Pint, composer-normalize and collision.
    • require is unchanged.
  • package.json is kept for Playwright only. package-lock.json is committed now (it was gitignored), because browser-tests.yml runs npm ci.
  • LICENSE → LICENSE.md: full original text, including the Muazzam Builds copyright, is unchanged.
  • CHANGELOG.md is restored from the GitHub releases (only v1.2.0 has a release; v1.0.0, v1.0.1 and v1.1.0 are tags without releases). UPGRADING.md added.
  • README restructured along the template: badges, Key features, Requirements, Installation, Configuration, Usage, Testing your application, Translations, Development, Credits (incl. Muazzam Builds), Happenv logo. No content was dropped. Added the missing connect_timeout / timeout config keys and an optional @source line for custom themes.
  • Labels breaking-change, dependencies, skip-changelog created.

Reviewer notes

  • src/ changed, formatting and internal only:
    • Pint import order.
    • declare(strict_types=1) in the service provider, TurnstileVerifier and the three auth page classes.
    • An equivalent early return in Turnstile::shouldRenderWidget().
    • Fully qualified ResetPassword imported in TurnstilePlugin.
    • No signature, visibility or behaviour changes. resources/views and resources/lang are unchanged.
  • Rector skips (rector.php):
    • ArrayToFirstClassCallableRector: Rector crashes on is_callable([parent::class, …]) in the trait, and a path-scoped skip does not help.
    • RemoveExtraParametersRector for src/Testing/TestsTurnstile.php: it would strip the $schema argument from the Livewire test macros, which is a real behaviour change.
    • The Rector Laravel rules are pinned to LaravelLevelSetList::UP_TO_LARAVEL_110 instead of withComposerBased(laravel: true), because composer.json still allows Laravel 11. Following the installed Laravel would rewrite code into Laravel 13-only forms.
  • PHPStan baseline: 11 errors (10 entries), none trivially safe to fix without touching behaviour:
    • Defensive is_callable(parent::…) in the trait.
    • ?? on verifier results.
    • Livewire macro closures in TestsTurnstile.
    • The generic @mixin Testable.
      Analysis is clean on both Filament 4 and 5 with the baseline.
  • Tests:
    • Added the skeleton's deprecation guard to TestCase::setUp().
    • Browser tests use assertSee() instead of the deprecated waitForText(). It is what waitForText() called, and the deprecation output failed the strict run.
    • ArchTest and TranslationsTest (64 locales) are kept; no missing translation keys.

Copilot AI lite review requested due to automatic review settings September 24, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Restrict GitHub Actions Dependabot updates and correct .npmrc’s release-age value.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Aligns the package with the Happenv skeleton through expanded CI, tooling, documentation, security automation, and testing while preserving runtime behavior and public APIs.

Changes:

  • Adds PHP/Laravel/Filament test matrices and browser testing.
  • Adds static analysis, formatting, release, dependency, and security workflows.
  • Updates package metadata, documentation, and development tooling.
  • Follow-ups remain for Dependabot action update restrictions and npm release-age configuration.
File Summary
UPGRADING.md Adds upgrade guidance.
tests/​Unit/​TranslationsTest.php Updates translation test syntax.
tests/​TestCase.php Adds deprecation detection.
tests/​Pest.php Enables strict typing.
tests/​PanelTestCase.php Updates provider setup.
tests/​Fixtures/​User.php Applies strict typing.
tests/​Fixtures/​CustomLogin.php Applies strict typing.
tests/​Feature/​LoginMultiFactorTest.php Simplifies test state handling.
tests/​Browser/​TurnstileWidgetTest.php Updates browser assertions.
src/​TurnstilePlugin.php Cleans up imports.
src/​Rules/​TurnstileRule.php Reviewed for internal compatibility changes.
src/​Pages/​Auth/​Register.php Applies strict typing.
src/​Pages/​Auth/​PasswordReset/​RequestPasswordReset.php Applies strict typing.
src/​Pages/​Auth/​Login.php Applies strict typing.
src/​Http/​TurnstileVerifier.php Applies strict typing.
src/​Forms/​Components/​Turnstile.php Reviewed for equivalent internal refactoring.
src/​FilamentTurnstileServiceProvider.php Applies strict typing.
src/​Concerns/​InteractsWithTurnstile.php Reviewed for formatting and compatibility.
rector.php Configures Rector and exclusions.
README.md Restructures documentation.
pint.json Adds formatting configuration.
phpunit.xml.dist Enables strict PHPUnit settings.
phpstan.neon.dist Adds PHPStan configuration.
phpstan-baseline.neon Records known analysis exceptions.
package.json Configures Playwright tooling.
package-lock.json Locks npm dependencies.
LICENSE.md Adds the license text.
composer.json Updates metadata, scripts, and development tooling.
CHANGELOG.md Restores release history.
.nvmrc Pins Node.js.
.npmrc Configures npm policies.
.gitignore Updates ignored files.
.github/​zizmor.yml Configures workflow security scanning.
.github/​workflows/​zizmor.yml Adds workflow security checks.
.github/​workflows/​update-changelog.yml Adds changelog automation.
.github/​workflows/​trufflehog.yml Adds secret scanning.
.github/​workflows/​tests.yml Adds the test matrix.
.github/​workflows/​quality.yml Adds quality checks.
.github/​workflows/​pr-title.yml Adds pull request title validation.
.github/​workflows/​phpstan.yml Adds static analysis workflow.
.github/​workflows/​dependabot-auto-merge.yml Adds dependency auto-merge automation.
.github/​workflows/​composer-audit.yml Adds Composer security auditing.
.github/​workflows/​browser-tests.yml Adds browser testing.
.github/​SECURITY.md Adds security guidance.
.github/​release.yml Adds release configuration.
.github/​ISSUE_TEMPLATE/​config.yml Configures issue templates.
.github/​ISSUE_TEMPLATE/​bug.yml Adds a bug report form.
.github/​dependabot.yml Configures dependency updates.
.github/​CONTRIBUTING.md Adds contribution guidance.
.gitattributes Adds repository and archive rules.
.editorconfig Defines formatting conventions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .npmrc
@@ -0,0 +1 @@
min-release-age=7
@webard
webard merged commit 161fe55 into 1.x Sep 24, 2026
28 of 29 checks passed
@webard
webard deleted the chore/happenv-standard branch September 24, 2026 12:17
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