Add development environment setup and server scripts#2
Merged
ralflang merged 2 commits intoFRAMEWORK_6_0from Feb 26, 2026
Merged
Add development environment setup and server scripts#2ralflang merged 2 commits intoFRAMEWORK_6_0from
ralflang merged 2 commits intoFRAMEWORK_6_0from
Conversation
Add three new utility scripts to streamline Horde development:
1. install-ubuntu-24.04.sh
- Idempotent installation of PHP 8.3, 8.4, and 8.5
- Installs all required Horde extensions (cli, fpm, bcmath, curl,
gd, intl, mbstring, mysql, xml, zip, soap, ldap, imap, tidy, etc.)
- Configures ondrej/php PPA for Ubuntu 24.04 (Noble)
- Sets PHP 8.3 as default version
- Installs PHP-FPM for all versions
2. install-ubuntu-24.04-developer-tools.sh
- Calls install-ubuntu-24.04.sh to ensure PHP is installed
- Installs PHIVE (PHar Installation and Verification Environment)
- Installs developer tools globally: Composer, PHPUnit 10/11,
PHP-CS-Fixer, PHPStan, and Dephpend
- Idempotent - safe to run multiple times
3. horde-dev-server.sh
- Runs PHP built-in development server for Horde
- Default: localhost:8585 serving /srv/www/horde-dev/web
- Options: -a (all interfaces), -p (port), --php (version)
- Includes port conflict detection and security warnings
- Displays all available access URLs when using all interfaces
All scripts are idempotent and include comprehensive help text.
Add a new GitHub Actions workflow for testing PHP 8.5 compatibility. This workflow demonstrates the simplified approach enabled by the new install-ubuntu-24.04.sh script: - Single-line PHP installation (vs 10+ lines in existing workflows) - Installs ALL required Horde extensions automatically (25+ extensions) - Covers extensions missing in existing workflows: - Graphics: gd, imagick - Utilities: xml, zip, soap, tidy, readline, bz2, xsl - Caching: apcu, memcached, redis, opcache - Optional: pgsql The workflow follows the same testing pattern as php83.yml and php84-alpha.yml but with significantly reduced maintenance burden. Future enhancement: These workflows could be consolidated into a single matrix-based workflow using the installation script.
Member
Author
Added: PHP 8.5 CI WorkflowI've added a new GitHub Actions workflow ( Comparison: Before vs AfterOld approach (php83.yml, php84-alpha.yml): - name: Upgrade to PHP 8.4 from PPA
run: |
sudo add-apt-repository ppa:ondrej/php
sudo apt -o Dpkg::Progress-Fancy=0 update
sudo apt install php8.4 php8.4-dom php8.4-pdo php8.4-sqlite3 \
php8.4-mysql php8.4-curl php8.4-intl php8.4-mbstring \
php8.4-cli php8.4-fpm php8.4-ldap php8.4-bcmath
sudo update-alternatives --set php /usr/bin/php8.4New approach (php85.yml): - name: Install PHP 8.5 with all Horde extensions
run: sudo bash scripts/install-ubuntu-24.04.sh
- name: Set PHP 8.5 as default
run: sudo update-alternatives --set php /usr/bin/php8.5Benefits
Future EnhancementThe three PHP workflows (php83.yml, php84-alpha.yml, php85.yml) could be consolidated into a single matrix-based workflow: strategy:
matrix:
php-version: ['8.3', '8.4', '8.5']
steps:
- name: Install PHP
run: sudo bash scripts/install-ubuntu-24.04.sh
- name: Set version
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-version }}This would reduce maintenance from 3 workflow files to 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add three new utility scripts to streamline Horde development environment setup and local testing.
New Scripts
1. install-ubuntu-24.04.sh
Idempotent PHP installation script for Ubuntu 24.04 (Noble):
2. install-ubuntu-24.04-developer-tools.sh
Developer tools installation script:
3. horde-dev-server.sh
PHP development server wrapper for Horde:
-a, --all-interfaces- Listen on 0.0.0.0 (all network interfaces)-p, --port PORT- Custom port number-d, --docroot PATH- Custom document root--php VERSION- Use specific PHP version (8.3, 8.4, 8.5)-h, --help- Show help messageTesting
All scripts have been tested and verified:
Usage