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

upgraded module to support zf3 #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that depends on ZfcBase.

## Requirements

* Zend Framework 2
* Zend Framework 3

## Installation

Expand Down
73 changes: 38 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
{
"name": "zf-commons/zfc-base",
"description": "A set of genetic (abstract) classes which are commonly used across multiple modules.",
"type": "library",
"keywords": [
"zf2"
],
"homepage": "https://github.com/ZF-Commons/ZfcBase",
"authors": [
{
"name": "Evan Coury",
"email": "[email protected]",
"homepage": "http://blog.evan.pro/"
},
{
"name": "Kyle Spraggs",
"email": "[email protected]",
"homepage": "http://www.spiffyjr.me/"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zend-db": "~2.1",
"zendframework/zend-eventmanager": "~2.1",
"zendframework/zend-loader": "~2.1",
"zendframework/zend-modulemanager": "~2.1",
"zendframework/zend-mvc": "~2.1",
"zendframework/zend-servicemanager": "~2.1",
"zendframework/zend-stdlib": "~2.1"
"name": "zf-commons/zfc-base",
"description": "A set of genetic (abstract) classes which are commonly used across multiple modules.",
"type": "library",
"keywords": [
"zf2"
],
"homepage": "https://github.com/ZF-Commons/ZfcBase",
"authors": [
{
"name": "Evan Coury",
"email": "[email protected]",
"homepage": "http://blog.evan.pro/"
},
"autoload": {
"psr-0": {
"ZfcBase": "src/"
},
"classmap": [
"./Module.php"
]
{
"name": "Kyle Spraggs",
"email": "[email protected]",
"homepage": "http://www.spiffyjr.me/"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zend-component-installer": "^1.0 || ^0.3 || ^1.0.0-dev@dev",
"zendframework/zend-db": "~2.8",
"zendframework/zend-eventmanager": "^3.0",
"zendframework/zend-loader": "~2.5",
"zendframework/zend-modulemanager": "~2.7",
"zendframework/zend-form": "~2.9",
"zendframework/zend-mvc": "^3.0",
"zendframework/zend-servicemanager": "~3.1",
"zendframework/zend-stdlib": "~3.0"
},
"autoload": {
"psr-0": {
"ZfcBase": "src/",
"ZfcBaseTest": "test/"
},
"classmap": [
"./Module.php"
]
}
}
4 changes: 3 additions & 1 deletion src/ZfcBase/Form/ProvidesEventsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public function getEventManager()
}
// silently ignore invalid eventIdentifier types
}
$this->setEventManager(new EventManager($identifiers));
$eventManager = new EventManager();
$eventManager->setIdentifiers($identifiers);
$this->setEventManager($eventManager);
}
return $this->events;
}
Expand Down
10 changes: 9 additions & 1 deletion test/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,18 @@ public static function init()
);

$config = ArrayUtils::merge($baseConfig, $testConfig);
$smConfig = isset($config['service_manager']) ? $config['service_manager'] : [];
$smConfig = new ServiceManagerConfig($smConfig);

$serviceManager = new ServiceManager(new ServiceManagerConfig());
$serviceManager = new ServiceManager();
$smConfig->configureServiceManager($serviceManager);
$serviceManager->setService('ApplicationConfig', $config);

// Load modules
$serviceManager->get('ModuleManager')->loadModules();



static::$serviceManager = $serviceManager;
}

Expand Down
2 changes: 2 additions & 0 deletions test/TestConfig.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ define('ZF2_PATH', getenv('HOME') . '/workspace/zf2/library');

return array(
'modules' => array(
'Zend\Router',
'Zend\Form',
'ZfcBase',
),
);