Skip to content

Comments

chore: merge refactor/dependency-injection-joan into dev#17

Merged
LucaPipolo merged 2 commits intomainfrom
refactor/dependency-injection-joan
Nov 28, 2025
Merged

chore: merge refactor/dependency-injection-joan into dev#17
LucaPipolo merged 2 commits intomainfrom
refactor/dependency-injection-joan

Conversation

@juanlopez4691
Copy link
Member

@juanlopez4691 juanlopez4691 commented Jun 4, 2024

No description provided.

@juanlopez4691 juanlopez4691 requested a review from LucaPipolo June 4, 2024 14:27
@LucaPipolo LucaPipolo changed the title Refactor dependency injector chore: merge refactor/dependency-injection-joan into dev Nov 17, 2025
@LucaPipolo LucaPipolo force-pushed the refactor/dependency-injection-joan branch from 4afab63 to 0889346 Compare November 28, 2025 11:23
Copilot AI review requested due to automatic review settings November 28, 2025 11:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@LucaPipolo LucaPipolo force-pushed the refactor/dependency-injection-joan branch from 0889346 to d7f457d Compare November 28, 2025 11:24
@LucaPipolo LucaPipolo merged commit 7e70256 into main Nov 28, 2025
5 checks passed
@LucaPipolo LucaPipolo deleted the refactor/dependency-injection-joan branch November 28, 2025 11:25
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