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

Feature: CodeIgniter 4 upgrade #3592

Closed
wants to merge 641 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
641 commits
Select commit Hold shift + click to select a range
52c8511
CI4 fixes
objecttothis Dec 5, 2022
91d8d68
Moving sql scripts to new location
objecttothis Dec 5, 2022
99bd8f7
Validation for login
objecttothis Dec 5, 2022
f490200
Bugfixes
objecttothis Dec 6, 2022
7d41d7b
string interpolation fix
objecttothis Dec 6, 2022
29c9bd8
Bugfixes
objecttothis Dec 6, 2022
977be7a
Debugging routes
objecttothis Dec 6, 2022
c6a696f
Changes for CI 4.2.10
objecttothis Dec 9, 2022
4d94437
Changes for CI 4.2.10
objecttothis Dec 9, 2022
1e88ff9
Corrected typos
objecttothis Dec 9, 2022
6895729
Upgraded composer packages
objecttothis Dec 9, 2022
bdbc860
Upgrade to CI 4.2.10
objecttothis Dec 9, 2022
3a37863
Upgrade to CI 4.2.10
objecttothis Dec 9, 2022
c3e73aa
Package versions
objecttothis Dec 9, 2022
86cc3d9
Remove incompatible package
objecttothis Dec 9, 2022
cb073e4
fixed extra comma
objecttothis Dec 9, 2022
666c7d9
Package updates for compatibility
objecttothis Dec 9, 2022
016912d
Updated .htaccess files
objecttothis Dec 10, 2022
e4c4b0d
Updated .htaccess files
objecttothis Dec 10, 2022
e3647c3
Update language strings to CI4 format
objecttothis Dec 10, 2022
c5f8b21
Update language strings to CI4 format
objecttothis Dec 10, 2022
f994d5e
Update language strings to CI4 format
objecttothis Dec 10, 2022
6401dda
Added +SymLinksIfOwnerMatch for security
objecttothis Dec 10, 2022
82cb308
Moved Options higher in the htaccess
objecttothis Dec 10, 2022
658d510
Consolidate and move options to the top
objecttothis Dec 10, 2022
1df52d1
CI4 related fixes
objecttothis Dec 10, 2022
03e5092
upgrade spark to latest 4.2.10
objecttothis Dec 10, 2022
2e6d54e
Update Composer to CI 4.3.1
objecttothis Jan 26, 2023
82a03e7
Match some composer.json entries to CI4
objecttothis Jan 26, 2023
4e7b114
CI4 4.3.1 upgrade
objecttothis Jan 26, 2023
8c7f5c1
CI4 4.3.1 upgrade
objecttothis Jan 26, 2023
2fe2a3d
Added missing file and updated composer.lock
objecttothis Jan 27, 2023
04a08f2
Migrations changes
objecttothis Jan 27, 2023
b42a1a9
Added required defaults to app\Config\Email.php
objecttothis Jan 27, 2023
4d6a3cc
CI4 updates
objecttothis Jan 27, 2023
3831503
Renamed index to getIndex in Controllers
objecttothis Jan 27, 2023
dd7e2f7
Setting Routes
objecttothis Jan 27, 2023
0fad576
Correct redirect() calls to CI4 format
objecttothis Jan 30, 2023
d7a3bc2
Fixed index() naming
objecttothis Jan 30, 2023
936ccb9
Bug Fixes
objecttothis Jan 30, 2023
80cabb5
Convert $this->load->vars() to CI4
objecttothis Jan 30, 2023
fa1f4af
Login functionality
objecttothis Jan 30, 2023
bbb8703
Added .editorconfig
objecttothis Jan 30, 2023
2a7ce12
Converted space indentation to tab
objecttothis Jan 30, 2023
6a9b334
Corrected formatting of login.php view
objecttothis Jan 30, 2023
70f49ac
Fixed migration version check
objecttothis Jan 30, 2023
832e36e
Removed MY_Validation.php
objecttothis Feb 2, 2023
925691e
Temporarily disabling CSRF until we can figure out what parts need to…
objecttothis Feb 2, 2023
3442d81
Fixed Login Validation
objecttothis Feb 2, 2023
cdcc858
Updated PHPDoc
objecttothis Feb 2, 2023
d6d7b7a
Convert migrations table to CI4 format
objecttothis Feb 2, 2023
cdb21d3
Migrations fixes
objecttothis Feb 3, 2023
1a0e5b9
Migrations fixes
objecttothis Feb 4, 2023
62b47a5
Migrations fixes
objecttothis Feb 4, 2023
86395a6
Moved pre-automated migrations scripts
objecttothis Feb 4, 2023
dd31231
Updated the CI4 migrations conversion script
objecttothis Feb 4, 2023
caf3118
migrations table migration to CI4
objecttothis Feb 5, 2023
98d1904
Fixed bug in CI4 conversion functionality
objecttothis Feb 5, 2023
ec14d6d
Return int in get_current_version()
objecttothis Feb 5, 2023
f1054f3
moved base scripts to a place that makes more sense
objecttothis Feb 6, 2023
c774c1d
Bump dependencies
objecttothis Feb 6, 2023
5d3a8aa
Bump dev dependencies
objecttothis Feb 6, 2023
493289d
Removed vlucas\dotenv.
objecttothis Feb 6, 2023
dfa5038
Adjust the build config to allow building the CI4 branch.
SteveIreland Feb 7, 2023
e1fb285
Formatting
objecttothis Feb 7, 2023
a5d01ae
Corrected the schema of the sessions table
objecttothis Feb 7, 2023
558bef7
Sessions issues. Not fixed yet.
objecttothis Feb 7, 2023
33b0642
Bump dompdf/dompdf from master
objecttothis Feb 7, 2023
7b3a4bb
Bump dompdf/dompdf and picquer dependencies
objecttothis Feb 7, 2023
08b4421
Removed dependency vulnerabilities.
objecttothis Feb 7, 2023
3b46d1c
Added npm-check-updates as a dev-dependency.
objecttothis Feb 7, 2023
f129e2f
Fixed CSS in Login view
objecttothis Feb 7, 2023
744f7cf
Fixed CSS in Login view
objecttothis Feb 7, 2023
e5c0fb2
Fixed CSS in Login view
objecttothis Feb 7, 2023
af14768
Fixed bug preventing view data being passed
objecttothis Feb 8, 2023
17f4a68
Fixed getUri Segment bug
objecttothis Feb 8, 2023
88c7b11
Fixed Commit_sha1 not being found
objecttothis Feb 8, 2023
c1c4fe2
fixed language line in en-US
objecttothis Feb 8, 2023
8dd0f41
fixed menu image file references
objecttothis Feb 8, 2023
b5c36f9
Match model function signatures to parent
objecttothis Feb 9, 2023
f0acd50
Match model function signatures to parent
objecttothis Feb 9, 2023
5022bfa
Added calls to helpers
objecttothis Feb 9, 2023
d83a19a
Fix decryption
objecttothis Feb 10, 2023
cd96e42
Fix SQL
objecttothis Feb 10, 2023
6e3af91
Fix incorrect function calls
objecttothis Feb 10, 2023
9aec0b4
Fix incorrect function calls
objecttothis Feb 10, 2023
271d146
Fix incorrect function calls
objecttothis Feb 10, 2023
bc8c3fd
Simplified boolean comparisons
objecttothis Feb 10, 2023
d408675
Fixed sale->update() signature
objecttothis Feb 10, 2023
628c047
Simplified code
objecttothis Feb 11, 2023
e508ab8
Typos and correcting variable
objecttothis Feb 11, 2023
dcf1bbb
CI4 updates
objecttothis Feb 11, 2023
7b7de41
Caching of ospos_app_config
objecttothis Feb 12, 2023
29997d9
Simplified business logic
objecttothis Feb 12, 2023
b149ae6
Reduce calls to config('OSPOS') for speed.
objecttothis Feb 12, 2023
2db77b9
Remove unused function
objecttothis Feb 13, 2023
b041f8f
rawurlencode/decode cache data
objecttothis Feb 13, 2023
bde3cb2
Replaces calls to config('OSPOS') in views
objecttothis Feb 13, 2023
2dd8a62
Replaces calls to config('OSPOS')
objecttothis Feb 13, 2023
9dc9856
Fixed undefined variable before use.
objecttothis Feb 14, 2023
854b58c
fixed css references
objecttothis Feb 14, 2023
d276f99
Autoload cookie helper
objecttothis Feb 17, 2023
dd73099
Removed commented code
objecttothis Feb 17, 2023
2150e4d
Fix encryption and missing call
objecttothis Feb 17, 2023
f0898f3
Fix for incorrect link generation
objecttothis Feb 17, 2023
f3bd534
Added missing initialization of stock_location model
objecttothis Feb 17, 2023
067fd99
Work on language line generation for reports.
objecttothis Feb 17, 2023
319205d
Fixed default language_code
objecttothis Feb 18, 2023
86b47c3
Fix login so that it redirects after migration
objecttothis Feb 18, 2023
03872f0
Working on encryption
objecttothis Feb 18, 2023
7594439
commented out code causing infinite loop.
objecttothis Feb 18, 2023
e8b7f22
Added CI3's encryption class as a library
objecttothis Feb 18, 2023
7d78eec
Fix CI4/CI3 encryption compatibility
objecttothis Feb 19, 2023
7738242
Encryption
objecttothis Feb 24, 2023
6126483
Added allowedFields to models
objecttothis Feb 25, 2023
dd3b733
Added protected fields for CI4 models
objecttothis Feb 25, 2023
00955b0
Model fixes
objecttothis Feb 25, 2023
51f8910
This revises the build process to handle grunt components requiring t…
SteveIreland Feb 26, 2023
bd91576
The first of many tweaks to the reworked build process. This correct…
SteveIreland Feb 26, 2023
8a1e4b2
Convert encryption to CI4
objecttothis Feb 27, 2023
78cfe92
Convert encryption to CI4
objecttothis Feb 27, 2023
d8d82aa
Mostly clean up the build documentation, but also corrects an error i…
SteveIreland Feb 28, 2023
32192b9
CI4 bugfixes
objecttothis Feb 28, 2023
715275b
Added missing stock_location model reference
objecttothis Feb 28, 2023
32ba4a9
Remove grunt045 from zipped opensourcepos file. Also fix the call to…
SteveIreland Mar 1, 2023
706adf4
This commit addresses the scenario where encryption fails when the va…
SteveIreland Mar 2, 2023
026ac25
Restore the logout behavior so that when logout is clicked then the u…
SteveIreland Mar 3, 2023
63b0068
Sales MVC
objecttothis Mar 3, 2023
c990bb2
Tack on the void return type onto the Employee:logout method.
SteveIreland Mar 3, 2023
b23573d
Clone .env to have clean version in case the repository version accid…
SteveIreland Mar 5, 2023
d0ddf79
jQuery was one of three javascript files that were not being built co…
SteveIreland Mar 8, 2023
ac10b61
If in development mode use the non-minimized verson of the java and c…
SteveIreland Mar 8, 2023
750b2af
A touch of "standards compliance" cleanup.
SteveIreland Mar 8, 2023
eb31313
This resolve the issue of the tables not being rendered by removing t…
SteveIreland Mar 8, 2023
a9e4283
I believe this batch of changes resolves numerous CI4 related issues …
SteveIreland Mar 12, 2023
7cb4c3e
Correct some experimental code.
SteveIreland Mar 12, 2023
3ec33b6
Correct some experimental code.
SteveIreland Mar 12, 2023
f03c75d
More search corrections
SteveIreland Mar 12, 2023
512baf7
Never program while your wife is trying to have a serious discussion …
SteveIreland Mar 12, 2023
80b893a
Corrected model search method naming and added defaults for parameter…
SteveIreland Mar 14, 2023
c5180ab
Primary changes return type from ResultSet to int for those requests …
SteveIreland Mar 16, 2023
0ce73cc
These minor changes were needed to get to the point where the Item fo…
SteveIreland Mar 17, 2023
022b2b0
Making these changes allowed me to actually add a new customer. It w…
SteveIreland Mar 22, 2023
a207539
Slightly more progress on customer maintenance.
SteveIreland Mar 24, 2023
9ee7b8f
This commit appears to fix customer deletes and updates.
SteveIreland Mar 25, 2023
c564deb
This commit renames the get_row ajax call to getAjaxRow in order to l…
SteveIreland Mar 25, 2023
b707677
Bulk Controller changes.
SteveIreland Mar 25, 2023
1863db9
Bulk Model changes.
SteveIreland Mar 25, 2023
e45dd10
Bulk View changes.
SteveIreland Mar 25, 2023
2288011
A few additional tweaks for customer maintenance
SteveIreland Mar 25, 2023
8cbc915
A few tweaks for item maintenance
SteveIreland Mar 25, 2023
ddc9769
It started to seem a little silly and a waste of time to try to keep …
SteveIreland Mar 25, 2023
9c94964
This reworks some things in customer and item maintenance to improve …
SteveIreland Mar 25, 2023
30bf976
Remove a debug statement.
SteveIreland Mar 25, 2023
34ee5cc
More pogress on Item Maintenance.
SteveIreland Mar 25, 2023
c70fcdb
Refactored the empty object initialization to make it easier to clone…
SteveIreland Mar 26, 2023
7da6aef
Minor item maintenance changes. Cleaning up so I can restart fresh f…
SteveIreland Mar 26, 2023
9826e54
Removed problematic calls to site_url function.
SteveIreland Mar 28, 2023
54416ae
This cleans up a few more things.
SteveIreland Mar 30, 2023
cc604c2
This cleans up a few more things in the area of giftcards.
SteveIreland Mar 31, 2023
5d9eaa4
This got me to the point where I could add an item to a sale.
SteveIreland Apr 1, 2023
71b68a0
For #3698, this commit gets me to the point where I can add, change a…
SteveIreland Apr 2, 2023
d879ab6
update int(1) columns in `_customers` and `_cash_up` tables to use ti…
0x85dotdev Apr 2, 2023
fbd4e37
Restore the tables.sql to its virgin state.
SteveIreland Apr 4, 2023
b5f67ae
For #3730, some progress made on configuration maintenance. More rem…
SteveIreland Apr 5, 2023
35c1ffe
Removes a character that magically appeared out of nowhere.
SteveIreland Apr 5, 2023
badc390
For #3730. Discovered that saving the mailchimp credentials without a…
SteveIreland Apr 6, 2023
ee21f2a
For #3730. Made more changes to get configuration panels working.
SteveIreland Apr 7, 2023
961419b
For #3730. Fix issue raised by @odiea and cleaned up the checkboxes o…
SteveIreland Apr 7, 2023
fa38042
For #3730. More minor corrections to issues found during testing.
SteveIreland Apr 8, 2023
47e2501
For #3730. This corrects errors I encountered doing attribute configu…
SteveIreland Apr 9, 2023
0bfa56f
For #3730. This fixes the inability to add a TEXT field to an item.
SteveIreland Apr 9, 2023
47f4193
For #3730. This replaces FILTER_SANITIZE_STRING with FILTER_SANITIZE_…
SteveIreland Apr 9, 2023
3154b61
For #3730. Prototype of item maintenance changes.
SteveIreland Apr 10, 2023
6ffca6c
For #3730. @odeia raised a couple of issues that needed to be fixed.
SteveIreland Apr 11, 2023
3668f3c
For #3730. This adds a migration script to preload required configura…
SteveIreland Apr 13, 2023
294c6a9
For #3734. This drops the unique index on customer.account_number and…
SteveIreland Apr 13, 2023
ae1eebe
For #3730. Another save by @odiea.
SteveIreland Apr 14, 2023
29fabc0
For #3739. Removed unnecessary escaping from customer maintenance.
SteveIreland Apr 15, 2023
2847d36
For #3732. Fixes for reported item maintenance issues.
SteveIreland Apr 15, 2023
2fbc9a4
For #3739. More adjustments for removing esc()
SteveIreland Apr 16, 2023
1f52958
For #3739. More adjustments for removing esc()
SteveIreland Apr 16, 2023
95ba062
Trying my hand at cherry picking master changes into CI4.
awriel Apr 12, 2023
9b80811
For #3698. I'm pleased to announce that this set of changes seems to …
SteveIreland Apr 21, 2023
b3678ba
For #3698. Cleanup Attribute.php
SteveIreland Apr 21, 2023
f7b9c3b
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 21, 2023
1ab8c95
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 23, 2023
d92225c
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 24, 2023
3bcddd6
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 26, 2023
3c931a9
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 27, 2023
e7218b2
For #3741. Manual migration of commits from master to branch through …
SteveIreland Apr 28, 2023
65c85ab
Merge remote-tracking branch 'origin/ci4-upgrade' into ci4-upgrade
SteveIreland Apr 28, 2023
836ffaf
Fixes #3749. This seems to resolve issues with employee maintenance. …
SteveIreland Apr 28, 2023
9353600
For #3749, added the exit() statement after the header was updated.
SteveIreland May 1, 2023
01c129e
Bump docker base image to php8
jekkos May 1, 2023
f6a5b0b
Revert compose file to v2 (#3754)
jekkos May 7, 2023
6b8e267
Save Gulp in preparation for migrating these changes over to the ci4 …
SteveIreland May 27, 2023
1cdefef
With this commit we are moving from bower and grunt to gulp in order …
SteveIreland May 29, 2023
c143c35
Fix favicon path in header.php
SteveIreland May 30, 2023
9ee0bb1
In Token_lib change App\Models\tokens\Token to App\Models\Tokens\Toke
SteveIreland May 31, 2023
97dfdf2
setAttribute should be setTextAttribute for a group separator symbol.
SteveIreland Jun 4, 2023
43781c8
Add fabrication of database.sql to gulp build.
SteveIreland Jun 6, 2023
bef33fa
Resolved various issues with item kit maintenance, one of which was r…
SteveIreland Jun 10, 2023
13e0011
Resolved a couple of issues with the Reports panel, one of which was …
SteveIreland Jun 11, 2023
c8af68f
Update .travis.yml
jekkos Jun 11, 2023
54ee2dd
Update node image name (#3584)
jekkos Jun 11, 2023
5ef3717
Add back database Dockerfile (#3584)
jekkos Jun 11, 2023
3f87a92
Fix path to database (#3584)
jekkos Jun 11, 2023
7812626
Add tag to sqlscript image (#3584)
jekkos Jun 11, 2023
2f3bde3
Use ci4 composer image (#3584)
jekkos Jun 11, 2023
17d7b74
Update compose files (#3584)
jekkos Jun 12, 2023
9a615fa
Set dev container to development mode (#3584)
jekkos Jun 12, 2023
b9af9df
Set CI_ENVIRONMENT in compose files
jekkos Jun 12, 2023
5ec5c69
Set default hostname to localhost (#3584)
jekkos Jun 13, 2023
091614e
Add privileged flag to node (#3584)
jekkos Jun 13, 2023
958a93b
Add missing whitespace (#3584)
jekkos Jun 14, 2023
92e064d
Fix ownership of /app (#3584)
jekkos Jun 14, 2023
7e85cb1
Remove package update for now (#3584)
jekkos Jun 14, 2023
f323ec0
Enable apt update again (#3584)
jekkos Jun 16, 2023
4429e48
Bump docker base image (#3584)
jekkos Jun 16, 2023
218e825
Do not install openssl (#3584)
jekkos Jun 20, 2023
00f54ef
Simplify docker config (#3584)
jekkos Jun 20, 2023
ab8989c
Correct dockerignore to pick up changes to path folder names.
SteveIreland Jun 25, 2023
8db87fd
In dev mode, allow blank root password.
SteveIreland Jun 25, 2023
60c8ef5
Revert to last working Dockerfile (#3584)
jekkos Jun 25, 2023
be8584c
Move first stage to different image (#3584)
jekkos Jun 26, 2023
71df876
Sync language files with master (#3468)
jekkos Aug 27, 2023
0fcf041
added note about intl
objecttothis Sep 5, 2023
68c6fd4
Reinstate en-US files (#3468)
jekkos Sep 5, 2023
2115abe
CI4: string interpolation changes (#3811)
owlbrudder Sep 8, 2023
d1f945b
Correct some anomalies around bootstrap_tables_locale.php (#3817)
owlbrudder Sep 13, 2023
1067e68
Handle missing mailchimp api key (#3816)
owlbrudder Sep 16, 2023
a78f897
Ci4 enhancement use writable backup (#3815)
owlbrudder Sep 19, 2023
4a0cf52
Add CI4 coding standards linter
jekkos Sep 19, 2023
f9277ee
CI4: Bugfix - add function to remove .env.bak issue #3826
owlbrudder Sep 21, 2023
7b9be20
CI4: Bugfix to login.php (#3830)
owlbrudder Sep 23, 2023
821bdc8
CI4: Bugfix correct the removal of env backup
owlbrudder Sep 24, 2023
2628487
Clean up work on reports listing view and lang() methods (#3707)
edwinbsmith Sep 29, 2023
5ef2608
Ci4 bugfix string interpolation (#3836)
owlbrudder Oct 4, 2023
3db105c
Add CI4 language migration scripts (#3468)
jekkos Oct 14, 2023
9993e2d
Sync language files with master (#3468)
jekkos Oct 14, 2023
7a92e76
CI4: Bugfix to correct two config issues
owlbrudder Oct 19, 2023
850bdf4
CI4: Bugfix test sanity of config item
owlbrudder Oct 19, 2023
5fbbccf
Corrected keys for Bootstrap_tables.php
objecttothis Oct 31, 2023
1a1497c
Bump to allow php 8.1
objecttothis Oct 31, 2023
022a9ba
Fix Company logo location
objecttothis Oct 31, 2023
27a8c62
Fix Company logo location
objecttothis Oct 31, 2023
b212533
Fix item_pics
objecttothis Oct 31, 2023
246ea27
Fixed incorrect language line
objecttothis Oct 31, 2023
36fc66f
Replaced BASEPATH with FCPATH
objecttothis Nov 2, 2023
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
  •  
  •  
  •  
6 changes: 1 addition & 5 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"directory": "public/bower_components",
"scripts": {
"postinstall": "grunt default genlicense",
"postuninstall": "grunt default genlicense"
}
"directory": "public/resources"
}
6 changes: 4 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
tmp
application/config/email.php
app/Config/Email.php
*.patch
patches/
.idea/
Expand All @@ -16,4 +16,6 @@ git-svn-diff.py
*~
*.~
*.log
application/sessions/*
app/writable/session/*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense indeed, you're tesing the docker setup?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You caught me. :-) Yes. I've spent most of this weekend learning Docker, Linux, and trying to make sense of all of the build scripts so that I can help out. I can clean up the obvious stuff, but a lot of it still doesn't make sense or seems overly complicated - but, no doubt that is due to not knowing what I'm doing. I was able to get the mariadb container running, but I was getting three script failures on the ospos container. I just noticed that you made some changes, so I'll pull those and try again, and hopefully have better luck tomorrow. Been reading the docker documentation to get a better grip on how things tie together.

Copy link
Member Author

@jekkos jekkos Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool great to hear, I thought I was almost done here but it seems something weird is going on with the travis build, I thought perhaps I'll temporarily build the base image (debian, php and apache) locally and push that, then add the CI4 code to it in the travis build. That will save us build credits but we"ll have to provide security updates ourselves by pushing the base image manually

I had it working at one point but was doing some minor tweaking but now the base install fails and only when I build it on travis. Will give it a go for now and then we can switch back later.

!app/writable/session/index.html

22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = tab
insert_final_newline = true
max_line_length = 120
tab_width = 4

[{*.cjs,*.js}]
indent_style = tab

[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}]
indent_style = tab

[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
indent_style = tab

[{*.htm,*.html,*.ng,*.sht,*.shtm,*.shtml}]
indent_style = tab
63 changes: 63 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

CI_ENVIRONMENT = production

#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------

database.default.hostname = 'localhost'
database.default.database = 'ospos'
database.default.username = 'admin'
database.default.password = 'pointofsale'
database.default.DBDriver = 'MySQLi'
database.default.DBPrefix = 'ospos_'

database.development.hostname = 'localhost'
database.development.database = 'ospos'
database.development.username = 'admin'
database.development.password = 'pointofsale'
database.development.DBDriver = 'MySQLi'
database.development.DBPrefix = 'ospos_'

database.tests.hostname = 'localhost'
database.tests.database = 'ospos'
database.tests.username = 'admin'
database.tests.password = 'pointofsale'
database.tests.DBDriver = 'MySQLi'
database.tests.DBPrefix = 'ospos_'

#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------

encryption.key = ''

#--------------------------------------------------------------------
# LOGGER
# - 0 = Disables logging, Error logging TURNED OFF
# - 1 = Emergency Messages - System is unusable
# - 2 = Alert Messages - Action Must Be Taken Immediately
# - 3 = Critical Messages - Application component unavailable, unexpected exception.
# - 4 = Runtime Errors - Don't need immediate action, but should be monitored.
# - 5 = Warnings - Exceptional occurrences that are not errors.
# - 6 = Notices - Normal but significant events.
# - 7 = Info - Interesting events, like user logging in, etc.
# - 8 = Debug - Detailed debug information.
# - 9 = All Messages
#--------------------------------------------------------------------

logger.threshold = 0
app.db_log_enabled = false

#--------------------------------------------------------------------
# HONEYPOT
#--------------------------------------------------------------------

honeypot.hidden = true
honeypot.label = 'Fill This Field'
honeypot.name = 'honeypot'
honeypot.template = '<label>{label}</label><input type="text" name="{name}" value=""/>'
honeypot.container = '<div style="display:none">{template}</div>'
63 changes: 63 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

CI_ENVIRONMENT = production

#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------

database.default.hostname = 'localhost'
database.default.database = 'ospos'
database.default.username = 'admin'
database.default.password = 'pointofsale'
database.default.DBDriver = 'MySQLi'
database.default.DBPrefix = 'ospos_'

database.development.hostname = 'localhost'
database.development.database = 'ospos'
database.development.username = 'admin'
database.development.password = 'pointofsale'
database.development.DBDriver = 'MySQLi'
database.development.DBPrefix = 'ospos_'

database.tests.hostname = 'localhost'
database.tests.database = 'ospos'
database.tests.username = 'admin'
database.tests.password = 'pointofsale'
database.tests.DBDriver = 'MySQLi'
database.tests.DBPrefix = 'ospos_'

#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------

encryption.key = ''

#--------------------------------------------------------------------
# LOGGER
# - 0 = Disables logging, Error logging TURNED OFF
# - 1 = Emergency Messages - System is unusable
# - 2 = Alert Messages - Action Must Be Taken Immediately
# - 3 = Critical Messages - Application component unavailable, unexpected exception.
# - 4 = Runtime Errors - Don't need immediate action, but should be monitored.
# - 5 = Warnings - Exceptional occurrences that are not errors.
# - 6 = Notices - Normal but significant events.
# - 7 = Info - Interesting events, like user logging in, etc.
# - 8 = Debug - Detailed debug information.
# - 9 = All Messages
#--------------------------------------------------------------------

logger.threshold = 0
app.db_log_enabled = false

#--------------------------------------------------------------------
# HONEYPOT
#--------------------------------------------------------------------

honeypot.hidden = true
honeypot.label = 'Fill This Field'
honeypot.name = 'honeypot'
honeypot.template = '<label>{label}</label><input type="text" name="{name}" value=""/>'
honeypot.container = '<div style="display:none">{template}</div>'
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist/ merge=ours
application/language/**/*.php merge=ours
app/Language/**/*.php merge=ours
text=auto
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Coding Standards

on:
push:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'
pull_request:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
php-version:
- '7.4'
- '8.0'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: tokenizer
coverage: none

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

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
${{ runner.os }}-

- name: Install dependencies
run: composer update --ansi --no-interaction

- name: Run lint on `app/`, `public/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.no-header.php --using-cache=no --diff
51 changes: 21 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
# Dependency directories
/node_modules
/vendor
/public/bower_components

# Logs
/application/logs/*
*.log
node_modules
vendor
public/resources
app/Config/email.php
app/sessions/*
app/logs/*
app/uploads/*
npm-debug.log*

# Build generated
/tmp
/public/license/.licenses
/public/license/bower.LICENSES
/public/dist

# Docker
!/docker/.env
/docker/data/database/db/*
/docker/data/certbot/conf/*
/docker/data/ospos/app/*

# Database
/database/database.sql
/database/migrate_phppos_dist.sql

# Use files
/application/config/email.php
/application/sessions/*
/application/uploads/*
!docker/.env
docker/data/database/db/*
docker/data/certbot/conf/*
docker/data/ospos/app/*

# Editors
## SublimeText
Expand Down Expand Up @@ -69,22 +54,28 @@ $RECYCLE.BIN/
.com.apple.timemachine.donotpresent

# Other
/generate_langauges.php
/dist
/docs
generate_languages.php
dist
docs
/patches
/translations
translations
/.buildpath
/.project
/.settings/*
*.patch
git-svn-diff.py
*.bash
.swp
system/
*.swp
*.rej
*.orig
*~
*.~
.env
auth.json

*.png
*.jpg
*.jpeg
*copy*
46 changes: 10 additions & 36 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# redirect to public page
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public$
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteRule "^(.*)$" "/public/" [R=301,L]
RewriteEngine On

RewriteCond %{REQUEST_URI} !^public$
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteRule "^(.*)$" "/public/" [R=301,L]

# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need. Uncomment
# the line below and comment the line above.
#RewriteRule "^(.*)$" "/[SUBDIRECTORY]/public/" [R=301,L]
</IfModule>

# disable directory browsing
Expand All @@ -17,7 +23,6 @@ IndexIgnore *
Header always set X-Frame-Options "SAMEORIGIN"
</Ifmodule>

# Apache 2.4
<IfModule authz_core_module>
# secure htaccess file
<Files .htaccess>
Expand All @@ -39,34 +44,3 @@ IndexIgnore *
Require all denied
</FilesMatch>
</IfModule>

# Apache 2.2
<IfModule !authz_core_module>
# secure htaccess file
<Files .htaccess>
Order allow,deny
Deny from all
Satisfy all
</Files>

# prevent access to PHP error log
<Files error_log>
Order allow,deny
Deny from all
Satisfy all
</Files>

# prevent access to LICENSE
<Files LICENSE>
Order allow,deny
Deny from all
Satisfy all
</Files>

# prevent access to csv, txt and md files
<FilesMatch "\.(csv|txt|md|yml|json|lock)$">
Order allow,deny
Deny from all
Satisfy all
</FilesMatch>
</IfModule>
Loading