Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBAL-1257: doctrine-dbal will not execute if doctrine/dbal is installed as a dependency #1208

Closed
doctrinebot opened this issue Jun 30, 2015 · 3 comments
Assignees
Labels

Comments

@doctrinebot
Copy link

Jira issue originally created by user elazar:

[doctrine-dbal](https://github.com/doctrine/dbal/blob/master/bin/doctrine-dbal) is configured as a vendor binary. However, when doctrine/dbal is installed as a dependency via Composer, while doctrine-dbal is copied to vendor/bin, the [doctrine-dbal.php](https://github.com/doctrine/dbal/blob/4ec16d06fef228db4f154d9ef968154d8144aa63/bin/doctrine-dbal#L4) file it requires is not. As such, doctrine-dbal won't work if invoked in this situation.

doctrine-dbal should probably check if doctrine-dbal.php exists in the same directory and, if not, instead include it from \*\_DIR\_\* . '/../doctrine/dbal/bin/doctrine-dbal.php'.

@doctrinebot
Copy link
Author

Comment created by stof:

Composer will never copy bin files, as this would indeed always break any requirement in them (which would involve copying the whole library too). It either creates symlinks or create proxy files calling the original one, depending on your system. In both cases, the doctrine file stays in its place, and so everything works fine.

I also see 2 reasons which could break things:

  • if you have a tool replacing the files generated by Composer by their own files and doing it in a crappy way => solution: stop using this tool until they fix their mess
  • if you have a broken setup advocating it can create symlinks but then actually copying files (I think this may happen in some cases with VMs when you are in shared folders, but I'm not sure) => solution: fix your system.

In any case, there is nothing which should be changed in Doctrine DBAL IMO, as DBAL works totally fine for the expected Composer behavior.
Thus, your proposal would not work for people moving their composer bin-dir to a custom location, so it is not even an acceptable workaround.

@morozov
Copy link
Member

morozov commented Aug 6, 2022

This is irrelevant as of #5337.

@morozov morozov closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2022
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants