GithubHelp home page GithubHelp logo

Comments (6)

jkowalleck avatar jkowalleck commented on September 7, 2024

the parameter annotation is missing for a good reason> there is nothing to document.
the parameter is intended to be mixed. if it was not null, it is casted to string, using __toString() magic method, if needed.

furthermore, the following patch will confuse phpmd - which it was written for. there must be no space

-     * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
-     * @SuppressWarnings(PHPMD.ElseExpression)
+     * @SuppressWarnings (PHPMD.BooleanArgumentFlag)
+     * @SuppressWarnings (PHPMD.ElseExpression)

please help reproducing this. i do not see any psalm warnings.
I do not see this issue, cannot reproduce

  • Code Analysis (8.1, lowest)
    php tools/psalm/vendor/vimeo/psalm/psalm --php-version=8.1 --no-diff --no-cache --long-progress --output-format=github --report=CI_reports/psalm/php8.1_lowest.junit.xml --stats --shepherd
      shell: /usr/bin/bash -e {0}
      env:
        PHP_VERSION_LATEST: 8.2
        PHP_PROJECT_EXT: dom,json,libxml,simplexml
        REPORTS_DIR: CI_reports
        TESTS_REPORTS_ARTIFACT: tests-reports
        TYPES_REPORTS_ARTIFACT: types-reports
        COMPOSER_PROCESS_TIMEOUT: 0
        COMPOSER_NO_INTERACTION: 1
        COMPOSER_NO_AUDIT: 1
    Target PHP version: 8.1 (set by CLI argument) Enabled extensions: dom.
    Scanning files...
    Analyzing files...
    
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 60 / 86 (69%)
    ░░░░░░░░░░░░░░░░░░░░░░░░░░
    🐑 results sent to shepherd.dev 🐑
    
  • Code Analysis (8.2, highest)
    php tools/psalm/vendor/vimeo/psalm/psalm --php-version=8.2 --no-diff --no-cache --long-progress --output-format=github --report=CI_reports/psalm/php8.2_highest.junit.xml --stats --shepherd
      shell: /usr/bin/bash -e {0}
      env:
        PHP_VERSION_LATEST: 8.2
        PHP_PROJECT_EXT: dom,json,libxml,simplexml
        REPORTS_DIR: CI_reports
        TESTS_REPORTS_ARTIFACT: tests-reports
        TYPES_REPORTS_ARTIFACT: types-reports
        COMPOSER_PROCESS_TIMEOUT: 0
        COMPOSER_NO_INTERACTION: 1
        COMPOSER_NO_AUDIT: 1
    Target PHP version: 8.2 (set by CLI argument) Enabled extensions: dom.
    Scanning files...
    Analyzing files...
    
    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 60 / 86 (69%)
    ░░░░░░░░░░░░░░░░░░░░░░░░░░
    🐑 results sent to shepherd.dev 🐑
    

from cyclonedx-php-library.

llaville avatar llaville commented on September 7, 2024

I saw it, because I run tests locally on my clone copy of this repo !

With : https://github.com/CycloneDX/cyclonedx-php-library/blob/v2.2.0/composer.json#L119

I've noticed that warning is shown only on first run (when no psalm cache dir exists).

With params used by CI, I've realized that warning is not display with --output-format=github option

cdx

from cyclonedx-php-library.

llaville avatar llaville commented on September 7, 2024

To reproduce locally:

rm -rf .psalm.cache/
composer test:psalm

from cyclonedx-php-library.

llaville avatar llaville commented on September 7, 2024

It come from Psalm itself: this warning is only display on console or phpstorm output format
See https://github.com/vimeo/psalm/blob/master/src/Psalm/IssueBuffer.php#L710

from cyclonedx-php-library.

jkowalleck avatar jkowalleck commented on September 7, 2024

thanks for the research.
will look into this and provide a fix

from cyclonedx-php-library.

jkowalleck avatar jkowalleck commented on September 7, 2024

just like in the screenshot from #313 (comment)
I was unable to get psalm to output the actual warning, and furthermore psalm still passed.

but i was able to provide a fix so that psalm did not output that it was able to fix something.

from cyclonedx-php-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.