-
Notifications
You must be signed in to change notification settings - Fork 951
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
Phalcon storage #743
base: develop
Are you sure you want to change the base?
Phalcon storage #743
Changes from 1 commit
d68233e
074d366
eedce8f
04f183e
a0a289e
2173560
ced15f3
835b318
cf3a157
4d77748
f18eb47
cfd5166
fa994c1
5d1cf4b
4f90609
97d6f14
ab1d2bd
122aebd
a016904
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,12 @@ cache: | |
directories: | ||
- $HOME/.composer/cache | ||
- vendor | ||
- $HOME/cphalcon | ||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7 | ||
- hhvm | ||
env: | ||
global: | ||
- SKIP_MONGO_TESTS=1 | ||
|
@@ -20,11 +19,16 @@ services: | |
- mongodb | ||
- redis-server | ||
- cassandra | ||
- mysql | ||
- memcached | ||
before_install: | ||
- phpenv config-rm xdebug.ini || return 0 | ||
- composer install --prefer-source --no-interaction | ||
- vendor/bin/install-phalcon.sh 2.0.x | ||
- phpenv config-rm xdebug.ini || return 0 | ||
install: | ||
- composer install --no-interaction | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is |
||
before_script: | ||
- php -m | ||
- psql -c 'create database oauth2_server_php;' -U postgres | ||
after_script: | ||
- php test/cleanup.php |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
namespace OAuth2\Storage\Phalcon\Models; | ||
|
||
use OAuth2\Storage\Phalcon\Phalcon; | ||
use Phalcon\Mvc\Model\Validator\Email as Email; | ||
|
||
class OauthUsers extends \Phalcon\Mvc\Model | ||
|
@@ -77,7 +78,7 @@ public static function findFirst($parameters = null) | |
public function initialize() | ||
{ | ||
$this->keepSnapshots(true); | ||
$this->setSource("'oauth__users'"); | ||
$this->setSource("'" . $this->getDI()->get(Phalcon::KEY_PHALCON_CONFIG_ARRAY)->getUserTable() . "'"); | ||
$this->hasMany('username', 'OAuth2\Storage\Phalcon\Models\OauthAccessTokens', 'user_id', array("alias" => "AccessTokens")); | ||
$this->hasMany('username', 'OAuth2\Storage\Phalcon\Models\OauthRefreshTokens', 'user_id', array("alias" => "RefreshTokens")); | ||
} | ||
|
@@ -112,7 +113,7 @@ public function validation() | |
*/ | ||
public function getSource() | ||
{ | ||
return 'oauth__users'; | ||
return $this->getDI()->get(Phalcon::KEY_PHALCON_CONFIG_ARRAY)->getUserTable(); | ||
} | ||
|
||
/** | ||
|
@@ -132,5 +133,5 @@ public function getRefreshTokens($parameters = null) | |
{ | ||
return $this->getRelated('RefreshTokens', $parameters); | ||
} | ||
|
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add newline :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, got it. Thanks for pointing them out. I'll clean it up ASAP. What do you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remove php 7 and hhvm!! Just add an if statement around your before_install:
.. Or something similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad... I'm kinda new to Travis and I've really only used a couple times, let alone with Phalcon. I'll fix it up right away.