Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realign #2

Merged
merged 112 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
5dd880b
Removed depreciation message with strtoupper
garryxigen Sep 26, 2022
ecb2580
Reverted changes in composer.json
garryxigen Sep 27, 2022
ff8131e
isNumber() bugfix
develart-projects Sep 29, 2022
7452eb9
Updated strtoupper with type cast
garryxigen Oct 26, 2022
cf4a608
Merge branch 'Shardj:master' into master
krytenuk Feb 7, 2023
50c425e
Added typecast to stop depreciation messages
garryxigen Feb 7, 2023
5154ad3
Basic Sendgrid Transport Class
tsmgeek Feb 25, 2023
13ae909
linting
tsmgeek Feb 27, 2023
22214a4
Update SendgridSmtp.php
tsmgeek Feb 27, 2023
8505de4
Fixing error (since PHP 8.1):
emelyanov-s Apr 14, 2023
584f034
Using APCUIterator for APCu
emelyanov-s Apr 14, 2023
48ad3c3
Fixed "emails are displayed incorrectly" with PHP 8.1+
fballiano Apr 18, 2023
e38751e
A better patch supporting PHP7 too
fballiano Apr 18, 2023
2b8f160
- Fatal error fix: Uncaught ArgumentCountError: apcu_clear_cache() ex…
emelyanov-s Apr 24, 2023
b1a9e3e
Added more precise return types on Zend_Controller_Request_Http
staabm Apr 26, 2023
17ac38c
fix
staabm Apr 26, 2023
08b891b
Fix PHPDoc for @methods to ensure static analysers understand it
holtkamp May 11, 2023
b3586c1
Fix for very slow chunk processing for larger content in the http res…
aleksandar-mitrev Jun 13, 2023
cfaf5bb
- revoke function skope
aleksandar-mitrev Jun 13, 2023
b4e595f
Made tests be able to run on all supported PHP versions, and run succ…
boenrobot Jun 9, 2023
5ada3ee
Extend native SessionHandlerInterface
holtkamp Jul 12, 2023
674afc7
PHP8.2 - Fix null beeing passed to urlencode
griesi007 Jul 12, 2023
a71c43e
Merge master into isNumber-bugfix
develart-projects Jul 24, 2023
d7f99e7
Updated Format::isNumber() to comply with FloatTest UTs
develart-projects Jul 24, 2023
9bb873b
Fix docblock in Zend_Json_Server
kiatng Aug 9, 2023
4afdf79
Merge pull request #262 from develart-projects/isNumber-bugfix
develart-projects Aug 9, 2023
5c05065
Merge pull request #358 from griesi007/patch-1
develart-projects Aug 9, 2023
85b51a7
Merge pull request #331 from tsmgeek/patch-3
develart-projects Aug 9, 2023
9643572
Merge pull request #342 from emelyanov-s/fix/cache-apcu-update
develart-projects Aug 9, 2023
6c5d379
Merge pull request #349 from holtkamp/patch-1
develart-projects Aug 9, 2023
b5c3d04
Merge pull request #347 from staabm/patch-1
develart-projects Aug 9, 2023
b8780fa
Merge pull request #361 from kiatng/fix_docblock_in_json_server
develart-projects Aug 9, 2023
41a26bf
Merge pull request #353 from boenrobot/phpunit-cross-versions
develart-projects Aug 9, 2023
ae9e5df
Merge pull request #344 from fballiano/patch-1
develart-projects Aug 9, 2023
de90587
Merge pull request #357 from holtkamp/patch-2
develart-projects Aug 9, 2023
0a76a30
version bump
develart-projects Aug 10, 2023
2e53484
comment fix (#355)
develart-projects Aug 10, 2023
8dce1fa
fixed deprecation in comparsion (#351)
develart-projects Aug 10, 2023
787c991
fixed Zend version test
develart-projects Aug 10, 2023
14e968d
fixed Zend_Date::ISO_8601 validation (#339)
develart-projects Aug 10, 2023
8d040e6
fixed Zend_Date::ISO_8601 validation - extended length check (#339)
develart-projects Aug 10, 2023
e41414c
fixed PR: Add ForceIndex function to DB Select.php #350
develart-projects Aug 10, 2023
e5a1915
Merge branch 'master' into fix/remove-depreciation-messages
krytenuk Aug 10, 2023
1bc6de3
reverted: Add ForceIndex function to DB Select.php #350
develart-projects Aug 10, 2023
6ff9af2
Merge pull request #325 from krytenuk/fix/remove-depreciation-messages
develart-projects Aug 10, 2023
aa077dd
Merge pull request #364 from develart-projects/versionAndMinorFixes
develart-projects Aug 10, 2023
a2ba93e
test: since php8 PDO::commit with new behavior
hungtrinh Aug 12, 2023
6d045bf
test: since php 8 PDO::commit will act like php 7
hungtrinh Aug 12, 2023
8446d15
implement spec PDO::commit like php 7
hungtrinh Aug 12, 2023
d2df032
test: since php8 PDO::rollback with new behavior
hungtrinh Aug 12, 2023
bd9707f
test: since php 8 PDO::rollback will act like php 7
hungtrinh Aug 12, 2023
da7125f
implement spec PDO::rollback like php 7
hungtrinh Aug 12, 2023
a683dd9
fix bug phpunit @runInSeparateProcess hang on github action
hungtrinh Aug 13, 2023
139950f
pdo transaction in bc mode refactoring
hungtrinh Aug 14, 2023
346655e
test method name refactoring
hungtrinh Aug 14, 2023
9bfa4a3
sendmail header sanitization quick-fix, as described in #326
develart-projects Aug 15, 2023
1f5789a
Merge pull request #365 from hungtrinh/pdo-transaction-bring-back-lik…
develart-projects Aug 15, 2023
ec42481
Merge pull request #366 from develart-projects/sendmailEmailHeaderFix
develart-projects Aug 15, 2023
3d86664
Version fix
develart-projects Aug 15, 2023
421a40c
Version fix, changelog fixed
develart-projects Aug 15, 2023
7ae8cb4
Merge pull request #367 from develart-projects/versioningFix
develart-projects Aug 15, 2023
2a2bbcf
Enabled testing of APCU for all PHP versions.
boenrobot Aug 10, 2023
310ce0c
Merge pull request #363 from boenrobot/enable-apcu-testing
develart-projects Aug 21, 2023
972a7e1
Finnish date translations
Aug 21, 2023
2eded49
Merge pull request #368 from Lodewyk/finnish-date-translations
develart-projects Aug 21, 2023
1a6f258
addressed 5th sendmail param validation using -f (#326)
develart-projects Aug 23, 2023
0f0cb95
Merge pull request #371 from develart-projects/mailParametersValidati…
develart-projects Aug 23, 2023
59ddb43
version bump 1.23.3
develart-projects Aug 23, 2023
61cf50b
Merge pull request #372 from develart-projects/v1_23_3
develart-projects Aug 23, 2023
497d319
Sendmail transport - wrong comparison fix
develart-projects Aug 24, 2023
97b188e
version bump
develart-projects Aug 24, 2023
622a60b
Merge pull request #373 from develart-projects/sendmailTransportWrong…
develart-projects Aug 24, 2023
ca18b33
further Zend Mail sendmail transport validation tweak
develart-projects Aug 24, 2023
0464ee9
Merge pull request #374 from develart-projects/yetAnotherUpdateToSend…
develart-projects Aug 24, 2023
e1c2541
added SameSite setCookie param (#315)
develart-projects Aug 30, 2023
8aba653
Merge pull request #375 from develart-projects/samesiteCookieHeaderParam
develart-projects Aug 30, 2023
ae86354
compataibility for php 8.2 to stop error Deprecated: Creation of dyna…
pcmad Sep 6, 2023
fd95045
Merge pull request #376 from pcmad/patch-1
develart-projects Sep 7, 2023
9d249ac
added setting to disable automatic strigify of pdo mysql
Sep 11, 2023
92574e5
Revert changes since Shardj#357 for the backward-compatible issue rep…
fanlei Sep 13, 2023
d5f9151
Merge pull request #379 from fanlei/hotfix/return-type-not-match-depr…
develart-projects Sep 13, 2023
2307028
static flag issue fixed
Sep 15, 2023
d9ef42a
Merge pull request #378 from roshanbudhathoki/fix/flag-to-disable-str…
develart-projects Sep 19, 2023
444bd9a
avoid potential array access on non-existent key
dochne Sep 27, 2023
74ce53b
Merge pull request #383 from dochne/master
develart-projects Sep 27, 2023
fa81714
Support X-Forwarded-Proto header
rokclimb15 Oct 26, 2023
e90fae7
Merge pull request #386 from rokclimb15/serverurl-helper-x-forwarded-…
develart-projects Oct 26, 2023
053b7cb
add "array" as allowed type of $value
holtkamp Nov 7, 2023
f8018da
Merge pull request #387 from holtkamp/patch-incomplete-phpdoc-zend-lo…
develart-projects Nov 7, 2023
daa2ada
Updated DocBlocks to return `$this` for fluent interface
sreichel Nov 24, 2023
a9fe914
Added Zend_Json
sreichel Nov 24, 2023
31d166b
Fixed typo
sreichel Nov 24, 2023
f53b663
Improving limit method using OVER()
Nov 24, 2023
a510220
stop: PHP Fatal error: Uncaught TypeError: strtolower(): Argument #1…
DavidGoodwin Dec 31, 2023
4eb8fd1
and tidy up the exception message thrown so it is readable
DavidGoodwin Dec 31, 2023
64b8699
fix spelling (thanks @sreichel)
DavidGoodwin Jan 1, 2024
2a1a0cc
Merge pull request #390 from sreichel/fluent
develart-projects Jan 23, 2024
8c3b0a7
Fixes A non-numeric value encountered in PhpMath.php
sreichel Jan 24, 2024
0eeea1f
Merge pull request #402 from sreichel/sreichel-patch-phpmath
develart-projects Jan 26, 2024
ae0ac8f
Merge pull request #392 from ushiday/patch01
develart-projects Jan 26, 2024
dbdd481
Merge pull request #396 from DavidGoodwin/master
develart-projects Jan 26, 2024
e0dcbb3
1.24.0 release
develart-projects Feb 5, 2024
b87c150
Merge pull request #404 from develart-projects/master
develart-projects Feb 5, 2024
d0001bf
don't run string functions on null objects
muli Apr 2, 2024
5f6cce1
correct params docs
muli Apr 2, 2024
22800df
Fix deprecation message in php8 with null param with realpath()
tsmgeek Apr 27, 2024
f9bc749
Add check in DbTable Authentication Adapter for empty results when Am…
rruchte May 2, 2024
78f59e6
restore mbstring overloading for full backwards compatibility
thomaslauria Jul 22, 2024
be808f8
Merge pull request #354 from MittagQI/hotfix/slow-bodychunk-decode-fo…
develart-projects Jul 22, 2024
5ca64ea
Merge pull request #419 from rruchte/auth-ambiguous-identity-fix
develart-projects Jul 22, 2024
bd0c634
Merge pull request #413 from tsmgeek/patch-4
develart-projects Jul 22, 2024
94d85ab
Merge pull request #410 from muli/fix_deprecated_usage_of_string_func…
develart-projects Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
67 changes: 56 additions & 11 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHPUnit-9
name: PHPUnit

on: [push, pull_request]

Expand All @@ -9,7 +9,6 @@ jobs:
runs-on: ubuntu-22.04

env:
PHP_EXTENSIONS: none, posix, curl, dom, json, libxml, mbstring, openssl, tokenizer, xml, xmlwriter, ctype, iconv, simplexml, pdo_sqlite, pdo_mysql, fileinfo, json, zip, sqlite, soap, bcmath, mcrypt, igbinary, gd, bz2, lzf, rar, memcached, memcache
PHP_INI_VALUES: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On

TESTS_ZEND_DB_ADAPTER_PDO_MYSQL_ENABLED: true
Expand All @@ -34,7 +33,9 @@ jobs:
TESTS_ZEND_CACHE_LIBMEMCACHED_HOST: 127.0.0.1
TESTS_ZEND_CACHE_LIBMEMCACHED_PORT: 11211

# https://hub.docker.com/r/bitnami/openldap
TESTS_ZEND_CACHE_APC_ENABLED: true

# https://hub.docker.com/r/bitnami/openldap
LDAP_ROOT: "dc=example,dc=com"
LDAP_ALLOW_ANON_BINDING: false
LDAP_SKIP_DEFAULT_TREE: "yes"
Expand All @@ -46,6 +47,7 @@ jobs:
TESTS_ZEND_AUTH_ADAPTER_LDAP_ONLINE_ENABLED: true

LOCALES: "fr_FR@euro fr_FR fr_BE.UTF-8 de en_US"
OPENSSL_CONF: "./tests/openssl.conf"
services:
memcache:
image: memcached:1.6.17-alpine
Expand All @@ -60,7 +62,7 @@ jobs:
MYSQL_DATABASE: ${{ env.TESTS_ZEND_DB_ADAPTER_MYSQL_DATABASE }}
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
ports:
- 3306:3306
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
Expand Down Expand Up @@ -99,13 +101,28 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
experimental:
- false
include:
#bare for PHP >=7.2
- php-extensions-bare: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer, mbstring"
#full for PHP <= 8.0
- php-extensions-full: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer, mbstring, apcu, ctype, openssl, curl, gd, posix, pdo_sqlite, pdo_mysql, fileinfo, zip, sqlite, soap, bcmath, igbinary, bz2, lzf, memcached, memcache, ldap, sqlite, mcrypt, rar"
- php-version: "7.1"
php-extensions-bare: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer"
- php-version: "8.1"
php-extensions-full: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer, mbstring, apcu, ctype, openssl, curl, gd, posix, pdo_sqlite, pdo_mysql, fileinfo, zip, sqlite, soap, bcmath, igbinary, bz2, lzf, memcached, memcache, ldap, sqlite, mcrypt"
- php-version: "8.2"
php-extensions-full: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer, mbstring, apcu, ctype, openssl, curl, gd, posix, pdo_sqlite, pdo_mysql, fileinfo, zip, sqlite, soap, bcmath, igbinary, bz2, lzf, memcached, memcache, ldap, sqlite, mcrypt"
- php-version: "8.3"
php-extensions-full: "none, iconv, json, libxml, xml, dom, simplexml, xmlwriter, tokenizer, mbstring, apcu, ctype, openssl, curl, gd, posix, pdo_sqlite, pdo_mysql, fileinfo, zip, sqlite, soap, bcmath, igbinary, bz2, lzf, memcached, memcache, ldap, sqlite"
experimental: true

steps:
Expand All @@ -118,32 +135,60 @@ jobs:
echo "All languages..."
locale -a

- name: Provider config base on env for intergrate test
- name: Provider config base on env for integrate test
run: cp tests/TestConfiguration.env.php tests/TestConfiguration.php

- name: Install PHP with extensions
- name: Install PHP with minimal extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: cs2pr
extensions: memcached, memcache
extensions: ${{ matrix.php-extensions-bare }}
ini-values: ${{ env.PHP_INI_VALUES }}
env:
# https://github.com/shivammathur/setup-php/issues/407#issuecomment-773675741
fail-fast: true

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress --no-interaction

- name: Lint PHP source files
run: |
bin/parallel-lint --exclude vendor --exclude tests/Zend/Loader/_files/ParseError.php . --checkstyle | cs2pr

- name: "Run tests on PHP ${{ matrix.php-version }} (Experimental: ${{ matrix.experimental }}) with minimal extensions"
run: |
bin/phpunit -c tests/phpunit.xml
continue-on-error: ${{ matrix.experimental }}

- name: Setup LDAP
run: |
sudo apt-get install -y libnss-ldap libpam-ldap ldap-utils
tests/resources/openldap/docker-entrypoint-initdb.d/init.sh

- name: "Run tests on PHP ${{ matrix.php-version }} (Experimental: ${{ matrix.experimental }})"
run: bin/phpunit -c tests/phpunit.xml
continue-on-error: ${{ matrix.experimental }}
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: cs2pr
extensions: ${{ matrix.php-extensions-full }}
ini-values: ${{ env.PHP_INI_VALUES }}, apc.enable_cli=1
env:
# https://github.com/shivammathur/setup-php/issues/407#issuecomment-773675741
fail-fast: true

- name: "Run tests on PHP ${{ matrix.php-version }} (Experimental: ${{ matrix.experimental }}) with extensions"
run: |
bin/phpunit -c tests/phpunit.xml
continue-on-error: ${{ matrix.experimental }}
9 changes: 9 additions & 0 deletions BREAKING-CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
![zf1-future logo](https://imgur.com/S0i6qOh.png)
<sub><sup>Thanks to [WebTigers](https://github.com/WebTigers) for the logo</sup></sub>

#AIM of this doc.
As pressure to implement some PHP 8.2+ related changes are raising, we are goig to track any possible breaking change, starting from version 1.24.0

### 1.24.0
* some depracation messages have been suppresses for 8.1, but reverted: https://github.com/Shardj/zf1-future/issues/377

78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.24.0] - 2024-02-05
- introduced BREAKING CHANGES doc.

### Added
- support "samesite" cookie attribute in Zend_Http_Header_SetCookie in https://github.com/Shardj/zf1-future/issues/315
- Support X-Forwarded-Proto header in https://github.com/Shardj/zf1-future/pull/386
- added setting to disable automatic strigify of pdo mysql in https://github.com/Shardj/zf1-future/pull/378

### Fixed
- reverted Deprecated : Return type on Zend_Session_SaveHandler_DbTable in https://github.com/Shardj/zf1-future/issues/377
- Zend_Db_Adapter_Db2 limit does not work in https://github.com/Shardj/zf1-future/issues/391
- Zend_Http_Client-Adapter_Socket - check transfer-encoding header is a string (and not an array) in https://github.com/Shardj/zf1-future/pull/396
- Fixes A non-numeric value encountered in PhpMath.php in https://github.com/Shardj/zf1-future/pull/402
- Updated DocBlocks to return $this for fluent interface in https://github.com/Shardj/zf1-future/pull/390
- add "array" as allowed type of $value in https://github.com/Shardj/zf1-future/pull/387
- Avoid undefined array key access inside url assembly in https://github.com/Shardj/zf1-future/pull/383
- Fixed #357 return type backward-compatible issue reported in https://github.com/Shardj/zf1-future/pull/379
- Fixed missing property in https://github.com/Shardj/zf1-future/pull/376


## [1.23.5] - 2023-08-24
### Fixed
- further Zend Mail sendmail transport validation tweak

## [1.23.4] - 2023-08-24
### Fixed
- corrected Zend Mail sendmail transport comparison

## [1.23.3] - 2023-08-23
### Added
- Enabled testing of APCU for all PHP versions when running with all extensions enabled by @boenrobot in https://github.com/Shardj/zf1-future/pull/363

### Fixed
- Finnish date translations by @Lodewyk in https://github.com/Shardj/zf1-future/pull/368
- addressed 5th sendmail param validation using -f (#326) by @develart-projects in https://github.com/Shardj/zf1-future/pull/371

## [1.23.2] - 2023-08-15
### Fixed
- corrected versioning and changelog

## [1.23.1] - 2023-08-15
### Fixed
- Pdo transaction bring back like php7 by @hungtrinh in #365
- sendmail header sanitization quick-fix, as described in #326 by @develart-projects in #366

## [1.23.0] - 2023-08-10
### Added
- Made tests be able to run on all supported PHP versions, and run successfully by @boenrobot in #353
- Extend native SessionHandlerInterface by @holtkamp in #357

### Fixed
- Added typecast to stop depreciation messages by @krytenuk in #325
- Version and minor fixes by @develart-projects in #364

## [1.22.1] - 2023-08-07
### Fixed
- getTranslator() docblocks for the Zend_Form family by @boenrobot in #311
- Fixed the version test since the latest release. by @boenrobot in #312
- Fix: pin phpunit to 9 instead of latest (10) in github actions by @hungtrinh in #321
- Pdo sqlite keep bc since php81 by @hungtrinh in #320
- Keep pdo mysql adapter fetch digit field type BC with php <= 8.0 by @hungtrinh in #324
- PDO: Fix partial error return when using a encrypted connection by @TAINCER in #327
- Partial helper pull vars from view model by @hungtrinh in #329
- [Zend_Ldap] php 8.1 & 8.2 compatibility fixes by @hungtrinh in #333
- SUPEE-10752 from Magento 1.9.3.9 by @fballiano in #313
- Set stream context before opening socket by @tsmgeek in #330
- Fixed PHPDoc in Zend_Validate_Regex by @PHPGangsta in #332
- [Github action] - On test zend ldap by @hungtrinh in #335
- zend-validate fix issue: File "Intelligentmail.php" does not exist by @hungtrinh in #336
- Fixing typo in README.txt generation part by @me-ve in #338
- isNumber() bugfix by @develart-projects in #262
- PHP8.2 - Fix null beeing passed to urlencode by @griesi007 in #358
- Basic Sendgrid Transport Class by @tsmgeek in #331
- Fix/cache apcu update by @emelyanov-s in #342
- Fix PHPDoc for @methods to ensure static analysers understand it by @holtkamp in #349
- Added more precise return types on Zend_Controller_Request_Http by @staabm in #347
- Fix docblock in Zend_Json_Server by @kiatng in #361

## [1.22.0] - 2023-01-16
### Added
- Github actions and test improvements #298, #292, #287, #285, #284, #280, #275, #273, #272, #269
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Zend Framework 1 now for PHP 8.1!
### Classic ZF1 Reborn
Zend may have abandoned the original Zend Framework, but the global Zend Framework Community has not! Since Zend sentenced ZF1 to EOL, the Zend Framework community around the globe has continued to work and build on what we consider to be one of the best PHP frameworks of all time.
Framework is tested by users up to PHP version 8.1. Note, that with 8.2+ you can experience some incompatibilities.

# ZF1-Future Sponsors
### Products and Projects built with ZF1-Future:
Expand Down
2 changes: 2 additions & 0 deletions bin/classmap_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
exit(2);
}
$libraryPath = $opts->l;
} else {
$libraryPath = '.';
}
$libraryPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($libraryPath));

Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "shardj/zf1-future",
"description": "Zend Framework 1. The aim is to keep ZF1 working with the latest PHP versions",
"type": "library",
"version": "1.24.0",
"keywords": [
"framework",
"zf1"
Expand All @@ -11,6 +12,7 @@
"require": {
"php": ">=7.1",
"symfony/polyfill-php81": "^1.24",
"symfony/polyfill-ctype": "^1.27",
"symfony/polyfill-mbstring": "^1.26"
},
"suggest": {
Expand All @@ -33,9 +35,10 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9",
"phpunit/phpunit": "^7|^8|^9",
"php-parallel-lint/php-parallel-lint": "^1.3",
"rector/rector": "^0.14.8"
"rector/rector": "^0.12.19",
"yoast/phpunit-polyfills": "2.0"
},
"archive": {
"exclude": ["/demos", "/documentation", "/tests"]
Expand Down
8 changes: 6 additions & 2 deletions library/Zend/Auth/Adapter/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,12 @@ protected function _authenticateValidateResultSet(array $resultIdentities)
protected function _authenticateValidateResult($resultIdentity)
{
$zendAuthCredentialMatchColumn = $this->_zendDb->foldCase('zend_auth_credential_match');

if ($resultIdentity[$zendAuthCredentialMatchColumn] != '1') {

if (empty($resultIdentity)) {
$this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;
$this->_authenticateResultInfo['messages'][] = 'A record with the supplied identity could not be found.';
return $this->_authenticateCreateAuthResult();
} elseif ($resultIdentity[$zendAuthCredentialMatchColumn] != '1') {
$this->_authenticateResultInfo['code'] = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;
$this->_authenticateResultInfo['messages'][] = 'Supplied credential is invalid.';
return $this->_authenticateCreateAuthResult();
Expand Down
12 changes: 5 additions & 7 deletions library/Zend/Cache/Backend/Apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function load($id, $doNotTestCacheValidity = false)
{
$tmp = apcu_fetch($id);
if (is_array($tmp)) {
return $tmp[0];
return $tmp[0] ?? false;
}
return false;
}
Expand All @@ -89,7 +89,7 @@ public function test($id)
{
$tmp = apcu_fetch($id);
if (is_array($tmp)) {
return $tmp[1];
return $tmp[1] ?? false;
}
return false;
}
Expand All @@ -108,7 +108,7 @@ public function test($id)
*/
public function save($data, $id, $tags = [], $specificLifetime = false)
{
$lifetime = $this->getLifetime($specificLifetime);
$lifetime = $this->getLifetime($specificLifetime) ?? 0;
$result = apcu_store($id, [$data, time(), $lifetime], $lifetime);
if (count($tags) > 0) {
$this->_log(self::TAGS_UNSUPPORTED_BY_SAVE_OF_APC_BACKEND);
Expand Down Expand Up @@ -146,8 +146,7 @@ public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = [])
{
switch ($mode) {
case Zend_Cache::CLEANING_MODE_ALL:
return apcu_clear_cache('user');
break;
return apcu_clear_cache();
case Zend_Cache::CLEANING_MODE_OLD:
$this->_log("Zend_Cache_Backend_Apc::clean() : CLEANING_MODE_OLD is unsupported by the Apc backend");
break;
Expand All @@ -158,7 +157,6 @@ public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = [])
break;
default:
Zend_Cache::throwException('Invalid mode for clean() method');
break;
}
}

Expand Down Expand Up @@ -259,7 +257,7 @@ public function getIdsMatchingAnyTags($tags = [])
public function getIds()
{
$ids = [];
$iterator = new APCIterator('user', null, APC_ITER_KEY);
$iterator = new APCUIterator(null, APC_ITER_KEY);
foreach ($iterator as $item) {
$ids[] = $item['key'];
}
Expand Down
9 changes: 8 additions & 1 deletion library/Zend/Cache/Backend/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ public function save($data, $id, $tags = [], $specificLifetime = false)
$this->_recursiveMkdirAndChmod($id);
}
if (!is_writable($path)) {
$this->_log('Zend_Cache_Backend_File::save() : path ' . $path . ' is not writable');
return false;
}
}
Expand Down Expand Up @@ -1011,14 +1012,20 @@ protected function _filePutContents($file, $string)
$result = false;
$f = @fopen($file, 'ab+');
if ($f) {
if ($this->_options['file_locking']) @flock($f, LOCK_EX);
if ($this->_options['file_locking']) {
@flock($f, LOCK_EX);
}
fseek($f, 0);
ftruncate($f, 0);
$tmp = @fwrite($f, $string);
if (!($tmp === FALSE)) {
$result = true;
} else {
$this->_log("Zend_Cache_Backend_File::_filePutContents() : failed to write contents");
}
@fclose($f);
} else {
$this->_log("Zend_Cache_Backend_File::_filePutContents() : we can't obtain handle");
}
@chmod($file, $this->_options['cache_file_perm']);
return $result;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Cache/Backend/Static.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Zend_Cache_Backend_Static
*
* @param string $name
* @param mixed $value
* @return Zend_Cache_Backend_Static
* @return $this
*/
public function setOption($name, $value)
{
Expand Down
Loading
Loading