Yii3 - How to start

Comparing #53 with #54

Revision #54 was created by rackycz rackycz on Apr 25, 2026, 9:08:34 AM.

xdebug

Content

[...]
```

Next we also need an algorithm that will enforce these tokens in each request, will validate and refresh them and will restrict access only to endpoints that the user can use. This is a bigger topic for later. It may be covered by the package https://github.com/yiisoft/auth/ which offers "HTTP bearer authentication".

## xDebug (xdebug.ini)
 
 
It was a little tricky, but it is simple. Make sure your file `docker/dev/.env` contains following. (tested on MacOs + Docker Desktop):
 
 
```
 
XDEBUG_MODE=develop,debug,coverage
 
XDEBUG_CONFIG="client_host=host.docker.internal start_with_request=yes"
 
```
 
 
Method `xdebug_info()` will still show `xdebug.mode=develop`, but `Step Debugger` will be `enabled`.
 
 
You can ehnance it by appending `idekey`, but IDE setup then may require you to specify the host (localhost:80) and set "path mapping" so that your local project-folder is mapped to "/app". All is done via IDE configuration.
 
 
```
 
XDEBUG_CONFIG="client_host=host.docker.internal start_with_request=yes idekey=yii3debug
 
```
 
 
If you want to see correct value `xdebug.mode` in `xdebug_info()`, or generally configure xdebug via `xdebug.ini`, do this:
 
 
docker/dev/xdebug.ini:
 
```
 
xdebug.mode=develop,debug,coverage
 
xdebug.client_host=host.docker.internal
 
xdebug.start_with_request=yes
 
xdebug.idekey=yii3debug
 
```
 
 
docker/Dockerfile:
 
```
 
COPY docker/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
 
```
 
 
dockerignore:
 
```
 
!/docker/dev/xdebug.ini
 
```
 
 
## php.ini
 
 
You can do the same as above (chapter about xDebug) with `php.ini` for example to set the timezone:
 
```
 
[Date]
 
date.timezone = "UTC"
 
```
 
 
docker/Dockerfile:
 
```
 
COPY docker/dev/php.ini /usr/local/etc/php/conf.d/custom.ini
 
```
 
 
## UI

**Pjax**

Pjax does not exist any more, but you can use [HTMX](https://htmx.org/docs/#introduction) instead:
[...]