Skip to content

Commit

Permalink
Merge pull request #32 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Starting Laravel 8 support
  • Loading branch information
arcanedev-maroc authored Sep 9, 2020
2 parents b368e6d + fa2effa commit 162cf44
Show file tree
Hide file tree
Showing 24 changed files with 46 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-7-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 6
runs: 4
php_code_sniffer:
enabled: true
config:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This package is inspired/based on [illuminate/html](https://github.com/illuminat
* Easy setup & configuration.
* Well documented & IDE Friendly.
* Well tested with maximum code quality.
* Laravel `5.1` to `7.x` are supported.
* Laravel `5.1` to `8.x` are supported.
* Made with :heart: & :coffee:.

## Table of contents
Expand All @@ -46,7 +46,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
- [LaravelCollective](https://github.com/LaravelCollective/html)
- [All Contributors][link-contributors]

[badge_laravel]: https://img.shields.io/badge/Laravel-5.1%20to%207.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.1%20to%208.x-orange.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-html.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelHtml/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelHtml.svg?style=flat-square
Expand Down
24 changes: 17 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2.5",
"arcanedev/php-html": "^4.0",
"arcanedev/support": "^7.0"
"php": "^7.3",
"arcanedev/php-html": "^5.0",
"arcanedev/support": "^8.0"
},
"require-dev": {
"ext-dom": "*",
"orchestra/testbench": "^5.0",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.5|^9.0"
"ext-dom": "*",
"orchestra/testbench": "^6.0",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand All @@ -35,13 +35,23 @@
"Arcanedev\\LaravelHtml\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
},
"extra": {
"branch-alias": {
"dev-develop": "8.x-dev"
},
"laravel": {
"providers": [
"Arcanedev\\LaravelHtml\\HtmlServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
33 changes: 14 additions & 19 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<directory suffix=".php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/coverage/clover.xml"/>
<html outputDirectory="build/coverage/html"/>
<text outputFile="build/coverage/coverage.txt" showOnlySummary="true"/>
</report>
</coverage>
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-text" target="build/logs/coverage.txt"/>
<log type="coverage-html" target="build/logs/coverage"/>
</logging>
</phpunit>
1 change: 0 additions & 1 deletion src/AbstractBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class AbstractBuilder
*
* @package Arcanedev\LaravelHtml
* @author ARCANEDEV <[email protected]>
*/
abstract class AbstractBuilder
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Interface FormBuilder
*
* @package Arcanedev\LaravelHtml\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface FormBuilder
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface HtmlBuilder
*
* @package Arcanedev\LaravelHtml\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface HtmlBuilder
Expand Down
1 change: 0 additions & 1 deletion src/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
/**
* Class FormBuilder
*
* @package Arcanedev\LaravelHtml
* @author ARCANEDEV <[email protected]>
*/
class FormBuilder extends AbstractBuilder implements FormBuilderContract
Expand Down
1 change: 0 additions & 1 deletion src/Helpers/Obfuscater.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class Obfuscater
*
* @package Arcanedev\LaravelHtml\Helpers
* @author ARCANEDEV <[email protected]>
*/
class Obfuscater
Expand Down
1 change: 0 additions & 1 deletion src/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
/**
* Class HtmlBuilder
*
* @package Arcanedev\LaravelHtml
* @author ARCANEDEV <[email protected]>
*/
class HtmlBuilder extends AbstractBuilder implements HtmlBuilderContract
Expand Down
4 changes: 2 additions & 2 deletions src/HtmlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace Arcanedev\LaravelHtml;

use Arcanedev\LaravelHtml\Contracts\{FormBuilder as FormBuilderContract, HtmlBuilder as HtmlBuilderContract};
use Arcanedev\LaravelHtml\Contracts\FormBuilder as FormBuilderContract;
use Arcanedev\LaravelHtml\Contracts\HtmlBuilder as HtmlBuilderContract;
use Arcanedev\Support\Providers\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;

/**
* Class HtmlServiceProvider
*
* @package Arcanedev\LaravelHtml
* @author ARCANEDEV <[email protected]>
*/
class HtmlServiceProvider extends ServiceProvider implements DeferrableProvider
Expand Down
6 changes: 2 additions & 4 deletions src/Traits/Componentable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
namespace Arcanedev\LaravelHtml\Traits;

use BadMethodCallException;
use Illuminate\Support\Arr;
use Illuminate\Support\HtmlString;
use Illuminate\Support\{Arr, HtmlString};

/**
* Class Componentable
* Trait Componentable
*
* @package Arcanedev\LaravelHtml\Traits
* @author ARCANEDEV <[email protected]>
*/
trait Componentable
Expand Down
3 changes: 1 addition & 2 deletions src/Traits/FormAccessible.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
use ReflectionMethod;

/**
* Class FormAccessible
* Trait FormAccessible
*
* @package Arcanedev\LaravelHtml\Traits
* @author ARCANEDEV <[email protected]>
*/
trait FormAccessible
Expand Down
7 changes: 5 additions & 2 deletions tests/Concerns/AssertsHtmlStrings.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?php namespace Arcanedev\LaravelHtml\Tests\Concerns;
<?php

declare(strict_types=1);

namespace Arcanedev\LaravelHtml\Tests\Concerns;

use DOMDocument;

/**
* Trait AssertsHtmlStrings
*
* @package Arcanedev\LaravelHtml\Tests\Concerns
* @author ARCANEDEV <[email protected]>
*/
trait AssertsHtmlStrings
Expand Down
1 change: 0 additions & 1 deletion tests/FormBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/**
* Class FormBuilderTest
*
* @package Arcanedev\LaravelHtml\Tests\Builders
* @author ARCANEDEV <[email protected]>
*/
class FormBuilderTest extends TestCase
Expand Down
1 change: 0 additions & 1 deletion tests/HtmlBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class HtmlBuilderTest
*
* @package Arcanedev\LaravelHtml\Tests\Builders
* @author ARCANEDEV <[email protected]>
*/
class HtmlBuilderTest extends TestCase
Expand Down
1 change: 0 additions & 1 deletion tests/HtmlServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class HtmlServiceProviderTest
*
* @package Arcanedev\LaravelHtml\Tests
* @author ARCANEDEV <[email protected]>
*/
class HtmlServiceProviderTest extends TestCase
Expand Down
1 change: 0 additions & 1 deletion tests/Stubs/DummyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class DummyController
*
* @package Arcanedev\LaravelHtml\Tests\Stubs
* @author ARCANEDEV <[email protected]>
*/
class DummyController extends Controller
Expand Down
1 change: 0 additions & 1 deletion tests/Stubs/FormBuilderModelStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class FormBuilderModelStub
*
* @package Arcanedev\LaravelHtml\Tests\Stubs
* @author ARCANEDEV <[email protected]>
*/
class FormBuilderModelStub
Expand Down
1 change: 0 additions & 1 deletion tests/Stubs/ModelThatDoesntUseForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class ModelThatDoesntUseForms
*
* @package Arcanedev\LaravelHtml\Tests\Stubs
* @author ARCANEDEV <[email protected]>
*/
class ModelThatDoesntUseForms extends Model
Expand Down
1 change: 0 additions & 1 deletion tests/Stubs/ModelThatUsesForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class ModelThatUsesForms
*
* @package Arcanedev\LaravelHtml\Tests\Stubs
* @author ARCANEDEV <[email protected]>
*/
class ModelThatUsesForms extends Model
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/**
* Class TestCase
*
* @package Arcanedev\LaravelHtml\Tests
* @author ARCANEDEV <[email protected]>
*/
abstract class TestCase extends BaseTestCase
Expand Down
2 changes: 0 additions & 2 deletions tests/Traits/FormAccessible.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Arcanedev\LaravelHtml\Tests\Traits;

use Arcanedev\LaravelHtml\FormBuilder;
use Arcanedev\LaravelHtml\Tests\Stubs\{ModelThatDoesntUseForms, ModelThatUsesForms};
use Arcanedev\LaravelHtml\Tests\TestCase;
use Carbon\Carbon;
Expand All @@ -13,7 +12,6 @@
/**
* Class FormAccessible
*
* @package Arcanedev\LaravelHtml\Tests\Traits
* @author ARCANEDEV <[email protected]>
*/
class FormAccessible extends TestCase
Expand Down

0 comments on commit 162cf44

Please sign in to comment.