mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 23:36:21 +07:00 
			
		
		
		
	Improve pecl support
This commit is contained in:
		| @ -120,7 +120,7 @@ PHP extensions can be setup using the `extensions` input. It accepts a `string` | ||||
| - On `Ubuntu`, extensions which are available as a package or available on `PECL` can be setup. | ||||
|  | ||||
| ```yaml | ||||
| - name: Setup PHP with pecl extension | ||||
| - name: Setup PHP with PECL extension | ||||
|   uses: shivammathur/setup-php@v2 | ||||
|   with: | ||||
|     php-version: '7.4' | ||||
| @ -140,7 +140,6 @@ PHP extensions can be setup using the `extensions` input. It accepts a `string` | ||||
|   uses: shivammathur/setup-php@v2 | ||||
|   with: | ||||
|     php-version: '5.4' | ||||
|     tools: pecl | ||||
|     extensions: swoole-1.9.3 | ||||
| ``` | ||||
|  | ||||
| @ -151,7 +150,6 @@ PHP extensions can be setup using the `extensions` input. It accepts a `string` | ||||
|   uses: shivammathur/setup-php@v2 | ||||
|   with: | ||||
|     php-version: '7.4' | ||||
|     tools: pecl | ||||
|     extensions: xdebug-beta | ||||
| ``` | ||||
|  | ||||
| @ -428,7 +426,6 @@ jobs: | ||||
| > Setup a nightly build of `PHP 8.1`.  | ||||
|  | ||||
| - This version is currently in development. | ||||
| - `PECL` is installed by default with `PHP 8.1` on both `ubuntu` and `macOS`. | ||||
| - Some user space extensions might not support this version currently. | ||||
|  | ||||
| ```yaml | ||||
|  | ||||
							
								
								
									
										5
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -2577,10 +2577,7 @@ async function getScript(filename, version, os_version) { | ||||
|     const extension_csv = await utils.getInput('extensions', false); | ||||
|     const ini_values_csv = await utils.getInput('ini-values', false); | ||||
|     const coverage_driver = await utils.getInput('coverage', false); | ||||
|     let tools_csv = await utils.getInput('tools', false); | ||||
|     if (/.*-(beta|alpha|devel|snapshot|\d+\.\d+\.\d+).*/.test(extension_csv)) { | ||||
|         tools_csv = 'pecl, ' + tools_csv; | ||||
|     } | ||||
|     const tools_csv = await utils.getInput('tools', false); | ||||
|     let script = await utils.readScript(filename); | ||||
|     script += await tools.addTools(tools_csv, version, os_version); | ||||
|     if (extension_csv) { | ||||
|  | ||||
| @ -25,10 +25,7 @@ export async function getScript( | ||||
|   const extension_csv: string = await utils.getInput('extensions', false); | ||||
|   const ini_values_csv: string = await utils.getInput('ini-values', false); | ||||
|   const coverage_driver: string = await utils.getInput('coverage', false); | ||||
|   let tools_csv: string = await utils.getInput('tools', false); | ||||
|   if (/.*-(beta|alpha|devel|snapshot|\d+\.\d+\.\d+).*/.test(extension_csv)) { | ||||
|     tools_csv = 'pecl, ' + tools_csv; | ||||
|   } | ||||
|   const tools_csv: string = await utils.getInput('tools', false); | ||||
|  | ||||
|   let script: string = await utils.readScript(filename); | ||||
|   script += await tools.addTools(tools_csv, version, os_version); | ||||
|  | ||||
| @ -112,7 +112,10 @@ enable_extension() { | ||||
|  | ||||
| # Function to configure PECL. | ||||
| configure_pecl() { | ||||
|   if ! [ -e /tmp/pecl_config ] && command -v pecl >/dev/null && command -v pear >/dev/null; then | ||||
|   if ! [ -e /tmp/pecl_config ]; then | ||||
|     if ! command -v pecl >/dev/null || ! command -v pear >/dev/null; then | ||||
|       add_pecl >/dev/null 2>&1 | ||||
|     fi | ||||
|     for script in pear pecl; do | ||||
|       sudo "$script" config-set php_ini "${pecl_file:-${ini_file[@]}}" | ||||
|       sudo "$script" channel-update "$script".php.net | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur