Skip to content

Instantly share code, notes, and snippets.

@aaronsummers
Created July 12, 2023 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronsummers/0c9b535c58623ff87dc1784fc1b3d18e to your computer and use it in GitHub Desktop.
Save aaronsummers/0c9b535c58623ff87dc1784fc1b3d18e to your computer and use it in GitHub Desktop.
Add stubs to VS Code and DEVSENSE PHP extension

Install the stubs for ACF pro and WordPress using composer

ACF PRO stubs also installed other dependencies like WP stubs.

composer require php-stubs/acf-pro-stubs

If you're not installing the ACF stubs, add the WP stubs using the below command:

composer require php-stubs/wordpress-stubs

Once installed add the stubs to your project, by copying the location of the stubs from the returned install notes:

@example: Using version ^6.2 for php-stubs/wordpress-stubs @example: php-stubs/acf-pro-stubs

Add these stubs to our settings.json

	"php.stubs": [
		"*"
		"php-stubs/acf-pro-stubs",
		"php-stubs/wordpress-stubs",
	],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment