Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

is bin/pluginmap_generator.php broken ? #5054

Merged
merged 1 commit into from
Oct 20, 2013

Conversation

weierophinney
Copy link
Member

I just tried run bin/pluginmap_generator.php via console and produce error :

Notice: Undefined property: Zend\File\PhpClassFile::$classname in /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php on line 126

Call Stack:
    0.0008     345144   1. {main}() /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php:0


Notice: Undefined property: Zend\File\PhpClassFile::$classname in /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php on line 127

Call Stack:
    0.0008     345144   1. {main}() /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php:0


Fatal error: Cannot access empty property in /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php on line 129

Call Stack:
    0.0008     345144   1. {main}() /Users/abdulmalikikhsan/www/ZendSkeletonApplication/vendor/zendframework/zendframework/bin/pluginmap_generator.php:0

@Ocramius
Copy link
Member

@samsonasik is this actually something that is still used?

@samsonasik
Copy link
Contributor Author

@Ocramius I don't know, should is it removed ?

@Ocramius
Copy link
Member

@samsonasik looks like an old version of the classmap generator...

@samsonasik
Copy link
Contributor Author

I propose it to be removed at #5057

- Fixed some assumptions that changed along the way with regards to what
  the PhpClassFile class composes and returns. Added the ability to
  aggregate namespaces as well as classes in PhpClassFile, and a getter
  for the namespaces, in order to make the pluginmap_generator work.
- Modified the pluginmap_generator to use the new methods.
@weierophinney
Copy link
Member

@samsonasik Please test this PR -- my tests show it working with these changes. If so, I'll get somebody to review and merge.

@samsonasik
Copy link
Contributor Author

@weierophinney I've test and got :

return array (
  'module' => 'Application\\Module',
  'indexcontroller' => 'Application\\Controller\\IndexController',
);

should '\' should be '' ( single backslash ) ?

@Ocramius
Copy link
Member

Ocramius commented Sep 3, 2013

@samsonasik no, the double backslashes are actually ok

@samsonasik
Copy link
Contributor Author

ok 👍

@@ -122,11 +122,20 @@
// Iterate over each element in the path, and create a map of pluginname => classname
$map = new \stdClass;
foreach ($l as $file) {
$namespaces = $file->getNamespaces();
$namespace = empty($file->namespace) ? '' : $file->namespace . '\\';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is not used since is overwritten in the second foreach

@ghost ghost assigned Maks3w Oct 20, 2013
Maks3w added a commit that referenced this pull request Oct 20, 2013
Maks3w added a commit that referenced this pull request Oct 20, 2013
Maks3w added a commit that referenced this pull request Oct 20, 2013
@Maks3w Maks3w merged commit 4984111 into zendframework:master Oct 20, 2013
weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
- Fixed some assumptions that changed along the way with regards to what
  the PhpClassFile class composes and returns. Added the ability to
  aggregate namespaces as well as classes in PhpClassFile, and a getter
  for the namespaces, in order to make the pluginmap_generator work.
- Modified the pluginmap_generator to use the new methods.
gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants