phpList/core

Schema validation errors

bizmate opened this issue · 0 comments

Short problem description

Entities define a schema that is invalid according to doctrine schema validation tool. As a result the schema cannot be created

Steps to reproduce

  1. bin/console doctrine:schema:validate
  2. shows validation errors
[Mapping]  FAIL - The entity-class 'PhpList\Core\Domain\Model\Messaging\SubscriberList' mapping is invalid:
* The field PhpList\Core\Domain\Model\Messaging\SubscriberList#subscribers is on the owning side of a bi-directional relationship, but the specified mappedBy association on the target-entity PhpList\Core\Domain\Model\Subscription\Subscriber# does not contain the required 'inversedBy' attribute.

[Mapping]  FAIL - The entity-class 'PhpList\Core\Domain\Model\Subscription\Subscriber' mapping is invalid:
* The field PhpList\Core\Domain\Model\Subscription\Subscriber#subscribedLists is on the owning side of a bi-directional relationship, but the specified mappedBy association on the target-entity PhpList\Core\Domain\Model\Messaging\SubscriberList# does not contain the required 'inversedBy' attribute.


In SchemaException.php line 109:
                                                                  
  The table with name 'phplist.phplist_listuser' already exists.  

  1. As a result also the schema cannot be generated

Expected behaviour

no errors when running bin/console doctrine:schema:create and a consistent db structure as a result

Actual behaviour

As per description in steps

System configuration

docker, php7.2, mysql 5.7
Extra info at https://github.com/bizmate/phplist-benchmark

Package version

dev-master tried both hashes 9f890f2 and d4dc77b

PHP and Composer version

php - php7.2 ( https://github.com/bizmate/phplist-benchmark/blob/master/docker/php/Dockerfile#L1 )
Composer version 1.9.3 2020-02-04 12:58:49