Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/compile-windows.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
name: "[Windows] Build Phalcon"
on: [push, pull_request]

on:
- push
- pull_request

env:
# All versions should be declared here
PHALCON_VERSION: 5.9.3

jobs:
windows:
runs-on: windows-latest
name: "Build Phalcon (PHP ${{matrix.php}}-${{matrix.ts}}-${{matrix.arch}})"
name: "Build Phalcon (PHP ${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }})"
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
php: ["8.0","8.1","8.2","8.3"]
arch: [x64,x86]
ts: [nts,ts]
php:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
arch:
- x64
- x86
ts:
- nts
- ts
experimental: [false]
steps:
- name: Checkout Phalcon
Expand All @@ -31,7 +46,7 @@ jobs:

- name: Setup PHP
id: setup-php
uses: php/setup-php-sdk@v0.8
uses: php/setup-php-sdk@v0.10
with:
version: ${{matrix.php}}
arch: ${{matrix.arch}}
Expand Down Expand Up @@ -76,7 +91,7 @@ jobs:
$phalconDllOpt = 'TEST_PHP_ARGS=-n -d zend_extension=' + $dir + '\php_phalcon.dll'
echo $phalconDllOpt >> $env:GITHUB_ENV

$artifactName = 'php_phalcon-php${{matrix.php}}'
$artifactName = 'php_phalcon-${{ env.PHALCON_VERSION }}-php${{matrix.php}}'

if ('nts' -ne '${{matrix.ts}}') { $artifactName = $artifactName + '-ts' }
if ('nts' -eq '${{matrix.ts}}') { $artifactName = $artifactName + '-nts' }
Expand Down Expand Up @@ -105,4 +120,4 @@ jobs:
name: ${{env.ARTIFACT_NAME}}
path: |
${{env.ARTIFACT}}
LICENSE.txt
LICENSE.txt
15 changes: 7 additions & 8 deletions phalcon/Http/Request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use Phalcon\Filter\FilterInterface;
use Phalcon\Http\Message\RequestMethodInterface;
use Phalcon\Http\Request\File;
use Phalcon\Http\Request\FileInterface;
use Phalcon\Filter\FilterFactory;
use Phalcon\Http\Request\Exception;
use Phalcon\Support\Helper\Json\Decode;
use UnexpectedValueException;
Expand Down Expand Up @@ -1646,15 +1647,13 @@ class Request extends AbstractInjectionAware implements RequestInterface, Reques

if typeof filterService != "object" {
let container = <DiInterface> this->container;

if container === null {
throw new Exception(
"A dependency injection container is required to access the 'filter' service"
);
if typeof container == "object" && container->has("filter") {
let filter = <FilterInterface> container->getShared("filter"),
this->filterService = filter;
} else {
this->filterService = (new FilterFactory())->newInstance();
}

let filterService = <FilterInterface> container->getShared("filter"),
this->filterService = filterService;
this->filterService = filterService;
}

return this->filterService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?php
<?php // phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace

// @codingStandardsIgnoreStart
use Phalcon\Mvc\Controller;

// @codingStandardsIgnoreSEnd

/**
* \DispatcherTestDefaultNoNamespaceController
* Dispatcher Controller for testing different dispatch scenarios
Expand All @@ -23,8 +20,8 @@
*/
class DispatcherTestDefaultNoNamespaceController extends Controller
{
const RETURN_VALUE_STRING = 'string';
const RETURN_VALUE_INT = 5;
public const RETURN_VALUE_STRING = 'string';
public const RETURN_VALUE_INT = 5;

public function beforeExecuteRoute()
{
Expand Down
Loading