chore: merge refactor/dependency-injection-joan into dev#17
Merged
LucaPipolo merged 2 commits intomainfrom Nov 28, 2025
Merged
Conversation
LucaPipolo
approved these changes
Nov 17, 2025
4afab63 to
0889346
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the dependency injection implementation and migrates the project from pnpm to Bun as the package manager. The changes simplify class constructors by using PHP-DI's #[Inject] attribute for property injection instead of constructor injection, and update all build/lint tooling to use Bun.
Key changes:
- Refactored PHP classes to use attribute-based dependency injection instead of constructor injection
- Migrated from pnpm to Bun package manager across all scripts and CI workflows
- Updated linting commands to include TypeScript files
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli/class-cli.php | Replaced constructor injection with #[Inject] attribute for container property |
| src/attributes/class-hook.php | Replaced constructor injection with #[Inject] attribute and moved hooked_classes loading to method scope |
| package.json | Updated all scripts from pnpm to bun, added TypeScript to lint commands, removed packageManager field, added minimatch dependency |
| functions.php | Updated to retrieve Hook and CLI instances from container instead of manual instantiation |
| assets/scripts/main.ts | Added eslint-disable comment for console.log statement |
| .husky/pre-commit | Changed from pnpm to bun for running lint-staged |
| .github/workflows/lint.yml | Replaced pnpm setup with Bun installation and updated all pnpm commands to bun |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0889346 to
d7f457d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.