When running “vendor/bin/phinx migrate -c phinx.php” (as described in Upgrade Manual) nothing happend and i was stuck in “maintainance mode”.
The file “error_log” shows “No such file or directory in /…/xibo/vendor/bin/phinx on line 27”
An that’s correct:
The file /…/xibo/vendor/bin/phinx shows a wrong path for require on line 27:
Original line 27: $app = require DIR . ‘/…/app/phinx.php’;
Solution
I changed this line to…
$app = require DIR . ‘/…/robmorgan/phinx/app/phinx.php’;
…and the migration worked.
I found other solutions, where some folders from the folder “vendor/robmorgan” are copied around and some config files are to be changed; but maybe this is the “easiest / fastest” solution !?
Future?
Could this line be changed in future versions “by default” ?
What is strange is that our Docker install uses /var/www/cms/vendor/bin/phinx migrate -c /var/www/cms/phinx.php command without any issues - as we do on our development environments.
The command itself (…vendor/bin/phinx migrate -c …) is okay but the path in the require statement inside the phinx (line 27) is wrong. The only way the given path ([currDir]/…/app/phinx.php) would be correct ist, if you startet phinx from …/robmorgan/phinx/[anySubDir] as far as i think what DIR [with 2 underscores before / after] st used for)…
I will “play around” and build another “phinx” (manually) that takes …migrate -c [pathToCms]phinx.php; maybe that works better and we don’t have to change anything…
So my idea:
cd to …robmorgan/phinx/app
call [pathToCms]/vendor/bin/phinx migrate -c [pathToCms]/phinx.php
…and looking as what the DIR is interpreted then
Tested: so the DIR is taken as [dir where “phinx” resides / is called] - no solution this way ;-(
but: [DirToXibo]/vendor/robmorgan/phinx/bin/phinx migrate -c phinx.php works…!
(works = see that script was startet and writes some lines back to my terminal)
…will test again on next update!
Yeah - “symlink” makes sense
I habe “my” solution (on hosted environment) and will look for an easy solution for me (or just use the “longer line” from above)
Great - if you have the time to report an issue I am sure the Phinx project would be interested in finding out whats not working in your environment. but at least you have a workaround.
Just in case you’re wondering why we don’t just adopt your workaround - its a good question - essentially i’m worried that phinx might at some point change the way that phar file is generated and if we’re calling it in a non-standard way we end up with a broken install.