Skip to content

Use more strict rector rules#289

Open
CarlSchwan wants to merge 4 commits into
masterfrom
carl/rector-strict
Open

Use more strict rector rules#289
CarlSchwan wants to merge 4 commits into
masterfrom
carl/rector-strict

Conversation

@CarlSchwan

Copy link
Copy Markdown
Contributor

1rst commit is mostly modifying rector and second is running rector

I reviewed manually all the changes in lib but not in tests

Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan self-assigned this Jul 14, 2026
@CarlSchwan CarlSchwan changed the title Use more struct rector rules Use more strict rector rules Jul 14, 2026
@SebastianKrupinski

Copy link
Copy Markdown

The CI is completely red

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan
CarlSchwan force-pushed the carl/rector-strict branch from 35b684e to faa702e Compare July 14, 2026 15:39
@CarlSchwan

Copy link
Copy Markdown
Contributor Author

The CI is completely red

fixed

@phil-davis

Copy link
Copy Markdown
Contributor

cs-fixer still wants to line-up a few comments.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan
CarlSchwan force-pushed the carl/rector-strict branch from 71cdc85 to e16bab0 Compare July 15, 2026 08:49
@phil-davis

Copy link
Copy Markdown
Contributor

https://github.com/sabre-io/http/actions/runs/29402155718/job/87309000578?pr=289

There were 3 errors:

1) Sabre\HTTP\FunctionsTest::testGetHeaderValues with data set #0 ('a', ['a'])
TypeError: Sabre\HTTP\FunctionsTest::testGetHeaderValues(): Argument #1 ($input) must be of type array, string given, called in /home/runner/work/http/http/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 1667

/home/runner/work/http/http/tests/HTTP/FunctionsTest.php:44
...

And needs a rebase anyway, the other "hmac" PR was just merged.

Comment thread rector.php

@phil-davis phil-davis Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@CarlSchwan please write some words about why you have proposed these Rector rule sets.
(when we decide on new/changed rule sets, we will want to apply them to all the sabre-io repos)

Comment on lines -32 to +33
self::assertFalse($result, 'No AWS Authorization header was supplied, so we should have gotten false');
self::assertEquals(AWS::ERR_NOAWSHEADER, $this->auth->errorCode);
$this->assertFalse($result, 'No AWS Authorization header was supplied, so we should have gotten false');
$this->assertSame(AWS::ERR_NOAWSHEADER, $this->auth->errorCode);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are all a bit surprising. I thought that the PHPunit Assert library were all static methods, and previous iterations of code-style and analysis recommended using the :: static calling.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants