Skip to content

Commit

Permalink
remove zend autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
mamuz committed Aug 20, 2015
1 parent 3160c74 commit c81c9c7
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 85 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* text=auto

/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
/README.md export-ignore
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The recommended way to install
```json
{
"require": {
"mamuz/mamuz-content-manager": "0.*"
"mamuz/mamuz-content-manager": "*"
}
}
```
Expand Down
21 changes: 0 additions & 21 deletions autoload_classmap.php

This file was deleted.

78 changes: 41 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{
"name" : "mamuz/mamuz-content-manager",
"type" : "library",
"description" : "Provides simple content manager for ZF2 with Doctrine",
"homepage" : "https://github.com/mamuz/MamuzContentManager",
"license" : "MIT",
"keywords" : ["mamuz", "cms", "markdown", "zf2", "doctrine"],
"authors" : [
{
"name" : "Marco Muths",
"email": "mamuz.de@gmail.com"
}
],
"minimum-stability": "dev",
"prefer-stable" : true,
"require" : {
"php" : ">=5.4",
"zendframework/zend-mvc" : "~2.3",
"zendframework/zend-servicemanager": "~2.3",
"zendframework/zend-eventmanager" : "~2.3",
"zendframework/zend-modulemanager" : "~2.3",
"zendframework/zend-loader" : "~2.3",
"zendframework/zend-view" : "~2.3",
"zendframework/zend-http" : "~2.3",
"zendframework/zend-form" : "~2.3",
"doctrine/doctrine-orm-module" : "0.*",
"maglnet/magl-markdown" : "1.*"
},
"require-dev" : {
"satooshi/php-coveralls" : "0.6.*",
"phpunit/phpunit" : "4.*",
"mockery/mockery" : "0.9.*",
"mamuz/php-dependency-analysis": "0.*"
},
"autoload" : {
"psr-0": {
"MamuzContentManager\\": "src/"
}
"name": "mamuz/mamuz-content-manager",
"type": "library",
"description": "Provides simple content manager for ZF2 with Doctrine",
"homepage": "https://github.com/mamuz/MamuzContentManager",
"license": "MIT",
"keywords": [
"cms",
"markdown",
"zf2",
"doctrine"
],
"authors": [
{
"name": "Marco Muths",
"email": "mamuz.de@gmail.com"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.4",
"zendframework/zend-mvc": "~2.3",
"zendframework/zend-servicemanager": "~2.3",
"zendframework/zend-eventmanager": "~2.3",
"zendframework/zend-modulemanager": "~2.3",
"zendframework/zend-view": "~2.3",
"zendframework/zend-http": "~2.3",
"zendframework/zend-form": "~2.3",
"doctrine/doctrine-orm-module": "~0.8",
"maglnet/magl-markdown": "~1.3"
},
"require-dev": {
"satooshi/php-coveralls": "0.6.*",
"phpunit/phpunit": "4.*",
"mockery/mockery": "0.9.*",
"mamuz/php-dependency-analysis": "0.*"
},
"autoload": {
"psr-0": {
"MamuzContentManager\\": "src/"
}
}
}
15 changes: 0 additions & 15 deletions src/MamuzContentManager/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Zend\ModuleManager\ModuleManagerInterface;

class Module implements
Feature\AutoloaderProviderInterface,
Feature\ConfigProviderInterface,
Feature\InitProviderInterface
{
Expand All @@ -28,20 +27,6 @@ public function getConfig()
return include __DIR__ . '/../../config/module.config.php';
}

public function getAutoloaderConfig()
{
return array(
'Zend\Loader\ClassMapAutoloader' => array(
__DIR__ . '/../../autoload_classmap.php',
),
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__,
),
),
);
}

private function addDomainManager(ModuleManager $modules)
{
/** @var \Zend\ServiceManager\ServiceLocatorInterface $sm */
Expand Down
11 changes: 0 additions & 11 deletions tests/MamuzContentManagerTest/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ protected function setUp()

public function testImplementingFeatures()
{
$this->assertInstanceOf('Zend\ModuleManager\Feature\AutoloaderProviderInterface', $this->fixture);
$this->assertInstanceOf('Zend\ModuleManager\Feature\ConfigProviderInterface', $this->fixture);
$this->assertInstanceOf('Zend\ModuleManager\Feature\InitProviderInterface', $this->fixture);
}
Expand All @@ -27,16 +26,6 @@ public function testConfigRetrieval()
$this->assertSame($expected, $this->fixture->getConfig());
}

public function testAutoloaderConfigRetrieval()
{
$expected = array(
'Zend\Loader\ClassMapAutoloader',
'Zend\Loader\StandardAutoloader',
);

$this->assertSame($expected, array_keys($this->fixture->getAutoloaderConfig()));
}

public function testLoadingModules()
{
$moduleManager = \Mockery::mock('Zend\ModuleManager\ModuleManagerInterface');
Expand Down

0 comments on commit c81c9c7

Please sign in to comment.