Skip to content

Moved dependencies in composer.json to allow run without dev deps#2199

Closed
JanMikes wants to merge 1 commit intomasterfrom
fix-run-rector-without-dev-dependencies
Closed

Moved dependencies in composer.json to allow run without dev deps#2199
JanMikes wants to merge 1 commit intomasterfrom
fix-run-rector-without-dev-dependencies

Conversation

@JanMikes
Copy link
Copy Markdown
Contributor

Fixes #2185

@JanMikes JanMikes requested a review from TomasVotruba October 25, 2019 10:21
@TomasVotruba
Copy link
Copy Markdown
Member

These packages are dev, not production. This is not way to fix it

@JanMikes
Copy link
Copy Markdown
Contributor Author

Then why they are required to run bin/rector if they are dev?

@TomasVotruba
Copy link
Copy Markdown
Member

I run bin/rector reasily without them

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba
Copy link
Copy Markdown
Member

Not sure if, but this one might be related to PHPStan rather:
#2184

@TomasVotruba TomasVotruba deleted the fix-run-rector-without-dev-dependencies branch October 25, 2019 14:25
@JanMikes
Copy link
Copy Markdown
Contributor Author

E.g. here https://github.com/TomasVotruba/tomasvotruba.cz/blob/master/.travis.yml#L19

@TomasVotruba well, this is kinda "lucky" because pehapkari.cz project has all dependencies in dev, that are otherwise failing, but for example when tried on other project, where we do not use symplify phpstan extensions and so on, this fails. It fails even for rector itself

  1. git clone https://github.com/pehapkari/pehapkari.cz.git
  2. composer install --no-dev
  3. bin/rector --version

Imho this is definitely bug, that affects most of projects where rector is installed.

It is caused by that when running bin/rector it loads phpstan.neon which is targeted for internal use (running phpstan against repository itself) if i understand it correctly and it should not be used for analysing other repositories with rector. As mentioned by you, #2184 could do the trick

TomasVotruba added a commit that referenced this pull request May 1, 2022
rectorphp/rector-src@039181a [DeadCode] Remove RemoveCodeAfterReturnRector, already handled at RemoveUnreachableStatementRector (#2199)
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.

error docker run: Nette\FileNotFoundException missing config.neon

2 participants