0 votes

After i use export to php doctrine files, i has 2 spaces, but in Symfony2 project i have 4 spaces in all my (and not only my) project code.

Symfony2 use the PSR standarts - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

Code MUST use 4 spaces for indenting, not tabs.

And as you can see on http://www.php-fig.org/ , Doctrine use this standarts too.

in Solved by (270 points)
recategorized by

ORM Designer uses spacing based on analyses of destination file (tabs vs spaces and number of spaces). If 2 spaces was used, then you probably have some wrong spacing in your file.

If you didn't find a problem in your file, would it be possible to send me this file to [email protected] so we can test it and fix the possible bug? Thanks!

Orm designer created this files for me with 2 spaces. Ok, then i send exported files to you.

Oh, it's a new file created by ORM Designer. I assumed it's existing file based on "I has 2 spaces". So the problem is in default spacing for new files. Ok, I will check it.

1 Answer

0 votes
Best answer

This issue is resolved in latest version of ORM Designer.

Based on this article http://www.php-fig.org/ we changed default spacing for all Doctrine2 projects to four spaces.

If anyone will want to update this settings manually, you can edit file Doctrine2.export.osc at line 162

phpResult.ReformatAst(true,110,"\n","    ");

and modify last parameter to any other value. Syntax of this command is

ReformatAst(reformatModifiedElementsOnly, maximumCharsOnLine, defaultNewlineChar, defaultLineIndention);
by Skipper developer (141k points)
selected by