Skip to content

Commit

Permalink
Fix to match Aura.Di 4.x
Browse files Browse the repository at this point in the history
Although `composer.json` specifies a `require-dev` which includes this line:
```
        "aura/di": "~4.0",
```
Aura.Auth does not work properly with Aura.Di 4.x.  This is because strict type checking in PHP 7.2+ requires that the function signatures for `define()` and `modify()` specify a `void` return type.  The PHPUnit tests apparently do not instantiate any object using this provided configuration file (`Common.php`), because to do so throws a fatal error.  This change should fix that problem.
  • Loading branch information
cxj authored Dec 4, 2019
1 parent 7a2ae57 commit 71c03d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class Common extends Config
{
public function define(Container $di)
public function define(Container $di): void
{
/**
* Services
Expand Down

2 comments on commit 71c03d4

@cxj
Copy link
Collaborator Author

@cxj cxj commented on 71c03d4 Dec 4, 2019

Choose a reason for hiding this comment

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

@brandonsavage @harikt : Does this seem sufficient to you? Is this something there should be a unit test for?

@harikt
Copy link
Member

@harikt harikt commented on 71c03d4 Dec 8, 2019

Choose a reason for hiding this comment

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

I am good with this. Sorry for the delay.

Please sign in to comment.