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

Issue 497: Abstracting Storage API #555

Merged
merged 94 commits into from
Jun 10, 2014
Merged

Issue 497: Abstracting Storage API #555

merged 94 commits into from
Jun 10, 2014

Conversation

lukecarbis
Copy link
Contributor

Resolves #497

Remaining:

  • CS Fixes

See #497 for further discussion.

shadyvb and others added 30 commits April 30, 2014 10:18
Add new WPDB Storage Adapter, instruct Stream to use it
Provide a filtering mechanism to alter storage engine used
Execute the following to get a mongo server working inside vvv for testing:
```
vasshin # ssh into vagrant
sudo apt-get install mongodb -y
sudo pecl install mongo
echo 'extension=mongo.so' | sudo tee -a /etc/php5/mods-available/mongo.conf
sudo php5enmod mongo
sudo service php-fpm restart
```

You'll need to install a mu-plugin so the db engine would switch, put the
following in `mu-plugins/stream-mongo.php` ( or any filename ):
```
<?php
add_filter( 'wp_stream_db_adapter', function() { return 'mongo'; } );
add_filter( 'wp_stream_no_tables', '__return_true' );
```
@shadyvb
Copy link
Contributor

shadyvb commented May 28, 2014

@lukecarbis @fjarrett And now that Travis is finally happy, please do review/test at will.

@shadyvb
Copy link
Contributor

shadyvb commented May 28, 2014

@fjarrett Please note that I'm now using WordPress:core ruleset for PHPCS checks, feel free to add extra rules to phpcs.ruleset.xml as you see fit. And please do note any CS issue that might not be covered by existing sniffs ( or PHPStorm checks ) so it can be incorporated into WPCS and save us the time needed to fix it everytime.

Luke Carbis and others added 9 commits May 29, 2014 09:03
Conflicts:
	bin/.travis.yml
	includes/db.php
	includes/db/install/wpdb.php
	phpcs.ruleset.xml
	stream.php
	tests/bootstrap.php
…temporarily untill JetStream enables Facets feature
Conflicts:
	classes/class-wp-stream-context-query.php
	classes/class-wp-stream-dashboard-widget.php
	classes/class-wp-stream-db.php
	classes/class-wp-stream-install.php
	classes/class-wp-stream-query.php
	includes/db/install/wpdb.php
	includes/install.php
	stream.php
	tests/tests/test-stream.php
@lukecarbis
Copy link
Contributor Author

What shall we do about the db directory and associated class files?

  1. Move the db folder from includes to classes, and modify the autoloader function to explicitly load these differently
  2. Move the db folder to the root directory, and create a new constant in stream called WP_STREAM_DB_DIR
  3. Leave everything where it is (in the includes directory)

@frankiejarrett
Copy link
Contributor

@lukecarbis I'd say option #1, except db-updates should remain in the includes dir because it's not a class. We might even be able to delete it completely.

@lukecarbis
Copy link
Contributor Author

I'm happy with this branch now 😺. @shadyvb - any reason for us to keep the 'do not merge' tag?

@lukecarbis lukecarbis added this to the 2.0.0 milestone Jun 5, 2014
frankiejarrett added a commit that referenced this pull request Jun 10, 2014
Issue 497: Abstracting Storage API
@frankiejarrett frankiejarrett merged commit dd1743f into 2.0.0 Jun 10, 2014
@frankiejarrett frankiejarrett deleted the issue-156 branch June 10, 2014 17:32
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

Successfully merging this pull request may close these issues.

4 participants