Skip to content

Commit 6c79731

Browse files
committed
feat: CodeIgniter 3 Compatibility
1 parent 34852e4 commit 6c79731

File tree

253 files changed

+60930
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+60930
-1
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ TEST_WEB_70 := \
502502
test_metrics \
503503
test_web_cakephp_28 \
504504
test_web_codeigniter_22 \
505+
test_web_codeigniter_31 \
505506
test_web_laravel_42 \
506507
test_web_lumen_52 \
507508
test_web_nette_24 \
@@ -546,6 +547,7 @@ TEST_WEB_71 := \
546547
test_metrics \
547548
test_web_cakephp_28 \
548549
test_web_codeigniter_22 \
550+
test_web_codeigniter_31 \
549551
test_web_laravel_42 \
550552
test_web_laravel_57 \
551553
test_web_laravel_58 \
@@ -598,6 +600,7 @@ TEST_INTEGRATIONS_72 := \
598600
TEST_WEB_72 := \
599601
test_metrics \
600602
test_web_codeigniter_22 \
603+
test_web_codeigniter_31 \
601604
test_web_drupal_89 \
602605
test_web_laravel_42 \
603606
test_web_laravel_57 \
@@ -656,6 +659,7 @@ TEST_INTEGRATIONS_73 :=\
656659
TEST_WEB_73 := \
657660
test_metrics \
658661
test_web_codeigniter_22 \
662+
test_web_codeigniter_31 \
659663
test_web_drupal_89 \
660664
test_web_laminas_14 \
661665
test_web_laravel_57 \
@@ -716,6 +720,7 @@ TEST_INTEGRATIONS_74 := \
716720
TEST_WEB_74 := \
717721
test_metrics \
718722
test_web_codeigniter_22 \
723+
test_web_codeigniter_31 \
719724
test_web_drupal_89 \
720725
test_web_drupal_95 \
721726
test_web_laminas_14 \
@@ -776,6 +781,7 @@ TEST_INTEGRATIONS_80 := \
776781
TEST_WEB_80 := \
777782
test_metrics \
778783
test_web_codeigniter_22 \
784+
test_web_codeigniter_31 \
779785
test_web_drupal_95 \
780786
test_web_laminas_rest_19 \
781787
test_web_laminas_14 \
@@ -822,6 +828,7 @@ TEST_INTEGRATIONS_81 := \
822828
TEST_WEB_81 := \
823829
test_metrics \
824830
test_web_codeigniter_22 \
831+
test_web_codeigniter_31 \
825832
test_web_drupal_95 \
826833
test_web_drupal_101 \
827834
test_web_laminas_rest_19 \
@@ -870,6 +877,7 @@ TEST_INTEGRATIONS_82 := \
870877
TEST_WEB_82 := \
871878
test_metrics \
872879
test_web_codeigniter_22 \
880+
test_web_codeigniter_31 \
873881
test_web_drupal_95 \
874882
test_web_drupal_101 \
875883
test_web_laminas_rest_19 \
@@ -921,6 +929,7 @@ TEST_INTEGRATIONS_83 := \
921929
TEST_WEB_83 := \
922930
test_metrics \
923931
test_web_codeigniter_22 \
932+
test_web_codeigniter_31 \
924933
test_web_drupal_95 \
925934
test_web_laravel_8x \
926935
test_web_laravel_9x \
@@ -1164,6 +1173,9 @@ test_web_cakephp_28: global_test_run_dependencies
11641173
$(call run_tests_debug,--testsuite=cakephp-28-test)
11651174
test_web_codeigniter_22: global_test_run_dependencies
11661175
$(call run_tests_debug,--testsuite=codeigniter-22-test)
1176+
test_web_codeigniter_31: global_test_run_dependencies
1177+
$(COMPOSER) --working-dir=tests/Frameworks/CodeIgniter/Version_3_1 update
1178+
$(call run_tests_debug,--testsuite=codeigniter-31-test)
11671179
test_web_drupal_89: global_test_run_dependencies
11681180
$(COMPOSER) --working-dir=tests/Frameworks/Drupal/Version_8_9/core update --ignore-platform-reqs
11691181
$(COMPOSER) --working-dir=tests/Frameworks/Drupal/Version_8_9 update --ignore-platform-reqs

src/Integrations/Integrations/CodeIgniter/V2/CodeIgniterIntegration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function init(\CI_Router $router = null)
3636
return Integration::NOT_LOADED;
3737
}
3838
$majorVersion = \substr(\CI_VERSION, 0, 2);
39-
if ('2.' === $majorVersion) {
39+
if ('2.' === $majorVersion || '3.' === $majorVersion) {
4040
/* After _set_routing has been called the class and method
4141
* are known, so now we can set up tracing on CodeIgniter.
4242
*/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
# Matches multiple files with brace expansion notation
10+
# Set default charset
11+
[*]
12+
charset = utf-8
13+
14+
# Tab indentation (no size specified)
15+
indent_style = tab
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.DS_Store
2+
3+
application/cache/*
4+
!application/cache/index.html
5+
6+
application/logs/*
7+
!application/logs/index.html
8+
9+
!application/*/.htaccess
10+
11+
composer.lock
12+
tests/mocks/database/ci_test.sqlite
13+
14+
user_guide_src/build/*
15+
user_guide_src/cilexer/build/*
16+
user_guide_src/cilexer/dist/*
17+
user_guide_src/cilexer/pycilexer.egg-info/*
18+
/vendor/
19+
20+
# IDE Files
21+
#-------------------------
22+
/nbproject/
23+
.idea/*
24+
25+
## Sublime Text cache files
26+
*.tmlanguage.cache
27+
*.tmPreferences.cache
28+
*.stTheme.cache
29+
*.sublime-workspace
30+
*.sublime-project
31+
/tests/tests/
32+
/tests/results/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<?php
2+
defined('BASEPATH') OR exit('No direct script access allowed');
3+
4+
/*
5+
| -------------------------------------------------------------------
6+
| AUTO-LOADER
7+
| -------------------------------------------------------------------
8+
| This file specifies which systems should be loaded by default.
9+
|
10+
| In order to keep the framework as light-weight as possible only the
11+
| absolute minimal resources are loaded by default. For example,
12+
| the database is not connected to automatically since no assumption
13+
| is made regarding whether you intend to use it. This file lets
14+
| you globally define which systems you would like loaded with every
15+
| request.
16+
|
17+
| -------------------------------------------------------------------
18+
| Instructions
19+
| -------------------------------------------------------------------
20+
|
21+
| These are the things you can load automatically:
22+
|
23+
| 1. Packages
24+
| 2. Libraries
25+
| 3. Drivers
26+
| 4. Helper files
27+
| 5. Custom config files
28+
| 6. Language files
29+
| 7. Models
30+
|
31+
*/
32+
33+
/*
34+
| -------------------------------------------------------------------
35+
| Auto-load Packages
36+
| -------------------------------------------------------------------
37+
| Prototype:
38+
|
39+
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
40+
|
41+
*/
42+
$autoload['packages'] = array();
43+
44+
/*
45+
| -------------------------------------------------------------------
46+
| Auto-load Libraries
47+
| -------------------------------------------------------------------
48+
| These are the classes located in system/libraries/ or your
49+
| application/libraries/ directory, with the addition of the
50+
| 'database' library, which is somewhat of a special case.
51+
|
52+
| Prototype:
53+
|
54+
| $autoload['libraries'] = array('database', 'email', 'session');
55+
|
56+
| You can also supply an alternative library name to be assigned
57+
| in the controller:
58+
|
59+
| $autoload['libraries'] = array('user_agent' => 'ua');
60+
*/
61+
$autoload['libraries'] = array();
62+
63+
/*
64+
| -------------------------------------------------------------------
65+
| Auto-load Drivers
66+
| -------------------------------------------------------------------
67+
| These classes are located in system/libraries/ or in your
68+
| application/libraries/ directory, but are also placed inside their
69+
| own subdirectory and they extend the CI_Driver_Library class. They
70+
| offer multiple interchangeable driver options.
71+
|
72+
| Prototype:
73+
|
74+
| $autoload['drivers'] = array('cache');
75+
|
76+
| You can also supply an alternative property name to be assigned in
77+
| the controller:
78+
|
79+
| $autoload['drivers'] = array('cache' => 'cch');
80+
|
81+
*/
82+
$autoload['drivers'] = array();
83+
84+
/*
85+
| -------------------------------------------------------------------
86+
| Auto-load Helper Files
87+
| -------------------------------------------------------------------
88+
| Prototype:
89+
|
90+
| $autoload['helper'] = array('url', 'file');
91+
*/
92+
$autoload['helper'] = array();
93+
94+
/*
95+
| -------------------------------------------------------------------
96+
| Auto-load Config files
97+
| -------------------------------------------------------------------
98+
| Prototype:
99+
|
100+
| $autoload['config'] = array('config1', 'config2');
101+
|
102+
| NOTE: This item is intended for use ONLY if you have created custom
103+
| config files. Otherwise, leave it blank.
104+
|
105+
*/
106+
$autoload['config'] = array();
107+
108+
/*
109+
| -------------------------------------------------------------------
110+
| Auto-load Language files
111+
| -------------------------------------------------------------------
112+
| Prototype:
113+
|
114+
| $autoload['language'] = array('lang1', 'lang2');
115+
|
116+
| NOTE: Do not include the "_lang" part of your file. For example
117+
| "codeigniter_lang.php" would be referenced as array('codeigniter');
118+
|
119+
*/
120+
$autoload['language'] = array();
121+
122+
/*
123+
| -------------------------------------------------------------------
124+
| Auto-load Models
125+
| -------------------------------------------------------------------
126+
| Prototype:
127+
|
128+
| $autoload['model'] = array('first_model', 'second_model');
129+
|
130+
| You can also supply an alternative model name to be assigned
131+
| in the controller:
132+
|
133+
| $autoload['model'] = array('first_model' => 'first');
134+
*/
135+
$autoload['model'] = array();

0 commit comments

Comments
 (0)