Commit graph

19632 commits

Author SHA1 Message Date
Juan Cruz Vincenti
84cfdfb0c3 Fix some PHP 8.1 deprecation warnings
* Fix passing null to str_replace and preg_replace in HttpSocket
* Fix dynamic props usage in ModelValidator
* Fix passing null to rawurlencode in CakeRoute
2024-01-11 23:02:17 +01:00
Kamil Wylegala
2eeb1f6476
Update README.md 2023-12-22 15:20:48 +01:00
Diego Surita
fa1f817be2 Fix passing null deprecation warning on CakeText::insert method
Warning message: `Deprecated (8192): preg_quote(): Passing null to parameter #1 ($str) of type string is deprecated [vendor/cakephp/cakephp/lib/Cake/Utility/CakeText.php, line 168]`
2023-12-22 15:19:51 +01:00
Kamil Wylegala
c646ba319d
Update README.md 2023-12-19 22:25:48 +01:00
Diego Surita
b4e0e7f080 Change Hash callback class reference on filter method 2023-12-19 22:24:08 +01:00
Diego Surita
7acb7c2938 Fix Hash class callback callable pattern deprecated 2023-12-19 22:24:08 +01:00
Diego Surita
e712b2da89 Fix dynamic property creation deprecation warning from CakeEvent class 2023-12-19 22:23:26 +01:00
Diego Surita
0b0ec3ef40 Fix dynamic property creation deprecation warning
There are many classes that create properties dynamically (Controller class for example).
2023-12-19 22:23:26 +01:00
Diego Surita
8473730ba2 Fix passing a null input to h function
Fix the following deprecation warning: Deprecated (8192): htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/basics.php, line 231]
2023-12-19 15:27:45 +01:00
Kamil Wylegala
219d13c0f0 Allowed dynamic properties in model. 2023-11-13 23:23:07 +01:00
Kamil Wylegala
bfe381539c
Update README.md 2023-11-02 09:38:50 +01:00
daris
1a06136cb0 Fix trying to read uninitialized properties when fetching call stack during exception handling
"Typed property ... must not be accessed before initialization" error was displayed instead of CakePHP error page with call stack
2023-11-02 09:32:49 +01:00
MassimoI
1cd99ff3e0 solving the named parameters incompatibility 2023-10-23 15:56:03 +02:00
Kamil Wylegala
a75b4166b5
Update README.md 2023-10-20 09:28:22 +02:00
Jan Pešek
0f1bb51402 fix: get rid of (some) PHP deprecation warnings
- RequestHandlerComponent might not have CONTENT_TYPE env set
- basics.php might not have SCRIPT_URI env set
2023-10-20 09:26:46 +02:00
Kamil Wylegala
41af03e193 Docker compose setup to run tests locally. 2023-10-19 23:25:34 +02:00
Kamil Wylegala
98ecc6cfc3 Removed usage of deprecated getKeys in favor of keys() from phpredis 2023-10-19 23:25:34 +02:00
Kamil Wylegala
78e22f161c
Update README.md 2023-09-18 19:34:56 +02:00
daris
5dbc22efd3 Fixed deprecation warning when parsing parameters in ShellDispatcher.php
PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in lib/Cake/Console/ShellDispatcher.php on line 295

It broke some behat tests for my project because PHP issued warning and then session has not been able to start correctly due to "Session cannot be started after headers have already been sent" error
2023-09-18 19:34:17 +02:00
Kamil Wylegala
b0200a75fa
Update README.md 2023-08-18 18:18:49 +02:00
Jan Pešek
cc74b59637 feat(#46): get rid of (some) PHP deprecation warnings
- use issets, default local var values, better/newer language constructs
2023-08-18 18:17:39 +02:00
Kamil Wylegala
de95041969
Fixed PHP 8.2 deprecation notices in CakeEvent class. (#43)
* Fixed PHP 8.2 deprecation notices in CakeEvent class.
2023-06-02 23:18:08 +02:00
Koji Tanaka
b5ebe993ad fix: Undefined TESTS constants cause the "cake bake project" command to exit with an error 2023-03-12 12:04:43 +01:00
Kamil Wylegala
8b5e4fc29d
Update README.md 2023-02-19 13:59:18 +01:00
Koji Tanaka
071b292969 docs: Comment on database.php about adding PDO::ATTR_STRINGIFY_FETCHES => true flag in PHP 8.1
Comment on how to set up when using PDO MySQL/SQLite driver with connection flags unspecified and PHP 8.1 to keep the type when retrieving integer/float columns.
2023-02-19 13:58:40 +01:00
Koji Tanaka
797b7e0a3c test: MysqlTest::testTinyintCasting() Use assertEquals for assertions as in other record-retrieval tests. 2023-02-19 13:58:40 +01:00
Koji Tanaka
747f9e3d13 test: Fixed improved return value of mocked PDO class exec() method.
Return value of PDO::exec() is the number of rows affected,
which is 0 for any of these method calls.
2023-02-19 13:58:40 +01:00
Koji Tanaka
7df7fefca4 test: Separate FormHelperTest::testSecuredFileInput() by PHP Version.
Added 'full_path' key
https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.core.upload-full-path-key
2023-02-19 13:58:40 +01:00
Koji Tanaka
9115ec765f test: Skip DebuggerTest::testExportVarRecursion() in PHP 8.1+.
PHP 8.1+, $GLOBALS no longer has $GLOBALS as an element.
2023-02-19 13:58:40 +01:00
Kamil Wylegala
ce3e0c35e5
Update README.md 2023-02-11 13:59:58 +01:00
Koji Tanaka
0489533600 test: Fixed expected value when float value is specified in DboSource::value() argument. 2023-02-11 13:58:44 +01:00
Koji Tanaka
ddd53dd874 test: Fixed PostgresTest::testAlterSchema()
The last few lines of PostgresTest::testAlterSchema() were added in the following commit. There was a problem, but the test succeeds in less than PHP 7.4.
6a4e7558fc (diff-bb8406239275388d1950fd590496d45d70b9e85b1c521ec75837e1138c9743d9)
In PHP 7.4+, after executing DboSource::dropSchema(), executing DboSource::alterSchema() raises a "Warning Error" and the test fails.
2023-02-11 13:58:44 +01:00
Koji Tanaka
ca2c909ac9 test: Restore if LC_NUMERIC is changed during testing.
Improved PostgresTest::testLocalizedFloats().
This test changes the locale (LC_NUMERIC) and restores it last. Therefore, if the test failed, subsequent tests referencing the locale could fail.
2023-02-11 13:58:44 +01:00
Kenshin Okinaka
0ec6365f9d Update .gitignore 2023-02-03 09:42:19 +01:00
Kenshin Okinaka
732ed00c63 Delete compser.lock 2023-02-03 09:42:19 +01:00
Kamil Wylegala
996066bae5 Changelog update. 2023-01-30 21:30:31 +01:00
Koji Tanaka
1d1750ae8c fix: PaginatorHelper::numbers() generates extra separator string in PHP 8.0+. 2023-01-30 21:28:56 +01:00
Kamil Wylegala
3d32e313c0 Changelog 2023-01-22 14:26:38 +01:00
Koji Tanaka
3acfb1da49 fix: Relative time may not be cached if specified in CacheHelper duration 2023-01-22 14:24:47 +01:00
Kamil Wylegala
1409ea3dda Changelog update. 2023-01-11 22:47:25 +01:00
Koji Tanaka
94f73e75e6 fix: Checking with get_magic_quotes_gpc() is no longer necessary. 2023-01-11 22:45:29 +01:00
Koji Tanaka
85452fd81c test: Skip test PaginatorHelperTest::testNumbers() 2023-01-11 22:45:29 +01:00
Koji Tanaka
3721b5bec2 test: Skip a part of test for Mysql
Some strings are not quoted correctly in PHP 8.0+.
2023-01-11 22:45:29 +01:00
Koji Tanaka
d21c18e079 test: Skip some tests for cache feature
If expiration date is specified as a relative time, there is a bug that prevents the test from being cached, so the test is skipped.
2023-01-11 22:45:29 +01:00
Koji Tanaka
f369064c7d test: In PHP 8.0+ DebuggerTest::testOutput() marked as incomplete. 2023-01-11 22:45:29 +01:00
Koji Tanaka
7baab67d65 fix: Fixed error generation in MootoolsEngineHelper::drop()
Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
2023-01-11 22:45:29 +01:00
Koji Tanaka
fb5e694ef7 fix: The get_magic_quotes_gpc function was removed in PHP 8.0, so check before calling it. 2023-01-11 22:45:29 +01:00
Koji Tanaka
cbf4682ad5 test: Change the test to match the behavior of the MailTransport class.
see: https://github.com/kamilwylegala/cakephp2-php8/pull/20

Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
2023-01-11 22:45:29 +01:00
Koji Tanaka
5ab5310120 test: Fixed FileTest::testPermission()
Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
2023-01-11 22:45:29 +01:00
Koji Tanaka
fd5f39df07 test: Fixed CakeNumberTest::testCurrencyFractionSymbol()
Change in behavior of == comparison operators in PHP 8.0 has revealed a bug in the test code.
 see: https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.core.string-number-comparision

 Co-authored-by: Kenshin Okinaka <okinakak@yahoo.co.jp>
2023-01-11 22:45:29 +01:00