Skip to content

Conversation

@Jeroeny
Copy link
Contributor

@Jeroeny Jeroeny commented Aug 23, 2022

  • Bugfix
  • BC: There is a difference in the output of PsrPrinter

The PSR standard(s) seem to indicate that they use a newline between use statements of different types (class, function and const).
It would be nice if this could be supported

@dg
Copy link
Member

dg commented Aug 23, 2022

Thanks!

@dg dg merged commit b95f7fd into nette:master Aug 23, 2022
@Jeroeny Jeroeny deleted the nsnewline branch August 23, 2022 20:24
@dg
Copy link
Member

dg commented Aug 23, 2022

What is the $psrSort for?

dg pushed a commit that referenced this pull request Aug 23, 2022
@Jeroeny
Copy link
Contributor Author

Jeroeny commented Aug 24, 2022

What is the $psrSort for?

It fixes the namespace sort:

before

namespace Example;

use Example\Foo\EmailAlias\Bar;
use Example\Foo\Email\Test;
use Example\Foo\MyClass;
use Example\Foo\Other;

after

namespace Example;

use Example\Foo\Email\Test;
use Example\Foo\EmailAlias\Bar;
use Example\Foo\MyClass;
use Example\Foo\Other;

Maybe it can be supported but not by default enabled in any printer?

dg pushed a commit that referenced this pull request Sep 12, 2022
@dg
Copy link
Member

dg commented Oct 6, 2022

@Jeroeny okay, I'm gonna use that as the default sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants