XF 2.0 [xf-dev:generate-phpstorm-meta] permission error on windows 10

Marcus

Well-known member
I use Windows 10 local php 7.1 and execute the command in my Users Documents directory. cmd.php creates other files and directories with success. I would create a directory I just need to know where it should be.

Code:
php cmd.php xf-dev:generate-phpstorm-meta Addon
Writing Addon...
File could not be written to. Check directories exist and permissions.

php cmd.php xf-dev:generate-phpstorm-meta said:
Generates a .phpstorm.meta.php file for dynamic return type hinting
 

Chris D

XenForo developer
Staff member
Files can only be written to the directories which are writeable. It doesn't matter which file is doing it, it should work as long as that directory is writeable.

It does work fine on Windows machines.
 

Marcus

Well-known member
I have executed this command as admin who can write to every directory, still gives me the same error message.
 

Chris D

XenForo developer
Staff member
What exactly is the "Addon" argument you're adding?

The only argument that exists for the command is the path to write the file to. You're asking it to write the file to a path called "Addon". Is there a directory called "Addon" in your XF root?

If you're unsure of what a command does or what arugments and options are available, add -h to the end, e.g. php cmd.php xf-dev:generate-phpstorm-meta -h:
Code:
Usage:
  xf-dev:generate-phpstorm-meta [options] [--] [<path>]

Arguments:
  path                  Path to save the generated .phpstorm.meta.php file. [default: ".phpstorm.meta.php"]

Options:
      --print           If enabled, prints instead of writing
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Generates a .phpstorm.meta.php file for dynamic return type hinting
 

Marcus

Well-known member
Thank you ! I set the argument to "AddonName", not to the directory as it would be correct. It works great without any additional arguments. Thanks for showing me how to get detailed information about the commands, this will be helpful for the other commands.
 
Top