Install CakePHP 4 using composer always failed with postInstall runtime exception

I installed Composer for Windows fine.

Run
composer create-project --prefer-dist cakephp/app:~4.0 my_app_name

always give error, however, Cake application still works, but there are bugs.

What’s wrong? Can I safely ignore the error?

Bugs that I noticed: Authentication plugin did not work really well, it can not return redirect parameter, and Remember Me does not work.

Can’t confirm that with MacOS

Seems like setting the permissions is not working on your end.
But thats just a minor thing, everything else should be working.

What errors do you get? Have you gone through the CMS Tutorial - Authentication - 4.x ?

No I did not go through the CMS Tutorial, but I did follow the Authentication documentation section alone.
The problem I have was:

  • Can not Redirect to previously visit before Log in action. The $this->Authentication->getLoginRedirect() always return null
  • Can not get the Remember Me working.

I had to set an $origin variable from Controller to View, then make it hidden field in View form, submit back to Login action, and redirect to that $origin if authenticate successful.

And in new test project, I develop on Fedora Core Linux, I installed CakePHP using Composer with the same command, there is no any Installation error.
And guess what, the Authentication plugin works as it is designed for. I means the Redirection works like a charm.

I think there is something wrong with Installation script using Composer on Windows.