振奋人心!PHP官方扩展安装程序PIE发布
振奋人心!PHP官方扩展安装程序PIE发布
PHP官方Github
目前是 0.1.0 预览版
github.com/php/pie
以后安装扩展就和安装依赖包/库一样简单
Packagist
packagist.org/extensions
同样,扩展也是在 Packagist 中浏览
赶快去体验吧
起飞了
感觉没有太大变化,pie用phar实现安装脚本,pecl是C安装脚本。
这有啥振奋的 :flushed:
一定也不振奋啊
半点卵用没有的功能
pie都不带点介绍的吗?首先,图片看不到
很多东西都出晚了,,
Windows Support In order to support Windows users, you must publish pre-built DLLs, as PIE does not currently support building DLLs on the fly. The expected workflow for Windows-compatible releases is:
The release is made on GitHub (only GitHub is supported at the moment) A CI pipeline runs to build the release assets, e.g. in a GitHub Action The resulting build assets are published to the GitHub release in a ZIP file The name of the ZIP file, and the DLL contained within must be:
php_{extension-name}-{tag}-{php-maj/min}-{ts|nts}-{compiler}-{arch}.zip Example: php_xdebug-3.3.2-8.3-ts-vs16-x86_64.zip The descriptions of these items:
extension-name the name of the extension, e.g. xdebug tag for example 3.3.0alpha3 - defined by the tag/release you have made php-maj/min - for example 8.3 for PHP 8.3.* compiler - usually something like vc6, vs16 - fetch from 'PHP Extension Build' flags in php -i ts|nts - Thread-safe or non-thread safe. arch - for example x86_64. Windows: Architecture from php -i non-Windows: check PHP_INT_SIZE - 4 for 32-bit, 8 for 64-bit. Contents of the Windows ZIP The pre-built ZIP should contain at minimum a DLL named in the same way as the ZIP itself, for example php_{extension-name}-{tag}-{php-maj/min}-{ts|nts}-{compiler}-{arch}.dll. The .dll will be moved into the PHP extensions path, and renamed, e.g. to C:\path\to\php\ext\php_{extension-name}.dll. The ZIP file may include additional resources, such as:
php_{extension-name}.pdb - this will be moved alongside the C:\path\to\php\ext\php_{extension-name}.dll *.dll - any other .dll would be moved alongside C:\path\to\php\php.exe Any other file, which would be moved into C:\path\to\php\extras{extension-name}. Automation of the Windows publishing PHP provides a set of GitHub Actions that enable extension maintainers to build and release the Windows compatible assets. An example workflow that uses these actions:
name: Publish Windows Releases on: release: types: [published]
permissions: contents: write
jobs: get-extension-matrix: runs-on: ubuntu-latest outputs: matrix: ${{ steps.extension-matrix.outputs.matrix }} steps: - name: Checkout uses: actions/checkout@v4 - name: Get the extension matrix id: extension-matrix uses: php/php-windows-builder/extension-matrix@v1 build: needs: get-extension-matrix runs-on: ${{ matrix.os }} strategy: matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}} steps: - name: Checkout uses: actions/checkout@v4 - name: Build the extension uses: php/php-windows-builder/extension@v1 with: php-version: ${{ matrix.php-version }} arch: ${{ matrix.arch }} ts: ${{ matrix.ts }} release: runs-on: ubuntu-latest needs: build if: ${{ github.event_name == 'release' }} steps: - name: Upload artifact to the release uses: php/php-windows-builder/release@v1 with: release: ${{ github.event.release.tag_name }} token: ${{ secrets.GITHUB_TOKEN }} Source: github.com/php/php-windows-builder...
好消息,支持windows了
本该十几年前就出的东西, 如今如落西山才出来
现在出也不晚,确实跟composer统一了,以后安装扩展和安装包一样简单了
感觉有点晚了,同时没有啥大的亮点。现在集成环境、docker之类的安装扩展也很方便,大家只会选择最熟悉的。
看上去还不错。不过可用这个命令安装的扩展太少了。只有20个左右,实际的php扩展应该有过百了。
干啥用的
ubuntu 安装扩展,比如 php7.4-cli, 感觉这个已经很方便了
不是二进制分发的。安装 swoole 一直超时,编译还一直报错。如果可以像remi一样并且支持windows,那就真的飞起来了
我觉得还是让Composer支持二进制扩展编译安装比较合适,就类似于npm那种