Skip to content

Commit

Permalink
Merge pull request #2027 from phalcon/development
Browse files Browse the repository at this point in the history
0.12.14
  • Loading branch information
sergeyklay authored Dec 11, 2019
2 parents a4e9535 + 3ac3d3b commit 745631d
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 74 deletions.
44 changes: 22 additions & 22 deletions .ci/appveyor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Function SetupPhpVersionString {
$DestinationPath = "${Env:Temp}\php-sha1sum.txt"

If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading PHP SHA sums file: ${RemoteUrl} ..."
Write-Output "Downloading PHP SHA sums file: ${RemoteUrl} ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand Down Expand Up @@ -99,14 +99,14 @@ Function EnsureChocolateyIsInstalled {
}

Function InstallSdk {
Write-Host "Install PHP SDK binary tools: ${Env:PHP_SDK_VERSION}" -foregroundcolor Cyan
Write-Output "Install PHP SDK binary tools: ${Env:PHP_SDK_VERSION}" -foregroundcolor Cyan

$RemoteUrl = "https://github.com/OSTC/php-sdk-binary-tools/archive/php-sdk-${Env:PHP_SDK_VERSION}.zip"
$DestinationPath = "C:\Downloads\php-sdk-${Env:PHP_SDK_VERSION}.zip"

If (-not (Test-Path $Env:PHP_SDK_PATH)) {
If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading PHP SDK binary tools: $RemoteUrl ..."
Write-Output "Downloading PHP SDK binary tools: $RemoteUrl ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand All @@ -121,14 +121,14 @@ Function InstallSdk {
}

Function InstallPhp {
Write-Host "Install PHP: ${Env:PHP_VERSION}" -foregroundcolor Cyan
Write-Output "Install PHP: ${Env:PHP_VERSION}" -foregroundcolor Cyan

$RemoteUrl = "http://windows.php.net/downloads/releases/php-${Env:PHP_VERSION}-${Env:BUILD_TYPE}-vc${Env:VC_VERSION}-${Env:PLATFORM}.zip"
$DestinationPath = "C:\Downloads\php-${Env:PHP_VERSION}-${Env:BUILD_TYPE}-VC${Env:VC_VERSION}-${Env:PLATFORM}.zip"

If (-not (Test-Path $Env:PHP_PATH)) {
If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading PHP source code: $RemoteUrl ..."
Write-Output "Downloading PHP source code: $RemoteUrl ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand All @@ -141,14 +141,14 @@ Function InstallPhp {
}

Function InstallPhpDevPack {
Write-Host "Install PHP Dev pack: ${Env:PHP_VERSION}" -foregroundcolor Cyan
Write-Output "Install PHP Dev pack: ${Env:PHP_VERSION}" -foregroundcolor Cyan

$RemoteUrl = "http://windows.php.net/downloads/releases/php-devel-pack-${Env:PHP_VERSION}-${Env:BUILD_TYPE}-vc${Env:VC_VERSION}-${Env:PLATFORM}.zip"
$DestinationPath = "C:\Downloads\php-devel-pack-${Env:PHP_VERSION}-${Env:BUILD_TYPE}-VC${Env:VC_VERSION}-${Env:PLATFORM}.zip"

If (-not (Test-Path $Env:PHP_DEVPACK)) {
If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading PHP Dev pack: ${RemoteUrl} ..."
Write-Output "Downloading PHP Dev pack: ${RemoteUrl} ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand Down Expand Up @@ -177,7 +177,7 @@ Function InstallParser {

If (-not (Test-Path "${Env:PHP_PATH}\ext\php_zephir_parser.dll")) {
If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading Zephir Parser: ${RemoteUrl} ..."
Write-Output "Downloading Zephir Parser: ${RemoteUrl} ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand All @@ -200,7 +200,7 @@ Function InstallPsrExtension {

If (-not (Test-Path "${Env:PHP_PATH}\ext\php_psr.dll")) {
If (-not [System.IO.File]::Exists($DestinationPath)) {
Write-Host "Downloading PHP PSR: ${RemoteUrl} ..."
Write-Output "Downloading PHP PSR: ${RemoteUrl} ..."
DownloadFile $RemoteUrl $DestinationPath
}

Expand Down Expand Up @@ -338,13 +338,13 @@ Function EnableExtension {
Function PrintBuildDetails {
$BuildDate = Get-Date -Format g

Write-Host "Build date: ${BuildDate}"
Write-Host "Build version: ${Env:APPVEYOR_BUILD_VERSION}"
Write-Host "Build type: ${Env:BUILD_TYPE}"
Write-Host "Build worker image: ${Env:APPVEYOR_BUILD_WORKER_IMAGE}"
Write-Host "Git commit: ${Env:APPVEYOR_REPO_COMMIT}"
Write-Host "Platform: ${Env:PLATFORM}"
Write-Host "Target PHP version: ${Env:PHP_MINOR}"
Write-Output "Build date: ${BuildDate}"
Write-Output "Build version: ${Env:APPVEYOR_BUILD_VERSION}"
Write-Output "Build type: ${Env:BUILD_TYPE}"
Write-Output "Build worker image: ${Env:APPVEYOR_BUILD_WORKER_IMAGE}"
Write-Output "Git commit: ${Env:APPVEYOR_REPO_COMMIT}"
Write-Output "Platform: ${Env:PLATFORM}"
Write-Output "Target PHP version: ${Env:PHP_MINOR}"
}

Function PrintLogs {
Expand All @@ -362,7 +362,7 @@ Function PrintLogs {
}

Function PrintVars {
Write-Host ($Env:Path).Replace(';', "`n")
Write-Output ($Env:Path).Replace(';', "`n")

Get-ChildItem Env:
}
Expand Down Expand Up @@ -398,13 +398,13 @@ Function PrintPhpInfo {
$PhpExe = "${Env:PHP_PATH}\php.exe"

If (Test-Path -Path "${PhpExe}") {
Write-Host ""
Write-Output ""
& "${PhpExe}" -v

Write-Host ""
Write-Output ""
& "${PhpExe}" -m

Write-Host ""
Write-Output ""
& "${PhpExe}" -i
} ElseIf (Test-Path -Path "${IniFile}") {
Get-Content -Path "${IniFile}"
Expand All @@ -428,7 +428,7 @@ Function Expand-Item7zip {
$Result = (& 7z x "$Archive" "-o$Destination" -aoa -bd -y -r)

If ($LastExitCode -ne 0) {
Write-Host "An error occurred while unzipping [$Archive] to [$Destination]. Error code was: ${LastExitCode}"
Write-Output "An error occurred while unzipping [$Archive] to [$Destination]. Error code was: ${LastExitCode}"
Exit $LastExitCode
}
}
Expand All @@ -453,7 +453,7 @@ Function DownloadFile {
} Catch {
If ($RetryCount -ge $RetryMax) {
$ErrorMessage = $_.Exception.Message
Write-Host "Error downloadingig ${RemoteUrl}: $ErrorMessage"
Write-Output "Error downloadingig ${RemoteUrl}: $ErrorMessage"
$Completed = $true
} Else {
$RetryCount++
Expand Down
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ env:
- BUILD_TYPE=regular
- BOX_VERSION=3.8.1
- REPORT_COVERAGE=1
- ZEPHIR_PARSER_VERSION="v1.3.2"
- ZEPHIR_PARSER_VERSION="v1.3.3"
- PATH="${HOME}/bin:${PATH}"
- TRAVIS_COMMIT_LOG="$(git log --format=fuller -5)"
- MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)"
- SYMFONY_PHPUNIT_DIR="$HOME/.phpunit"

matrix:
fast_finish: true
allow_failures:
- php: '7.4snapshot'

include:
- os: linux
Expand Down Expand Up @@ -80,14 +78,13 @@ matrix:

- os: linux
compiler: gcc
php: '7.4snapshot'
php: '7.4'
addons:
apt:
packages:
- gdb
env:
# TODO: Recheck
- BUILD_PHAR=0
- SYMFONY_PHPUNIT_VERSION=7.4

- os: linux
cache: false
Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [0.12.14] - 2019-12-11
### Removed
- Removed `zend_uint` typedef usage

## [0.12.13] - 2019-12-08
### Fixed
- Removed `uint` and `ulong` typedefs support
- Fixed PHP 7.4 support for macOS [phalcon/cphalcon#14577](https://github.com/phalcon/cphalcon/issues/14577)

### Removed
- Removed `uint` and `ulong` typedefs usage

## [0.12.12] - 2019-11-25
### Added
- Option to set banner for stubs generator
Expand Down Expand Up @@ -344,7 +350,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed casting resource to int (only ZendEngine 3)
[#1524](https://github.com/phalcon/zephir/issues/1524)

[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.13...HEAD
[Unreleased]: https://github.com/phalcon/zephir/compare/0.12.14...HEAD
[0.12.14]: https://github.com/phalcon/zephir/compare/0.12.14...0.12.14
[0.12.13]: https://github.com/phalcon/zephir/compare/0.12.12...0.12.13
[0.12.12]: https://github.com/phalcon/zephir/compare/0.12.11...0.12.12
[0.12.11]: https://github.com/phalcon/zephir/compare/0.12.10...0.12.11
Expand Down
2 changes: 1 addition & 1 deletion Library/Backends/ZendEngine3/StringsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function genConcatCode()
$t = substr($key, $i, 1);
$sparams[] = 'op'.$n;
if ('s' == $t) {
$params[] = 'const char *op'.$n.', zend_uint op'.$n.'_len';
$params[] = 'const char *op'.$n.', uint32_t op'.$n.'_len';
$lparams[] = 'op'.$n.', sizeof(op'.$n.')-1';
$lengths[] = 'op'.$n.'_len';
$svars[] = $n;
Expand Down
4 changes: 2 additions & 2 deletions Library/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function __construct()
*/
public function __toString()
{
return json_encode($this, JSON_PRETTY_PRINT);
return (string) json_encode($this, JSON_PRETTY_PRINT);
}

/**
Expand All @@ -130,7 +130,7 @@ public function __toString()
*
* @return Config
*/
public static function fromServer()
public static function fromServer(): self
{
$config = new self();

Expand Down
2 changes: 1 addition & 1 deletion Library/Zephir.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
final class Zephir
{
const VERSION = '0.12.13-$Id$';
const VERSION = '0.12.14-$Id$';

const LOGO = <<<'ASCII'
_____ __ _
Expand Down
10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 0.12.13-{build}
version: 0.12.14-{build}

environment:
matrix:
- PHP_MINOR: 7.2
VC_VERSION: 15
- PHP_MINOR: '7.2'
VC_VERSION: '15'
BUILD_TYPE: nts-Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

Expand All @@ -18,8 +18,8 @@ environment:
NO_INTERACTION: 1
REPORT_EXIT_STATUS: 1
COMPOSER_NO_INTERACTION: 1
PARSER_VERSION: 1.3.2
PARSER_RELEASE: 505
PARSER_VERSION: 1.3.3
PARSER_RELEASE: 514
PSR_VERSION: 0.6.1

matrix:
Expand Down
2 changes: 1 addition & 1 deletion ext/php_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define PHP_TEST_VERSION "1.0.0"
#define PHP_TEST_EXTNAME "test"
#define PHP_TEST_AUTHOR "Zephir Team and contributors"
#define PHP_TEST_ZEPVERSION "0.12.13-$Id$"
#define PHP_TEST_ZEPVERSION "0.12.14-$Id$"
#define PHP_TEST_DESCRIPTION "Description <b>test</b> for<br/>Test Extension."

typedef struct _zephir_struct_db {
Expand Down
12 changes: 6 additions & 6 deletions kernels/ZendEngine3/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "kernel/object.h"
#include "kernel/fcall.h"

void ZEPHIR_FASTCALL zephir_create_array(zval *return_value, zend_uint size, int initialize)
void ZEPHIR_FASTCALL zephir_create_array(zval *return_value, uint32_t size, int initialize)
{
uint i;
zval null_value;
Expand Down Expand Up @@ -153,7 +153,7 @@ int zephir_array_isset_fetch(zval *fetched, const zval *arr, zval *index, int re
return 0;
}

int zephir_array_isset_string_fetch(zval *fetched, const zval *arr, char *index, zend_uint index_length, int readonly)
int zephir_array_isset_string_fetch(zval *fetched, const zval *arr, char *index, uint32_t index_length, int readonly)
{
zval *zv;
if (UNEXPECTED(Z_TYPE_P(arr) == IS_OBJECT && zephir_instance_of_ev((zval *)arr, (const zend_class_entry *)zend_ce_arrayaccess))) {
Expand Down Expand Up @@ -280,7 +280,7 @@ int ZEPHIR_FASTCALL zephir_array_isset(const zval *arr, zval *index)
}
}

int ZEPHIR_FASTCALL zephir_array_isset_string(const zval *arr, const char *index, zend_uint index_length)
int ZEPHIR_FASTCALL zephir_array_isset_string(const zval *arr, const char *index, uint32_t index_length)
{
if (UNEXPECTED(Z_TYPE_P(arr) == IS_OBJECT && zephir_instance_of_ev((zval *)arr, (const zend_class_entry *)zend_ce_arrayaccess))) {
zend_long ZEPHIR_LAST_CALL_STATUS;
Expand Down Expand Up @@ -369,7 +369,7 @@ int ZEPHIR_FASTCALL zephir_array_unset(zval *arr, zval *index, int flags)
}
}

int ZEPHIR_FASTCALL zephir_array_unset_string(zval *arr, const char *index, zend_uint index_length, int flags)
int ZEPHIR_FASTCALL zephir_array_unset_string(zval *arr, const char *index, uint32_t index_length, int flags)
{
if (UNEXPECTED(Z_TYPE_P(arr) == IS_OBJECT && zephir_instance_of_ev(arr, (const zend_class_entry *)zend_ce_arrayaccess))) {
zend_long ZEPHIR_LAST_CALL_STATUS;
Expand Down Expand Up @@ -515,7 +515,7 @@ int zephir_array_fetch(zval *return_value, zval *arr, zval *index, int flags ZEP
return FAILURE;
}

int zephir_array_fetch_string(zval *return_value, zval *arr, const char *index, zend_uint index_length, int flags ZEPHIR_DEBUG_PARAMS)
int zephir_array_fetch_string(zval *return_value, zval *arr, const char *index, uint32_t index_length, int flags ZEPHIR_DEBUG_PARAMS)
{
zval *zv;

Expand Down Expand Up @@ -698,7 +698,7 @@ int zephir_array_update_zval(zval *arr, zval *index, zval *value, int flags)
return ret != NULL ? FAILURE : SUCCESS;
}

int zephir_array_update_string(zval *arr, const char *index, zend_uint index_length, zval *value, int flags)
int zephir_array_update_string(zval *arr, const char *index, uint32_t index_length, zval *value, int flags)
{

if (UNEXPECTED(Z_TYPE_P(arr) == IS_OBJECT && zephir_instance_of_ev(arr, (const zend_class_entry *)zend_ce_arrayaccess))) {
Expand Down
12 changes: 6 additions & 6 deletions kernels/ZendEngine3/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "kernel/globals.h"
#include "kernel/main.h"

void ZEPHIR_FASTCALL zephir_create_array(zval *return_value, zend_uint size, int initialize);
void ZEPHIR_FASTCALL zephir_create_array(zval *return_value, uint32_t size, int initialize);

/**
* Simple convenience function which ensures that you are dealing with an array and you can
Expand All @@ -28,22 +28,22 @@ void ZEPHIR_FASTCALL zephir_ensure_array(zval *probable_array);

/** Combined isset/fetch */
int zephir_array_isset_fetch(zval *fetched, const zval *arr, zval *index, int readonly);
int zephir_array_isset_string_fetch(zval *fetched, const zval *arr, char *index, zend_uint index_length, int readonly);
int zephir_array_isset_string_fetch(zval *fetched, const zval *arr, char *index, uint32_t index_length, int readonly);
int zephir_array_isset_long_fetch(zval *fetched, const zval *arr, unsigned long index, int readonly);

/** Check for index existence */
int ZEPHIR_FASTCALL zephir_array_isset(const zval *arr, zval *index);
int ZEPHIR_FASTCALL zephir_array_isset_long(const zval *arr, unsigned long index);
int ZEPHIR_FASTCALL zephir_array_isset_string(const zval *arr, const char *index, zend_uint index_length);
int ZEPHIR_FASTCALL zephir_array_isset_string(const zval *arr, const char *index, uint32_t index_length);

/** Unset existing indexes */
int ZEPHIR_FASTCALL zephir_array_unset(zval *arr, zval *index, int flags);
int ZEPHIR_FASTCALL zephir_array_unset_long(zval *arr, unsigned long index, int flags);
int ZEPHIR_FASTCALL zephir_array_unset_string(zval *arr, const char *index, zend_uint index_length, int flags);
int ZEPHIR_FASTCALL zephir_array_unset_string(zval *arr, const char *index, uint32_t index_length, int flags);

/** Fetch items from arrays */
int zephir_array_fetch(zval *return_value, zval *arr, zval *index, int flags ZEPHIR_DEBUG_PARAMS);
int zephir_array_fetch_string(zval *return_value, zval *arr, const char *index, zend_uint index_length, int flags ZEPHIR_DEBUG_PARAMS);
int zephir_array_fetch_string(zval *return_value, zval *arr, const char *index, uint32_t index_length, int flags ZEPHIR_DEBUG_PARAMS);
int zephir_array_fetch_long(zval *return_value, zval *arr, unsigned long index, int flags ZEPHIR_DEBUG_PARAMS);

/** Append elements to arrays */
Expand All @@ -52,7 +52,7 @@ void zephir_merge_append(zval *left, zval *values);

/** Modify array */
int zephir_array_update_zval(zval *arr, zval *index, zval *value, int flags);
int zephir_array_update_string(zval *arr, const char *index, zend_uint index_length, zval *value, int flags);
int zephir_array_update_string(zval *arr, const char *index, uint32_t index_length, zval *value, int flags);
int zephir_array_update_long(zval *arr, unsigned long index, zval *value, int flags ZEPHIR_DEBUG_PARAMS);

void zephir_array_keys(zval *return_value, zval *arr);
Expand Down
Loading

0 comments on commit 745631d

Please sign in to comment.