Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Feature: show deprecated php warnings #94

Merged
merged 4 commits into from
Sep 29, 2018

Conversation

mzk
Copy link
Contributor

@mzk mzk commented Mar 1, 2017

screen shot 2017-03-01 at 12 13 21

ref mzk#1

@@ -39,7 +39,7 @@

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="125"/>
<property name="lineLimit" value="135"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather use multi-line constructor. This rule is quite important

Copy link
Contributor Author

@mzk mzk Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function __construct(
        PhpExecutable $phpExecutable,
        $fileToCheck,
        $aspTags = false,
        $shortTag = false,
        $deprecated = false)
    {
FILE: /private/var/www/PHP-Parallel-Lint/src/Process/LintProcess.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 29 | ERROR | [x] The closing parenthesis of a multi-line function
    |       |     declaration must be on a new line
    |       |     (PEAR.Functions.FunctionDeclaration.CloseBracketLine)
 30 | ERROR | [x] The closing parenthesis and the opening brace of a
    |       |     multi-line function declaration must be on the same
    |       |     line
    |       |     (PEAR.Functions.FunctionDeclaration.NewlineBeforeOpenBrace)
    public function __construct(
        PhpExecutable $phpExecutable,
        $fileToCheck,
        $aspTags = false,
        $shortTag = false,
        $deprecated = false
    )
    {
 31 | ERROR | [x] The closing parenthesis and the opening brace of a
    |       |     multi-line function declaration must be on the same
    |       |     line
    |       |     (PEAR.Functions.FunctionDeclaration.NewlineBeforeOpenBrace)
    public function __construct(
        PhpExecutable $phpExecutable,
        $fileToCheck,
        $aspTags = false,
        $shortTag = false,
        $deprecated = false
    ) {
Opening brace should be on a new line
    |       |     (Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine)

So, isn't possible with this ruleset

Copy link

@TomasVotruba TomasVotruba Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Crazy :D

I think I've disabled one of those rules for these reasons.

@mzk
Copy link
Contributor Author

mzk commented Mar 15, 2018

ping @JakubOnderka

@JakubOnderka
Copy link
Owner

@mzk Sorry for late reply. Can you please resolve conflicts and rebase to current master? Then I will merge it and release new version

@mzk
Copy link
Contributor Author

mzk commented Aug 13, 2018

@JakubOnderka What took so long? Waiting for a conflict? Frequent release prevents conflicts.

@mzk mzk force-pushed the deprecated-warnings branch from 1b1857c to c084943 Compare August 13, 2018 20:07
@mzk
Copy link
Contributor Author

mzk commented Aug 14, 2018

Rebased, tests passed. @JakubOnderka

@mzk
Copy link
Contributor Author

mzk commented Sep 7, 2018

ping @JakubOnderka

@JakubOnderka JakubOnderka merged commit 32e04fb into JakubOnderka:master Sep 29, 2018
@mzk mzk deleted the deprecated-warnings branch October 5, 2018 11:01
@legoktm
Copy link

legoktm commented Oct 15, 2018

Thanks for adding this @mzk, I was going to file a bug for this feature request :-)

@JakubOnderka, would it be possible to have a new release/tag for this feature?

jrfnl added a commit to Yoast/yoastcs that referenced this pull request Feb 17, 2022
The `--show-deprecated` option was added to PHP Parallel Lint some years ago, but never documented, so I never knew it existed.

Enabling this option allows for deprecations which can be detected at compile time to be shown (in contrast to deprecations which can only be detected at run-time).

Refs:
* php-parallel-lint/PHP-Parallel-Lint#81
* JakubOnderka/PHP-Parallel-Lint#94
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants