Laravel Versions

I recently returned to a Laravel project and couldn’t remember what the version was. A quick look at the
composer.json helped:

1
"laravel/framework": "^8.0",

But which version was that, exactly?

One thing you can do is to run the following command:

1
2
> php artisan --version
Laravel Framework 8.16.1

Perfect! But is there another way, out of interest? Of course!

Take a peek at your composer.lock file in the root of your project:

1
2
3
{
"name": "laravel/framework",
"version": "v8.16.1",

That makes sense since the lock file, err, locks versions. Any other ways?

Yes, one more: Take a look at \vendor\laravel\framework\src\Illuminate\Foundation\Application.php

1
2
3
4
5
6
7
8
class Application extends Container implements ApplicationContract, CachesConfiguration, CachesRoutes, HttpKernelInterface
{
/**
* The Laravel framework version.
*
* @var string
*/
const VERSION = '8.16.1';

Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’ logicalmoon.com