-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
ci/cdPR checks, deploys, automationPR checks, deploys, automationphpRequires understanding PHPRequires understanding PHP
Description
Description of the bug
While working on #111 , we learned that the default composer test will fail after initial configure due to the current structure of navigating to cd plugins/[folder] before running phpcs or phpunit and the resulting folder not having proper .phpcs.xml (prefixes, names, etc) nor a proper phpunit.xml.
Steps To Reproduce
- Clone this repo
- run
yes '' | php ./configure.php --project_name=cwp --author_name=cwp [email protected](accepting all defaults) - run
composer install - run
composer test - Observe failures
Additional Information
- Ensure plugin is cloned, scaffolded, search-replaced, config files generated so that when composer test is run it's working correctly.
- Ensure theme and plugin namespaces are just the name of the theme or plugin, without the
Alley\WP\prefix, e.g.,Example_PluginnotAlley\WP\Example_Plugin. Ensure this is universally applied, including in template files for the scaffolder in the plugin. - Remove
./plugin-templates/in.phpcs.xmlas part of scaffolding as it isn't necessary after the configure script has been run. - Add a new block to
.phpcs.xmldisabling the same check that was disabled in./plugin-templates/but for the plugin's blocks folder instead. - Ensure phpunit configuration is present in the plugin folder after running the configure script.
- Ensure that the
xsi:noNamespaceSchemaLocationproperty points to../../mu-plugins/vendor/phpunit/phpunit/phpunit.xsdfor both the plugin and the theme, and that this isclient-mu-pluginsinstead ofmu-pluginsfor a VIP install. - Ensure autoloader is properly being loaded in the plugin and theme so that tests pass.
- Ensure that Composer autoloader configuration is correct - for tests it should be PSR-4 format, not WordPress autoloader format.
- Ensure theme files and tests are added to the autoloader configuration now that create-wordpress-theme includes PHP components.
Metadata
Metadata
Assignees
Labels
ci/cdPR checks, deploys, automationPR checks, deploys, automationphpRequires understanding PHPRequires understanding PHP