pageSizeLimit issues on total count [SOLVED]

I’m having issues with the pageSizeLimit parameter in the ActiveDataProvider.

Setting this option in the pagination attribute, the total count returned is the count of ALL items in the queried table.

Via query param I try to filter a list of clients according with the route ID column, and in the search model I set the page size limit as the following:

        $query = Client::find()->indexBy("id");

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                 'pageSizeLimit' => [1, 100]
            ]
        ]);

$query->andFilterWhere([
            'id' => $this->id,
            'status' => !$this->status || $this->status == '' ? [Client::STATUS_ACTIVE, Client::STATUS_BLOCKED, Client::STATUS_PENDING_UPDATE] : $this->status,
            'zona_id' => $this->zona_id,
        ]);
...

The pageSizeLimit will build the following SQL sentence:

SELECT COUNT(*) FROM `client`;

But if I comment/delete the pagination attribute configuration, then the total count will be the actual total count and the SQL count will be built correctly:

SELECT COUNT(*) FROM `client` where (`client`.`status` IN (1, 2, 0)) AND (`client`.`route_id`='1') LIMIT 20;

Is a “bug” in the pagination or maybe I’m having a mistake I’m not seeing?

I didn’t see this issue in Github. I have updated and now is working again.