Commit graph

33982 commits

Author SHA1 Message Date
Roland Häder f38ad168f5
Reverted and improved TODO:
------
@nupplaphil: There is no easy possibility to add a logger here, that's why there
isn't any yet and instead a placeholder.. This execution point is a critical
state during a testrun, and tbh I'd like to leave here no further logic (yet)
because I spent hours debugging cases, where transactions weren't fully closed
and strange/unpredictable errors occur (sometimes -mainly during debugging other
errors :) ...)
-----
2022-06-21 19:21:25 +02:00
Roland Häder 80c8ec17c2
Fixed documentation 2022-06-21 18:43:25 +02:00
Roland Häder 0332a57bfd
Rewrote to suggestions from @MrPetovan (I tried to maintain the old way of
['scheme' => 'table'] with my version).
2022-06-21 18:13:01 +02:00
Roland Häder 3b8d9a7248
Use protected $this->logger instead 2022-06-21 17:54:48 +02:00
Roland Häder 9ccb113530
Ops, autorun.sh is there but looks like lesser "multi-project" friendly as
MYSQL_* must be defined. I might still use my version as that is
project-specific.
2022-06-21 17:48:10 +02:00
Roland Häder dcedd2e5d9
Ops, WWORD ... 2022-06-21 13:54:03 +02:00
Roland Häder 5e57ad4d44
Added simple wrapper script to run PHPUnit tests for you. To use this, you need
to set at least 4 variables in your ~/.bashrc (recommended):

export FRIENDICA_MYSQL_HOST="localhost"
export FRIENDICA_MYSQL_DATABASE="friendica_test"
export FRIENDICA_MYSQL_USER="friendica_test"
export FRIENDICA_MYSQL_PASSWWORD="friendica_test"

Then you can put ./bin/dev/run_tests.sh into your .git/hooks/pre-commit file
2022-06-21 13:47:40 +02:00
Roland Häder 5fe428d3e4
Fixed:
- PHPUnit\Framework\Error\Notice:  Undefined index: language in /.../src/Util/EMailer/MailBuilder.php on line 122
2022-06-21 13:47:40 +02:00
Roland Häder a7651fa1d5
Changes:
- let's at least log the error message, yes it does flood your logfile
2022-06-21 13:47:40 +02:00
Roland Häder 1080a840f5
Changes:
- Database->$driver can no longer be NULL, an empty string is fine anyway
2022-06-21 13:47:39 +02:00
Roland Häder 945cd1a2c2
Fixed:
- since $table can be now schema.table, this needs being taken care off
- maybe this foreach(explode()) is a bit an overkill as only 1 or 2 entries
  can be found in it
2022-06-21 13:47:39 +02:00
Roland Häder 0d81a08e3c
WIP: Properly some fixes? Also why is DROP VIEW IF EXISTS is being killed? 2022-06-21 13:47:39 +02:00
Roland Häder 44a9ec9b17
Rewrite:
- avoid having array|string for $table to have a "string" type-hint for $table
- you now have to do it for yourself by giving 'schema.table' as parameter
2022-06-21 13:47:38 +02:00
Roland Häder f62c28008a
Removed comment 2022-06-21 13:47:38 +02:00
Roland Häder cefffde691
Changes:
- added type-hints
- added some missing documentation
2022-06-21 13:47:37 +02:00
Roland Häder f1867463a0
Changes:
- added more type-hints
2022-06-21 13:47:37 +02:00
Roland Häder 77c37ff2db
Fixed:
- Uncaught Exception TypeError: "Argument 3 passed to
  Friendica\Protocol\DFRN::createActivity() must be of the type string, null
  given, called ..."
2022-06-21 13:47:37 +02:00
Hypolite Petovan e6ddb167f6
Merge pull request #11664 from tobiasd/20220621-fr
update FR translations THX kalon33
2022-06-21 07:43:12 -04:00
Tobias Diekershoff 4650ff53d9
Merge pull request #11662 from MrPetovan/bug/11661-splitattachment-null
Ensure parameter 4 of Post\Media::splitAttachment is a boolean value
2022-06-21 06:48:52 +02:00
Tobias Diekershoff fff6e30782
update FR translations THX kalon33 2022-06-21 06:45:14 +02:00
Hypolite Petovan d2ca812647
Merge pull request #11660 from Quix0r/fixes/more-type-hints-003
More type-hints - Batch 003
2022-06-20 21:53:17 -04:00
Roland Häder 3e522ed512
Fixed:
- prevent NULL from being handled over to XML::escape()
- still I wonder that an object can be? It is a string-only accepting method
2022-06-21 01:42:37 +02:00
Roland Häder 95f9eb34ac
Fixed indenting 2022-06-21 01:29:33 +02:00
Hypolite Petovan ee9bc338a5
Merge pull request #11663 from Quix0r/composer/upgrade
Updated composer.phar
2022-06-20 19:17:13 -04:00
Roland Häder b6fa022a73
Changes:
- added type-hints
- added some documentation
- marked some generic methods to be moved to Util\Strings class instead
2022-06-20 23:50:24 +02:00
Roland Häder 6a98ffa330
Updated composer.phar 2022-06-20 22:55:21 +02:00
Roland Häder fbae0b8bcf
Changes:
- renamed ItemArrayFromMail() to getItemArrayFromMail() to follow naming-convetion
- added missing type-hints
- added missing documentation
2022-06-20 21:22:46 +02:00
Roland Häder ea22e88896
Added documentation 2022-06-20 21:02:34 +02:00
Roland Häder 752953e472
Changes:
- as @MrPetovan pointed out, $actor can be NULL earlier and used later as NULL
- added some missing type-hints
- added missing documentation
- the added @TODO points out to avoid true|false|null for a boolean
2022-06-20 21:00:19 +02:00
Hypolite Petovan 88eacbf66e Ensure parameter 4 of Post\Media::splitAttachment is a boolean value 2022-06-20 14:34:02 -04:00
Roland Häder 0c12e947dd
Changes:
- null was 2nd argument's value before, an empty string is basically the same here
2022-06-20 20:01:59 +02:00
Roland Häder feb87e8dc3
Changes:
- let's start throwing exceptions on e.g. invalid arguments instead of returning
  FALSE
2022-06-20 19:09:08 +02:00
Roland Häder 4fb03cf163
Changes:
- fixed a null value handled over to Friendica\Model\APContact::getByURL()
- added missing type-hints
2022-06-20 19:05:02 +02:00
Roland Häder e96a548286
Changes:
- dumped default value for $input
- added unknown 'platform' which prevents an "Undefined index: platform in
  /var/www/.../src/Model/GServer.php on line 940" error
2022-06-20 18:56:22 +02:00
Roland Häder e5cc7a5ab1
Fixes:
- Strings::isHex() should not be misused for checking on NULL
2022-06-20 08:25:45 +02:00
Roland Häder 6743de63f5
Changed:
- DBA::exists() should only be used for checking if records exists.
- if you want to check if a table exists, please ALWAYS use
  DBStructure::existsTable() instead
2022-06-20 08:20:07 +02:00
Roland Häder cc750d743b
Changes:
- some methods now need to return bool to be compatible
- added some missing type-hints
2022-06-20 08:12:54 +02:00
Roland Häder 9c80dd35e5
Both declarations must be the same 2022-06-20 08:07:12 +02:00
Tobias Diekershoff 13a5a30b28
Merge pull request #11659 from MrPetovan/bug/11511-relocate-quote-identifier
Add missing identifier quote in Database->replaceInTableFields
2022-06-20 06:26:33 +02:00
Roland Häder cd3b01fd82
Changed:
- cannot have type-hints :-(
2022-06-20 03:48:34 +02:00
Roland Häder 94a594eeb2
Ops, wrong type-hint 2022-06-20 03:36:36 +02:00
Roland Häder ec96f2252e
Changes:
- added type-hints
- added some missing documentation
2022-06-20 03:10:23 +02:00
Roland Häder 14bf72e4fe
Changes:
- added some documentation
- added type-hints
2022-06-20 02:48:05 +02:00
Roland Häder 97904ea7dd
Changes:
- added type-hints
- added missing documentation
2022-06-20 02:48:02 +02:00
Roland Häder a0c8fc6d6e
Changes:
- added more type-hints
2022-06-20 02:48:02 +02:00
Hypolite Petovan 7528b79469
Merge pull request #11657 from Quix0r/fixes/post-media-size-bigint
Size "mediumint" wasn't enough
2022-06-19 20:23:29 -04:00
Hypolite Petovan d48e40c1bf Add missing identifier quote in Database->replaceInTableFields
- This caused hyphenated table names to fail the replace query
2022-06-19 20:06:12 -04:00
Roland Häder d276f2c62b
Changes:
- added type-hints
- changed some double-quotes to single
2022-06-20 01:00:29 +02:00
Roland Häder 8c38265b37
Changes:
- `url` to `varbinary(1024)`
 - `preview` to `varbinary(512)`

as the previous once (half length) were not enough in real-life scenarios
2022-06-19 23:09:29 +02:00
Roland Häder 2512449751
Incremented again 2022-06-19 15:36:16 +02:00