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

rename v3 main plugin file #62

Closed
joostdekeijzer opened this issue Feb 23, 2024 · 8 comments
Closed

rename v3 main plugin file #62

joostdekeijzer opened this issue Feb 23, 2024 · 8 comments

Comments

@joostdekeijzer
Copy link

Details

  • WordPress version: v6.4.3
  • ACF version: v6.2.2 Pro

Reproduction

Testing v3 branch I've updated the plugin through composer from v2.1.0 to v3.x-dev.

Because the main plugin file is renamed I get the following error in the WordPress plugins overview:

image

Renaming the main plugin file from plugin.php to acf-country.php should fix this and make a more seamless version update possible.

@joostdekeijzer
Copy link
Author

(did a quick test by renaming the file manually directly after composer update and renaming does resolve this issue for me)

@nlemoine
Copy link
Owner

Hello @joostdekeijzer,

I did some cleanup, can you try latest 3.x branch and tell me if it's working for you? Than I can merge #63 and 3.0 is released.

@joostdekeijzer
Copy link
Author

With PHPv8.1 I get

PHP Fatal error: Type of HelloNico\AcfCountry\CountryField::$show_in_rest must not be defined (as in class acf_field) in public_html/wp-content/plugins/acf-country/src/CountryField.php on line 0

Removing code below from CountryField.php solves it.

    /**
     * Isn't needed because we're extending acf_field, but it's here for clarity.
     *
     * @var boolean
     */
    public bool $show_in_rest = true;

@joostdekeijzer
Copy link
Author

Other than that the upgrade works fine

@nlemoine
Copy link
Owner

Just removed the type, seems to work fine, you can update and tell me everything's ok from your side?

@joostdekeijzer
Copy link
Author

All OK here :)

@nlemoine
Copy link
Owner

Let's release it then! :)

@joostdekeijzer
Copy link
Author

💪

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

2 participants