Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Laravel 10.x Compatibility #182

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Conversation

laravel-shift
Copy link
Contributor

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

Before merging, you need to:

  • Checkout the l10-compatibility branch
  • Review all comments for additional changes
  • Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

@laravel-shift
Copy link
Contributor Author

⚗️ Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-postgis.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "phaza/laravel-postgis": "dev-l10-compatibility",
    }
}

Finally, run: composer update

@Cadrach
Copy link

Cadrach commented Feb 27, 2023

Integrating this would be nice as we cannot deploy the library with laravel 10.x at the moment.

Copy link

@Cadrach Cadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@BrekiTomasson
Copy link

Looks like the bosnadev/database dependency that this package has is still going to be a blocking factor, since it requires "illuminate/database": "^5.0|^6.0|^7.0|^8.0|^9.0" and will not install in a Laravel 10 environment.

@BrekiTomasson
Copy link

I took a further look at bosnadev/database and realized that it's probably abandoned. I forked the repository and updated it to support Laravel 10 and will be taking over maintenance until the original developer lets me know what his plans for the repository is. Feel free to change your implementation of bosnadev/database to this: https://github.com/BrekiTomasson/database

@alguintu
Copy link

alguintu commented Mar 23, 2023

I took a further look at bosnadev/database and realized that it's probably abandoned. I forked the repository and updated it to support Laravel 10 and will be taking over maintenance until the original developer lets me know what his plans for the repository is. Feel free to change your implementation of bosnadev/database to this: https://github.com/BrekiTomasson/database

I forked the l10-compatibility branch above to my own l10-compatibility-database and replaced bosnadev/database with your BrekiTomasson/database repo, but still composer wouldn't install the package since Laravel replaces it. Can't figure out how to make it work.

 mstaack/laravel-postgis dev-l10-compatibility-database requires bosnadev/database dev-master -> satisfiable by bosnadev/database[dev-master].
    - Conclusion: don't install laravel/framework v10.0.0 (conflict analysis result)
    - bosnadev/database dev-master requires illuminate/database ^5.0|^6.0|^7.0|^8.0|^9.0 -> satisfiable by illuminate/database[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0,
..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev].
    - Only one of these can be installed: illuminate/database[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/database and thus cannot coexist with it.
    - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].

Somehow it still prefers the Laravel's bosnadev/database dependency over BrekiTomasson/database. Have you managed to actually make it work? Any help would be appreciated. Thanks.

@alguintu
Copy link

alguintu commented Mar 23, 2023

Nevermind, I was doing it the long way. I just imported both the laravel-shift/laravel-postgis:dev-l10-compatibility and BrekiTomasson/database:dev-master on my main project and everything is installed now!

For anybody else looking to make this work with Laravel 10 right now:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-postgis.git"
        },
        {
            "type": "vcs",
            "url": "https://github.com/BrekiTomasson/database.git"
        }
    ],
    "require": {
        "php": "^8.1",
        "doctrine/dbal": "^3.6",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^10.0",
        "laravel/sanctum": "^3.2",
        "laravel/tinker": "^2.8",
        "mstaack/laravel-postgis": "dev-l10-compatibility",
        "bosnadev/database": "dev-master"
    }
}    

@mstaack mstaack merged commit 1c96de3 into mstaack:master Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants