Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .github/workflows/ci.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pull Request Chores
on:
pull_request:
branches:
- FRAMEWORK_6_0
workflow_dispatch:

jobs:
CI:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter, xdebug
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}, composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies and local tools
run: |
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config prefer-stable true
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install --no-interaction --no-progress

- name: Run PHPUnit
run: vendor/bin/phpunit --testdox

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer check -vvv

- name: Run phpstan (mandatory level)
run: vendor/bin/phpstan --no-progress

- name: Run phpstan (level 9, allowed to fail)
run: vendor/bin/phpstan --no-progress --level=9
continue-on-error: true

67 changes: 0 additions & 67 deletions .github/workflows/phpdoc.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/update-satis.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.DS_Store
.buildpath
.cache
.project
.settings
nbproject/
*~
.#*
*.bak
*.orig
*.rej
*.swp
*.kdev4
.kdev4/*

# Ignore ALL config files
conf.php

# Ignore testing files
run-tests.log
/test/*/*/*.diff
/test/*/*/*.exp
/test/*/*/*.log
/test/*/*/*.out
/test/*/*/*/*.diff
/test/*/*/*/*.exp
/test/*/*/*/*.log
/test/*/*/*/*.out

vendor/
web/
var/
tools/
.phive/
.php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.cache/
composer.lock
21 changes: 21 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
$potentialDirs = ['/lib', '/src', '/tests'];

$finder = (new PhpCsFixer\Finder());

foreach ($potentialDirs as $dir) {
$full = __DIR__ . $dir;
if (is_dir($full)) {
$finder->in($full);
}
}


return (new PhpCsFixer\Config())
->setRules([
'@PER-CS' => true,
'@PHP82Migration' => true,
'php_unit_test_class_requires_covers' => true,
])
->setFinder($finder)
;
14 changes: 6 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
{
"name": "horde/horde-installer-plugin",
"description": "Horde.org Framework's composer 2.x plugin",
"type": "composer-plugin",
"license": "MIT",
"autoload": {
"psr-4": {"Horde\\Composer\\": "src/"}
},
"repositories": [
{
"type": "composer",
"url": "https://horde-satis.maintaina.com/"
}
],
"extra": {
"class": "Horde\\Composer\\HordeInstallerPlugin"
},
"require": {
"composer-plugin-api": "~2.0"
"composer-plugin-api": "~2.0",
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^12",
"composer/composer": "~2.0",
"horde/test": "^3"
"friendsofphp/php-cs-fixer": "^3",
"phpstan/phpstan": "^2"
}
}
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: 5
errorFormat: github
treatPhpDocTypesAsCertain: false
paths:
- src
- test
24 changes: 12 additions & 12 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="test/bootstrap.php"
cacheResultFile=".phpunit.cache/test-results"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="true"
requireCoverageMetadata="false"
beStrictAboutCoverageMetadata="false"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
displayDetailsOnPhpunitDeprecations="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">
colors="true">
<testsuites>
<testsuite name="horde/horde-installer-plugin">
<testsuite name="unit">
<directory>test</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".phpunit.cache/code-coverage"
processUncoveredFiles="true">
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
<include>
<directory suffix=".php">src</directory>
<directory>src</directory>
</include>
</coverage>
</source>
</phpunit>
6 changes: 3 additions & 3 deletions src/ApplicationLinker.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function run(): void
}
$appVendorDir = $vendorDir . '/' . $app;
[$vendor, $appName] = explode('/', $app);
$appWebDir = $webDir . '/' . $appName;
$appWebDir = $webDir . '/' . $appName;
// abort if the app isn't actually there
if (!is_dir($appVendorDir) || !is_readable($appVendorDir)) {
// TODO: Consume IO object and warn
Expand All @@ -75,15 +75,15 @@ public function run(): void
'.gitignore', 'README.rst',
],
'dirs' => [
'doc',
'doc',
'test',
'bin',
'script',
'scripts',
'static', // static should be ensured to exist in webdir.
'.git',
'.github',
]
],
];

if ($this->mode === 'symlink') {
Expand Down
Loading
Loading