Skip to content

Commit a05f6aa

Browse files
authored
Merge pull request #16881 from phalcon/5.0.x
v5.11.1
2 parents 2a6a764 + 330dda2 commit a05f6aa

284 files changed

Lines changed: 9015 additions & 6210 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/compile-windows.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
# All versions should be declared here
9-
PHALCON_VERSION: '5.12.0'
9+
PHALCON_VERSION: '5.11.1'
1010
PHP_VERSION_LIST: '8.1, 8.2, 8.3, 8.4, 8.5'
1111
ARCH_LIST: 'x64, x86'
1212
TS_LIST: 'nts, ts'
@@ -55,31 +55,3 @@ jobs:
5555
php-version: ${{ matrix.php-version }}
5656
arch: ${{ matrix.arch }}
5757
ts: ${{ matrix.ts }}
58-
59-
60-
# - name: Extract Phalcon Version
61-
# shell: powershell
62-
# run: |
63-
# chcp 65001
64-
# $r = Select-String -Path build/phalcon/php_phalcon.h -Pattern 'PHP_PHALCON_VERSION\s+"(.*)"'
65-
# $s = $r.Matches[0].Groups[1]
66-
# echo "$s"
67-
# $PhalconVersion = 'PHALCON_VERSION=' + $s
68-
# echo $PhalconVersion >> $env:GITHUB_ENV
69-
#
70-
# - name: Setup PHP
71-
# id: setup-php
72-
# uses: php/setup-php-sdk@v0.11
73-
# with:
74-
# version: ${{matrix.php}}
75-
# arch: ${{matrix.arch}}
76-
# ts: ${{matrix.ts}}
77-
# deps: zlib
78-
#
79-
# - name: Upload artifacts
80-
# uses: actions/upload-artifact@v4
81-
# with:
82-
# name: ${{env.ARTIFACT_NAME}}
83-
# path: |
84-
# ${{env.ARTIFACT}}
85-
# LICENSE.txt

.github/workflows/main.yml

Lines changed: 97 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
env:
1919
# All versions should be declared here
20-
PHALCON_VERSION: 5.11.0
20+
PHALCON_VERSION: 5.11.1
2121
ZEPHIR_PARSER_VERSION: 1.8.0
2222
# For tests
2323
LANG: en_US.UTF-8
@@ -104,28 +104,21 @@ jobs:
104104
- name: Validate extension loads
105105
run: php -d extension=build/phalcon/modules/phalcon.so -r 'echo "phalcon " . (new Phalcon\Support\Version())->get() . PHP_EOL;'
106106

107-
# Generate IDE stubs and validate with Psalm
107+
# Generate IDE stubs, validate with Psalm, fix code style and store as artifact
108108
stubs:
109-
name: Stubs / PHP ${{ matrix.php }}
109+
permissions:
110+
contents: read
111+
name: Stubs
110112
runs-on: ubuntu-latest
111113
timeout-minutes: 15
112-
strategy:
113-
fail-fast: false
114-
matrix:
115-
php:
116-
- '8.1'
117-
- '8.2'
118-
- '8.3'
119-
- '8.4'
120-
- '8.5'
121114

122115
steps:
123116
- uses: actions/checkout@v6
124117

125118
- name: Setup PHP
126119
uses: shivammathur/setup-php@v2
127120
with:
128-
php-version: ${{ matrix.php }}
121+
php-version: '8.5'
129122
tools: pecl
130123
extensions: zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
131124

@@ -136,11 +129,23 @@ jobs:
136129
137130
- run: composer install --prefer-dist --ignore-platform-reqs
138131

139-
- name: Validate stubs
132+
- name: Generate and validate stubs
140133
run: |
141134
vendor/bin/zephir stubs
142135
vendor/bin/psalm ide/
143136
137+
- name: Fix code style on generated stubs
138+
# phpcbf exits 1 when it fixes files; passing the path on the CLI overrides
139+
# the <file> entries in phpcs.xml so the PSR12 ruleset is applied to the stubs.
140+
run: vendor/bin/phpcbf --standard=phpcs.xml ide/${{ env.PHALCON_VERSION }}/ || true
141+
142+
- name: Upload IDE stubs artifact
143+
uses: actions/upload-artifact@v7
144+
with:
145+
name: phalcon-ide-stubs
146+
path: ide/${{ env.PHALCON_VERSION }}/Phalcon/
147+
retention-days: 5
148+
144149
# Build Phalcon PECL package (artifact consumed by build-and-test and database_test)
145150
generate_pecl:
146151
name: Build Phalcon PECL package
@@ -426,6 +431,17 @@ jobs:
426431
PHPTS: ${{ matrix.ts }}
427432
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
428433

434+
- name: Redis Cluster
435+
uses: vishnudxb/redis-cluster@1.10.0
436+
with:
437+
master1-port: 5000
438+
master2-port: 5001
439+
master3-port: 5002
440+
slave1-port: 5003
441+
slave2-port: 5004
442+
slave3-port: 5005
443+
sleep-duration: 5
444+
429445
- name: Download compiled Phalcon extension
430446
uses: actions/download-artifact@v8
431447
with:
@@ -706,3 +722,70 @@ jobs:
706722
allowUpdates: true
707723
artifacts: "./build-artifacts/release/*.zip,./build-artifacts/release/*.tgz"
708724
artifactContentType: application/octet-stream
725+
726+
publish_stubs:
727+
permissions:
728+
contents: read
729+
730+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
731+
732+
name: Publish IDE Stubs
733+
runs-on: ubuntu-latest
734+
needs: [release, stubs]
735+
736+
steps:
737+
- uses: actions/checkout@v6
738+
739+
- name: Download IDE stubs artifact
740+
uses: actions/download-artifact@v8
741+
with:
742+
name: phalcon-ide-stubs
743+
path: ./ide-stubs
744+
745+
- name: Checkout phalcon-ide-stubs
746+
uses: actions/checkout@v6
747+
with:
748+
repository: phalcon/phalcon-ide-stubs
749+
token: ${{ secrets.STUBS_REPO_TOKEN }}
750+
path: phalcon-ide-stubs
751+
752+
- name: Copy stubs into phalcon-ide-stubs
753+
# Copies the contents of ide/<version>/Phalcon/ into the stubs repo src/ folder.
754+
# No files are deleted; other repo files are unaffected.
755+
run: cp -r ./ide-stubs/. phalcon-ide-stubs/src/
756+
757+
- name: Commit and push stubs branch
758+
working-directory: phalcon-ide-stubs
759+
run: |
760+
git config user.name "github-actions[bot]"
761+
git config user.email "github-actions[bot]@users.noreply.github.com"
762+
git checkout -b stubs/v${{ env.PHALCON_VERSION }}
763+
git add src/
764+
git commit -m "stubs: update to v${{ env.PHALCON_VERSION }}"
765+
git push origin stubs/v${{ env.PHALCON_VERSION }}
766+
767+
- name: Create Pull Request in phalcon-ide-stubs
768+
working-directory: phalcon-ide-stubs
769+
env:
770+
GH_TOKEN: ${{ secrets.STUBS_REPO_TOKEN }}
771+
run: |
772+
gh pr create \
773+
--repo phalcon/phalcon-ide-stubs \
774+
--head stubs/v${{ env.PHALCON_VERSION }} \
775+
--base master \
776+
--title "stubs: update to v${{ env.PHALCON_VERSION }}" \
777+
--body "v${{ env.PHALCON_VERSION }} Stubs"
778+
779+
- name: Create draft release in phalcon-ide-stubs
780+
uses: ncipollo/release-action@v1
781+
with:
782+
token: ${{ secrets.STUBS_REPO_TOKEN }}
783+
owner: phalcon
784+
repo: phalcon-ide-stubs
785+
tag: v${{ env.PHALCON_VERSION }}
786+
name: v${{ env.PHALCON_VERSION }} Stubs
787+
body: "v${{ env.PHALCON_VERSION }} Stubs"
788+
draft: true
789+
allowUpdates: true
790+
commit: master
791+

.github/workflows/release-windows.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

CHANGELOG-5.0.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
2-
## 5.12.0 (2026-04-03)
2+
## 5.11.1 (2026-XX-XX)
3+
4+
### Changed
5+
6+
### Added
7+
8+
### Fixed
9+
10+
### Removed
11+
12+
# Changelog
13+
## 5.11.1 (2026-04-04)
14+
15+
### Changed
16+
17+
### Added
18+
19+
- Added `Phalcon\Storage\Adapter\RedisCluster` adapter to support Redis Cluster connections [#16867](https://github.com/phalcon/cphalcon/issues/16867)
20+
- Added `Phalcon\Support\Settings` to be used for ini settings throughout the framework [#16873](https://github.com/phalcon/cphalcon/issues/16873)
21+
22+
### Fixed
23+
24+
- Fixed `Phalcon\Encryption\Security::computeHmac()` to catch `\ValueError` thrown by PHP 8.1+ when an unknown hashing algorithm is passed [#16893](https://github.com/phalcon/cphalcon/issues/16893)
25+
26+
### Removed
27+
28+
## 5.11.0 (2026-04-03)
329

430
### Changed
531

@@ -25,6 +51,7 @@
2551
- Fixed `Phalcon\Acl\Adapter\Memory::isAllowed()` and `Phalcon\Mvc\Model\Binder` to handle PHP 8.1+ union and intersection types by checking for `ReflectionNamedType` before calling `getName()` [#16261](https://github.com/phalcon/cphalcon/issues/16261)
2652
- Fixed memory leak in PHQL parser (phql_internal_parse_phql()) during repeated query execution. [#16854](https://github.com/phalcon/cphalcon/issues/16854)
2753
- Fixed a deadlock issue when running the db suite [#16862](https://github.com/phalcon/cphalcon/issues/16862)
54+
- Fixed `Phalcon\Storage\Adapter\Redis::clear()` and `Phalcon\Storage\Adapter\Stream::clear()` to only delete keys belonging to the current prefix instead of flushing the entire storage [#16806](https://github.com/phalcon/cphalcon/issues/16806)
2855

2956
### Removed
3057

0 commit comments

Comments
 (0)