zendframework / ZFTool

Utility module for maintaining modular Zend Framework 2 applications.
187 stars 102 forks source link

PHP Fatal error: Class 'Zend\Log\ProcessorPluginManager' #92

Closed cincarnato closed 9 years ago

cincarnato commented 10 years ago

zftool not work. (ZF2.3.0)

step 1:

Run: composer require zendframework/zftool:dev-master

and I had the problem when running : "php zf.php" from the directory "/vendor/zendframework/zftool"

which is where composer installed zftools in. command line error was "Error: I cannot find the autoloader of the application."

I try move zftool to vendor/ and same error "Error: I cannot find the autoloader of the application."

From zftool dir I try run: "composer install" and then

PHP Fatal error: Class 'Zend\Log\ProcessorPluginManager' not found in /home/security/www/App/vendor/ZFTool/vendor/zendframework/zend-mvc/Zend/Mvc/Service/AbstractPluginManagerFactory.php on line 33

samsonasik commented 10 years ago

have you tried zf 2.3.1 ? I'm using zf 2.3.1 and it's working

settermjd commented 10 years ago

After it working for some time, I've received the same error. This is with the phar file and after using the composer install.

settermjd commented 10 years ago

I've found the source of the issue and would like to commit a patch for it, but I've not contributed to the project before and am not sure how to get the tests to run. Odd question, yes. But I would have thought that all I'd need to do is to cd to the test directory and run phpunit. Is anything else required?

samsonasik commented 10 years ago

I usually fix typo/copyright in this module :D . I have run composer install while clone and install via ZFTool directory, and realise that it's using ZF2 2.2.5. but I think, if you're using ZendSkeletonApplication, it's not be an issue ( usually, I used ZendDeveloperTools to just run php public/index.php. About testing, yes, you can go to tests directory and run phpunit . you can follow : https://github.com/zendframework/zf2/blob/master/CONTRIBUTING.md it's quite similar.

settermjd commented 10 years ago

Thanks Abdul.

Matt — Sent from Mailbox for iPhone

On Wed, Apr 30, 2014 at 8:30 PM, Abdul Malik Ikhsan notifications@github.com wrote:

I usually fix typo/copyright in this module :D . I have run composer install while clone and install via ZFTool directory, and realise that it's using ZF2 2.2.5. but I think, if you're using ZendSkeletonApplication, it's not be an issue. About testing, yes, you can go to tests directory and run phpunit . you can follow : https://github.com/zendframework/zf2/blob/master/CONTRIBUTING.md it's quite similar.

Reply to this email directly or view it on GitHub: https://github.com/zendframework/ZFTool/issues/92#issuecomment-41832011

avatasia commented 10 years ago

I have find a solution, after install the zftool, change composer.json: "require": { "php": ">=5.3.3", "zendframework/zendframework": "2.3.*" }

then run 'composer install', and run 'php bin\create-phar', you can use zftool.phar to create your new project.

aadswebdesign commented 10 years ago

Hi all, when learning to work with composer and zftool , I came across 'PHP Fatal error: Class 'Zend\Log\ProcessorPluginManager' too. I managed to get all loaded 'zendframework/zftool' and all the other needed 'zendframework/-' classes, except one '-/zend-log' and I founded that out later on. Then I tried to compose it separately and of many zf2 versions still I did not get it composed at no way. So 'and that is me, I looked for another way to get it solved and I did :) First I had a close look of how that 'zendframework/-' was done, then I created it the same way for 'zend-log'. Here is how.

  1. in 'zendframework' I created this new folders 'zend-log/Zend/' 2 in 'Zend' I pasted a copy of 'Log' from a 'ZF2-2.3.1' stack.
  2. then I added a line ' 'Zend\Log\' => array($vendorDir . '/zendframework/zend-log'),' in 'composer/autoload_namespaces.php' Problem solved, all is working fine now! Cheers
bilelwebdev commented 9 years ago

Hi Folks,

To resolve this issue, I added the following requirement in composer.json: "zendframework/zend-log": ">=2.3.0"

Then just restart "composer install" (don't forget to remove composer.lock if file exists) and launch: php bin\create-phar

Everything should work fine !

Bilel

leeivan commented 9 years ago

I follow bilewebdev's method, but I execute "php composer.phar update" at last step instead.

paladini commented 9 years ago

To fix that I justf follow the instructions above (from @bilelwebdev and @leeivan ).

What I exactly did is following:

  1. Added "zendframework/zend-log": ">=2.3.0" to composer.json.
  2. Run composer update or php composer.phar update.

Thanks!

Doev commented 9 years ago

Same here. ZFTool was not working before I added "zendframework/zend-log": ">=2.3.0" to composer.json.

ezimuel commented 9 years ago

I fixed this in the last merge, there was missing dependencies with Zend\Log and Zend\I18n due to the last update on zend-mvc.