Skip to content

Commit

Permalink
laravel 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
reliq committed Sep 12, 2020
1 parent 296f466 commit 61245cd
Show file tree
Hide file tree
Showing 36 changed files with 612 additions and 596 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement, request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
39 changes: 39 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Unit Tests

on: [push, pull_request]

jobs:
run:
runs-on: ubuntu-latest
strategy:
max-parallel: 10
matrix:
laravel-version: ['^7.0', '^8.0']
preference: ['stable']
php-versions: ['7.4']
name: Laravel ${{ matrix.laravel-version }} (${{ matrix.preference }}) on PHP ${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xdebug
coverage: xdebug
- name: Install dependencies
run: |
composer require --no-update --no-interaction "illuminate/support:${{ matrix.laravel-version }}"
composer update --prefer-${{ matrix.preference }} --no-interaction --prefer-dist --no-suggest --no-scripts --optimize-autoloader
- name: Lint composer.json
run: composer validate
- name: Run Tests
run: composer test:ci
- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} #required
file: ./coverage.xml #optional
flags: unittests #optional
name: codecov-umbrella #optional
fail_ci_if_error: true #optional (default = false)
100 changes: 0 additions & 100 deletions .php_cs

This file was deleted.

5 changes: 0 additions & 5 deletions .styleci.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"require": {
"php": "^7.4",
"ext-json": "*",
"illuminate/support": "6 - 7",
"illuminate/support": "7 - 8",
"league/commonmark": "^1.1",
"league/commonmark-extras": "^1.1",
"monolog/monolog": "1.24 - 2",
Expand All @@ -31,11 +31,11 @@
"symfony/yaml": "^4.3"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"orchestra/testbench-browser-kit": "4 - 5",
"goaop/framework": "^3.0@rc",
"codeception/aspect-mock": "^3.1",
"phpro/grumphp": "^0.18.0"
"orchestra/testbench-browser-kit": "4 - 6",
"phpunit/phpunit": "^9.3",
"phpro/grumphp": "^0.19.1",
"phpspec/prophecy-phpunit": "^2.0",
"symplify/easy-coding-standard": "^8.2"
},
"autoload": {
"psr-4": {
Expand Down
15 changes: 15 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();

$parameters->set('line_ending', "\n");

$parameters->set('paths', [__DIR__ . '/src', __DIR__ . '/tests']);

$parameters->set('sets', ['clean-code', 'psr12']);
};
19 changes: 8 additions & 11 deletions grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
parameters:
grumphp:
tasks:
phpcsfixer2:
allow_risky: ~
cache_file: ~
ecs:
config: ~
rules: []
using_cache: ~
config_contains_finder: true
verbose: true
diff: false
triggered_by: ['php']
level: ~
whitelist_patterns: [ ]
triggered_by: [ 'php' ]
clear-cache: false
no-progress-bar: true
phpunit:
config_file: ~
testsuite: Unit
group: []
group: [ ]
always_execute: false
26 changes: 26 additions & 0 deletions src/Contract/FileHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* @noinspection PhpTooManyParametersInspection
*/

declare(strict_types=1);

namespace ReliqArts\Docweaver\Contract;

interface FileHelper
{
/**
* Returns absolute path name
*
* @return string|false the canonicalize-d absolute pathname on success. False on failure
* @see realpath()
*/
public function realPath(string $path);

/**
* @return string|false The function returns the read data or false on failure.
* @see file_get_contents()
*/
public function getFileContents(string $filename, bool $useIncludePath = false);
}
22 changes: 22 additions & 0 deletions src/Contract/ProcessHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/**
* @noinspection PhpTooManyParametersInspection
*/

declare(strict_types=1);

namespace ReliqArts\Docweaver\Contract;

use Symfony\Component\Process\Process;

interface ProcessHelper
{
public function createProcess(
array $command,
string $cwd = null,
array $env = null,
$input = null,
?float $timeout = 60
): Process;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Symfony\Component\Process\Exception\ProcessFailedException;

interface VCSCommandRunner
interface VcsCommandRunner
{
public function clone(string $source, string $branch, string $workingDirectory): void;

Expand Down
15 changes: 15 additions & 0 deletions src/Contract/YamlHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace ReliqArts\Docweaver\Contract;

use Symfony\Component\Yaml\Exception\ParseException;

interface YamlHelper
{
/**
* @throws ParseException
*/
public function parse(string $input, int $flags = 0);
}

0 comments on commit 61245cd

Please sign in to comment.