GithubHelp home page GithubHelp logo

zftool's Issues

List modules error

Hello, i`m use:

php zftool.phar modules

and always get the result:

No modules installed. Are you in the root folder...

I`m testing this with Windows :) (XP)

This is the root of the working directory of my project on the basis of a skeleton application. Contains several modules installed. Some of these modules are created using Zend Tool.
Thank you.

CreateController fails in mkdir if not only one folder to create

Just trying zftool in my first zf2 project and noticed this..
I created a module X and everything was fine.. didn't notice that it also created the XController so I tried to create it again

zftool.phar create controller X X

and it gave me an error:

PHP Warning:  mkdir(): No such file or directory in /home/user/workspace/test/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 141
PHP Stack trace:
PHP   1. {main}() /home/user/workspace/test/vendor/zendframework/zftool/zf.php:0
PHP   2. Zend\Mvc\Application->run() /home/user/workspace/test/vendor/zendframework/zftool/zf.php:50
PHP   3. Zend\EventManager\EventManager->trigger() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:309
PHP   4. Zend\EventManager\EventManager->triggerListeners() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207
PHP   5. call_user_func() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP   6. Zend\Mvc\DispatchListener->onDispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP   7. Zend\Mvc\Controller\AbstractController->dispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:114
PHP   8. Zend\EventManager\EventManager->trigger() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php:117
PHP   9. Zend\EventManager\EventManager->triggerListeners() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207
PHP  10. call_user_func() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP  11. Zend\Mvc\Controller\AbstractActionController->onDispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP  12. ZFTool\Controller\CreateController->controllerAction() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php:83
PHP  13. mkdir() /home/user/workspace/test/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php:141
PHP Warning:  file_put_contents(./module/Revis/view/test/test/index.phtml): failed to open stream: No such file or directory in /home/user/workspace/test/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php on line 146
PHP Stack trace:
PHP   1. {main}() /home/user/workspace/test/vendor/zendframework/zftool/zf.php:0
PHP   2. Zend\Mvc\Application->run() /home/user/workspace/test/vendor/zendframework/zftool/zf.php:50
PHP   3. Zend\EventManager\EventManager->trigger() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:309
PHP   4. Zend\EventManager\EventManager->triggerListeners() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207
PHP   5. call_user_func() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP   6. Zend\Mvc\DispatchListener->onDispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP   7. Zend\Mvc\Controller\AbstractController->dispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php:114
PHP   8. Zend\EventManager\EventManager->trigger() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php:117
PHP   9. Zend\EventManager\EventManager->triggerListeners() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207
PHP  10. call_user_func() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP  11. Zend\Mvc\Controller\AbstractActionController->onDispatch() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468
PHP  12. ZFTool\Controller\CreateController->controllerAction() /home/user/workspace/test/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php:83
PHP  13. file_put_contents() /home/user/workspace/test/vendor/zendframework/zftool/src/ZFTool/Controller/CreateController.php:146
There was an error during controller creation.

This ssemed to be because mkdir "recursive" param is default to false.. and the module current view folder is empty.. maybe setting the recursive param to true would solve this issue.

Build cache

Would it possible to use this tool to trigger the building of the module map cache, and the config cache? If there isn't already an easy way to do this from command line?

tag a version

For maintaining a "production-level" composer.json file and not a "stability: dev" one, please create a tag with what ever version possible.

create controller and action with different namespace

Hello,

I can not find command to create controller with different namespace. I have Application module with structure like this:

image
And I would like to be able to create controllers and actions in Admin namespace. Is it impossible using ZFTool or am I missing something?

Add Zend\Form dependency to composer.json

Because Zend\Form moved from required to suggested in the composer.json of Zend\Mvc you have to add Zend\Form as a dependency in the composer.json of ZFTool. Otherwise ZFTool throws an error:

Fatal error: Class 'Zend\Form\FormAbstractServiceFactory' not found in C:\www\project\vendor\zendframework\zend-servicemanager\Zend\ServiceManager\ServiceManager.php on line 311

zftool.phar: command not found

i download the zftool.phar and copy it to vendor/ZFtool and when go to that folder on ubuntu system it say: zftool.phar: command not found

Red text on fail notification

It is a suggestion: when i run a test fail, the text of fail is red, where your tag is red too. Can you write the text in white?

Add ZF2 MVC specific diagnostic checks

Moved from zendframework/zend-diagnostics#18

  • Check view_manager template_map and template_path_stack
    • Check for existence
    • Check for readability
    • Lint the PHP code
  • Check Zend\Db connection availability
  • Generic Zend\Cache\Adapter check, optionally probing for capabilities and checking that too.
  • Generic Zend\Session\Adapter check.
  • Try to instantiate all SM services found in configuration and catch exceptions.
  • Is module installed ? (request)
  • mbstring.func_overload === 0 here

Class 'Zend\Serializer\AdapterPluginManager' not found in phar

The PHAR version downloaded from packages.zendframework.com, whenever invoked, throws the following exception:

PHP Fatal error: Class 'Zend\Serializer\AdapterPluginManager' not found in phar:///usr/local/bin/zftool/vendor/zendframework/zend-mvc/Zend/Mvc/Service/AbstractPluginManagerFactory.php on line 2
PHP Stack trace:
PHP 1. {main}() /usr/local/bin/zftool:0
PHP 2. require() /usr/local/bin/zftool:11
PHP 3. Zend\Mvc\Application::init() phar:///usr/local/bin/zftool/zf.php:2
PHP 4. Zend\ModuleManager\ModuleManager->loadModules() phar:///usr/local/bin/zftool/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php:2
PHP 5. Zend\EventManager\EventManager->trigger() phar:///usr/local/bin/zftool/vendor/zendframework/zend-modulemanager/Zend/ModuleManager/ModuleManager.php:2
PHP 6. Zend\EventManager\EventManager->triggerListeners() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
PHP 7. call_user_func() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
PHP 8. Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
PHP 9. Zend\ServiceManager\ServiceManager->get() phar:///usr/local/bin/zftool/vendor/zendframework/zend-modulemanager/Zend/ModuleManager/Listener/ServiceListener.php:2
PHP 10. Zend\ServiceManager\ServiceManager->create() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
PHP 11. Zend\ServiceManager\ServiceManager->doCreate() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
PHP 12. Zend\ServiceManager\ServiceManager->createFromFactory() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
PHP 13. Zend\ServiceManager\ServiceManager->createServiceViaCallback() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
PHP 14. call_user_func() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
PHP 15. Zend\Mvc\Service\AbstractPluginManagerFactory->createService() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2

Fatal error: Class 'Zend\Serializer\AdapterPluginManager' not found in phar:///usr/local/bin/zftool/vendor/zendframework/zend-mvc/Zend/Mvc/Service/AbstractPluginManagerFactory.php on line 2

Call Stack:
0.0001 223488 1. {main}() /usr/local/bin/zftool:0
0.0100 770464 2. require('phar:///usr/local/bin/zftool/zf.php') /usr/local/bin/zftool:11
0.0115 887808 3. Zend\Mvc\Application::init() phar:///usr/local/bin/zftool/zf.php:2
0.0205 1903696 4. Zend\ModuleManager\ModuleManager->loadModules() phar:///usr/local/bin/zftool/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php:2
0.0233 2181320 5. Zend\EventManager\EventManager->trigger() phar:///usr/local/bin/zftool/vendor/zendframework/zend-modulemanager/Zend/ModuleManager/ModuleManager.php:2
0.0233 2181376 6. Zend\EventManager\EventManager->triggerListeners() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
0.0234 2183136 7. call_user_func() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
0.0234 2183168 8. Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost() phar:///usr/local/bin/zftool/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php:2
0.0287 2691504 9. Zend\ServiceManager\ServiceManager->get() phar:///usr/local/bin/zftool/vendor/zendframework/zend-modulemanager/Zend/ModuleManager/Listener/ServiceListener.php:2
0.0287 2692040 10. Zend\ServiceManager\ServiceManager->create() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
0.0287 2692040 11. Zend\ServiceManager\ServiceManager->doCreate() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
0.0287 2692088 12. Zend\ServiceManager\ServiceManager->createFromFactory() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
0.0288 2694536 13. Zend\ServiceManager\ServiceManager->createServiceViaCallback() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
0.0288 2694912 14. call_user_func() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2
0.0288 2694952 15. Zend\Mvc\Service\AbstractPluginManagerFactory->createService() phar:///usr/local/bin/zftool/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:2

I don't have any version of Zend Framework 2 installed.
I am using PHP 5.4.4-14 on Debian Wheezy.

I cannot download the ZF2 library from github.

I get this error:

C:\Users\Dennis\ZF2Training>php zftool.phar install zf mo

Warning: Invalid argument supplied for foreach() in phar://C:/Users/Dennis/ZF2Tr
aining/zftool.phar/src/ZFTool/Model/Zf.php on line 2
I cannot download the ZF2 library from github.

C:\Users\Dennis\ZF2Training>

I am on Windows 7, tried PHP 5.5.6 64, and PHP 4.4.22 86, but no go. What could be the problem?

'create action' command fails on `static::VALUE`

starting from static::VALUE to end of method all is removed

$this->setParams(array(
            'type' => static::TYPE,
            'someValue' => $someValue,
        ));
        return $viewModel;

become

$this->setParams(array(
            'type' => 

and adding unnecessary double tab indent

    public function someMethod()
    {
        first line
                other lines
        last line
    }

Php error in .phar

Current phar file show error messge:

Deprecated: Polyfill autoload support (file library/Zend/Stdlib/compatibility/autoload.php) is no longer necessary; please remove your require statement referencing this file in phar:///home/oleg/bin/zftool/vendor/zendframework/zend-stdlib/Zend/Stdlib/compatibility/autoload.php on line 2

PHP Stack trace:
PHP   1. {main}() /home/oleg/bin/zftool:0
PHP   2. require() /home/oleg/bin/zftool:11
PHP   3. require_once() phar:///home/oleg/bin/zftool/zf.php:2
PHP   4. ComposerAutoloaderInit081f8432ba4b62926df0ac8fd1dd620b::getLoader() phar:///home/oleg/bin/zftool/vendor/autoload.php:2
PHP   5. require() phar:///home/oleg/bin/zftool/vendor/composer/autoload_real.php:2
PHP   6. trigger_error() phar:///home/oleg/bin/zftool/vendor/zendframework/zend-stdlib/Zend/Stdlib/compatibility/autoload.php:2

I am use PHP 5.4.9

zf.php doesn't work when ZFTool is installed as Module

I report here an error reported in mailing list:
I cloned the ZFTool from Gitbub into vendor/ZFTool
Then I cd into that directory.
I enable ZFTool in application.config.php
I run: $ php zf.php create module TheName
It complains about not finding "vendor/ZFTool/vendor/autoload.php"

zf create Action with "-" on action name

When i create a new action with "-" on the name, ZfTool createas a method name with "-", and this raise a sintax error on PHP.

How to proceed:

zf create action my-action Controller Module

Create:

class Controller

public function my-actionAction() { //raise a sintaxError - Unexpected '-'
}

On:
ZFTool - Zend Framework 2 command line Tool
The application in this folder is using Zend Framework 2.3.3

Can't create index.phtml when creating controller

When I try create controller with command zf.php create controller I get following errors

Warning: mkdir(): No such file or directory in C:\OpenServer\domains\zf2.local\ZendSkeletonApplication\vendor\zftool\src\ZFTool\Controller\CreateController.php on line 142

Warning: file_put_contents(./module/test/view/test/index/index.phtml): failed to open stream: No such file or directory in C:\OpenServer\domains\zf2.local\ZendSkeletonApplicatio
n\vendor\zftool\src\ZFTool\Controller\CreateController.php on line 147
There was an error during controller creation.

I've fixed this by adding following string in moduleAction method in ZFTool\Controller\CreateController class:
mkdir("$path/module/$name/view/" . strtolower($name));

Wrong classpaths were generated

ZFTool genererates wrong classpaths:

return array(
    'Album\Module'                     => __DIR__ . '/../../../../../../D:\PATH_TO_PROJECT\module\Album/D:/PATH_TO_PROJECT/module/Album/Module.php',
    'Album\Controller\AlbumController' => __DIR__ . '/../../../../../../D:\PATH_TO_PROJECT\module\Album/D:/PATH_TO_PROJECT/module/Album/src/Album/Controller/AlbumController.php',
    'Album\Form\AlbumForm'             => __DIR__ . '/../../../../../../D:\PATH_TO_PROJECT\module\Album/D:/PATH_TO_PROJECT/module/Album/src/Album/Form/AlbumForm.php',
    'Album\Model\Album'                => __DIR__ . '/../../../../../../D:\PATH_TO_PROJECT\module\Album/D:/PATH_TO_PROJECT/module/Album/src/Album/Model/Album.php',
    'Album\Model\AlbumTable'           => __DIR__ . '/../../../../../../D:\PATH_TO_PROJECT\module\Album/D:/PATH_TO_PROJECT/module/Album/src/Album/Model/AlbumTable.php',
);

Win 7 64
Xampp php 5.4
The command I used:
d:\XAMPP\php\php.exe zf.php classmap generate d:\PATH_TO_PROJECT\module\Album
d:\PATH_TO_PROJECT\module\Album\autoload_classmap.php
-w

Allow running Diagnostics on each request

Use case (via Maxime Corbeau):

  • The diagnostics would be run on any requests.
  • IF all the tests are successful, then the request would be processed as usual.
  • IF some of the tests fail, the processing of the request would be stopped and the diagnostics page would be returned.

The reason for wanting this is that the test environment can change frequently: the above setup would allow detecting changes immediately as they occur without having to manually check the diagnostics page (which is cumbersome, and doesn't guarantee detecting changes as they occur anyway because it's checked sporadically whereas the only way to do so it to check on any request).
This obviously would be disabled for production environment.

Missing require dependency for Zend\Log in composer.json

I created zftool.phar by executing the following command:

$ php create-phar
Phar created successfully in D:\path-to\vendor\zendframework\zftool\bin/zftool.phar

Next I tried to run:

php zftool.phar

Result:

Fatal error: Class 'Zend\Log\ProcessorPluginManager' not found in phar://D:/path-to/vendor/zendframework/zftool/bin/zftool.phar/vendor/zendframework/zend-mvc/Zend/Mvc/Service/AbstractPluginManagerFactory.php on line 2

It seems Zend\Log is missing in composer.json. After adding it, running composer update and again running php create-phar everything works fine.

Suggested fix:
Add this line to the require section of composer.json:

"zendframework/zend-log": ">=2.2.2",

Errata in docs/DIAGNOSTICS.md

DirReadable class in "Check system paths" test is specified as DirRedable.
Should be DirReadable .

'zfcuser' is not a service of ZfcUser module. Should be replaced for example with 'zfcuser_user_service'?

Test 'is64bit' could return false even in 64bit windows machine https://bugs.php.net/bug.php?id=64863, so is it a valid test?

PHP Fatal error ArrayObject::offsetGet()

with zftool.phar downloaded from https://packages.zendframework.com/zftool.phar

I've maybe the same error that i've get with zf2.1.1, a problem with ArrayObject::offsetGet()

(issue zendframework/ZendSkeletonApplication#161)

I've PHP 5.3.3-7+squeeze14

And my version of zf2 :

zendframework/zendframework [dev-master f07fafa] : Zend Framework 2
zendframework/zftool [dev-master e0a06db] : Utility module for Zend Framework 2 applications.

$ ./zftool.phar
PHP Fatal error: Declaration of Zend\Stdlib\ArrayObject::offsetGet() must be compatible with that of ArrayAccess::offsetGet() in phar:///home/maxime.apollium.redmine.itika.net/application/zftool.phar/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject.php on line 2

Allow to have performance check

Hi,

ZF 2 is often criticized for being slow, but one of the reason is that there is few documentation about how to optimize the framework or a particular module (for instance DoctrineModule have a few options you need to tweak for production, same for a lot of modules).

Therefore I think it would be a good idea to have a new kind of "tests" to check if some performance things are done (I'm not sure if this would be part of the new diagnostic tool, too me it's a bit different)

Fatal error: Class 'Zend\Serializer\AdapterPluginManager' not found in D:\www\zend\cursozend\vendor\zendframework\zend-mvc\Zend\Mvc\Service\AbstractPluginManagerFactory.php on line 33

I just update using the comands:

  • php composer.phar self-update
  • php composer.php update

Now my application just send this error message and I dont know how to deal with it.

Fatal error: Class 'Zend\Serializer\AdapterPluginManager' not found in D:\www\zend\cursozend\vendor\zendframework\zend-mvc\Zend\Mvc\Service\AbstractPluginManagerFactory.php on line 33
Call Stack

Time Memory Function Location

1 0.0003 670640 {main}( ) ..\index.php:0
2 0.0059 943104 Zend\Mvc\Application::init( ) ..\index.php:12
3 0.0369 2805152 Zend\ModuleManager\ModuleManager->loadModules( ) ..\Application.php:253
4 0.0584 3533520 Zend\EventManager\EventManager->trigger( ) ..\ModuleManager.php:117
5 0.0585 3533576 Zend\EventManager\EventManager->triggerListeners( ) ..\EventManager.php:207
6 0.0586 3536296 call_user_func ( ) ..\EventManager.php:472
7 0.0586 3536328 Zend\ModuleManager\Listener\ServiceListener->onLoadModulesPost( ) ..\EventManager.php:472
8 0.0793 4336592 Zend\ServiceManager\ServiceManager->get( ) ..\ServiceListener.php:213
9 0.0793 4337104 Zend\ServiceManager\ServiceManager->create( ) ..\ServiceManager.php:481
10 0.0793 4337104 Zend\ServiceManager\ServiceManager->doCreate( ) ..\ServiceManager.php:557
11 0.0793 4337152 Zend\ServiceManager\ServiceManager->createFromFactory( ) ..\ServiceManager.php:598
12 0.0799 4340104 Zend\ServiceManager\ServiceManager->createServiceViaCallback( ) ..\ServiceManager.php:983
13 0.0799 4340472 call_user_func ( ) ..\ServiceManager.php:853
14 0.0799 4340512 Zend\Mvc\Service\AbstractPluginManagerFactory->createService( ) ..\ServiceManager.php:853

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

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

composer.json requires zend-version, but zf2's composer.json doesn't have that at all

running update on composer gave me the following:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - zendframework/zftool dev-master requires zendframework/zend-version >=2.0.0 -> no matching package found.
    - zendframework/zftool dev-master requires zendframework/zend-version >=2.0.0 -> no matching package found.
    - Installation request for zendframework/zftool dev-master -> satisfiable by zendframework/zftool dev-master.

Three days ago, #9 was merged with the following change to composer.json:
https://github.com/zendframework/ZFTool/pull/9/files#L4R30

But who provides zend-version ?

No zf.php

Where's this zf.php you speak of?

The application has thrown an exception!

I have my application setup and running.

I have added zftool using composer

From the root of my application, when I run "vendor/bin/zf.php modules" it throws an exception: "The application has thrown an exception!"

I can see the same issue was briefly mentioned here: #44

What can be the problem? How can I solve it?

php5.3 compatibility in InstallController line 58

for PHP 5.3.3 or later compatibility (as mentioned in the requirements) : in InstallController , line 58

$zipFolder = $tmpDir . '/' . rtrim($zip->statIndex(0)['name'], "/");

should be replaced with any thing like:

$zipFolders = $zip->statIndex(0);
$zipFolder = $tmpDir . '/' . rtrim($zipFolders['name'], "/");

Create action doesn't work

Hello!
When I trying to create an action with ZFTool e.g zf.php create action add Index Console z:/zend/app, I add this error : Invalid arguments or no arguments provided.
I also trying with zf.php create action add IndexController Console z:/zend/app.
For informations, my working environment is under Windows 7 and the IndexController and the Console module were previously created with ZFTool...

Can't install using composer

Hello,

I have downloadded zf2 sceleton application and I whant to use it with zftool.

I am using php .\composer.phar require zendframework/zftool:dev-master

But I am getting:Package "zendframework/zftool" listed for update is not installed. Ignoring.

How can I fix this issue?

wrong autoload location if installed with composer

when installed with composer you get error
" Error: I cannot find the autoloader of the application. "

This is because of subdirectory of zendframework. It can be resovled by adding 1 dirname to zf.php (line 17) :

$basePath = dirname(dirname(dirname($basePath)));

regards

Error when using ZFTool

vagrant@precise64:/vagrant/www/ssc/ssc$ ./vendor/zendframework/zftool/zf.php create module test
PHP Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (ZFTool) could not be initialized.' in /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManage r.php:175
Stack trace:
#0 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(149): Zend\ModuleManager\ModuleManager->loadModuleByName (Object(Zend\ModuleManager\ModuleEvent))
#1 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(90): Zend\ModuleManager\ModuleManager->loadModule('ZFTool')
#2 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent))
#3 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
#4 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventM in /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 175

Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (ZFTool) could not be initialized.' in /vagrant/www/ssc/ssc /vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php :175
Stack trace:
#0 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(149): Zend\ModuleManager\ModuleManager->loadModuleByName (Object(Zend\ModuleManager\ModuleEvent))
#1 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(90): Zend\ModuleManager\ModuleManager->loadModule('ZFTool')
#2 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent))
#3 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
#4 /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventM in /vagrant/www/ssc/ssc/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 175

ssc/config/application.config.php

array( 'Application', 'ZfcBase', 'ZfcUser', 'Page',), 'module_paths' => array( './module', './vendor', ), 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php',), ), ); That's the only config that I can think might matter. If you need to see any others, lmk.

Generated paths contain double slashes

The generated paths contain double slashes:

return array(
    'Catalog\Module'                               => __DIR__ . '//Module.php',
    'Catalog\Controller\CatalogController'         => __DIR__ . '//src/Catalog/Controller/CatalogController.php',
);

This doesn't causes any errors, the script works fine. But maybe it should also be corrected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.