0 votes

Is there a way to force skipper to not reformat multi line annotation to single line?
Auto generated annotation sometimes is to long and does not pass phpcs, and every time I do export, skipper overwrite already formatted annotation to single line.

enter image description here

in Solved by (120 points)
recategorized by

Unfortunately, there is no way how to customize the Skipper format or how to keep already exported @ORM annotations.

Skipper needs it to re-export it every time.

But we will check the settings and update it to meet 120 characters limit.

1 Answer

0 votes

We fixed this issue today. The fix is available in beta here: https://www.skipper18.com/support/402/downloads-skipper-beta

Here is our testing sample for 119, 120 and 121 characters:

<?php

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class Entity2
{
    /**
     * @ORM\Column(type="string", length=255, nullable=true, name="contract_type_h", options={"collation":"ascii_bin"})
     */
    private $t120;

    /**
     * @ORM\Column(
     *     type="string",
     *     length=255,
     *     nullable=true,
     *     name="contract_type_ha",
     *     options={"collation":"ascii_bin"}
     * )
     */
    private $t121;

    /**
     * @ORM\Column(type="string", length=255, nullable=true, name="contract_type_", options={"collation":"ascii_bin"})
     */
    private $t119;
}
by Skipper developer (141k points)

It works fine now for @ORM\Column(property level) but is still broken on the class level, for example indexes in @ORM\Table

/**
 * @ORM\Entity()
 * @ORM\Table(
 *     name="condition_treatments",
 *     uniqueConstraints={@ORM\UniqueConstraint(name="treatment_condition_very_long_nameeeeeeeeeee", columns={"treatment_handle","medical_condition_handle"})}
 * )
 */
class TreatmentMedicalCondition {

}

please send me a demo project with this export to [email protected] (It's sufficient to simplify the project to export only this one class).

Earlier updates should have resolved all such instances, so if there is still an issue, it's likely a bug.