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
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches:
- master
- 'claude/**'
pull_request:
branches:
- master

jobs:
lint:
name: PHP ${{ matrix.php }} lint
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ['5.6', '7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Parallel lint
run: vendor/bin/parallel-lint --exclude vendor .
23 changes: 15 additions & 8 deletions HTML/QuickForm/depselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
require_once 'HTML/QuickForm/text.php';

class HTML_QuickForm_depselect extends HTML_QuickForm_text {
function HTML_QuickForm_depselect(
$elementName=null,
$elementLabel=null,
$attributes=null,

function __construct(
$elementName=null,
$elementLabel=null,
$attributes=null,
$properties=null){
parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
// PHP 4-style parent constructors are fatal in PHP 8. Prefer
// parent::__construct(), but fall back to the PHP 4 ctor name
// for installations running against pre-modernized PEAR
// HTML_QuickForm bundles shipped with older xataface versions.
if (is_callable(array('HTML_QuickForm_input', '__construct'))) {
parent::__construct($elementName, $elementLabel, $attributes);
} else {
parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
}
}

function toHtml(){
$oldFrozen = $this->_flagFrozen;
$this->_flagFrozen = 0;
Expand All @@ -23,4 +31,3 @@ function toHtml(){
return $out;
}
}

12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "shannah/xataface-module-depselect",
"description": "Xataface dependent-select widget module.",
"type": "xataface-module",
"license": "LGPL-2.1-or-later",
"require": {
"php": ">=5.6"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3"
}
}
Loading