diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 1c897736..815b02b3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -105,6 +105,11 @@ After that has been done, you can run the integration tests: vendor/bin/phpunit tests/Integration/ ``` +When changing database relations and entities please ensure the mapping is valid by running: + +```bash +bin/console doctrine:schema:validate +``` ## Coding Style diff --git a/.travis.yml b/.travis.yml index fe74d8d8..6b8f6269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,11 @@ script: echo "Validating the composer.json"; composer validate --no-check-all --no-check-lock --strict; +- > + echo; + echo "Doctrine database schema validation"; + bin/console doctrine:schema:validate; + - > echo; echo "Linting all PHP files"; diff --git a/src/Domain/Model/Subscription/Subscriber.php b/src/Domain/Model/Subscription/Subscriber.php index 226d2209..0c045bbb 100644 --- a/src/Domain/Model/Subscription/Subscriber.php +++ b/src/Domain/Model/Subscription/Subscriber.php @@ -118,7 +118,7 @@ class Subscriber implements DomainModel, Identity, CreationDate, ModificationDat /** * @var Collection - * @Mapping\ManyToMany(targetEntity="PhpList\Core\Domain\Model\Messaging\SubscriberList", inversedBy="subscribers") + * @Mapping\ManyToMany(targetEntity="PhpList\Core\Domain\Model\Messaging\SubscriberList", mappedBy="subscribers") * @Mapping\JoinTable(name="phplist_listuser", * joinColumns={@Mapping\JoinColumn(name="userid")}, * inverseJoinColumns={@Mapping\JoinColumn(name="listid")}