ADmad

Results 347 comments of ADmad

Throwing an exception sounds reasonable, you can make a PR targeting the 5.next branch.

That example is indeed a bit of a doozy. I wouldn't mind getting rid of that in 5.1. So if `className` is specified then don't allow a dot in the...

`ErrorController::beforeRender()` is called for the `Controller.beforeRender` event, not `Exception.beforeRender` event. You need to better explain what you mean by "404 page stopped working.".

@infoliv Please provide the full stack trace of the error you are getting.

This looks like a problem in your behavior rather than the core code. With the strong typing we have I don't see how the config array passed to the behavior...

I am unable to reproduced this, `ErrorController::beforeRender()` gets called as expected. Maybe in your case an exception is being generated when the exception renderer tries to create an `ErrorController` instance...

The `$config` array can also contain other keys like `enabled` https://github.com/cakephp/cakephp/blob/76d79ed748ecf052f111492e3b3249fb666a94af/src/ORM/BehaviorRegistry.php#L154 So you should be adding your custom behavior config under a specific key instead of directly iterating the `$config`...

Since you added a `parent::initialize()` calls in `ErrorController::initialize()` you also need to add extra code to skip auth checks for the `ErrorController`: ``` if ($this->components()->has('Authentication')) { $this->Authentication->allowUnauthenticated([$this->request->getParam('action')]); } ```

There's no `WRITE_ALL` constant in either cakephp/database or cakephp/orm packages in 4.x. Please provide the file and line number where the error was generated and preferably the full stack trace.

Since your app has the orm package as a dependency the database package is an indirect dependency which you updated by itself instead of updating the orm. I am unaware...