Skip to content

Commit

Permalink
Merge 4fd44cc into 48ec06f
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 17, 2021
2 parents 48ec06f + 4fd44cc commit cd6b4b9
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ composer.lock
vendor/
build/
.idea/
/.phpunit.result.cache
21 changes: 12 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ cache:
directories:
- $HOME/.composer/cache

env:
- XDEBUG_MODE=coverage

matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: hhvm
allow_failures:
- php: hhvm
- php: 7.3
- php: 8.0

before_script:
- composer self-update
- composer update --prefer-source
- |
if [ $(phpenv version-name) != '8.0' ]; then
travis_retry composer update
fi
if [ $(phpenv version-name) == '8.0' ]; then
travis_retry composer update --ignore-platform-reqs
fi
script:
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
Expand All @@ -27,5 +31,4 @@ after_script:
- php ./vendor/bin/coveralls -v

notifications:
irc: "irc.freenode.org#zftalk.modules"
email: true
54 changes: 27 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name": "bushbaby/zf-oauth2-doctrine-mutatetablenames",
"description": "Module for Apigility's Doctrine OAuth2 Server Adapter so table names can be configured",
"license": "BSD-3-Clause",
"author": "Bas Kamer",
"keywords": [
"oauth2",
"doctrine",
"apigility"
],
"require": {
"php": "^5.5 || ^7.0",
"zendframework/zend-modulemanager": "^2.7",
"zendframework/zend-stdlib": "^2.7 || ^3.0",
"api-skeletons/zf-oauth2-doctrine": "^1.0 || ^2.0 || ^3.0"
},
"autoload": {
"psr-4": {
"ZF\\OAuth2\\Doctrine\\MutateTableNames\\": "src/"
"name": "bushbaby/zf-oauth2-doctrine-mutatetablenames",
"description": "Module for Apigility's Doctrine OAuth2 Server Adapter so table names can be configured",
"license": "BSD-3-Clause",
"author": "Bas Kamer",
"keywords": [
"oauth2",
"doctrine",
"apigility"
],
"require": {
"php": "^7.3 || ~8.0",
"laminas/laminas-modulemanager": "^2.10.1",
"laminas/laminas-stdlib": "^2.7 || ^3.0",
"samsonasik/zf-oauth2-doctrine": "dev-master"
},
"classmap": [
"Module.php"
]
},
"require-dev": {
"phpunit/phpunit": "^4.8.8 || ^5.2",
"squizlabs/php_codesniffer": "^2.7",
"satooshi/php-coveralls": "~1.0"
}
"autoload": {
"psr-4": {
"ZF\\OAuth2\\Doctrine\\MutateTableNames\\": "src/"
},
"classmap": [
"Module.php"
]
},
"require-dev": {
"phpunit/phpunit": "^9.2",
"squizlabs/php_codesniffer": "^2.7",
"satooshi/php-coveralls": "~1.0"
}
}
29 changes: 9 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?xml version="1.0"?>
<phpunit
bootstrap="./tests/Bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true"
stopOnFailure="false"
processIsolation="false"
backupGlobals="false"
syntaxCheck="true"
>
<testsuite name="ZfOAuth2DoctrineMutateablename tests">
<directory>./tests</directory>
</testsuite>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/Bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" verbose="true" stopOnFailure="false" processIsolation="false" backupGlobals="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuite name="ZfOAuth2DoctrineMutateablename tests">
<directory>./tests</directory>
</testsuite>
</phpunit>
6 changes: 3 additions & 3 deletions src/Container/MutateTableNamesSubscriberFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace ZF\OAuth2\Doctrine\MutateTableNames\Container;

use Interop\Container\ContainerInterface;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Stdlib\ArrayUtils;
use Laminas\ServiceManager\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Laminas\Stdlib\ArrayUtils;
use ZF\OAuth2\Doctrine\MutateTableNames\EventSubscriber\MutateTableNamesSubscriber;

class MutateTableNamesSubscriberFactory implements FactoryInterface
Expand Down
8 changes: 4 additions & 4 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace ZF\OAuth2\Doctrine\MutateTableNames;

use Doctrine\Common\EventManager;
use Zend\EventManager\EventInterface;
use Zend\ModuleManager\Feature;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\EventManager\EventInterface;
use Laminas\ModuleManager\Feature;
use Laminas\ServiceManager\ServiceLocatorInterface;
use ZF\OAuth2\Doctrine\MutateTableNames\EventSubscriber\MutateTableNamesSubscriber;

class Module implements
Expand All @@ -22,7 +22,7 @@ class Module implements
public function getAutoloaderConfig()
{
return [
'Zend\Loader\StandardAutoloader' => [
'Laminas\Loader\StandardAutoloader' => [
'namespaces' => [
__NAMESPACE__ => __DIR__,
]
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Container/MutateTableNamesSubscriberFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace ZF\OAuth2\Doctrine\MutateTableNamesTest;

use Interop\Container\ContainerInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use ZF\OAuth2\Doctrine\MutateTableNames\Container\MutateTableNamesSubscriberFactory;
use ZF\OAuth2\Doctrine\MutateTableNames\EventSubscriber\MutateTableNamesSubscriber;

/**
* @covers \ZF\OAuth2\Doctrine\MutateTableNames\Container\MutateTableNamesSubscriberFactory
*/
class MutateTableNamesSubscriberFactoryTest extends \PHPUnit_Framework_TestCase
class MutateTableNamesSubscriberFactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCanCreateFromFactory()
{
Expand Down
22 changes: 11 additions & 11 deletions tests/src/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
namespace ZF\OAuth2\Doctrine\MutateTableNamesTest;

use Doctrine\Common\EventManager;
use Zend\EventManager\EventInterface;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\BootstrapListenerInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\DependencyIndicatorInterface;
use Zend\Mvc\ApplicationInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Laminas\EventManager\EventInterface;
use Laminas\ModuleManager\Feature\AutoloaderProviderInterface;
use Laminas\ModuleManager\Feature\BootstrapListenerInterface;
use Laminas\ModuleManager\Feature\ConfigProviderInterface;
use Laminas\ModuleManager\Feature\DependencyIndicatorInterface;
use Laminas\Mvc\ApplicationInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use ZF\OAuth2\Doctrine\MutateTableNames\EventSubscriber\MutateTableNamesSubscriber;
use ZF\OAuth2\Doctrine\MutateTableNames\Module;

/**
* @covers \ZF\OAuth2\Doctrine\MutateTableNames\Module
*/
class ModuleTest extends \PHPUnit_Framework_TestCase
class ModuleTest extends \PHPUnit\Framework\TestCase
{
public function testAttachesEventSubscriberToDoctrineEventManager()
{
Expand Down Expand Up @@ -75,9 +75,9 @@ public function testModuleAutoloading()
$this->assertInstanceOf(AutoloaderProviderInterface::class, $module);

$autoload = $module->getAutoloaderConfig();
$this->assertInternalType('array', $autoload);
$this->assertIsArray($autoload);
$this->assertSame(array(
'Zend\\Loader\\StandardAutoloader' =>
'Laminas\\Loader\\StandardAutoloader' =>
array(
'namespaces' =>
array(
Expand All @@ -93,7 +93,7 @@ public function testModuleConfig()

$this->assertInstanceOf(ConfigProviderInterface::class, $module);

$this->assertInternalType('array', $module->getConfig());
$this->assertIsArray($module->getConfig());
}

public function testModuleDependencies()
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Subscriber/MutateTableNamesSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
/**
* @covers \ZF\OAuth2\Doctrine\MutateTableNames\EventSubscriber\MutateTableNamesSubscriber
*/
class MutateTableNamesSubscriberTest extends \PHPUnit_Framework_TestCase
class MutateTableNamesSubscriberTest extends \PHPUnit\Framework\TestCase
{
/**
* @var MutateTableNamesSubscriber
*/
private $subscriber;

public function setUp()
protected function setUp(): void
{
$this->config = include __DIR__ . '/../../../config/oauth2.doctrine-orm.mutatetablenames.global.php.dist';
$this->config = $this->config['zf-oauth2-doctrine']['mutatetablenames'];
Expand Down

0 comments on commit cd6b4b9

Please sign in to comment.