Skip to content

chore: upkeep follow-ups (PHPUnit stubs, vite target, repo cleanup)#140

Merged
llbbl merged 3 commits into
masterfrom
chore/upkeep-followups
Jun 1, 2026
Merged

chore: upkeep follow-ups (PHPUnit stubs, vite target, repo cleanup)#140
llbbl merged 3 commits into
masterfrom
chore/upkeep-followups

Conversation

@llbbl

@llbbl llbbl commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Eliminates all 46 PHPUnit 13 deprecation notices by migrating createMock() to createStub() across the test suite
  • Hardens the Vite 7 build config with an explicit es2020 target and Node engine constraint
  • Cleans up stale repo files (stock env, .cursorrules, root contributing.md) and empty Vue directories
  • Adds Phpactor editor config enabling PHPStan + php-cs-fixer language servers

Changes

Test cleanup

  • tests/Tests/Feature/AuthTest.php: Migrated createMock()createStub() for mocks that use no expectations
  • tests/Tests/Feature/ChatTest.php: Migrated createMock()createStub() for mocks that use no expectations
  • tests/Tests/Feature/ChatControllerTest.php: Migrated applicable mocks to stubs; one createMock() intentionally retained because it uses ->expects()
  • tests/Tests/Unit/ChatModelPaginationTest.php: Migrated createMock()createStub() for mocks that use no expectations
  • phpunit.xml.dist: Bumped schema reference from 12.5 to 13.1

Build / config

  • vite.config.js: Set build.target: 'es2020' explicitly (Vite 7+ default changed to "baseline-widely-available")
  • package.json: Added "engines": { "node": ">=20.19" } to document the minimum Node requirement
  • src/vue/components/, src/vue/composables/: Removed empty directories

Repo cleanup

  • env: Deleted CodeIgniter 4's stock starter file (superseded by the customized .env.example)
  • .cursorrules: Deleted (editor-specific, not needed in repo)
  • contributing.md (root): Deleted (content lives in docs/contributing.md)

Editor tooling

  • .phpactor.json: Added Phpactor config enabling PHPStan and php-cs-fixer language servers

Docs

Verification

All of the following were run clean during development:

  • composer test — full test suite passes, 0 deprecation notices
  • composer analyse — PHPStan passes at configured level
  • pnpm build — production assets build without errors
  • pnpm dev — dev server starts cleanly
  • composer audit — no known security vulnerabilities
  • pnpm audit — no known security vulnerabilities

llbbl added 3 commits June 1, 2026 09:52
This commit deletes three legacy files: .cursorrules, contributing.md,
and env. The deletions remove outdated scaffolding and example settings
that no longer reflect the project structure, reducing confusion for new
contributors and CI checks. There are no functional changes to the
application; if onboarding or environment setup is needed, it should be
provided through up-to-date documentation or example configurations in
current docs.
Converts all test doubles from MockObject-based mocks to Stub instances
and updates related type hints and mock creation calls to simplify
dependency injection in tests. Upgrades PHPUnit configuration to v13 by
updating the noNamespaceSchemaLocation and adapting tests to the new
Stub usage. Aligns project tooling with newer environments by enforcing
Node >=20.19 in package.json and configuring vite to target ES2020 for
broader browser compatibility.
Adds a new .phpactor.json to enable language_server_phpstan and
language_server_php_cs_fixer, tightening IDE diagnostics and automatic
formatting for PHP. Deletes docs/tasks.md, removing the large
pre-upgrade task list from the repository. This config change improves
developer experience by enabling static analysis and fixers in the
editor, while the doc removal should be complemented by a replacement or
migration plan for task tracking.
@llbbl
llbbl merged commit c454ee8 into master Jun 1, 2026
5 checks passed
@llbbl
llbbl deleted the chore/upkeep-followups branch June 1, 2026 14:58
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