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

Codeigniter 4 upgrade #3858

Open
wants to merge 276 commits into
base: master
Choose a base branch
from
Open

Codeigniter 4 upgrade #3858

wants to merge 276 commits into from

Conversation

jekkos and others added 30 commits November 1, 2023 00:51
* Initial setup in a new environment

The result of running the npm build and editing the .env file

* Revert "Initial setup in a new environment"

This reverts commit 23e06de.

* Language interpolation update

I have edited all the interpolations in the en-US tree. To be consistent in using named parameters and not just positional numbers, I also edited the relevant lines in two controllers (Sales.php and Items.php) to send named variables to the lang() calls. The language string 'Sales.invoice_number_duplicate' contains an interploation for 'invoice_number'. This is sent when used by Controllers/Sales.php, but not sent when used by Views/sales/form.php, which means that string will contain a double space where the invoice number should be. The language string 'Customers.csv_import_partially_failed' contains no interpolations but two parameters are not being sent where it is used by Controllers/Customers.php. The string appears to be a near duplicate of 'Items.csv_import_partially_failed' which contains two interpolations. Either the Customers controller needs to be edited, or the Customers language string needs to be revised to look like the Items string.

---------

Co-authored-by: objecttothis <[email protected]>
Added function remove_backup() to security_helper.php. Added a call to this from the two places that call check_encryption where the backup is created. Added more defensive code to Config.php to ensure the encrypter  objectexists before it is called to avoid a crash.
* reworked reports and listing page to handle lang() functions in CI_4

* removed old methods

* update code style

* updated bracket style

---------

Co-authored-by: objecttothis <[email protected]>
* CI4: Bugfix string interpolation language files

These are the language files with all placeholders converted to CI4 numbered style eg {0}.

* CI4: Bugfix string interpolation source code files

These are the controllers and views which call lang() with parameters to be interpolated.

* CI4: Bugfix string interpolation shell scripts

These are the Linux bash scripts which use the sed (stream editor) utility to convert earlier forms of placeholders to CI4 numeric type. A number of typographical errors in the original Language files were corrected by these scripts.
Adds 'payment_message' to the app_config table and corrects a typo in Views/login.php where 'Login.form' should have been 'login_form'.
Add a !empty test when dereferencing mailchimp_api_key and mailchimp_list_id from the config array.
- Bump composer.json/lock to codeigniter 4.4.3
- Fix base_url() call without arguments
- Updated files in the project space
- Bump composer.json/lock to kint 5.0.4
- Update composer.json to include missing CI elements
- Corrected composer.json regarding minimum versions
- Updated README.md to reflect CI4 implementation
- Migrated some Routes.php to Routing.php
- Removed deprecated settings from Config/App.php
- Deleted extra closing parenthesis
- String interpolation
- Removed TODO
- Reworked thumbnail creation for CI4
- Corrected capitalization in calling function URL
- Added send() to return the HTTP response
- Removed space
- Removed TODO
- Added TODO
- Removed TODOs
- String Interpolation
- Changed quotes in html to match the rest of code
jekkos and others added 14 commits May 4, 2024 10:24
Signed-off-by: objecttothis <[email protected]>
- Added TODO where we need to convert to querybuilder
- Converted to switch statement.
- Removed unnecessary local variable
- Replaced Qualifiers with imports
- Replaced isset() call with null coalescing operator
- Replaced strpos function calls in if statements with str_contains calls
- Removed unnecessary leading \ in use statement
- Replaced deprecated functions
- Updated PHPdocs to match function signature
- Added missing type declarations
- Made class variables private.
- Explicitly declared dynamic properties
- use https:// links instead of http://
- Fixed type error from sending null when editing transactions
- Fixed Search Suggestion function name in Employees, Persons, Suppliers controller
- Fixed function name on Receivings Controller

Signed-off-by: objecttothis <[email protected]>
- Removed completed TODOs
- Added TODOs and comments where needed.

Signed-off-by: objecttothis <[email protected]>
- Updated deprecated BS5 classes
- Throw errors in separate alert boxes and not as an <ul>
- Make error translatable
- Small updates/fixes
Fix controller method names
BudsieBuds and others added 12 commits May 13, 2024 13:41
Reflect changes in #3826
Updated Travis CI badge
Signed-off-by: objecttothis <[email protected]>
- Changes for following best practice for CI4 localization
- Norwegian and Urdu languages now working again
- Sort languages by alphabet in config
- Correct capitalization.
- Revert assignment to an invalid language code.
- Correct dynamic assignment in config singleton.

Signed-off-by: objecttothis <[email protected]>
- Replaced == with === to avoid type juggling
- Removed unneeded TODO
- Added HTMLPurifier to composer.json
- Added Service to allow singleton instance of purifier.
- Implemented use in Customer Controller Search function.

Signed-off-by: objecttothis <[email protected]>
Signed-off-by: objecttothis <[email protected]>
- Formatting
- Added calls to HTMLPurifier
- Added filtering
- Refactored out variable for clarity

Signed-off-by: objecttothis <[email protected]>
- Added @noinspection PhpUnused to AJAX-called functions to remove weak warning that the function is unused. This will be needed for the linter.
- Referenced where the function is called in the PHPdocs.
- Removed redundant transaction. batch_save() is already being run in a transaction.
- Fixed function name in controller and view.
- Removed form helper load because it's autoloaded.
- Corrected variable reference in Secure_Controller.php

Signed-off-by: objecttothis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeIgniter4 Issue relates to the conversion to CodeIgniter 4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants