DDC-4011: Unable to complete tutorial #4896

Open
opened 2026-01-22 14:51:38 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Nov 22, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user ronaldsmit86:

Hey guys, I tried to work through the tutorial, but when I attempted to run the command: php vendor/bin/doctrine orm:schema-tool:create I got the message below:

dir=$(d=${0%[/]*}; cd "$d"; cd "../doctrine/orm/bin" && pwd)

See if we are running in Cygwin by checking for cygpath program

if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if ; then
dir=$(cygpath -m $dir);
fi
fi

dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/doctrine.php" "$@"

Not entirely clear to me. Does anyone know what I'm doing wrong and what I could do differently?

Originally created by @doctrinebot on GitHub (Nov 22, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user ronaldsmit86: Hey guys, I tried to work through the tutorial, but when I attempted to run the command: php vendor/bin/doctrine orm:schema-tool:create I got the message below: dir=$(d=${0%[/\]*}; cd "$d"; cd "../doctrine/orm/bin" && pwd) # See if we are running in Cygwin by checking for cygpath program if command -v 'cygpath' >/dev/null 2>&1; then # Cygwin paths start with /cygdrive/ which will break windows PHP, # so we need to translate the dir path to windows format. However # we could be using cygwin PHP which does not require this, so we # test if the path to PHP starts with /cygdrive/ rather than /usr/bin if [[ $(which php) == /cygdrive/\* ]]; then dir=$(cygpath -m $dir); fi fi dir=$(echo $dir | sed 's/ /\ /g') "${dir}/doctrine.php" "$@" Not entirely clear to me. Does anyone know what I'm doing wrong and what I could do differently?
Author
Owner

@whit0313 commented on GitHub (Jan 3, 2016):

I'm getting the same issue with php vendor/bin/phpcs.

I'm in a Vagrant Unbuntu virtual machine on a Windows 7 host - perhaps the problem (for me at least) is that I'm in a directory which is synced by Vagrant from the Windows host, so I am (sort of) in a Windows directory, even though I'm SSH-ed in to the Ubuntu virtual machine.

@ronaldsmit86 are you also using a *nix virtual machine on a Windows host?

(edit) - I realise this is a Doctrine thread, and I'm not using Doctrine. However if the problem is the *nix VM in a Windows host, then this comment might help Doctrine users.

@whit0313 commented on GitHub (Jan 3, 2016): I'm getting the same issue with `php vendor/bin/phpcs`. I'm in a Vagrant Unbuntu virtual machine on a Windows 7 host - perhaps the problem (for me at least) is that I'm in a directory which is synced by Vagrant from the Windows host, so I am (sort of) in a Windows directory, even though I'm SSH-ed in to the Ubuntu virtual machine. @ronaldsmit86 are you also using a *nix virtual machine on a Windows host? (edit) - I realise this is a Doctrine thread, and I'm not using Doctrine. However if the problem is the *nix VM in a Windows host, then this comment might help Doctrine users.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4896