Skip to content

Commit

Permalink
Merge pull request #15975 from phalcon/5.0.x
Browse files Browse the repository at this point in the history
5.0.0RC1
  • Loading branch information
niden authored May 31, 2022
2 parents 4ad2a25 + 843fb58 commit 88b4f9e
Show file tree
Hide file tree
Showing 1,099 changed files with 29,752 additions and 52,837 deletions.
14 changes: 2 additions & 12 deletions .ci/release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,8 @@ set -o pipefail
# How to use:
# release-notes.sh CHANGELOG.md

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


: "${GITHUB_ACTIONS:=0}"

if [ "$GITHUB_ACTIONS" = "true" ]
then
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
fi

echo "${changelog}"
46 changes: 12 additions & 34 deletions .github/actions/build-phalcon-win/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,20 @@ runs:
cache_dir: ${{ env.CACHE_DIR }}

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

# Workaround for
# PHP Warning: PHP Startup: Can't load module 'C:\tools\php\ext\php_zephir_parser.dll'
# as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
- name: Configure Developer Command Prompt for MSVC compiler
uses: ilammy/[email protected]
if: ${{ inputs.php_version }} == '7.4'
with:
arch: ${{ inputs.arch }}
toolset: 14.16

- name: Getting Details About Installed PHP
shell: powershell
run: |
Expand All @@ -90,37 +100,6 @@ runs:
.\.github\actions\build-phalcon-win\Expand-Item7zip.ps1 "${{ inputs.pecl }}" "${env:TEMP}"
.\.github\actions\build-phalcon-win\Expand-Item7zip.ps1 "${env:TEMP}\phalcon-pecl.tar" "${{ env.PHP_PECL_PATH }}\phalcon"
- name: PSR extension | init, phpize
shell: powershell
run: |
git clone https://github.com/jbboehr/php-psr.git ${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}
if (-not (Test-Path "${{ env.PHP_DEVPACK }}\include\ext\psr")) {
mkdir "${{ env.PHP_DEVPACK }}\include\ext\psr"
}
Set-Location "${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}"
phpize
- name: PSR extension | configure
working-directory: '${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}'
shell: powershell
run: |
echo "::group::Configure"
.\configure.bat --enable-psr
echo "::endgroup::"
- name: PSR extension | build
working-directory: '${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}'
shell: powershell
run: |
nmake
nmake install
- name: PSR extension | Inspecting Extension DLL File
shell: powershell
run: |
php --ri psr
Get-PhpExtension "${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}\${{ env.RELEASE_FOLDER }}\php_psr.dll"
- name: Phalcon | phpize
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'
shell: powershell
Expand All @@ -131,8 +110,7 @@ runs:
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'
shell: powershell
run: |
.\configure.bat --enable-phalcon `
--with-extra-libs="${{ env.PHP_PECL_PATH }}\psr\psr-${{ env.PSR_VERSION }}\${{ env.RELEASE_FOLDER }}"
.\configure.bat --enable-phalcon
- name: Phalcon | Build Project
working-directory: '${{ env.PHP_PECL_PATH }}\phalcon\phalcon-${{ env.PHALCON_VERSION }}'
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ on:

jobs:
build:
if: "!contains(github.event.head_commit.message, 'ci skip')"

runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0' ]
php: [ '7.4', '8.0', '8.1' ]

name: Build Dockerfile PHP ${{ matrix.php-versions }}
name: Build Dockerfile PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Build Dockerfile
run: docker build docker/${{ matrix.php-versions }}
run: docker build docker/${{ matrix.php }}
89 changes: 42 additions & 47 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ on:

env:
# All versions should be declared here
PHALCON_VERSION: 5.0.0beta3
ZEPHIR_PARSER_VERSION: 1.4.2
ZEPHIR_VERSION: 0.15.2
PSR_VERSION: 1.1.0
PHALCON_VERSION: 5.0.0RC1
ZEPHIR_PARSER_VERSION: 1.5.0
ZEPHIR_VERSION: 0.16.0

# For tests
LANG: en_US.UTF-8
Expand All @@ -33,7 +32,7 @@ env:
TOOLS_DIR: 'C:\tools'

# PHP extensions required by Composer
EXTENSIONS: apcu, gettext, gd, igbinary, imagick, intl, json, mbstring, msgpack, memcached, sqlite3, yaml, redis
EXTENSIONS: apcu, gettext, gd, igbinary, imagick, intl, json, mbstring, msgpack, memcached, sqlite3, yaml, redis, :memcache

jobs:
# Configure Workflow for correct run reusable workflow
Expand All @@ -49,79 +48,61 @@ jobs:
- id: setup-zephir-ext
name: Setup Zephir Extensions
run: |
echo "::set-output name=extensions::psr-${{ env.PSR_VERSION }}, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}"
echo "::set-output name=extensions::zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}"
# PHP CodeSniffer inspection
phpcs:
uses: zephir-lang/templates/.github/workflows/phpcs.yml@main
with:
standard: ./phpcs.xml

# Generates stubs and validates with PSALM
# Generate stubs and validates with PSALM
stubs:
needs: setup_workflow
uses: zephir-lang/templates/.github/workflows/phalcon-stubs.yml@main
uses: zephir-lang/templates/.github/workflows/phalcon-stubs-zephir-composer.yml@main
with:
extensions: ${{ needs.setup_workflow.outputs.zephir_extensions }}

generate:
needs: setup_workflow
uses: zephir-lang/templates/.github/workflows/phalcon-pecl.yml@main
uses: zephir-lang/templates/.github/workflows/phalcon-pecl-8.1.yml@main
with:
extensions: ${{ needs.setup_workflow.outputs.zephir_extensions }}
secrets:
composer-token: ${{ secrets.GITHUB_TOKEN }}

build-and-test:
name: tests / PHP-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.arch }}

needs: [generate]

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0' ]
php: [ '7.4', '8.0', '8.1' ]
ts: [ 'nts', 'ts' ]
arch: [ 'x64' ]

name:
- ubuntu-gcc
- macos-clang
- windows2016-vc15
- windows2019-vs16

# matrix names should be in next format:
# {php}-{ts}-{os.name}-{compiler}-{arch}
include:
# Linux
- name: ubuntu-gcc
os: ubuntu-18.04
compiler: gcc

- { name: ubuntu-gcc, os: ubuntu-18.04, compiler: gcc }
# macOS
- name: macos-clang
os: macos-10.15
compiler: clang

- { name: macos-clang, os: macos-10.15, compiler: clang }
# Windows
- name: windows2016-vc15
os: windows-2016
compiler: vc15

- name: windows2019-vs16
os: windows-2019
compiler: vs16

exclude:
- name: windows2019-vs16
php: '7.4'

- name: windows2016-vc15
php: '8.0'
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup platform specific environment
shell: pwsh
Expand All @@ -134,7 +115,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.EXTENSIONS }}, psr-${{ env.PSR_VERSION }}
extensions: ${{ env.EXTENSIONS }}
ini-values: apc.enable_cli=on, session.save_path=${{ env.SESSION_SAVE_PATH }}
tools: pecl, phpize, php-config
coverage: xdebug
Expand Down Expand Up @@ -228,6 +209,13 @@ jobs:
if: always()
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php }}.xml --ext DotReporter cli

- name: Check Release notes parser
if: runner.os == 'Linux'
shell: bash
run: |
echo "-- Creating Release Notes"
./.ci/release-notes.sh ./CHANGELOG-5.0.md
install:
needs: setup_workflow
uses: zephir-lang/templates/.github/workflows/phalcon-install-from-build.yml@main
Expand All @@ -242,7 +230,7 @@ jobs:
mysql:
image: mysql:5.7
ports:
- 3306
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: phalcon
Expand All @@ -251,26 +239,32 @@ jobs:
postgres:
image: postgres:12-alpine
ports:
- 5432
- "5432:5432"
env:
POSTGRES_USER: phalcon
POSTGRES_PASSWORD: secret
POSTGRES_DB: phalcon
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:5-alpine
ports:
- 6379
- "6379:6379"
memcached:
image: memcached:1.5-alpine
ports:
- 11211
- "11211:11211"

strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0' ]
php: [ '7.4', '8.0', '8.1' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -359,7 +353,8 @@ jobs:

- name: Run Database Tests (Postgres)
env:
DATA_POSTGRES_USER: postgres
DATA_POSTGRES_USER: phalcon
DATA_POSTGRES_PASS: secret
DATA_POSTGRES_PORT: ${{ job.services.postgres.ports['5432'] }}
DATA_REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
DATA_MEMCACHED_PORT: ${{ job.services.memcached.ports['11211'] }}
Expand All @@ -380,7 +375,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get the release version
id: get-version
Expand All @@ -399,7 +394,7 @@ jobs:
find ./build-artifacts -type f -name phalcon*.zip -exec cp {} ./build-artifacts/release/ ";"
find ./build-artifacts -type f -name phalcon*.tgz -exec cp {} ./build-artifacts/release/ ";"
echo "-- Creating Release Notes"
GITHUB_ACTIONS=false ./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
- name: Create Release
uses: ncipollo/release-action@v1
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/packagecloud-cleanup.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ext/run-tests.php
*.la
*.log
*.loT
*.dep
*.gch
*.h.ghc
*.phc
Expand Down
4 changes: 1 addition & 3 deletions BACKERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,13 @@ Thanks for the support
<a href="https://github.com/elcreator"><img src="https://avatars.githubusercontent.com/u/974975?v=4" title="Artur Kyryliuk" width="60" height="60"></a>
<a href="https://github.com/Ultimater"><img src="https://avatars.githubusercontent.com/u/1922199?v=4" title="Kevin Yarmak" width="60" height="60"></a>
<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>
<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>
<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>
<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>
<a href="https://github.com/f-do"><img src="https://avatars.githubusercontent.com/u/4299065?v=4" title="Florian" width="60" height="60"></a>
<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>
<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>
<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>
<a href="https://github.com/tztztztz"><img src="https://avatars.githubusercontent.com/u/7032308?v=4" title="Tomasz Zadora" width="60" height="60"></a>
<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>
<a href="https://github.com/sitchi"><img src=" https://avatars.githubusercontent.com/u/11546683?v=4" title="Nikoloz Sitchinava" width="60" height="60"></a>
<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>
<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>
<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>
Expand Down
Loading

0 comments on commit 88b4f9e

Please sign in to comment.