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

Warning about "php cs fixer" #1732

Closed
devSonicgirl opened this issue Jun 20, 2017 · 17 comments
Closed

Warning about "php cs fixer" #1732

devSonicgirl opened this issue Jun 20, 2017 · 17 comments

Comments

@devSonicgirl
Copy link

devSonicgirl commented Jun 20, 2017

Description

An alert appears after updating to version 0.30.2.

The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option named "Executables - PHP-CS-Fixer - Path" in Atom-Beautify package settings now.

There was no problem in previous versions.
How should we solve it?

@devSonicgirl devSonicgirl changed the title Warning about "psp cs fixer" Warning about "php cs fixer" Jun 20, 2017
@Glavin001
Copy link
Owner

How should we solve it?

The solution is in the error message:

The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option named "Executables - PHP-CS-Fixer - Path" in Atom-Beautify package settings now.

I will elaborate.

Go into Atom-Beautify package settings.

Before (currently what you have):

image

^ Delete it from there.

After (new correct way):

image

Does this help? How would you recommend I change this error message so it would be clear what to do?

@Glavin001
Copy link
Owner

@nicholas-ooi, you had the same question from #1725 (comment)

How would you recommend I change this error message to be more clear?

@devSonicgirl
Copy link
Author

devSonicgirl commented Jun 20, 2017

@Glavin001 Thank you.
It was difficult to find the PHP-CS-Fixer entry.
Well solved.

@Glavin001 Glavin001 self-assigned this Jun 21, 2017
@Glavin001 Glavin001 added this to the v0.31.0 milestone Jun 21, 2017
@Glavin001
Copy link
Owner

@LIANGWEIBIAO what do you think would make this message clearer and more self explanatory?

@ryanpcmcquen
Copy link

Perhaps we could change:

The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option named "Executables - PHP-CS-Fixer - Path" in Atom-Beautify package settings now.

To:

The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option under "Executables", labeled "PHP-CS-Fixer - Path" in this package's settings (scroll up).

@Glavin001
Copy link
Owner

Thank you for your feedback @ryanpcmcquen!

Before:

Please switch to using the option named "Executables - PHP-CS-Fixer - Path" in Atom-Beautify package settings now.

After:

Please switch to using the option under "Executables", labeled "PHP-CS-Fixer - Path" in this package's settings (scroll up).

I think this is an improvement.
I'm not sure what you meant by (scroll up)? Is this because the Executables section is at the top?

Let's go even further, how about the following:

Please switch to using the option in section "Executables" (near the top) in subsection "PHP-CS-Fixer" labelled "Path" in Atom-Beautify package settings.

I'm not sure about in this package's settings versus Atom-Beautify's package settings.

Please keep the feedback coming! I will make this change in the next couple days and publish.

@ryanpcmcquen
Copy link

I like near the top! I just found the wording confusing, although I am not sure in this package's settings is any less confusing ...

@Glavin001
Copy link
Owner

Awesome! Changing it to the following now:

The "PHP-CS-Fixer" configuration option has been deprecated. Please switch to using the option in section "Executables" (near the top) in subsection "PHP - PHP-CS-Fixer Path (cs_fixer_path)" labelled "Path" in Atom-Beautify package settings.

Will be in the next release.

@peterstavrou
Copy link

How do you get the menu "PHP-CS-FIXER" below PHP?
I have:
Perl
PHP
Puppet

@keisukefunatsu
Copy link

@peterstavrou
You can see "PHP-CS-FIXER" in "Executables" below General.

@Glavin001
Copy link
Owner

Published to v0.30.4

The error message should now be:

The "PHP - PHP-CS-Fixer Path (cs_fixer_path)" configuration option has been deprecated. Please switch to using the option in section "Executables" (near the top) in subsection "PHP-CS-Fixer" labelled "Path" in Atom-Beautify package settings.

@295black
Copy link

295black commented Jul 19, 2017

it is so difficult to find the PHP-CS-Fixer under the Executables ~~

@Glavin001
Copy link
Owner

@treasu is it? This is what it looks like:

image

Any recommendations for how it could be improved?

@k2levin
Copy link

k2levin commented Aug 2, 2017

Just a small add on, for those who is confuse and cannot find the "PHP-CS-Fixer"
Please expand the "Executables", "PHP-CS-Fixer" is inside "Executables"

@Samnan
Copy link

Samnan commented Aug 13, 2017

This is a mess really. I have tried everything to update the php cs fixer path, in executables section, in php cs fixer path ,removed one of them to keep the other , nothing works. The warning continues.

@Glavin001
Copy link
Owner

@Samnan the applicable line of code can be found at https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/php-cs-fixer.coffee#L92-L93

    if options.cs_fixer_path
      @deprecateOptionForExecutable("PHP-CS-Fixer", "PHP - PHP-CS-Fixer Path (cs_fixer_path)", "Path")

Where options.cs_fixer_path is the old, deprecated PHP - CS-Fixer Path option.
By deleting the value for this option -- making it an empty string, falsy -- it will not show the deprecation message.

If you find there is an issue, I recommend creating a debug.md Gist by following instructions at https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md
Without this debug.md information nothing can/will be done to investigate your issue. Once provided, I am confident we can figure out the issue.


@treasu and @k2levin if you have recommendations for how to improve the deprecation message, please let me know and preferably submit a Pull Request changing the code found at https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/beautifier.coffee#L99-L101

@Berg93
Copy link

Berg93 commented Dec 7, 2017

php-cs-fixer-problem
@Glavin001

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

No branches or pull requests

9 participants