Written by James McDonald

August 3, 2022

I got this deprecation warning after upgrading to CakePHP 4.4

"PaginatorComponent is deprecated, use a Cake\Datasource\Pagination\NumericPaginator instance directly"

I thought that meant I had to run the CakePHP 4 upgrade tool and it would fix it but no.

Simple Fix

Remove this line from your Controllers

$this->loadComponent('Paginator'); // remove this line from all your code

Running the Upgrade Tool is Good Idea

I did run the upgrade tool and the cakephp43 rector rules did some nice changes. For example using the cakephp43 rules got rid of getTableLocator() and replaced it with fetchTable()

Check each new Version’s Migration Guide

Be sure to check the migration guide for each version you upgrade to: https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html

Installing and Using the CakePHP 4 Upgrade Tool



Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...