Skip to content

Commit 88b4f9e

Browse files
authored
Merge pull request #15975 from phalcon/5.0.x
5.0.0RC1
2 parents 4ad2a25 + 843fb58 commit 88b4f9e

File tree

1,099 files changed

+29752
-52837
lines changed

Some content is hidden

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

1,099 files changed

+29752
-52837
lines changed

.ci/release-notes.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,8 @@ set -o pipefail
1717
# How to use:
1818
# release-notes.sh CHANGELOG.md
1919

20-
startline=$(cat "$1" | grep -nE "^## " | head -n 1 | cut -d ":" -f 1)
21-
finishline=$(($(cat "$1" | grep -nE "^# " | head -n 2 | tail -n 1 | cut -d ":" -f 1) - 1))
20+
startline=$(cat < "$1" | grep -nE "^## " | head -n 1 | cut -d ":" -f 1)
21+
finishline=$(($(cat < "$1" | grep -nE "^# " | head -n 2 | tail -n 1 | cut -d ":" -f 1) - 1))
2222
changelog=$(sed -n "${startline},${finishline}p" "$1");
2323

24-
25-
: "${GITHUB_ACTIONS:=0}"
26-
27-
if [ "$GITHUB_ACTIONS" = "true" ]
28-
then
29-
changelog="${changelog//'%'/'%25'}"
30-
changelog="${changelog//$'\n'/'%0A'}"
31-
changelog="${changelog//$'\r'/'%0D'}"
32-
fi
33-
3424
echo "${changelog}"

.github/actions/build-phalcon-win/action.yml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,20 @@ runs:
7575
cache_dir: ${{ env.CACHE_DIR }}
7676

7777
- name: Configure Developer Command Prompt for MSVC compiler
78-
uses: ilammy/msvc-dev-cmd@v1.9.0
78+
uses: ilammy/msvc-dev-cmd@v1.10.0
7979
with:
8080
arch: ${{ inputs.arch }}
8181

82+
# Workaround for
83+
# PHP Warning: PHP Startup: Can't load module 'C:\tools\php\ext\php_zephir_parser.dll'
84+
# as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
85+
- name: Configure Developer Command Prompt for MSVC compiler
86+
uses: ilammy/[email protected]
87+
if: ${{ inputs.php_version }} == '7.4'
88+
with:
89+
arch: ${{ inputs.arch }}
90+
toolset: 14.16
91+
8292
- name: Getting Details About Installed PHP
8393
shell: powershell
8494
run: |
@@ -90,37 +100,6 @@ runs:
90100
.\.github\actions\build-phalcon-win\Expand-Item7zip.ps1 "${{ inputs.pecl }}" "${env:TEMP}"
91101
.\.github\actions\build-phalcon-win\Expand-Item7zip.ps1 "${env:TEMP}\phalcon-pecl.tar" "${{ env.PHP_PECL_PATH }}\phalcon"
92102
93-
- name: PSR extension | init, phpize
94-
shell: powershell
95-
run: |
96-
git clone https://github.com/jbboehr/php-psr.git ${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}
97-
if (-not (Test-Path "${{ env.PHP_DEVPACK }}\include\ext\psr")) {
98-
mkdir "${{ env.PHP_DEVPACK }}\include\ext\psr"
99-
}
100-
Set-Location "${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}"
101-
phpize
102-
103-
- name: PSR extension | configure
104-
working-directory: '${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}'
105-
shell: powershell
106-
run: |
107-
echo "::group::Configure"
108-
.\configure.bat --enable-psr
109-
echo "::endgroup::"
110-
111-
- name: PSR extension | build
112-
working-directory: '${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}'
113-
shell: powershell
114-
run: |
115-
nmake
116-
nmake install
117-
118-
- name: PSR extension | Inspecting Extension DLL File
119-
shell: powershell
120-
run: |
121-
php --ri psr
122-
Get-PhpExtension "${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}\${{ env.RELEASE_FOLDER }}\php_psr.dll"
123-
124103
- name: Phalcon | phpize
125104
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'
126105
shell: powershell
@@ -131,8 +110,7 @@ runs:
131110
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'
132111
shell: powershell
133112
run: |
134-
.\configure.bat --enable-phalcon `
135-
--with-extra-libs="${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}\${{ env.RELEASE_FOLDER }}"
113+
.\configure.bat --enable-phalcon
136114
137115
- name: Phalcon | Build Project
138116
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'

.github/workflows/build-docker.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@ on:
77

88
jobs:
99
build:
10-
if: "!contains(github.event.head_commit.message, 'ci skip')"
11-
1210
runs-on: ubuntu-20.04
1311

1412
strategy:
1513
fail-fast: false
1614
matrix:
17-
php-versions: [ '7.4', '8.0' ]
15+
php: [ '7.4', '8.0', '8.1' ]
1816

19-
name: Build Dockerfile PHP ${{ matrix.php-versions }}
17+
name: Build Dockerfile PHP ${{ matrix.php }}
2018
steps:
21-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2220

2321
- name: Build Dockerfile
24-
run: docker build docker/${{ matrix.php-versions }}
22+
run: docker build docker/${{ matrix.php }}

.github/workflows/main.yml

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ on:
1919

2020
env:
2121
# All versions should be declared here
22-
PHALCON_VERSION: 5.0.0beta3
23-
ZEPHIR_PARSER_VERSION: 1.4.2
24-
ZEPHIR_VERSION: 0.15.2
25-
PSR_VERSION: 1.1.0
22+
PHALCON_VERSION: 5.0.0RC1
23+
ZEPHIR_PARSER_VERSION: 1.5.0
24+
ZEPHIR_VERSION: 0.16.0
2625

2726
# For tests
2827
LANG: en_US.UTF-8
@@ -33,7 +32,7 @@ env:
3332
TOOLS_DIR: 'C:\tools'
3433

3534
# PHP extensions required by Composer
36-
EXTENSIONS: apcu, gettext, gd, igbinary, imagick, intl, json, mbstring, msgpack, memcached, sqlite3, yaml, redis
35+
EXTENSIONS: apcu, gettext, gd, igbinary, imagick, intl, json, mbstring, msgpack, memcached, sqlite3, yaml, redis, :memcache
3736

3837
jobs:
3938
# Configure Workflow for correct run reusable workflow
@@ -49,79 +48,61 @@ jobs:
4948
- id: setup-zephir-ext
5049
name: Setup Zephir Extensions
5150
run: |
52-
echo "::set-output name=extensions::psr-${{ env.PSR_VERSION }}, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}"
51+
echo "::set-output name=extensions::zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}"
5352
5453
# PHP CodeSniffer inspection
5554
phpcs:
5655
uses: zephir-lang/templates/.github/workflows/phpcs.yml@main
5756
with:
5857
standard: ./phpcs.xml
5958

60-
# Generates stubs and validates with PSALM
59+
# Generate stubs and validates with PSALM
6160
stubs:
6261
needs: setup_workflow
63-
uses: zephir-lang/templates/.github/workflows/phalcon-stubs.yml@main
62+
uses: zephir-lang/templates/.github/workflows/phalcon-stubs-zephir-composer.yml@main
6463
with:
6564
extensions: ${{ needs.setup_workflow.outputs.zephir_extensions }}
6665

6766
generate:
6867
needs: setup_workflow
69-
uses: zephir-lang/templates/.github/workflows/phalcon-pecl.yml@main
68+
uses: zephir-lang/templates/.github/workflows/phalcon-pecl-8.1.yml@main
7069
with:
7170
extensions: ${{ needs.setup_workflow.outputs.zephir_extensions }}
7271
secrets:
7372
composer-token: ${{ secrets.GITHUB_TOKEN }}
7473

7574
build-and-test:
7675
name: tests / PHP-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.arch }}
77-
7876
needs: [generate]
79-
8077
runs-on: ${{ matrix.os }}
8178
strategy:
8279
fail-fast: false
8380
matrix:
84-
php: [ '7.4', '8.0' ]
81+
php: [ '7.4', '8.0', '8.1' ]
8582
ts: [ 'nts', 'ts' ]
8683
arch: [ 'x64' ]
8784

8885
name:
8986
- ubuntu-gcc
9087
- macos-clang
91-
- windows2016-vc15
92-
- windows2019-vs16
9388

9489
# matrix names should be in next format:
9590
# {php}-{ts}-{os.name}-{compiler}-{arch}
9691
include:
9792
# Linux
98-
- name: ubuntu-gcc
99-
os: ubuntu-18.04
100-
compiler: gcc
101-
93+
- { name: ubuntu-gcc, os: ubuntu-18.04, compiler: gcc }
10294
# macOS
103-
- name: macos-clang
104-
os: macos-10.15
105-
compiler: clang
106-
95+
- { name: macos-clang, os: macos-10.15, compiler: clang }
10796
# Windows
108-
- name: windows2016-vc15
109-
os: windows-2016
110-
compiler: vc15
111-
112-
- name: windows2019-vs16
113-
os: windows-2019
114-
compiler: vs16
115-
116-
exclude:
117-
- name: windows2019-vs16
118-
php: '7.4'
119-
120-
- name: windows2016-vc15
121-
php: '8.0'
97+
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
98+
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
99+
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
100+
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
101+
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
102+
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
122103

123104
steps:
124-
- uses: actions/checkout@v2
105+
- uses: actions/checkout@v3
125106

126107
- name: Setup platform specific environment
127108
shell: pwsh
@@ -134,7 +115,7 @@ jobs:
134115
uses: shivammathur/setup-php@v2
135116
with:
136117
php-version: ${{ matrix.php }}
137-
extensions: ${{ env.EXTENSIONS }}, psr-${{ env.PSR_VERSION }}
118+
extensions: ${{ env.EXTENSIONS }}
138119
ini-values: apc.enable_cli=on, session.save_path=${{ env.SESSION_SAVE_PATH }}
139120
tools: pecl, phpize, php-config
140121
coverage: xdebug
@@ -228,6 +209,13 @@ jobs:
228209
if: always()
229210
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php }}.xml --ext DotReporter cli
230211

212+
- name: Check Release notes parser
213+
if: runner.os == 'Linux'
214+
shell: bash
215+
run: |
216+
echo "-- Creating Release Notes"
217+
./.ci/release-notes.sh ./CHANGELOG-5.0.md
218+
231219
install:
232220
needs: setup_workflow
233221
uses: zephir-lang/templates/.github/workflows/phalcon-install-from-build.yml@main
@@ -242,7 +230,7 @@ jobs:
242230
mysql:
243231
image: mysql:5.7
244232
ports:
245-
- 3306
233+
- "3306:3306"
246234
env:
247235
MYSQL_ROOT_PASSWORD: secret
248236
MYSQL_USER: phalcon
@@ -251,26 +239,32 @@ jobs:
251239
postgres:
252240
image: postgres:12-alpine
253241
ports:
254-
- 5432
242+
- "5432:5432"
255243
env:
244+
POSTGRES_USER: phalcon
256245
POSTGRES_PASSWORD: secret
257246
POSTGRES_DB: phalcon
247+
options: >-
248+
--health-cmd pg_isready
249+
--health-interval 10s
250+
--health-timeout 5s
251+
--health-retries 5
258252
redis:
259253
image: redis:5-alpine
260254
ports:
261-
- 6379
255+
- "6379:6379"
262256
memcached:
263257
image: memcached:1.5-alpine
264258
ports:
265-
- 11211
259+
- "11211:11211"
266260

267261
strategy:
268262
fail-fast: false
269263
matrix:
270-
php: [ '7.4', '8.0' ]
264+
php: [ '7.4', '8.0', '8.1' ]
271265

272266
steps:
273-
- uses: actions/checkout@v2
267+
- uses: actions/checkout@v3
274268

275269
- name: Setup PHP
276270
uses: shivammathur/setup-php@v2
@@ -359,7 +353,8 @@ jobs:
359353

360354
- name: Run Database Tests (Postgres)
361355
env:
362-
DATA_POSTGRES_USER: postgres
356+
DATA_POSTGRES_USER: phalcon
357+
DATA_POSTGRES_PASS: secret
363358
DATA_POSTGRES_PORT: ${{ job.services.postgres.ports['5432'] }}
364359
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
365360
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
@@ -380,7 +375,7 @@ jobs:
380375
runs-on: ubuntu-20.04
381376

382377
steps:
383-
- uses: actions/checkout@v2
378+
- uses: actions/checkout@v3
384379

385380
- name: Get the release version
386381
id: get-version
@@ -399,7 +394,7 @@ jobs:
399394
find ./build-artifacts -type f -name phalcon*.zip -exec cp {} ./build-artifacts/release/ ";"
400395
find ./build-artifacts -type f -name phalcon*.tgz -exec cp {} ./build-artifacts/release/ ";"
401396
echo "-- Creating Release Notes"
402-
GITHUB_ACTIONS=false ./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
397+
./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
403398
404399
- name: Create Release
405400
uses: ncipollo/release-action@v1

.github/workflows/packagecloud-cleanup.yml

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ ext/run-tests.php
4343
*.la
4444
*.log
4545
*.loT
46+
*.dep
4647
*.gch
4748
*.h.ghc
4849
*.phc

BACKERS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,13 @@ Thanks for the support
106106
<a href="https://github.com/elcreator"><img src="https://avatars.githubusercontent.com/u/974975?v=4" title="Artur Kyryliuk" width="60" height="60"></a>
107107
<a href="https://github.com/Ultimater"><img src="https://avatars.githubusercontent.com/u/1922199?v=4" title="Kevin Yarmak" width="60" height="60"></a>
108108
<a href="https://github.com/qmegas"><img src="https://avatars3.githubusercontent.com/u/2444896?s=460&v=4" title="qmegas" width="60" height="60"></a>
109-
<a href="https://github.com/gwijnja"><img src="https://avatars1.githubusercontent.com/u/2666867?s=460&u=7f358f88d53208909d808db17b382ae44d9eb48a&v=4" title="Gerben Wijnja" width="60" height="60"></a>
110-
<a href="https://github.com/terolblade"><img src="https://avatars3.githubusercontent.com/u/3078649?s=460&v=4" title="Stanislav Sviridenko" width="60" height="60"></a>
111109
<a href="https://github.com/Ruzgfpegk"><img src="https://avatars1.githubusercontent.com/u/3818364?s=460&v=4" title="Ruzgfpegk" width="60" height="60"></a>
110+
<a href="https://github.com/f-do"><img src="https://avatars.githubusercontent.com/u/4299065?v=4" title="Florian" width="60" height="60"></a>
112111
<a href="https://github.com/borisdelev"><img src="https://avatars.githubusercontent.com/u/4441663?s=460&u=be604c39153e26326f2123c6e1bfe880d5ec0947&v=4" title="Boris Delev" width="60" height="60"></a>
113112
<a href="https://github.com/educury"><img src="https://avatars2.githubusercontent.com/u/5339278?s=460&v=4" title="educury" width="60" height="60"></a>
114113
<a href="https://github.com/emagus"><img src="https://avatars.githubusercontent.com/u/5857789?v=4" title="maGus Informática" width="60" height="60"></a>
115114
<a href="https://github.com/tztztztz"><img src="https://avatars.githubusercontent.com/u/7032308?v=4" title="Tomasz Zadora" width="60" height="60"></a>
116115
<a href="https://github.com/ruudboon"><img src="https://avatars3.githubusercontent.com/u/7444246?s=460&v=4" title="Ruud Boon" width="60" height="60"></a>
117-
<a href="https://github.com/sitchi"><img src=" https://avatars.githubusercontent.com/u/11546683?v=4" title="Nikoloz Sitchinava" width="60" height="60"></a>
118116
<a href="https://github.com/tacxticx88"><img src="https://avatars3.githubusercontent.com/u/12997062?s=460&u=5af0fbe438391ac46fb19befe0c20a4b1374e187&v=4" title="Clément" width="60" height="60"></a>
119117
<a href="https://github.com/Montana"><img src="https://avatars3.githubusercontent.com/u/20936398?s=460&v=4" title="Montana Mendy" width="60" height="60"></a>
120118
<a href="https://github.com/fvromera"><img src="https://avatars.githubusercontent.com/u/32909196?s=460&u=a4a6d765c836be52ab247354399d0ed1a49224fa&v=4" title="fvromera" width="60" height="60"></a>

0 commit comments

Comments
 (0)