Skip to content

Commit bfcb8a2

Browse files
committed
Drop support for Composer 1.x
1 parent a5ebe88 commit bfcb8a2

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33

44
## [unreleased]
55

6+
* Drop support for Composer 1.x by @GromNaN in [#2784](https://github.com/mongodb/laravel-mongodb/pull/2784)
7+
8+
## [4.2.0] - 2024-03-14
9+
610
* Add support for Laravel 11 by @GromNaN in [#2735](https://github.com/mongodb/laravel-mongodb/pull/2735)
711
* Implement Model::createOrFirst() using findOneAndUpdate operation by @GromNaN in [#2742](https://github.com/mongodb/laravel-mongodb/pull/2742)
812

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"require": {
2525
"php": "^8.1",
2626
"ext-mongodb": "^1.15",
27+
"composer-runtime-api": "^2.0.0",
2728
"illuminate/support": "^10.0|^11",
2829
"illuminate/container": "^10.0|^11",
2930
"illuminate/database": "^10.30|^11",

src/Connection.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,10 @@ private static function getVersion(): string
324324

325325
private static function lookupVersion(): string
326326
{
327-
if (class_exists(InstalledVersions::class)) {
328-
try {
329-
return self::$version = InstalledVersions::getPrettyVersion('mongodb/laravel-mongodb');
330-
} catch (Throwable) {
331-
return self::$version = 'error';
332-
}
327+
try {
328+
return self::$version = InstalledVersions::getPrettyVersion('mongodb/laravel-mongodb');
329+
} catch (Throwable) {
330+
return self::$version = 'error';
333331
}
334-
335-
return self::$version = 'unknown';
336332
}
337333
}

0 commit comments

Comments
 (0)