0 votes

I am evaluating Skipper and as I am aware at the moment there is no synchronization between model and source code.

If I want to import changes made manually in PHP source code (I am using Doctrine2) I have to use File -> Import to project -> Import ORM schema files.
That is fine because it retains regions and position of entities in my model but it also retains associations that are no longer in the source code. So if I want to see updated model I have to import it in new project. But then I lose regions and position of entities.

Is there a way around this?

Two way synchronization between model and code is crucial for the usability of the tool

in Solved by (160 points)
recategorized by

1 Answer

0 votes

The correct workflow is to edit any ORM objects/properties in skipper and export it to your model. There is not any two-way synchronization right now.

It's not crucial if you will use Skipper as the main ORM defining tool. The reason for this is that not everything in ORM framework can be uniquely identified and there is no way how to correctly and repetitively import/export it.

by Skipper developer (141k points)

This could be a deal breaker for me. There is so much that we can not do with Skipper with our entities. We must code that stuff by hand. And there will always be some custom things in entity classes which domain driven development requires. For example:

 @Assert\NotBlank(message="This field is mandatory")

or:

public function getName() {
    return $this->getFirstName() . ' ' . $this->getLastName();
}

Both examples can (and have to be) defined by hand in your code without problems. Skipper never removes it and also never imports it. Skipper works only with @ORM annotations (with definitions which can be defined in annotations as same as XML/YML) .

@Assert isn't Doctrine2 definition (but Symfony) and getters/setters are generated by Doctrine generator or by hand. These are parts which Skipper never touch.

Export of Skipper updates only all @ORM* annotations and leave anything else untouched.