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

Scrutinizer: still any use for PHP? #200

Open
mindplay-dk opened this issue May 29, 2024 · 4 comments
Open

Scrutinizer: still any use for PHP? #200

mindplay-dk opened this issue May 29, 2024 · 4 comments

Comments

@mindplay-dk
Copy link

Hey,

I noticed you're one of the few people still using Scrutinizer - and as with all of my own projects, nothing appears to work anymore.

None of my projects using Scrutinizer have worked in years - whenever I work on one of my PHP projects, I try again to see if I can get it working, and today I actually got one of my projects to pass an inspection, using the following bit of config:

checks:
    php: true
build:
    image: default-bionic
    environment:
        php: 8.1.28
    nodes:
        analysis:
            tests:
                override:
                    - php-scrutinizer-run

The magic is in build.image - it looks like their default default image doesn't even work for PHP, so you have to change this to default-bionic, and the environment.php setting should be set to an official PHP release tag.

I honestly don't know if the rest of these settings actually do something, or if so what - their documentation is an absolute mess, and their basic PHP instructions have not worked in at least 5 years.

And when I say this "works", I mean it actually ran an inspection and flagged it green - but it doesn't look like the values on the badges were actually updated, and the main page for that project still shows inspections from 5 years ago.

So yeah, maybe this bit of configuration helps you get your build working again - I figured it might be helpful.

But also, I was wondering, what is your impression or experience with Scrutinizer in recent years? To me, it's starting to look a lot like abandonware, at least with regards to their PHP support? Literally nothing works by default and the documentation is barely there.

I'm wondering if I should switch to something like coveralls for the code coverage badge, and just forget about the code quality rating. I don't think there's another code quality product (that's free for open source) that even supports PHP?

What do you think? 🤔

@koriym
Copy link
Member

koriym commented May 30, 2024

Hi, I am one of the few developers who still use scrutinizer in own repository.

scrutinizer was a pioneering CI service that appeared many years before the GH action workflow, with executables such as phpmd, phpcs and code coverage.
It included, but can now be executed by GH action. So the only thing that makes sense now is the code quality rating.

The scrutiniser gives an "A" grade for code quality because it only allows two branches in a method (e.g. no more than two if statements in a method), which is a very simple but good indicator of high maintainability that hasn't faded over time, and it is also a good indicator of the quality of the code compared to other frameworks and libraries. Compared to other frameworks and libraries, the Aura package scores highly.

That's all there is to it. It doesn't give out FAILEDs that need to be repaired, nor does it require regular maintenance. The only thing you might gain is a badge, like a medal, but we think you have very little to lose.

You may consider this as meaningless or remove it as outdated. Either way I don't see it as something that needs a big debate.

Other ones seem to be https://codeclimate.com/ and https://www.codacy.com/, plus https://www.sonarsource.com/products/sonarcloud/.

@mindplay-dk
Copy link
Author

Thanks @koriym 🙂

I wasn't trying to start a big debate - just wanted to help with the broken setup, and get your opinions. 🙂

@koriym
Copy link
Member

koriym commented May 30, 2024

Yeah, I understand your feeling. I'm not opposed to the transition. ☺️

@harikt
Copy link
Member

harikt commented Jun 1, 2024

If we need any adjustments, we can proceed. Nothing is blocking here.

Off topic : Nice to see you @mindplay-dk and good to see your contributions in php-fig .

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

No branches or pull requests

3 participants