Skip to content

Commit

Permalink
Merge branch '5.0.x' into #15598-php8.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build-docker.yml
#	CHANGELOG-5.0.md
#	composer.json
#	composer.lock
#	phalcon/Storage/Serializer/Base64.zep
#	phalcon/Storage/Serializer/Msgpack.zep
#	phalcon/Storage/Serializer/Php.zep
  • Loading branch information
Jeckerson committed Mar 20, 2022
2 parents 3ac487e + f7b78db commit e572e98
Show file tree
Hide file tree
Showing 655 changed files with 12,188 additions and 11,382 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}"
12 changes: 11 additions & 1 deletion .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/msvc-dev-cmd@v1.10.0
if: ${{ inputs.php_version }} == '7.4'
with:
arch: ${{ inputs.arch }}
toolset: 14.16

- name: Getting Details About Installed PHP
shell: powershell
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ 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', '8.1' ]
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

- name: Build Dockerfile
run: docker build docker/${{ matrix.php-versions }}
run: docker build docker/${{ matrix.php }}
41 changes: 15 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 Down Expand Up @@ -89,37 +89,19 @@ jobs:
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' }

- name: windows2016-vc15
php: '8.1'
Expand Down Expand Up @@ -232,6 +214,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 Down Expand Up @@ -403,7 +392,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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ tests/_output/*

.php_cs.cache
.env
zephir
5 changes: 1 addition & 4 deletions BACKERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ 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>
Expand All @@ -121,9 +121,6 @@ Thanks for the support
<a href="https://github.com/dredasss"><img src="https://avatars1.githubusercontent.com/u/38747389?s=460&u=ee99a8bb28ee6bedbbea6325d49d4eb99080d421&v=4" title="Nerijus Alex" width="60" height="60"></a>
<a href="https://github.com/postype"><img src="https://avatars.githubusercontent.com/u/54393235?s=200&v=4" title="https://www.postype.com/" width="60" height="60"></a>
<a href="https://github.com/iogates"><img src="https://avatars.githubusercontent.com/u/86652317?s=200&v=4" title="iogates" width="60" height="60"></a>
<a href="https://github.com/nicolec3urv7"><img src="https://avatars.githubusercontent.com/u/95520516?v=4" title="nicolec3urv7" width="60" height="60"></a>
<a href="https://github.com/lazospark1"><img src="https://avatars.githubusercontent.com/u/95704274?v=4" title="lazospark1" width="60" height="60"></a>
<a href="https://github.com/leonardarac"><img src="https://avatars.githubusercontent.com/u/95871191?v=4" title="leonardarac" width="60" height="60"></a>

[//]: github-sponsors

Expand Down
36 changes: 32 additions & 4 deletions CHANGELOG-5.0.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
# [5.0.0beta3](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta2) (xxxx-xx-xx)
# [5.0.0rc1](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta3) (xxxx-xx-xx)

## Changed
- Changed `Phalcon\Session\Bag::__construct()` to accept a `Phalcon\Session\Manager` as the first parameter and `name` as the second one [#15904](https://github.com/phalcon/cphalcon/issues/15904)
- Replicated `filter_var(input, FILTER_SANITIZE_STRING)` in `Phalcon\Filter\Sanitize\StringVal` to custom solution, due PHP8.1 deprecation [#15598](https://github.com/phalcon/cphalcon/issues/15598)
- Changed property types, as in original, in `Phalcon\Db\Result\Pdo:fetch()` and `Phalcon\Db\Result\Pdo:fetchAll()` methods [#15598](https://github.com/phalcon/cphalcon/issues/15598)

## Fixed
- Fixed `Phalcon\Logger\AbstractAdapter::getFormattedItem()` to not add `PHP_EOL` at the end of the message and added it to the `Phalcon\Logger\Adapter\Stream` [#14547](https://github.com/phalcon/cphalcon/issues/14547)
- Fixed `Phalcon\Html\Helper\Input\Numeric` to produce correct elements [#15896](https://github.com/phalcon/cphalcon/issues/15896)
- Fixed `Phalcon\Storage\Adapter\*` to correctly store `null` values [#15904](https://github.com/phalcon/cphalcon/issues/15904)
- Fixed PHP8.1 compatibility in `Phalcon\Http\Request\File:getRealType()` method [#15598](https://github.com/phalcon/cphalcon/issues/15598)

## Added
- Added `Phalcon\Encryption\Crypt::isValidDecryptLength($input)` to allow checking for the length of the decryption string [#15879](https://github.com/phalcon/cphalcon/issues/15879)
- Added `Phalcon\Di\InitializationAwareInterface` to allow auto calling the `initialize` method when accessing service through DIC [#15916](https://github.com/phalcon/cphalcon/pull/15916)
- Added
- `Phalcon\Storage\Serializer\MemcachedIgbinary`
- `Phalcon\Storage\Serializer\MemcachedJson`
- `Phalcon\Storage\Serializer\MemcachedPhp`
- `Phalcon\Storage\Serializer\RedisIgbinary`
- `Phalcon\Storage\Serializer\RedisJson`
- `Phalcon\Storage\Serializer\RedisMsgpack`
- `Phalcon\Storage\Serializer\RedisNone`
- `Phalcon\Storage\Serializer\RedisPhp` to be used if adapter serialization is required [#15904](https://github.com/phalcon/cphalcon/issues/15904)
- Added missing PDO constant `Phalcon\Db\Enum::FETCH_DEFAULT` (`\Pdo::FETCH_DEFAULT`) [#15598](https://github.com/phalcon/cphalcon/issues/15598)

# [5.0.0beta3](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta3) (2022-02-06)

## Changed
- Replicated `filter_var(input, FILTER_SANITIZE_STRING)` in `Phalcon\Filter\Sanitize\StringVal` to custom solution, due PHP8.1 deprecation [#15598](https://github.com/phalcon/cphalcon/issues/15598)
- Changed property types, as in original, in `Phalcon\Db\Result\Pdo:fetch()` and `Phalcon\Db\Result\Pdo:fetchAll()` methods [#15598](https://github.com/phalcon/cphalcon/issues/15598)
- Renamed `Phalcon\Db\Result\Pdo` to `Phalcon\Db\Result\PdoResult` to avoid collisions with `\PDO` [#15874](https://github.com/phalcon/cphalcon/issues/15854)

## Fixed
- Fixed `Phalcon\Logger\AbstractAdapter::getFormattedItem()` to not add `PHP_EOL` at the end of the message and added it to the `Phalcon\Logger\Adapter\Stream` [#14547](https://github.com/phalcon/cphalcon/issues/14547)
- Fixed `Phalcon\Html\Helper\Title:__invoke()` to not use the `$separator` as parameter - no need to redefine it in a view [#15866](https://github.com/phalcon/cphalcon/issues/15866)
- Fixed the delimiters for `Phalcon\Support\Helper\SnakeCase` and `Phalcon\Support\Helper\KamelCase` [#15850](https://github.com/phalcon/cphalcon/issues/15850)
- Fixed `Phalcon\Mvc\Router\Route::getName()` and `Phalcon\Mvc\Router\Route::getHostname()` to also return `null` [#15880](https://github.com/phalcon/cphalcon/issues/15880)
- Fixed `Phalcon\Mvc\Router\RouteInterface::getName()` and `Phalcon\Mvc\Router\RouteInterface::getHostname()` to also return `null` [#15880](https://github.com/phalcon/cphalcon/issues/15880)
- Fixed `Phalcon\Mvc\Model::findFirst()` to return `mixed` or `null` [#15883](https://github.com/phalcon/cphalcon/issues/15883)

## Added
- Added `Phalcon\Html\Helper\Title:setSeparator` to allow setting the separator independently [#15866](https://github.com/phalcon/cphalcon/issues/15866)

# [5.0.0beta2](https://github.com/phalcon/cphalcon/releases/tag/v5.0.0beta2) (2022-01-06)

Expand Down
Loading

0 comments on commit e572e98

Please sign in to comment.