In this article we will see the classified information about How to check CakePHP project in a CakePHP project. This is a very simple process. We need this case when we install, migrate or someone work with existing CakePHP project.
There are 3 ways to check CakePHP project version –
- Using Bake Console Command
- Looking into VERSION.txt File
- Using Core Configure Class
Learn More –
- CakePHP 4 Custom Validation Rule For Form Inputs
- CakePHP 4 Database Seeding From CSV File Tutorial
- CakePHP 4 Database Seeding From JSON File Tutorial
- CakePHP 4 Database Seeding Using Faker Library
Let’s get started.
CakePHP 4 Installation
To create a CakePHP project, run this command into your shell or terminal. Make sure composer should be installed in your system.
composer create-project --prefer-dist cakephp/app:~4.0 mycakephp
Above command will creates a project with the name called mycakephp.
Method #1 – Using Bake Console Command
Open CakePHP project into terminal and run this command into it.
$ bin/cake version
This command will output the current version of your project in which you are working with.
For Example, in my case it is 4.3.5
Method #2 – Looking into VERSION.txt File
You can find this given file VERSION.txt into /vendor/cakephp/cakephp folder.
If you open up this file then you should see the CakePHP version into it.
For Example, in my case it is –
Method #3 – Using Core Configure Class
You can use this code snippet to get the current version of CakePHP in which you are working with.
You can find this Core class Configure.php inside /vendor/cakephp/cakephp/src/Core folder.
We hope this article helped you to learn about How To Check CakePHP Version in a CakePHP Project Tutorial in a very detailed way.
Online Web Tutor invites you to try Skillshike! Learn CakePHP, Laravel, CodeIgniter, Node Js, MySQL, Authentication, RESTful Web Services, etc into a depth level. Master the Coding Skills to Become an Expert in PHP Web Development. So, Search your favourite course and enroll now.