is bin/pluginmap_generator.php broken ? #5054

Merged
merged 1 commit into from Oct 20, 2013

Projects

None yet

4 participants

@samsonasik

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
Member

@samsonasik is this actually something that is still used?

@samsonasik

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

@Ocramius
Member

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

@samsonasik

I propose it to be removed at #5057

@weierophinney weierophinney [#5054] make pluginmap generator work again
- 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.
4984111
@weierophinney
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

@weierophinney I've test and got :

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

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

@Ocramius
Member
Ocramius commented Sep 3, 2013

@samsonasik no, the double backslashes are actually ok

@samsonasik

ok 👍

@Maks3w Maks3w commented on the diff Oct 2, 2013
bin/pluginmap_generator.php
@@ -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 . '\\';
@Maks3w
Maks3w Oct 2, 2013 Zend Framework member

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

@Maks3w Maks3w was assigned Oct 20, 2013
@Maks3w Maks3w merged commit 4984111 into zendframework:master Oct 20, 2013

1 check passed

Details default The Travis CI build passed
@weierophinney weierophinney added a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#5054] make pluginmap generator work again
- 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.
e4120f9
@gianarb gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@Maks3w Maks3w Merge pull request zendframework/zendframework#5054 8b2030c
@gianarb gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@Maks3w Maks3w Merge pull request zendframework/zendframework#5054 in develop 73d3d1c
@gianarb gianarb pushed a commit to zendframework/zend-file that referenced this pull request May 15, 2015
@Maks3w Maks3w Merge pull request zendframework/zendframework#5054 in master de6c4f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment