laravel-6 support
This commit is contained in:
29
vendor/facade/ignition-contracts/.github/workflows/php-cs-fixer.yml
vendored
Normal file
29
vendor/facade/ignition-contracts/.github/workflows/php-cs-fixer.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Check & fix styling
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
style:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Fix style
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
with:
|
||||
args: --config=.php_cs --allow-risky=yes
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v2.3.0
|
||||
with:
|
||||
commit_message: Fix styling
|
||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
33
vendor/facade/ignition-contracts/.github/workflows/psalm.yml
vendored
Normal file
33
vendor/facade/ignition-contracts/.github/workflows/psalm.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Psalm
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.php'
|
||||
- 'psalm.xml'
|
||||
|
||||
jobs:
|
||||
psalm:
|
||||
name: psalm
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
|
||||
coverage: none
|
||||
|
||||
- name: Cache composer dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: vendor
|
||||
key: composer-${{ hashFiles('composer.lock') }}
|
||||
|
||||
- name: Run composer require
|
||||
run: composer require -n --prefer-dist
|
||||
|
||||
- name: Run psalm
|
||||
run: ./vendor/bin/psalm -c psalm.xml
|
43
vendor/facade/ignition-contracts/.github/workflows/run-tests.yml
vendored
Normal file
43
vendor/facade/ignition-contracts/.github/workflows/run-tests.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
php-tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php: [ 8.0, 7.4, 7.3 ]
|
||||
dependency-version: [ prefer-lowest, prefer-stable ]
|
||||
os: [ ubuntu-latest, windows-latest ]
|
||||
allow_failures:
|
||||
- php: 8.0
|
||||
|
||||
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install PHP 7 dependencies
|
||||
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
|
||||
if: "matrix.php < 8"
|
||||
|
||||
- name: Install PHP 8 dependencies
|
||||
run: composer update --prefer-stable --ignore-platform-req=php --no-interaction --no-progress
|
||||
if: "matrix.php >= 8"
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit
|
38
vendor/facade/ignition-contracts/.php_cs
vendored
Normal file
38
vendor/facade/ignition-contracts/.php_cs
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
$finder = Symfony\Component\Finder\Finder::create()
|
||||
->notPath('bootstrap/*')
|
||||
->notPath('storage/*')
|
||||
->notPath('resources/view/mail/*')
|
||||
->in([
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/tests',
|
||||
])
|
||||
->name('*.php')
|
||||
->notName('*.blade.php')
|
||||
->notName('GitConflictController.php')
|
||||
->ignoreDotFiles(true)
|
||||
->ignoreVCS(true);
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
|
||||
'no_unused_imports' => true,
|
||||
'not_operator_with_successor_space' => true,
|
||||
'trailing_comma_in_multiline_array' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'binary_operator_spaces' => true,
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
|
||||
],
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'method_argument_space' => [
|
||||
'on_multiline' => 'ensure_fully_multiline',
|
||||
'keep_multiple_spaces_after_comma' => true,
|
||||
]
|
||||
])
|
||||
->setFinder($finder);
|
22
vendor/facade/ignition-contracts/LICENSE.md
vendored
Normal file
22
vendor/facade/ignition-contracts/LICENSE.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Facade <info@facade.company>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
46
vendor/facade/ignition-contracts/composer.json
vendored
Normal file
46
vendor/facade/ignition-contracts/composer.json
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "facade/ignition-contracts",
|
||||
"description": "Solution contracts for Ignition",
|
||||
"keywords": [
|
||||
"flare",
|
||||
"contracts",
|
||||
"ignition"
|
||||
],
|
||||
"homepage": "https://github.com/facade/ignition-contracts",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Freek Van der Herten",
|
||||
"email": "freek@spatie.be",
|
||||
"homepage": "https://flareapp.io",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^v2.15.8",
|
||||
"phpunit/phpunit": "^9.3.11",
|
||||
"vimeo/psalm": "^3.17.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Facade\\IgnitionContracts\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Facade\\IgnitionContracts\\Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"psalm": "vendor/bin/psalm",
|
||||
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
|
||||
"test": "vendor/bin/phpunit",
|
||||
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
20
vendor/facade/ignition-contracts/psalm.xml
vendored
Normal file
20
vendor/facade/ignition-contracts/psalm.xml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="4"
|
||||
findUnusedVariablesAndParams="true"
|
||||
resolveFromConfigFile="true"
|
||||
useDocblockPropertyTypes="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src"/>
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
|
||||
<issueHandlers>
|
||||
</issueHandlers>
|
||||
</psalm>
|
56
vendor/facade/ignition-contracts/src/BaseSolution.php
vendored
Normal file
56
vendor/facade/ignition-contracts/src/BaseSolution.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
class BaseSolution implements Solution
|
||||
{
|
||||
protected $title;
|
||||
protected $description;
|
||||
protected $links = [];
|
||||
|
||||
public static function create(string $title)
|
||||
{
|
||||
return new static($title);
|
||||
}
|
||||
|
||||
public function __construct(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function getSolutionTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function setSolutionTitle(string $title): self
|
||||
{
|
||||
$this->title = $title;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSolutionDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setSolutionDescription(string $description): self
|
||||
{
|
||||
$this->description = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDocumentationLinks(): array
|
||||
{
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
public function setDocumentationLinks(array $links): self
|
||||
{
|
||||
$this->links = $links;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
13
vendor/facade/ignition-contracts/src/HasSolutionsForThrowable.php
vendored
Normal file
13
vendor/facade/ignition-contracts/src/HasSolutionsForThrowable.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
use Throwable;
|
||||
|
||||
interface HasSolutionsForThrowable
|
||||
{
|
||||
public function canSolve(Throwable $throwable): bool;
|
||||
|
||||
/** \Facade\IgnitionContracts\Solution[] */
|
||||
public function getSolutions(Throwable $throwable): array;
|
||||
}
|
8
vendor/facade/ignition-contracts/src/ProvidesSolution.php
vendored
Normal file
8
vendor/facade/ignition-contracts/src/ProvidesSolution.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
interface ProvidesSolution
|
||||
{
|
||||
public function getSolution(): Solution;
|
||||
}
|
14
vendor/facade/ignition-contracts/src/RunnableSolution.php
vendored
Normal file
14
vendor/facade/ignition-contracts/src/RunnableSolution.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
interface RunnableSolution extends Solution
|
||||
{
|
||||
public function getSolutionActionDescription(): string;
|
||||
|
||||
public function getRunButtonText(): string;
|
||||
|
||||
public function run(array $parameters = []);
|
||||
|
||||
public function getRunParameters(): array;
|
||||
}
|
12
vendor/facade/ignition-contracts/src/Solution.php
vendored
Normal file
12
vendor/facade/ignition-contracts/src/Solution.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
interface Solution
|
||||
{
|
||||
public function getSolutionTitle(): string;
|
||||
|
||||
public function getSolutionDescription(): string;
|
||||
|
||||
public function getDocumentationLinks(): array;
|
||||
}
|
20
vendor/facade/ignition-contracts/src/SolutionProviderRepository.php
vendored
Normal file
20
vendor/facade/ignition-contracts/src/SolutionProviderRepository.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\IgnitionContracts;
|
||||
|
||||
use Throwable;
|
||||
|
||||
interface SolutionProviderRepository
|
||||
{
|
||||
public function registerSolutionProvider(string $solutionProviderClass): self;
|
||||
|
||||
public function registerSolutionProviders(array $solutionProviderClasses): self;
|
||||
|
||||
/**
|
||||
* @param Throwable $throwable
|
||||
* @return \Facade\IgnitionContracts\Solution[]
|
||||
*/
|
||||
public function getSolutionsForThrowable(Throwable $throwable): array;
|
||||
|
||||
public function getSolutionForClass(string $solutionClass): ?Solution;
|
||||
}
|
Reference in New Issue
Block a user