1
0
Fork 0
mirror of https://github.com/archtechx/jobpipeline.git synced 2025-12-12 06:44:03 +00:00

L10 compatibility (#12)

* Bump dependencies for Laravel 10

* Update GitHub Actions for Laravel 10

* drop < L9 support

* use `dispatch_sync` instead of `dispatch_now`

* migrate phpunit configuration

* update matrix format

---------

Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
Guilherme Saade 2023-02-16 07:43:17 -03:00 committed by GitHub
parent fe0fc363e6
commit bfc53f6dd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 39 deletions

View file

@ -8,7 +8,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
laravel: [6, 8, 9] include:
- laravel: 9
php: 8.0
- laravel: 10
php: 8.1
steps: steps:
- name: Checkout code - name: Checkout code
@ -17,7 +21,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: '8.0' php-version: ${{matrix.php}}
- name: Start Redis - name: Start Redis
uses: supercharge/redis-github-action@1.1.0 uses: supercharge/redis-github-action@1.1.0

View file

@ -19,10 +19,11 @@
} }
}, },
"require": { "require": {
"illuminate/support": "^6.0|^8.0|^9.0" "php": "^8.0",
"illuminate/support": "^9.0|^10.0"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench": "^4.0|^6.0|^7.0", "orchestra/testbench": "^7.0|^8.0",
"spatie/valuestore": "^1.2", "spatie/valuestore": "^1.2",
"ext-redis": "*" "ext-redis": "*"
}, },

View file

@ -1,35 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
backupStaticAttributes="false" <coverage>
bootstrap="vendor/autoload.php" <include>
colors="true" <directory suffix=".php">./src</directory>
convertErrorsToExceptions="true" </include>
convertNoticesToExceptions="true" <exclude>
convertWarningsToExceptions="true" <file>./src/routes.php</file>
processIsolation="false" </exclude>
stopOnFailure="false"> </coverage>
<testsuites> <testsuites>
<testsuite name="Unit"> <testsuite name="Unit">
<directory suffix="Test.php">./tests</directory> <directory suffix="Test.php">./tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter> <php>
<whitelist processUncoveredFilesFromWhitelist="true"> <env name="APP_ENV" value="testing"/>
<directory suffix=".php">./src</directory> <env name="BCRYPT_ROUNDS" value="4"/>
<exclude> <env name="CACHE_DRIVER" value="redis"/>
<file>./src/routes.php</file> <env name="MAIL_DRIVER" value="array"/>
</exclude> <env name="QUEUE_CONNECTION" value="sync"/>
</whitelist> <env name="SESSION_DRIVER" value="array"/>
</filter> <env name="DB_CONNECTION" value="sqlite"/>
<php> <env name="DB_DATABASE" value=":memory:"/>
<env name="APP_ENV" value="testing"/> <env name="AWS_DEFAULT_REGION" value="us-west-2"/>
<env name="BCRYPT_ROUNDS" value="4"/> </php>
<env name="CACHE_DRIVER" value="redis"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="AWS_DEFAULT_REGION" value="us-west-2"/>
</php>
</phpunit> </phpunit>

View file

@ -93,7 +93,7 @@ class JobPipeline implements ShouldQueue
if ($this->shouldBeQueued) { if ($this->shouldBeQueued) {
dispatch($executable); dispatch($executable);
} else { } else {
dispatch_now($executable); dispatch_sync($executable);
} }
}; };
} }