Skip to content

Commit

Permalink
Merge pull request #31 from XetaIO/laravel10
Browse files Browse the repository at this point in the history
Update to laravel10 and remove support for previous version of Laravel.
  • Loading branch information
Xety authored Mar 17, 2023
2 parents dc1eda2 + ebcf1ab commit d5b7d23
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 80 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ jobs:
strategy:
matrix:
php:
- 8.2
- 8.1
- 8.0
- 7.4
- 7.3

steps:
- uses: actions/checkout@v2
Expand Down
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
>
> |Unit Tests|Coverage|Stable Version|Downloads|Laravel|License|
> |:-------:|:------:|:-------:|:------:|:-------:|:-------:|
> |[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/XetaIO/Xetaravel-Mentions/tests.yml?style=flat-square)](https://github.com/XetaIO/Xetaravel-Mentions/actions/workflows/tests.yml)|[![Coverage Status](https://img.shields.io/codecov/c/github/XetaIO/Xetaravel-Mentions?style=flat-square)](https://app.codecov.io/gh/XetaIO/Xetaravel-Mentions)|[![Latest Stable Version](https://img.shields.io/packagist/v/XetaIO/Xetaravel-Mentions.svg?style=flat-square)](https://packagist.org/packages/xetaio/xetaravel-mentions)|[![Total Downloads](https://img.shields.io/packagist/dt/xetaio/xetaravel-mentions.svg?style=flat-square)](https://packagist.org/packages/xetaio/xetaravel-mentions)|[![Laravel 8.0](https://img.shields.io/badge/Laravel->=8.0-f4645f.svg?style=flat-square)](http://laravel.com)|[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/XetaIO/Xetaravel-Mentions/blob/master/LICENSE)|
> |[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/XetaIO/Xetaravel-Mentions/tests.yml?style=flat-square)](https://github.com/XetaIO/Xetaravel-Mentions/actions/workflows/tests.yml)|[![Coverage Status](https://img.shields.io/codecov/c/github/XetaIO/Xetaravel-Mentions?style=flat-square)](https://app.codecov.io/gh/XetaIO/Xetaravel-Mentions)|[![Latest Stable Version](https://img.shields.io/packagist/v/XetaIO/Xetaravel-Mentions.svg?style=flat-square)](https://packagist.org/packages/xetaio/xetaravel-mentions)|[![Total Downloads](https://img.shields.io/packagist/dt/xetaio/xetaravel-mentions.svg?style=flat-square)](https://packagist.org/packages/xetaio/xetaravel-mentions)|[![Laravel 10.0](https://img.shields.io/badge/Laravel->=10.0-f4645f.svg?style=flat-square)](http://laravel.com)|[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/XetaIO/Xetaravel-Mentions/blob/master/LICENSE)|
>
> A package to parse `@mentions` from a text and mention the user with a notification.
>
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
}
],
"require": {
"php": ">=7.3",
"illuminate/support": "^8.0 || ^9.0",
"illuminate/database": "^8.0 || ^9.0",
"php": ">=8.1",
"illuminate/support": "^10.0",
"illuminate/database": "^10.0",
"xety/configurator": "^1.0"
},
"require-dev": {
"orchestra/testbench": "^6.0 || ^7.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.2"
},
Expand Down
52 changes: 27 additions & 25 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>
<php>
<ini name="xdebug.mode" value="coverage" />
<env name="XDEBUG_MODE" value="coverage" />
</php>
<testsuites>
<testsuite name="Xetaravel Mentions Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<php>
<ini name="xdebug.mode" value="coverage"/>
<env name="XDEBUG_MODE" value="coverage"/>
</php>
<testsuites>
<testsuite name="Xetaravel Mentions Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Parser/MentionParserTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Test\Parser;
namespace Tests\Parser;

use Tests\TestCase;
use Tests\vendor\Models\Article;
Expand Down
13 changes: 8 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class TestCase extends Orchestra
{
use RefreshDatabase;

public function setUp(): void
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -41,22 +41,25 @@ protected function getPackageProviders($app)
}

/**
* @param \Illuminate\Foundation\Application $app
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
protected function defineEnvironment($app)
{
$app['config']->set('database.default', 'testing');

$app['config']->set('database.connections.testing', [
'driver' => 'sqlite',
'database' => __DIR__.'/vendor/temp/database.sqlite',
'database' => __DIR__ . '/vendor/temp/database.sqlite',
'prefix' => '',
]);
}

protected function setupDatabase()
{
$databasePath = __DIR__.'/vendor/temp/database.sqlite';
$databasePath = __DIR__ . '/vendor/temp/database.sqlite';
file_put_contents($databasePath, '');
}
}

0 comments on commit d5b7d23

Please sign in to comment.