Skip to content

Commit

Permalink
Revert "Phalcon travis ci config (#1)"
Browse files Browse the repository at this point in the history
This reverts commit f18eb47.
  • Loading branch information
lucasantarella committed Jul 5, 2016
1 parent f18eb47 commit cfd5166
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 130 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cache:
directories:
- $HOME/.composer/cache
- vendor
- $HOME/cphalcon
php:
- 5.3
- 5.4
Expand All @@ -21,16 +20,11 @@ services:
- mongodb
- redis-server
- cassandra
- mysql
- memcached
before_install:
- composer install --prefer-source --no-interaction
- vendor/bin/install-phalcon.sh
- phpenv config-rm xdebug.ini || return 0
- phpenv config-rm xdebug.ini || return 0
install:
- composer install --no-interaction
before_script:
- php -m
- psql -c 'create database oauth2_server_php;' -U postgres
after_script:
- php test/cleanup.php
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"aws/aws-sdk-php": "~2.8",
"firebase/php-jwt": "~2.2",
"predis/predis": "dev-master",
"thobbs/phpcassa": "dev-master",
"techpivot/phalcon-ci-installer": "~1.0"
"thobbs/phpcassa": "dev-master"
}
}
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthAccessTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function findFirst($parameters = null)
*/
public function initialize()
{
$this->setSource("'oauth_access_tokens'");
$this->setSource("'oauth__access_tokens'");
$this->belongsTo('user_id', 'OAuth2\Storage\Phalcon\Models\OauthUsers', 'username', array("alias" => "User"));
$this->belongsTo('client_id', 'OAuth2\Storage\Phalcon\Models\OauthClients', 'client_id', array("alias" => "Client"));
}
Expand All @@ -73,7 +73,7 @@ public function initialize()
*/
public function getSource()
{
return 'oauth_access_tokens';
return 'oauth__access_tokens';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class OauthAuthorizationCodes extends \Phalcon\Mvc\Model
*/
public function getSource()
{
return 'oauth_authorization_codes';
return 'oauth__authorization_codes';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthClients.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function findFirst($parameters = null)
*/
public function initialize()
{
$this->setSource("'oauth_clients'");
$this->setSource("'oauth__clients'");
$this->belongsTo('user_id', 'OAuth2\Storage\Phalcon\Models\OauthUsers', 'username', array("alias" => "User"));
}

Expand All @@ -79,7 +79,7 @@ public function initialize()
*/
public function getSource()
{
return 'oauth_clients';
return 'oauth__clients';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/OAuth2/Storage/Phalcon/Models/OauthJti.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OauthJti extends \Phalcon\Mvc\Model
*/
public function getSource()
{
return 'oauth_jti';
return 'oauth__jti';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthJwt.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function findFirst($parameters = null)
*/
public function initialize()
{
$this->setSource("'oauth_jwt'");
$this->setSource("'oauth__jwt'");
$this->belongsTo('client_id', 'OAuth2\Storage\Phalcon\Models\OauthClients', 'client_id', array("alias" => "Client"));
}

Expand All @@ -61,7 +61,7 @@ public function initialize()
*/
public function getSource()
{
return 'oauth_jwt';
return 'oauth__jwt';
}

public function getClient($parameters = null)
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthPublicKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function findFirst($parameters = null)
*/
public function initialize()
{
$this->setSource("'oauth_public_keys'");
$this->setSource("'oauth__public_keys'");
$this->belongsTo('client_id', 'OAuth2\Storage\Phalcon\Models\OauthClients', 'client_id', array("alias" => "Client"));
}

Expand All @@ -67,7 +67,7 @@ public function initialize()
*/
public function getSource()
{
return 'oauth_public_keys';
return 'oauth__public_keys';
}

public function getClient($parameters = null)
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthRefreshTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function findFirst($parameters = null)
*/
public function initialize()
{
$this->setSource("'oauth_refresh_tokens'");
$this->setSource("'oauth__refresh_tokens'");
$this->belongsTo('user_id', 'OAuth2\Storage\Phalcon\Models\OauthUsers', 'username');
$this->belongsTo('client_id', 'OAuth2\Storage\Phalcon\Models\OauthClients', 'client_id');
}
Expand All @@ -73,7 +73,7 @@ public function initialize()
*/
public function getSource()
{
return 'oauth_refresh_tokens';
return 'oauth__refresh_tokens';
}

}
2 changes: 1 addition & 1 deletion src/OAuth2/Storage/Phalcon/Models/OauthScopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OauthScopes extends \Phalcon\Mvc\Model
*/
public function getSource()
{
return 'oauth_scopes';
return 'oauth__scopes';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth2/Storage/Phalcon/Models/OauthUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function findFirst($parameters = null)
public function initialize()
{
$this->keepSnapshots(true);
$this->setSource("'oauth_users'");
$this->setSource("'oauth__users'");
$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"));
}
Expand Down Expand Up @@ -112,7 +112,7 @@ public function validation()
*/
public function getSource()
{
return 'oauth_users';
return 'oauth__users';
}

/**
Expand Down
3 changes: 0 additions & 3 deletions src/OAuth2/Storage/Phalcon/Phalcon.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ class Phalcon implements
*/
public function __construct($di, $config = array())
{
if(!isset($di['db']))
throw new \InvalidArgumentException('Dependency injector must contain a valid database connection');

$this->di = $di;
$this->config = array_merge(array(
'client_table' => 'oauth_clients',
Expand Down
2 changes: 0 additions & 2 deletions test/OAuth2/AutoloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ public function testClassesExist()
$this->assertTrue(class_exists('OAuth2\Response'));
$this->assertTrue(class_exists('OAuth2\GrantType\UserCredentials'));
$this->assertTrue(interface_exists('OAuth2\Storage\AccessTokenInterface'));
$this->assertTrue(class_exists('OAuth2\Storage\Phalcon\Phalcon'));
$this->assertTrue(class_exists('OAuth2\Storage\Phalcon\Models\OauthUsers'));
}
}
101 changes: 0 additions & 101 deletions test/OAuth2/Storage/Phalcon/PhalconTest.php

This file was deleted.

15 changes: 15 additions & 0 deletions test/OAuth2/Storage/PhalconTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Created by PhpStorm.
* User: lucas
* Date: 7/1/2016
* Time: 2:08 PM
*/

namespace OAuth2\Storage;


class PhalconTest extends BaseTest
{

}

0 comments on commit cfd5166

Please sign in to comment.