Skip to content

Commit

Permalink
Merge pull request #7954 from cakephp/ADmad-patch-2
Browse files Browse the repository at this point in the history
Fix example
  • Loading branch information
dereuromark authored Nov 11, 2024
2 parents f8311af + 348ac18 commit e18cc4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions en/development/dependency-injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ Component Example
::

// In src/Controller/Component/SearchComponent.php
class SearchComponent extends Command
class SearchComponent extends Component
{
public function __construct(
ComponentRegistry $registry,
private UserService $users
private UserService $users,
array $config = []
) {
parent::__construct($registry, []);
parent::__construct($registry, $config);
}

public function something()
Expand Down

0 comments on commit e18cc4e

Please sign in to comment.