This is a module of Bearsampp project involving PHP.
This project uses Gradle as its build system. The legacy Ant build has been fully replaced with a modern, pure Gradle implementation.
# Display build information
gradle info
# List all available tasks
gradle tasks
# Verify build environment
gradle verify
# Build a release (interactive) - automatically fetches latest dependencies
gradle release
# Build a specific version (non-interactive)
gradle release -PbundleVersion=8.3.15
# Update dependencies only (without building)
gradle fetch -PbundleVersion=8.3.15
# Clean build artifacts
gradle cleanWhen a new PHP version is released, follow these steps:
-
Create version directory structure:
mkdir bin/php8.4.16
-
Copy configuration files from a similar version:
# Copy from previous version cp bin/php8.4.15/* bin/php8.4.16/
-
Build the release (fetch is automatic):
gradle release -PbundleVersion=8.4.16
The
releasetask automatically runsfetchwhich will:- β
Update
build.propertieswith today's date - β
Fetch the latest release tag from
modules-untouchedrepository - β Find and update ImageMagick, php_imagick, memcache, xdebug, and PEAR URLs
- β
Update
bearsampp.confwith the new PHP version - β
Update
deps.properties,exts.properties, andpear.properties - β
Update version-specific paths in
php.ini - β Download PHP binaries and dependencies
- β Build and package the release
- β
Update
-
Review the updated files in
bin/php8.4.16/:bearsampp.conf- PHP version updatedexts.properties- Extension URLs updateddeps.properties- Dependency URLs updatedpear.properties- PEAR URL updatedphp.ini- Version-specific paths updated
-
Commit the changes to git:
git add bin/php8.4.16/ git commit -m "Add PHP 8.4.16 configuration"
Note: The
fetchtask is automatically included in thereleasebuild process. You only need to rungradle fetchseparately if you want to update dependency URLs without building a release.
The fetch task integrates with the Bearsampp modules-untouched repository:
- Reads
php.propertiesfrom modules-untouched to get the PHP download URL - Extracts the release tag (e.g.,
php-2025.12.7) from the URL - Queries GitHub API to get all assets from that release
- Pattern matches to find the latest versions of:
- ImageMagick (portable Q16-HDRI x64)
- php_imagick (matching PHP major.minor version)
- php_memcache (matching PHP major.minor version)
- php_xdebug (matching PHP major.minor version)
- PEAR (pearweb_phars)
- Updates configuration files with the new URLs
- Updates version-specific paths in php.ini
This ensures all dependencies are automatically synchronized with the latest compatible versions from the modules-untouched releases.
| Requirement | Version | Purpose |
|---|---|---|
| Java | 8+ | Required for Gradle execution |
| Gradle | 8.0+ | Build automation tool |
| PowerShell | 5.0+ | DLL architecture validation |
| 7-Zip | Latest | Archive extraction (optional) |
| Task | Description |
|---|---|
release |
Build release package (interactive/non-interactive) |
fetch |
Fetch and update dependencies from modules-untouched |
clean |
Clean build artifacts and temporary files |
verify |
Verify build environment and dependencies |
info |
Display build configuration information |
listVersions |
List available bundle versions in bin/ |
listExtensions |
List PHP extensions configured in bin/ |
validateProperties |
Validate build.properties configuration |
For complete documentation, see .gradle-docs/README.md
- Build Documentation: .gradle-docs/README.md
- Task Reference: .gradle-docs/TASKS.md
- Configuration Guide: .gradle-docs/CONFIGURATION.md
- API Reference: .gradle-docs/API.md
- CI/CD Testing: docs/PHP-EXTENSION-TESTING.md
- Module Downloads: https://bearsampp.com/module/php
Issues must be reported on Bearsampp repository.