Skip to content

Commit

Permalink
Added support for Laravel 10 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeek committed Mar 23, 2023
1 parent f362c8d commit e5218c4
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 48 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ jobs:
laravel: '^9.0'
experimental: false
coverage: false
- operating_system: ubuntu-latest
postgres: '14'
php_versions: '8.1'
laravel: '^10.0'
experimental: false
coverage: false
runs-on: '${{ matrix.operating_system }}'
services:
postgres:
Expand Down Expand Up @@ -187,9 +193,9 @@ jobs:
-e "s/\${HOST}/${{ env.DB_HOST }}/" \
phpunit.xml.dist > phpunit.xml
if [[ ${{ matrix.coverage }} == true ]]; then
./vendor/bin/phpunit --verbose --stderr --coverage-clover build/logs/clover.xml --coverage-text
./vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml --coverage-text
else
./vendor/bin/phpunit --verbose --stderr
./vendor/bin/phpunit --stderr
fi
working-directory: './'
- name: 'Upload coverage results to Coveralls'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ composer.lock
app/release
app/.env
app/composer.json
/.phpunit.cache
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table1', function (Blueprint $table) {
$table->dropColumn([
'name',
'code',
'some_field',
]);
$table->dropColumn(['name', 'code', 'some_field']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table3', function (Blueprint $table) {
$table->dropColumn([
'name',
'code',
]);
$table->dropColumn(['name', 'code']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table2', function (Blueprint $table) {
$table->dropColumn([
'name',
'code',
]);
$table->dropColumn(['name', 'code']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table1', function (Blueprint $table) {
$table->dropColumn([
'feature_table2_id',
]);
$table->dropColumn(['feature_table2_id']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table2', function (Blueprint $table) {
$table->dropColumn([
'feature_table3_id',
]);
$table->dropColumn(['feature_table3_id']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table1', function (Blueprint $table) {
$table->dropColumn([
'name',
'code',
]);
$table->dropColumn(['name', 'code']);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public function down(): void
{
DB::transaction(function () {
Schema::table('feature_table3', function (Blueprint $table) {
$table->dropColumn([
'name',
'code',
]);
$table->dropColumn(['name', 'code']);
});
});
}
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
},
"require": {
"php": "^7.3|^7.4|^8.0",
"illuminate/support": "^5.7|^6.20|^7.30|^8.20|^9.0",
"illuminate/database": "^5.7|^6.20|^7.30|^8.20|^9.0",
"illuminate/console": "^5.7|^6.20|^7.30|^8.20|^9.0"
"illuminate/support": "^5.7|^6.20|^7.30|^8.20|^9.0|^10.0",
"illuminate/database": "^5.7|^6.20|^7.30|^8.20|^9.0|^10.0",
"illuminate/console": "^5.7|^6.20|^7.30|^8.20|^9.0|^10.0"
},
"require-dev": {
"phpunit/phpunit": "^7.3|^8.5|^9.4",
"phpunit/phpunit": "^7.3|^8.5|^9.4|^10.0",
"php-mock/php-mock": "^2.0",
"orchestra/testbench": "^3.8|^4.8|^5.7|^6.2|^7.0",
"orchestra/testbench": "^3.8|^4.8|^5.7|^6.2|^7.0|^8.0",
"umbrellio/code-style-php": "^1.0",
"laravel/legacy-factories": "^1.0",
"php-coveralls/php-coveralls": "^2.1",
Expand Down
23 changes: 10 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
colors="true" processIsolation="false"
stopOnFailure="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage processUncoveredFiles="true">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
cacheDirectory=".phpunit.cache"
>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
Expand All @@ -19,12 +16,12 @@
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<ini name="error_reporting" value="-1" />
<ini name="error_reporting" value="-1"/>
<var name="db_type" value="pdo_pgsql"/>
<var name="db_host" value="${HOST}" />
<var name="db_username" value="${USERNAME}" />
<var name="db_password" value="${PASSWORD}" />
<var name="db_database" value="${DATABASE}" />
<var name="db_host" value="${HOST}"/>
<var name="db_username" value="${USERNAME}"/>
<var name="db_password" value="${PASSWORD}"/>
<var name="db_database" value="${DATABASE}"/>
<var name="db_port" value="5432"/>
</php>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Console/RollbackMissingMigrationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RollbackMissingMigrationsTest extends FunctionalTestCase
private const RELEASE_PATH = self::APP_PATH . 'release/';
private const DATABASE_PATH = self::APP_PATH . 'database/';

public function provideMigrations(): Generator
public static function provideMigrations(): Generator
{
yield 'same_versions_of_migrations' => [
'before' => [
Expand Down

0 comments on commit e5218c4

Please sign in to comment.