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

[phpstan/phpstan] phpstan.neon.dist config file usage #1538

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

duboiss
Copy link
Contributor

@duboiss duboiss commented Sep 3, 2023

Q A
License MIT
Packagist https://packagist.org/packages/phpstan/phpstan

https://phpstan.org/config-reference#config-file

The usual practice is to have phpstan.neon.dist or phpstan.dist.neon under version control, and allow the user to override certain settings in their environment (on their own computer or on a continuous integration server) by creating phpstan.neon that’s present in .gitignore file. See Multiple files for more details:

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1538/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1538/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'phpstan/phpstan:^1.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

auto-merge was automatically disabled September 3, 2023 13:15

Head branch was pushed to by a user without write access

@lcobucci
Copy link

lcobucci commented Sep 7, 2023

Thanks @duboiss!
We're also having similar issues as @norkunas reported here and this seems to be the solution.

@weaverryan @fabpot is there something we can help on getting this integrated?

@symfony-recipes-bot symfony-recipes-bot merged commit fb99a1d into symfony:main Sep 11, 2023
2 checks passed
@alexander-schranz
Copy link
Contributor

alexander-schranz commented Sep 11, 2023

I would suggest here to use .dist.neon file instead of .neon.dist as .dist files don't work well out of the box in different IDEs: #1540

@lcobucci
Copy link

I would suggest here to use .dist.neon file instead of .neon.dist as .dist files don't work well out of the box in different IDEs: #1540

@alexander-schranz can you please share more details? I've been using .neon.dist for years without any issue... 🤔

@alexander-schranz
Copy link
Contributor

@lcobucci example PHPStorm (Neon Plugin installed) neon.dist requires manual configuration why .dist.neon works out of the box:

Bildschirmfoto 2023-09-11 um 19 25 50

@lcobucci
Copy link

@lcobucci example PHPStorm (Neon Plugin installed) neon.dist requires manual configuration why .dist.neon works out of the box:

Bildschirmfoto 2023-09-11 um 19 25 50

Thanks for sharing, I think I'm so used to configure the .dist for other formats that I never realised 😅

I honestly don't have remarks beyond personal opinion (and many repos to change if Symfony decides to move to .dist.neon)

@alexander-schranz
Copy link
Contributor

... and many repos to change if Symfony decides to move to .dist.neon

That is already the case with this merge that many need to move from phpstan.neon to phpstan.neon.dist or phpstan.dist.neon because if the recipes update is executed the phpstan.neon file is added to the .gitignore, which are mostly more then the ones using dist files. So changing it now will have the same effects.

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.

None yet

5 participants