You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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'.
The text was updated successfully, but these errors were encountered:
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.
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, whendoctrine/dbal
is installed as a dependency via Composer, whiledoctrine-dbal
is copied tovendor/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 ifdoctrine-dbal.php
exists in the same directory and, if not, instead include it from\*\_DIR\_\* . '/../doctrine/dbal/bin/doctrine-dbal.php'
.The text was updated successfully, but these errors were encountered: