Skip to content

Console fixes#93

Merged
mringler merged 10 commits intodevelopfrom
console_fixes
Feb 13, 2026
Merged

Console fixes#93
mringler merged 10 commits intodevelopfrom
console_fixes

Conversation

@mringler
Copy link
Copy Markdown
Collaborator

@mringler mringler commented Nov 25, 2025

Improves cli command error messages

  • Configuration properties were accessed directly, leading to array access exceptions or type exceptions with stack traces if property is not set. This is now done through methods and proper error messages.
  • Common parameters are checked during command setup and error message contains hint how to fix them.

Example output

Added hint section:

Screenshot_2025-11-25_11-01-52

Used to say "Invalid database name: no configured connection named $databaseName.":

Screenshot_2025-11-25_21-24-06

Used to say "No schema files were found (matching your schema fileset definition).":

Screenshot_2025-11-25_21-25-33

This can still be further improved in a later PR.

Other minor fixes

  • added ./bin/perpl executable next to ./bin/propel
  • fixed possible endless loop when executable is run from /bin without --config-dir param (propel.php was treated as configuration file)
  • config file detection also looks for files named perpl, i.e. perpl.json, perpl.yml.dist, etc
  • code cleanup

@kasparsatke
Copy link
Copy Markdown

Awesome!

@kasparsatke
Copy link
Copy Markdown

It may seem odd, but there are actually people using Windows 😉 So can we please also have a bin/perpl.bat alongside the bin/propel.bat?

@mringler
Copy link
Copy Markdown
Collaborator Author

Hmm, that does sound weird. Why, who does that?
Has wokeness gone too far, when we accept even the weirdest kink? What about the children?

But seriously, that means I have to rename propel.bat to perpl.bat and put call perpl.bat into a new propel.bat. Is that correct, can you confirm?

@kasparsatke
Copy link
Copy Markdown

Yeah, that wokeness never ends - it's just pandemic. Oops, I should not use this word - it also sounds like an invention of the woke industry. For sure, all those people live in a gated bubble or should I say - bubble of Gates?

So let's keep them in their bubble and make it as big as it needs to be. So, in the .bat file, call %~f0 twice to make sure they stay in.

But seriously, that means I have to rename propel.bat to perpl.bat and put call perpl.bat into a new propel.bat. Is that correct, can you confirm?

You can do it THAT way. Or you can just call perpl.php like you do it in the other files. But maybe I think too complicated.

@mringler
Copy link
Copy Markdown
Collaborator Author

Why %~f0, is that a joke I don't get? Apparently that prints the full file name with extension?

Or you can just call perpl.php like you do it in the other files

The .bat file looks like this:

@echo off

if "%PHPBIN%" == "" set PHPBIN=php
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "bin\propel" %*

I don't want to repeat that in case it ever get changed.

@kasparsatke
Copy link
Copy Markdown

kasparsatke commented Dec 18, 2025

Why %~f0, is that a joke I don't get? Apparently that prints the full file name with extension?

Yes this variable contains the full path and filename of the file that is currently being executed. And if you call it with call using this variable as an argument than you open the same file again in a new instance. And just to be sure, let's call it twice in case it gets closed again. And yes, it's just a bad joke.

And yes somehow the current .bat file is also a bad joke that is not bad enough yet. For starters, I would schedule to run a .bat file on my computer on every logon that executes setx PHPBIN=break just to let the propel.bat file do nothing, successfully.

But unfortunately that joke would only work for me so I fear there is no way around editing a/the .bat file in the repo if we want others to have fun too. Or, we could do it the right way - but maybe that is just a crazy/woke idea of mine and also we would still have to edit something.

@mringler mringler merged commit c39984d into develop Feb 13, 2026
38 checks passed
@mringler mringler deleted the console_fixes branch February 13, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants