Skip to content

Commit d10010d

Browse files
committed
Merge branch 'master' of github.com:php/pecl-encryption-mcrypt
* 'master' of github.com:php/pecl-encryption-mcrypt: Release 1.0.7 with support for PHP 8.3 Install libmcrypt dependency This should be --with-mcrypt as it uses a library Add GHA, to also build Windows binaries Fixed package.xml file Release 1.0.6 with package support for PHP 8.2
2 parents d821f9a + 1594986 commit d10010d

File tree

3 files changed

+97
-6
lines changed

3 files changed

+97
-6
lines changed

.github/workflows/build.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
release:
8+
types: [created]
9+
create:
10+
11+
jobs:
12+
windows:
13+
runs-on: windows-latest
14+
name: "Windows: Build and test"
15+
defaults:
16+
run:
17+
shell: cmd
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
php: ["7.3", "7.4", "8.0", "8.1", "8.2"]
22+
arch: [x86, x64]
23+
ts: [nts, ts]
24+
experimental: [false]
25+
steps:
26+
- name: Checkout Repository
27+
uses: actions/checkout@v3
28+
- name: Extract Version
29+
shell: powershell
30+
run: |
31+
chcp 65001
32+
$r = Select-String -Path php_mcrypt.h -Pattern 'PHP_MCRYPT_VERSION\s+"(.*)"'
33+
$s = $r.Matches[0].Groups[1]
34+
echo "$s"
35+
$extension_version = 'EXTENSION_VERSION=' + $s
36+
echo $extension_version >> $env:GITHUB_ENV
37+
- name: Setup PHP
38+
id: setup-php
39+
uses: cmb69/setup-php-sdk@v0.7
40+
with:
41+
version: ${{matrix.php}}
42+
arch: ${{matrix.arch}}
43+
ts: ${{matrix.ts}}
44+
deps: "libmcrypt"
45+
- name: Enable Developer Command Prompt
46+
uses: ilammy/msvc-dev-cmd@v1
47+
with:
48+
arch: ${{matrix.arch}}
49+
toolset: ${{steps.setup-php.outputs.toolset}}
50+
- name: Generate Build Files
51+
run: phpize
52+
- name: Configure Build
53+
run: configure --with-mcrypt --with-prefix=${{steps.setup-php.outputs.prefix}}
54+
- name: Build
55+
run: nmake
56+
- name: Define Module Env
57+
shell: powershell
58+
run: |
59+
chcp 65001
60+
61+
$dir = (Get-Location).Path + '\'
62+
if ('x64' -eq '${{matrix.arch}}') { $dir = $dir + 'x64\' }
63+
$dir = $dir + 'Release'
64+
if ('ts' -eq '${{matrix.ts}}') { $dir = $dir + '_TS' }
65+
66+
$artifact_name = 'php_mcrypt-${{env.EXTENSION_VERSION}}-${{matrix.php}}'
67+
68+
if ('7.2' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
69+
if ('7.3' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
70+
if ('7.4' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vc15' }
71+
if ('8.0' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
72+
if ('8.1' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
73+
if ('8.2' -eq '${{matrix.php}}') { $artifact_name = $artifact_name + '-vs16' }
74+
75+
if ('nts' -eq '${{matrix.ts}}') { $artifact_name = $artifact_name + '-nts' }
76+
if ('x64' -eq '${{matrix.arch}}') { $artifact_name = $artifact_name + '-x86_64' }
77+
78+
$extension_artifact_name = "ARTIFACT_NAME=" + $artifact_name
79+
echo $extension_artifact_name >> $env:GITHUB_ENV
80+
81+
$from = $dir + '\php_mcrypt.dll'
82+
$to = $dir + '\' + $artifact_name + ".dll"
83+
Copy-Item $from -Destination $to
84+
$extension_artifact = "ARTIFACT=" + $to
85+
echo $extension_artifact >> $env:GITHUB_ENV
86+
87+
- name: Upload artifacts
88+
uses: actions/upload-artifact@v3
89+
with:
90+
name: ${{env.ARTIFACT_NAME}}
91+
path: ${{env.ARTIFACT}}

package.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
<email>leigh@php.net</email>
2525
<active>yes</active>
2626
</lead>
27-
<date>2022-04-14</date>
27+
<date>2023-12-12</date>
2828
<version>
29-
<release>1.0.5</release>
29+
<release>1.0.7</release>
3030
<api>1.0.0</api>
3131
</version>
3232
<stability>
@@ -35,7 +35,7 @@
3535
</stability>
3636
<license uri="http://www.php.net/license">PHP License</license>
3737
<notes>
38-
- Make release to advertise PHP 8 support, which it already had.
38+
- Make release to advertise PHP 8.3 support, which it already had.
3939
</notes>
4040
<contents>
4141
<dir name="/">
@@ -106,8 +106,8 @@
106106
<required>
107107
<php>
108108
<min>7.2.0</min>
109-
<max>8.2.0</max>
110-
<exclude>8.2.0</exclude>
109+
<max>8.4.0</max>
110+
<exclude>8.4.0</exclude>
111111
</php>
112112
<pearinstaller>
113113
<min>1.4.0</min>

php_mcrypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
extern zend_module_entry mcrypt_module_entry;
3030
#define mcrypt_module_ptr &mcrypt_module_entry
3131

32-
#define PHP_MCRYPT_VERSION "1.0.5"
32+
#define PHP_MCRYPT_VERSION "1.0.7"
3333

3434
/* Functions for both old and new API */
3535
PHP_FUNCTION(mcrypt_ecb);

0 commit comments

Comments
 (0)