This repository was archived by the owner on May 21, 2021. It is now read-only.
TracyPanels Template, User (with SESSION), SQL statements added#4
Merged
Conversation
Added also LogMysqli.php that wraps \mysqli with logging and now with SQL statement gathering for TracyPanel (LogMysqli.php Class may be therefore removed from projects)
crs2
approved these changes
Feb 23, 2018
GodsDev
added a commit
that referenced
this pull request
Oct 30, 2020
…int is expected is the right correction (Tools::htmlTextarea) * Tools related issues fixed in Tools branch feature/phpstan-corrections * TODO composer.json: return stable Tools version
Merged
GodsDev
added a commit
that referenced
this pull request
Nov 15, 2020
Code governance
* phpunit is only require-dev, so `webmozart/assert` MUST be required in the `composer.json` of this application
* Check composer --no-dev dependencies
* build.sh set Executable bit (+x) to fix Warnings found in [bash-exec] linter! [WARN ] Error: File:[/github/workspace/build.sh] is not executable
* CustomFilters::webalize renamed because Method name "CustomFilters::webalize_" is not in camel caps format
* context['article'] to context['content'] for article.latte
* .gitignore: .php_cs.cache
* PHPUnit: error_reporting(E_ALL); // incl E_NOTICE
* change of author email rejthar@stanislavrejthar.com
* bump version "godsdev/tools": "^0.3.7
* bump version backyard/3.2.9 ("minimum-stability": "stable")
* gitignore cache
* forgotten HOME_TOKEN settings hinted by PHPUnit
* phplint.yml uses actions/checkout@v2 version as well
* main branch (will replace `master` branch in due time)
* dist/build.sh: To work on low performing environments, the script accepts number of seconds as parameter to be used as a waiting time between steps.
* PHP/5.6 tested and PHP/7.2 tested
Code changes and various minor bugs fixes
* TableAdmin.php: Localised field content\\url_## has language independant behaviour
* TableAdmin.php: TRANSLATIONS are defined through constructor, uses web app config
* LogMysqli: int instead of bool Parameter #2 of method GodsDev\MyCMS\LogMysqli::query() so that it is compatible with method GodsDev\Backyard\BackyardMysqli::query()
* MyAdmin: definition of properties $ASSETS_SUBFOLDERS, $agendas instead of their definition in dist/classes/Admin.php
* MyAdmin: Method GodsDev\MyCMS\MyAdmin::projectSpecificSections() invoked with 1 parameter, 0 required.
* MyAdminProcess: fix type Tools::addMessage($result['success'], $result['messages']); (instead of message)
* MyAdminProcess: $salt = mt_rand((int) 1e8, (int) 1e9); (Fix: mt_rand expects int, float given)
* MyTableAdmin: removed __construct as it only duplicated parent
* MyTableLister::viewInputs - $option typo changed to $options
* fix MyCMSMonoLingual::csrfStart: Parameter #1 $min and #2 $max of function rand expects int, float given.
* fix MyController Access to an undefined properties GodsDev\MyCMS\MyController::$language and GodsDev\MyCMS\MyController::$requestUri.
* fix MyCMSMonoLingual Result of (!is_object($this->logger) || !($this->logger instanceof LoggerInterface)) is always false.
* fix type for MyAdminProcess::$tableAdmin
* fix MyTableLister::setTable throw new \RunTimeException
* fix TableAdmin: LogMysqli database object instead of vanilla \mysqli
* LogMysqli::query does not throw \DBQueryException as it logs troubles instead
* LogMysqli::query @return \mysqli_result Object|false
* MyTableLister::viewTable argument \mysqli_result $query (instead of \mysqli)
* TableAdmin::customSave - typecast to fix parameter #1 $input of function str_pad expects string, int given.
* AdminProcess::adminProcess - fix Binary operation "+" between string and (float|int) results in an error. Parameter #1 $input of function str_pad expects string, (float|int) given.
* config.php: fix Parameter #2 $newvalue of function ini_set expects string, int given.
* fix MyFriendlyUrl::PAGE_NOT_FOUND - Visibility must be declared on all constants if your project supports PHP 7.1 or later
* fix MyFriendlyUrl - The first trait import statement must be declared on the first non-comment line after the class opening brace
* fix MyAdminProcess::processFilePack - Parentheses must be used when instantiating a new class (\ZipArchive)
* Parentheses must be used when instantiating a new class: MyCMSMonoLingual::renderLatte, MyAdminProcess::processFileUnpack
Code style
* PHP linter and super-linter for GitHub Actions
* $this->tableAdmin everywhere instead of $this->TableAdmin or $TableAdmin
* markdown lint README.md: MD010/no-hard-tabs, MD009/no-trailing-spaces, MD014/commands-show-output, MD025/single-title/single-h1, MD040/fenced-code-language, MD009/no-trailing-spaces, MD037/no-space-in-emphasis
* VALIDATE_CSS: false (stylelint seems to evaluate sass the same way as CSS; `.stylelintignore` prepared for future use)
PHPStan
* recommended fixes to PHPDocs
* removal of wrong code
* phpstan include structure (mycms includes dist, github/phpstan includes local; when PHPStan test dist/ as part of MyCMS, it knows the GodsDev\\MyCMS\\* classes, so they should be ignored only if dist/ lives in its own project)
* ignoreErrors references to 3rd library objects
* reasonable ignoreErrors exceptions
* dynamicConstantNames instead of constant induced exceptions
* some mixed type hints replaced with more specific ones
* discovering-symbols, e.g. conf/constants.php: Predefining constants for PHPSTAN analysis as recommanded by <https://phpstan.org/user-guide/discovering-symbols>
PHPCS
* 120 chars limit enforced
* multi-line control structure
* loosen rules where it makes sense
TODO fix (CRS2)
* MyTableAdmin: the right correction is replacing #3 $cols and #4 $rows false,false by 60,5 as int is expected?
* MyTableLister: addPage() invoked with 6 parameters, 3-5 required; Parameter #1 $types of method GodsDev\MyCMS\MyTableLister::filterKeys() expects array, string given
Authored-by: Stanislav Rejthar, rejthar@stanislavrejthar.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added also LogMysqli.php that wraps \mysqli with logging and now with SQL statement gathering for TracyPanel (LogMysqli.php Class may be therefore removed from projects)