Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PsrAutoloadingFixer - introduction #4259

Open
wants to merge 1 commit into
base: master
from

Conversation

@kubawerlos
Copy link
Contributor

kubawerlos commented Jan 13, 2019

As psr_0 and psr_4 fixers share a lot of code after discussion with @keradus we want to merge them and introduce this fixer to replace them.

src/Fixer/Basic/PsrAutoloadingFixer.php Outdated Show resolved Hide resolved
src/Fixer/Basic/Psr4Fixer.php Outdated Show resolved Hide resolved
keradus added a commit that referenced this pull request Feb 10, 2019
…with anonymous class (kubawerlos)

This PR was squashed before being merged into the 2.12 branch (closes #4260).

Discussion
----------

Psr0Fixer and Psr4Fixer  - fix for multiple classes in file with anonymous class

Found when working on #4259

Commits
-------

0c91b7c Psr0Fixer and Psr4Fixer  - fix for multiple classes in file with anonymous class
@SpacePossum

This comment has been minimized.

Copy link
Member

SpacePossum commented Oct 10, 2019

@kubawerlos can rebase and squash this PR for me?

I was wondering about two things:

  • PSR0 en PSR4 have the same code samples, yet one has only one, why is that?
  • with PSR0 and PSR4 deprecated, how to configure the new one to do either PSR0 or PSR4?
@kubawerlos kubawerlos force-pushed the kubawerlos:feature-psr-autoloading branch from cfcf011 to 89ed43d Oct 20, 2019
@kubawerlos

This comment has been minimized.

Copy link
Contributor Author

kubawerlos commented Oct 20, 2019

@SpacePossum rebased and squashed

PSR0 en PSR4 have the same code samples, yet one has only one, why is that?

PsrAutoloadingFixer has 2 code samples - 1st without configuration and 2nd with configuration and Psr4Fixer is not configurable fixer, so it cannot have the 2nd sample

with PSR0 and PSR4 deprecated, how to configure the new one to do either PSR0 or PSR4?

If you use PsrAutoloadingFixer without dir then it works as psr0 or psr4 without config - that was the reason for the merge - both work the same with default config. Adding dir makes the fixer works as psr0 with a dir.

@SpacePossum

This comment has been minimized.

Copy link
Member

SpacePossum commented Nov 5, 2019

thanks for explaining, I leave the review to someone with more knowledge on this topic

@kubawerlos kubawerlos force-pushed the kubawerlos:feature-psr-autoloading branch 2 times, most recently from 73777a5 to e1c9c1b Nov 7, 2019
@kubawerlos kubawerlos force-pushed the kubawerlos:feature-psr-autoloading branch from e1c9c1b to 645712a Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.