Skip to content

Commit

Permalink
Do not redeclare controller container property in order to avoid comp…
Browse files Browse the repository at this point in the history
…atibility issues (#179)

### Changes

Please describe both what is changing and why this is important.
Include:

- Removing scope keyword from constructor parameter to avoid property
re-declaration
- In turn that allows compatibility with both symfony version 6.x and
7.x
- Using given setter to achieve the same desired result

### References

[#178]

### Testing

Previously Symfony (6.4) app container building (cache:clear) was
throwing a fatal error, now it's not.

- [ ] This change adds test coverage

- [x] This change has been tested on the latest version of Symfony

### Checklist

- [x] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)

- [x] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)

- [ ] All existing and new tests complete without errors
  • Loading branch information
mkilmanas committed Dec 20, 2023
1 parent 7c4dff1 commit 0f60608
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controllers/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ final class AuthenticationController extends AbstractController implements Authe
public function __construct(
private Authenticator $authenticator,
private RouterInterface $router,
protected ContainerInterface $container,
ContainerInterface $container,
) {
$this-setContainer($container);
}

/**
Expand Down

0 comments on commit 0f60608

Please sign in to comment.