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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests on lowest deps also #123

Merged
merged 8 commits into from Nov 9, 2022
Merged

Run tests on lowest deps also #123

merged 8 commits into from Nov 9, 2022

Conversation

szepeviktor
Copy link
Owner

@szepeviktor szepeviktor commented Nov 9, 2022

@herndlm Here we go 馃悗

From #122 (comment)

@szepeviktor
Copy link
Owner Author

szepeviktor commented Nov 9, 2022

  • Locking wp-coding-standards/wpcs (2.1.0)

Root of CS errors.

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

yep, the phpcs errors can be fixed by upgrading the non direct dependency wp-coding-standards/wpcs from 2.1.0 to 2.3.0 but then some other CS errors show up, but it's a step forward

@szepeviktor
Copy link
Owner Author

upgrading the non direct dependency wp-coding-standards/wpcs

Done.

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

composer require --dev szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset:^0.6.1 automattic/phpcs-neutron-standard:^1.7 fixes all phpcs errors but one

@szepeviktor
Copy link
Owner Author

szepeviktor commented Nov 9, 2022

Let's just ignore CS.
I'm not willing to fiddle with my (unused, as I do not write code) CS for hours.

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

the dev deps in general are not important at all for the lowest deps test IMO. annoying that they get downgraded

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

a good pragmatical solution might be to run the lowest tests with just e.g. composer update --prefer-lowest --prefer-stable php-stubs/wordpress-stubs phpstan/phpstan. maybe the symfony polyfill too if you want, then we have all non-dev deps :)

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

looks like you're determined to fix it 馃帀
for the stub-dependency I think I can build you some conditional tests. e.g. one mysql2date for WP 5 and one for WP 6 or so, or just lock them to WP 6

@szepeviktor
Copy link
Owner Author

szepeviktor commented Nov 9, 2022

@herndlm Dev deps fixed!

  • Locking php-stubs/wordpress-stubs (v4.7.14)

How to handle inconsistent WP types?

@szepeviktor
Copy link
Owner Author

AFAIK WP 6.0 introduced meaningful types. Up to 5.0 types were mainly ignored.

@szepeviktor
Copy link
Owner Author

szepeviktor commented Nov 9, 2022

You can't cook a tasty soup from mud!!

@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

hehe, I wanted to suggest to wrap some tests maybe in something like

if (InstalledVersions::satisfies(new VersionParser(), 'php-stubs/wordpress-stubs', '^5.0')) {
            yield from $this->gatherAssertTypes(__DIR__ . '/data/wp_error_parameter.php');
        }

but locking the stubs should be fine, right. lower phpstan version is the most interesting thing most likely :)

@szepeviktor szepeviktor merged commit c02f76a into master Nov 9, 2022
1 check passed
@szepeviktor szepeviktor deleted the szepeviktor-patch-1 branch November 9, 2022 21:46
@herndlm
Copy link
Contributor

herndlm commented Nov 9, 2022

I think this makes sense, thx Viktor

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

Successfully merging this pull request may close these issues.

None yet

2 participants