Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 10 2018 21:39
    @SpacePossum banned @jewome62_gitlab
Bartolomé Sintes
@BartolomeSintes
````
print "<h1>";
     print "Hello";
print "</h1>";
formatted into
print "<h1>";
print "Hello";
print "</h1>";
HenkPoley
@HenkPoley
I believe code beautification is not the 'core business' of php-cs-fixer. Though I have to say that other tools (for example prettier-php) tend to use a lot wobblier methods of parsing the PHP scripts.
RANDRIAMITSIRY Lovasoa Gabriel
@JessGabriel_gitlab
Hey guys, someone know how to disable 'phpdoc_var_without_name' ?
I want to use:
/**
 * @var ObjectType $object
*/
Instead of
/**@var ObjectType $object*/
Obviously, in the first case, variable name will be removed. So, I loose autocomplete on my IDE (PhpStorm)
Dave van der Brugge
@dmvdbrugge
To disable a rule, simply not include it in your config :wink:
If it's included in a set you're using, you can respecify the rule as false:
'phpdoc_var_without_name' => false,
Kuba Werłos
@kubawerlos
How would this rule break PHPStrom's autoconplete? Can you elaborate? I have this rule always enabled and using PHPStorm and never had any problems.
RANDRIAMITSIRY Lovasoa Gabriel
@JessGabriel_gitlab
@dmvdbrugge it is not a separated rule, it is part of Symfony standard itself.
@kubawerlos I loose autocomplete, because he doesn't know which variable is annoted. And sometimes, this rule change the annotation to simple comment too
Dave van der Brugge
@dmvdbrugge
@JessGabriel_gitlab everything is a separate rule, that's how it works. Like I said, if you enable a set that uses it, you need to disable it, and I gave you the way to do it.
I see that you're active so :-)
SpacePossum
@SpacePossum
Hi, sure in a bit :) Im doing some merging and testing and going through a lot of notifications, sorry ya'all I was out for a few weeks, hope to catch up as much as I can today
Pol Dellaiera
@drupol
Thanks you mate :-)
I'm glad you merged the one with lowercase stuff :-)
SpacePossum
@SpacePossum
yeah Im patching that one on the upstream merge on 3.0.0 since we renamed the interfaces on that line X D
great to have it in, thanks for all the work!
Pol Dellaiera
@drupol
Excellent I'm really glad
A new release will be out soon I guess ?
Anyway, I don't bother you, ping me if you need me
SpacePossum
@SpacePossum
feel free to hang around, Im waiting for the unit tests to finish and such, not much action : )
not sure about the new release, Im planning to keep going most of the day until diner time, than do couple of hours tomorrow during the day
Im not doing the releases, so we would have to see when Keradus has time and is happy with the state of the brances
Pol Dellaiera
@drupol
Oki oki
SpacePossum
@SpacePossum
so that was my little 3 working days of PHP-CS-Fixer maintenance :sweat_smile: thanks all for all your efforts! :heart: sorry I didn't got to all your PR's, should be back to it soonish though ;)
Farhad Safarov
@seferov
Hello!
I was wondering if there is a plan to add a rule to enforce declare typehint unless there is a mixed docblock?
I searched through Github issues and I couldn't find anything about it.
SpacePossum
@SpacePossum
hello, you mean something like FriendsOfPHP/PHP-CS-Fixer#4056 ?
Farhad Safarov
@seferov
@SpacePossum actually it is similar. thank you
SpacePossum
@SpacePossum
good to hear, it has been merge so with the next minor release you can start using it : D
HenkPoley
@HenkPoley
php-cs-fixer turns /** @noinspection SpellCheckingInspection */ into // @noinspection SpellCheckingInspection. How do I stop it from doing that ?
Dave van der Brugge
@dmvdbrugge
Disable phpdoc_to_comment
HenkPoley
@HenkPoley
@dmvdbrugge thanks, that fixed it :)
Renato Schroepfer
@renatoschroepfer
Guys! I installed the php-cs-fixer extension on vscode. But when I save the file I get this error. PHP CS Fixer: php general error.
I am using Ubuntu 18.04 -> /usr/local/bin/php-cs-fixer
Eduardo Aranda Hernández
@eduardoarandah

Hello everybody!

Are there any rules to normalize declaration spaces?

$ok='ok';
$ok ='ok';
$ok= 'ok';

`

(add space before and after)

$ok = 'ok';
$ok = 'ok';
$ok = 'ok';
(same for this)
$a=[ 
    'instagram'=>'asdf',
    'instagram'    => 'asdf',
    'instagram' =>'asdf',
    'instagram'=> 'asdf',
];
Eduardo Aranda Hernández
@eduardoarandah

nevermind! i found it!

thanks!

jbalius
@jbalius
Hi Everyone,
I know no_superfluous_phpdoc_tags option, but I do not want to enable it as when it removes superfluous param definitions from doc blocks, PhpStorm complains that not all params are defined in docbloc.
Is there any option to remove superfluous docblock completely (docblock which has ALL params and return type as superfluous)?
Thanks in advance
HenkPoley
@HenkPoley
Just in case: in .php_cs: PhpCsFixer\Config::create()->setRules(['no_superfluous_phpdoc_tags ' => false])
AFAIK even with no docblock PhpStorm will keep complaining.
On the other hand, with them removed you can more clearly see in PhpStorm what you haven't documented
mihhac
@mihhac
Hi Everyone! I would like to add possibility to create parent directories to the cache file if the path does not exist but was configured. For example: cache file path was set to ~/.php-cs-fixer/.php_cs.cache and it will fail because directory ~/.php-cs-fixer/ does not exist. I think it would be beneficial for CI, some does not support caching by file but only by directories. What do you think?
Dave van der Brugge
@dmvdbrugge
Just make the directory in your CI setup before calling php-cs-fixer?
mkdir -p ~/.php-cs-fixer && <your current command> if you need a one-liner
I don't think this is the responsibility of php-cs-fixer
(But I'm just a contributor, not a maintainer, they might have a different opinion)
mihhac
@mihhac
Thanks @dmvdbrugge, let's hear more opinions.
Julien Falque
@julienfalque
agreed, creating the directory beforehand using mkdir is the way to go IMO