Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DoctrineCodeQuality] Add ImproveDoctrineCollectionDocTypeInEntityRector #4442

Merged
merged 11 commits into from
Oct 18, 2020

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Oct 18, 2020

 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;

 /**
  * @ORM\Entity
  */
 class SomeClass
 {
     /**
      * @ORM\OneToMany(targetEntity=Training::class, mappedBy="trainer")
+     * @var Collection<int, Training>|Trainer[]
      */
     private $trainings = [];
 }

Related post: https://tomasvotruba.com/blog/2020/03/23/doctrine-entity-typed-properties-with-php74/

@TomasVotruba TomasVotruba force-pushed the collection-typed-php74 branch 2 times, most recently from 1ec660d to 3dbfc56 Compare October 18, 2020 16:12
@TomasVotruba TomasVotruba force-pushed the collection-typed-php74 branch from 3dbfc56 to 9cec974 Compare October 18, 2020 16:15
@TomasVotruba TomasVotruba merged commit e845d7c into master Oct 18, 2020
@TomasVotruba TomasVotruba deleted the collection-typed-php74 branch October 18, 2020 16:29
TomasVotruba added a commit that referenced this pull request Jul 8, 2023
rectorphp/rector-src@b9ace5f [PHP 8] Resources object upgrade - remove 2 rules as the upgrade require wholesome manual work (#4442)
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.

1 participant