lucabecchetti / laravel-mysql-partition

Useful Laravel package to easily work with MySQL Partition
Other
139 stars 23 forks source link

Laravel 10.x Compatibility #12

Closed laravel-shift closed 1 year ago

laravel-shift commented 1 year ago

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

Before merging, you need to:

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

laravel-shift commented 1 year ago

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^9.5.10. If you would like to also upgrade your tests, you may run the PHPUnit 9 Shift for free.

laravel-shift commented 1 year ago

:alembic: 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-mysql-partition.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "brokenice/laravel-mysql-partition": "dev-l10-compatibility",
    }
}

Finally, run: composer update

tsaiyihua commented 1 year ago

according to the upgrade guide from laravel, there are some change required. laravel upgrade guide for database

in Schema.php every

DB::unprepared(DB::raw($query));

must instead of

DB::unprepared(DB::raw($query)->getValue(DB::connection()->getQueryGrammar()));