Skip to content
Open
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
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0
pull_request:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-20.04']
php-versions: ['7.4', '8.0', '8.1', 'latest']
phpunit-versions: ['latest', '9.5']
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
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 horde/test dependency and other dependencies
run: |
## For unclear reasons, github action fails randomly if we do not install before we require.
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config allow-plugins true
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install
- name: run phpunit
run: phpunit --bootstrap test/bootstrap.php
69 changes: 69 additions & 0 deletions .github/workflows/phpdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This is a basic workflow to help you get started with Actions

name: PHPDOC

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
- maintaina-composerfixed
- FRAMEWORK_6_0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ubuntu-20.04
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Setup uut dir
run: |
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export UUT_DIR=$(pwd)
export WORK_DIR=~
export BIN_DIR="${WORK_DIR}/bin"
mkdir -p $BIN_DIR
git config --global user.name "PHPDOC CI Job"
git config --global user.email "ci-job@maintaina.com"
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Doc Dir
uses: actions/checkout@v2
with:
repository: maintaina/phpdoc
token: ${{secrets.PHPDOC_TOKEN}}
path: "phpdoc-git"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: phpdocumentor run
run: |
export UUT_DIR=$(pwd)
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export WORK_DIR=/home/runner/
export BIN_DIR="${WORK_DIR}/bin"
wget https://phpdoc.org/phpDocumentor.phar
mkdir "${WORK_DIR}/phpdoc-out"
mv phpDocumentor.phar $BIN_DIR/phpdocumentor
chmod +x "${BIN_DIR}/phpdocumentor"
echo "Creating UUT related dir in docu repo"
mkdir -p $UUT_DIR/phpdoc-git/${GITHUB_REF##*/}/${REPO}/
## Look into any of lib, src, app (if they exist) but not test, migration, bin, locale or script dirs
$BIN_DIR/phpdocumentor -d $UUT_DIR/lib/ -d $UUT_DIR/src/ -d $UUT_DIR/app/ -t "${UUT_DIR}/phpdoc-git/${GITHUB_REF##*/}/${REPO}/"
cd ${UUT_DIR}/phpdoc-git
git add "${GITHUB_REF##*/}/${REPO}"
php indexer.php ${GITHUB_REF##*/} $REPO
git add index.html index.json
git commit -m "Updated phpdoc for $GITHUB_REPOSITORY (${GITHUB_REF##*/} branch) from ci"
git push
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: make release

# manual workflow to make a new release for the default branch
on:
workflow_dispatch:
branches:
- FRAMEWORK_6_0
env:
components: "/home/runner/.composer/web/components/bin/horde-components -c /home/runner/.composer/web/components/config/maintaina.conf.dist"

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-20.04']
php-versions: ['7.4']
steps:
- name: Setup git
run: |
mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
git config --global user.name "Github CI Runner"
git config --global user.email "ci-job@maintaina.com"
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: gettext
ini-values: post_max_size=512M, max_execution_time=360
tools: composer:v2
- name: Setup composer
run: |
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
composer global config repositories.0 composer https://horde-satis.maintaina.com
composer global config minimum-stability dev
composer config --no-plugins --global allow-plugins true
composer global require horde/components "dev-FRAMEWORK_6_0"
- name: write changelog
run: |
entries_amount=0; max_entries=100
PATTERN="^\[.*\] .*"

for commit in $(git rev-list FRAMEWORK_6_0)
do
msg=$(git log --format=%B -n 1 $commit | head -n 1)
if [ $entries_amount -gt $max_entries ]; then break; fi
if [[ $msg == 'Released'* ]]; then break; fi
if [[ $msg == 'Development mode for'* ]]; then break; fi
if [[ $msg =~ $PATTERN ]]; then
$components changed "$msg"
let "entries_amount+=1"
fi
done
- name: make release and push
run: |
$components release for maintaina
git push
git push origin --tags
60 changes: 60 additions & 0 deletions .github/workflows/update-satis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is a basic workflow to help you get started with Actions

name: Update Satis

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- FRAMEWORK_6_0
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run:
runs-on: ubuntu-20.04
steps:
- name: Setup github ssh key
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
- name: Setup uut dir
run: |
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export UUT_DIR=$(pwd)
export WORK_DIR=~
export BIN_DIR="${WORK_DIR}/bin"
mkdir -p $BIN_DIR
git config --global user.name "Satis Repository CI Job"
git config --global user.email "ci-job@maintaina.com"
- name: Checkout
uses: actions/checkout@v2
- name: Checkout satis web dir
uses: actions/checkout@v2
with:
repository: maintaina-com/maintaina-com.github.io
token: ${{secrets.PHPDOC_TOKEN}}
path: "maintaina-com.github.io"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
ini-values: post_max_size=512M, max_execution_time=3600
coverage: xdebug
tools: composer:v2
- name: Setup Github Token as composer credential
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Run Satis
run: |
export UUT_DIR=$(pwd)
export REPO=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
export WORK_DIR=/home/runner/
export BIN_DIR="${WORK_DIR}/bin"
composer create-project composer/satis:dev-main
composer global config --no-plugins allow-plugins true
php satis/bin/satis build -vvv maintaina-com.github.io/satis.json maintaina-com.github.io/ horde/${REPO,,}
cd maintaina-com.github.io
git add include/ index.html p2/ packages.json
git commit -m "Update for horde/${REPO,,}"
git push
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ run-tests.log
/test/*/*/*/*.log
/test/*/*/*/*.out

# Ignore test harness / quality tools output
.php-cs-fixer.cache
.phpunit.cache/

# ignore composer artifacts
composer.lock
vendor/
31 changes: 18 additions & 13 deletions .horde.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,29 @@ authors:
active: false
role: lead
version:
release: 2.4.2
api: 2.4.0
release: 3.0.0alpha5
api: 3.0.0alpha1
state:
release: stable
api: stable
release: alpha
api: alpha
license:
identifier: LGPL-2.1
identifier: LGPL-2.1-only
uri: http://www.horde.org/licenses/lgpl21
dependencies:
required:
php: ^5.3 || ^7
pear:
pear.horde.org/Horde_Exception: ^2
pear.horde.org/Horde_Nls: ^2
pear.horde.org/Horde_Translation: ^2.2
php: ^7.4 || ^8
composer:
horde/exception: ^3
horde/nls: ^3
horde/translation: ^3
optional:
pear:
pear.horde.org/Horde_Icalendar: ^2
pear.horde.org/Horde_Test: ^2.1
composer:
horde/icalendar: ^3
ext:
calendar: '*'
dev:
composer:
horde/icalendar: ^3
horde/test: ^3
ext:
calendar: '*'
25 changes: 25 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
// Lib is for legacy
->exclude('lib')
// doc may contain ancient examples or illustrational shorthand
->exclude('doc')
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__)
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'@PHP81Migration' => true,
'ordered_imports' => true,
'strict_param' => true,
'declare_strict_types' => true,
'method_argument_space' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)->setFormat('txt')->setRiskyAllowed(true);
;
43 changes: 27 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Date library",
"type": "library",
"homepage": "https://www.horde.org/libraries/Horde_Date",
"license": "LGPL-2.1",
"license": "LGPL-2.1-only",
"authors": [
{
"name": "Jan Schneider",
Expand All @@ -16,32 +16,43 @@
"role": "lead"
}
],
"version": "2.4.2",
"time": "2017-11-11",
"time": "2022-10-10",
"repositories": [
{
"type": "pear",
"url": "https://pear.horde.org"
"type": "composer",
"url": "https://horde-satis.maintaina.com"
}
],
"require": {
"php": "^5.3 || ^7",
"pear-pear.horde.org/Horde_Exception": "^2",
"pear-pear.horde.org/Horde_Nls": "^2",
"pear-pear.horde.org/Horde_Translation": "^2.2"
"php": "^7.4 || ^8",
"horde/exception": "^3 || dev-FRAMEWORK_6_0",
"horde/nls": "^3 || dev-FRAMEWORK_6_0",
"horde/translation": "^3 || dev-FRAMEWORK_6_0"
},
"suggest": {
"pear-pear.horde.org/Horde_Icalendar": "^2",
"pear-pear.horde.org/Horde_Test": "^2.1",
"require-dev": {
"horde/icalendar": "^3 || dev-FRAMEWORK_6_0",
"horde/test": "^3 || dev-FRAMEWORK_6_0",
"ext-calendar": "*"
},
"replace": {
"pear-pear.horde.org/Horde_Date": "2.*",
"pear-horde/Horde_Date": "2.*"
"suggest": {
"horde/icalendar": "^3 || dev-FRAMEWORK_6_0",
"horde/test": "^3 || dev-FRAMEWORK_6_0",
"ext-calendar": "*"
},
"autoload": {
"psr-0": {
"Horde_Date": "lib/"
}
}
},
"autoload-dev": {
"psr-4": {
"Horde\\Date\\Test\\": "test/"
}
},
"config": {
"allow-plugins": {
"horde/horde-installer-plugin": true
}
},
"minimum-stability": "dev"
}
Loading