Skip to content

Commit

Permalink
Support @reqired annotation and #[Required] attribute for properties.
Browse files Browse the repository at this point in the history
Prevent PropertyNotSetInConstructor when ContainerAwareTrait used.

fix test
  • Loading branch information
Punk-UnDeaD committed Mar 24, 2021
1 parent 6c5bead commit 9f89da0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ Feature: PropertyAccessorInterface
"""
class Company
{
public string $name = 'Acme';
/**
* @var string
*/
public $name = 'Acme';
}
$company = new Company();
Expand Down
4 changes: 3 additions & 1 deletion tests/acceptance/acceptance/RequiredAttribute.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ Feature: RequiredAttribute
<?php
class MyServiceB {
/** @var string */
/**
* @var string
*/
public $a;
public function __construct(){}
Expand Down

0 comments on commit 9f89da0

Please sign in to comment.