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

Roadmap for 2.0 #10

Open
10 of 17 tasks
dnaber-de opened this issue Oct 30, 2022 · 0 comments
Open
10 of 17 tasks

Roadmap for 2.0 #10

dnaber-de opened this issue Oct 30, 2022 · 0 comments
Milestone

Comments

@dnaber-de
Copy link
Member

dnaber-de commented Oct 30, 2022

Simplify bootstrapping/setup

Right now you have to define half a dozen constants (most of them DB credentials) in the phpunit.xml file just to work. I'd like to have a DB URL here like mysql://user:password@host/db_name?table_prefix=wp_ as single, yet human readable configuration. It should be read by default from an environment variable.

Ideally we ship a default boostrap file with a common set up to ease the set up of tests with WP Tests Starter

API Updates

  • Remove the SaltGeneratorInterface it's simply over the top
  • Reduce public methods of WpTestsStarter, there are simply to much of them that are not needed to be public
  • Rename namespace Common to Helper
  • Rename WpTestsStarter::createDummyConfigFile() to ::writeConfigFile()
  • Constants and globals should not set immediately but first on WpTestsStarter::bootstrap(). Thus ::defineDbName() should be renamed to ::useDbName() and so on
  • Fluent interface for WpTestsStarter public methods
  • Add method WpTestsStarter::addLivePlugin(callable $plugin) to directly run on muplugins_loaded
  • Add methods WpTestsStarter::addFilter() and ::addAction() to register listener before WP is loaded
  • Improve serialization of constants that gets on-the-fly written in the config file
  • Separate internals from WpTestsStarter into extra classes following single responsibility principle
  • Add method WpTestsStarter::useMuPluginDir(string $muPluginDir)
  • Add method WpTestsStarter::addNetworkActivePlugin(string $plugin)
  • Replace wordpress/wordpress repo with roots/wordpress or any other plain WP core library and a custom boot loader

Others

  • Update documentation: use https://github.com/WordPress/wordpress-develop as core repository. It is identified by a composer.json as wordpress/wordpress so we don't need to maintain a fork anymore (which is abandoned anyway)
  • Update documentation: focus on setup and use cases, less noise (API reference is basically useless)
  • Remove inline comments that don't add any value
  • Set Namespace to Inpsyde\WpTestsStarter and move everything to src/
dnaber-de added a commit that referenced this issue Oct 30, 2022
dnaber-de added a commit that referenced this issue Oct 30, 2022
dnaber-de added a commit that referenced this issue Oct 30, 2022
dnaber-de added a commit that referenced this issue Oct 31, 2022
* Rename setters: ::defineDbName() → ::useDbName() and thus
* Declare constants and globals on WpTestsStarter::bootstrap() and not
  immediately on the setters call
* set all unnecessary public methods from WpTestsStarter to private
@dnaber-de dnaber-de modified the milestones: 1.0.2, 2.0.0 Nov 1, 2022
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

1 participant