🆙 Add cms i using 🆙

This commit is contained in:
Remco
2025-11-25 22:42:56 +01:00
parent 94704e0925
commit d44196149e
35591 changed files with 3601123 additions and 0 deletions
@@ -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 }}
@@ -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
@@ -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
@@ -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);
@@ -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.
@@ -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
}
}
@@ -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>
@@ -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;
}
}
@@ -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;
}
@@ -0,0 +1,8 @@
<?php
namespace Facade\IgnitionContracts;
interface ProvidesSolution
{
public function getSolution(): Solution;
}
@@ -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;
}
@@ -0,0 +1,12 @@
<?php
namespace Facade\IgnitionContracts;
interface Solution
{
public function getSolutionTitle(): string;
public function getSolutionDescription(): string;
public function getDocumentationLinks(): array;
}
@@ -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;
}