dingo-d / wp-pest

A package that will add WordPress integration test suite with Pest
MIT License
119 stars 5 forks source link

Problem with WP 6.0.0 #10

Closed palmiak closed 2 years ago

palmiak commented 2 years ago

Describe your bug

When I try to use the latest (at the moment WP 6.0) I get " [ERROR] Failed opening remote file".

It's caused by the fact that https://api.wordpress.org/core/stable-check/1.0/ stores the latest WP as 6.0, while the file is 6.0.0.zip (https://github.com/WordPress/wordpress-develop/archive/refs/tags/6.0.0.zip)

I think there should be a method or an array with correct mappings, because I feel that once in a while this problem might occur.

Steps to Reproduce

Just setup the tests with 6.0

Expected behavior

To setup correctly

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in this repo.

Yes

dingo-d commented 2 years ago

Oh, that sucks! I'll fix this in a couple of days. I'm using https://api.wordpress.org/core/stable-check/1.0/ to check the tags, but I guess the zip is different in the .0 releases. Thanks for opening an issue for this. I'll probably just check if the latest is the version with no security version in semver and just add a 0 at the end 🤷🏼‍♂️

And maybe open an issue for the WP API on meta trac 😄

palmiak commented 2 years ago

I was wondering - maybe it would be better to install WP using composer instead of PHP. It would take care of managing the versions. What do you think?

dingo-d commented 2 years ago

I'd have to use shell_exec for that (or proc_open), and I think that would be an unnecessary complication tbh.

I have the fix almost ready, need to fix the tests, because I changed how I check for available tags 🙂

dingo-d commented 2 years ago

@palmiak I've tagged version 1.3.0, this should be fixed now 🙂