Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Commit

Permalink
Fix Error: Cannot access property Tests\Factories\UserFactory::$relat…
Browse files Browse the repository at this point in the history
…ionshipPrefixes

As this property was `private` it meant that the factories cannot use it when it is called
(in my case from this line https://github.com/lukeraymonddowning/poser/blob/master/src/Factory.php#L79)

So changing this to `protected` so the factory classes have access to it as well as the core Factory class
  • Loading branch information
AlanHolmes committed Mar 4, 2020
1 parent ffd0074 commit 2539bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
abstract class Factory {

protected static $modelName = null;
private static $relationshipPrefixes = ['with', 'for'];
protected static $relationshipPrefixes = ['with', 'for'];

protected
$count = 1,
Expand Down

0 comments on commit 2539bab

Please sign in to comment.