Skip to content

Commit 8918a0f

Browse files
authored
Merge pull request #1 from codeigniter4/develop
Update code
2 parents 1aa3c31 + 6424abb commit 8918a0f

File tree

131 files changed

+1658
-468
lines changed

Some content is hidden

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

131 files changed

+1658
-468
lines changed

admin/framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"require-dev": {
1616
"codeigniter4/codeigniter4-standard": "^1.0",
17-
"mikey179/vfsStream": "1.6.*",
17+
"mikey179/vfsstream": "1.6.*",
1818
"phpunit/phpunit": "^7.0",
1919
"squizlabs/php_codesniffer": "^3.3"
2020
},

admin/release-appstarter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ git checkout $branch
1212
echo -e "${BOLD}Build the framework distributable${NORMAL}"
1313

1414
echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
15-
releasable='app public writable README.md contributing.md env license.txt spark'
15+
releasable='app public writable README.md contributing.md env license.txt spark tests/_support'
1616
for fff in $releasable ; do
1717
if [ -d "$fff" ] ; then
1818
rm -rf $fff

admin/release-framework

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ git checkout $branch
1212
echo -e "${BOLD}Build the framework distributable${NORMAL}"
1313

1414
echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
15-
releasable='app docs public system writable contributing.md env license.txt spark'
15+
releasable='app docs public system writable contributing.md env license.txt spark tests/_support'
1616
for fff in $releasable ; do
1717
if [ -d "$fff" ] ; then
1818
rm -rf $fff

admin/starter/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"codeigniter4/framework": "^4@alpha"
1010
},
1111
"require-dev": {
12-
"mikey179/vfsStream": "1.6.*",
12+
"mikey179/vfsstream": "1.6.*",
1313
"phpunit/phpunit": "^7.0"
1414
},
1515
"scripts": {

admin/starter/phpunit.xml.dist

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="tests/_support/_bootstrap.php"
3+
backupGlobals="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
stopOnError="false"
9+
stopOnFailure="false"
10+
stopOnIncomplete="false"
11+
stopOnSkipped="false">
12+
<testsuites>
13+
<testsuite name="app">
14+
<directory>./tests</directory>
15+
<exclude>./tests/system</exclude>
16+
</testsuite>
17+
</testsuites>
18+
19+
<filter>
20+
<whitelist processUncoveredFilesFromWhitelist="true">
21+
<directory suffix=".php">./system</directory>
22+
<exclude>
23+
<directory>./system</directory>
24+
</exclude>
25+
</whitelist>
26+
</filter>
27+
28+
</phpunit>

app/Views/welcome_message.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
height: 200px;
1313
width: 155px;
1414
display: inline-block;
15-
opacity: 0.08;
15+
opacity: 0.12;
1616
position: absolute;
17+
z-index: 0;
1718
top: 2rem;
1819
left: 50%;
1920
margin-left: -73px;
@@ -32,6 +33,8 @@
3233
margin-top: 145px;
3334
margin-bottom: 0;
3435
color: #222;
36+
position: relative;
37+
z-index: 1;
3538
}
3639
.wrap {
3740
max-width: 1024px;
@@ -81,15 +84,11 @@
8184

8285
<div class="wrap">
8386

84-
<h1>Welcome to CodeIgniter</h1>
85-
86-
<p class="version">version <?= CodeIgniter\CodeIgniter::CI_VERSION ?></p>
87-
8887
<div class="logo">
8988
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
9089
width="155.000000px" height="200.000000px" viewBox="0 0 155.000000 200.000000"
9190
preserveAspectRatio="xMidYMid meet">
92-
<g transform="translate(0.000000,200.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">
91+
<g transform="translate(0.000000,200.000000) scale(0.100000,-0.100000)" fill="#ee2600" stroke="none">
9392
<path d="M737 1963 c22 -79 -7 -185 -78 -290 -18 -26 -107 -122 -197 -213
9493
-239 -240 -336 -371 -403 -544 -79 -206 -78 -408 5 -582 64 -134 212 -264 361
9594
-314 l60 -20 -30 22 c-210 152 -229 387 -48 588 25 27 48 50 51 50 4 0 7 -27
@@ -104,6 +103,10 @@
104103
</svg>
105104
</div>
106105

106+
<h1>Welcome to CodeIgniter</h1>
107+
108+
<p class="version">version <?= CodeIgniter\CodeIgniter::CI_VERSION ?></p>
109+
107110
<div class="guide">
108111
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
109112

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"require-dev": {
1717
"codeigniter4/codeigniter4-standard": "^1.0",
18-
"mikey179/vfsStream": "1.6.*",
18+
"mikey179/vfsstream": "1.6.*",
1919
"phpunit/phpunit": "^7.0",
2020
"squizlabs/php_codesniffer": "^3.3"
2121
},

env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
# at the beginning of the line.
1111
#--------------------------------------------------------------------
1212

13+
#--------------------------------------------------------------------
14+
# ENVIRONMENT
15+
#--------------------------------------------------------------------
16+
17+
# CI_ENVIRONMENT = production
18+
1319
#--------------------------------------------------------------------
1420
# APP
1521
#--------------------------------------------------------------------

system/Cache/Handlers/WincacheHandler.php

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?php namespace CodeIgniter\Cache\Handlers;
1+
<?php
2+
namespace CodeIgniter\Cache\Handlers;
23

34
/**
45
* CodeIgniter
@@ -38,6 +39,11 @@
3839

3940
use CodeIgniter\Cache\CacheInterface;
4041

42+
/**
43+
* Cache handler for WinCache from Microsoft & IIS.
44+
* Windows-only, so not testable on travis-ci.
45+
* Unusable methods flagged for code coverage ignoring.
46+
*/
4147
class WincacheHandler implements CacheInterface
4248
{
4349

@@ -59,6 +65,8 @@ public function __construct($config)
5965

6066
/**
6167
* Takes care of any handler-specific setup that must be done.
68+
*
69+
* @codeCoverageIgnore
6270
*/
6371
public function initialize()
6472
{
@@ -70,6 +78,8 @@ public function initialize()
7078
/**
7179
* Attempts to fetch an item from the cache store.
7280
*
81+
* @codeCoverageIgnore
82+
*
7383
* @param string $key Cache item name
7484
*
7585
* @return mixed
@@ -90,6 +100,8 @@ public function get(string $key)
90100
/**
91101
* Saves an item to the cache store.
92102
*
103+
* @codeCoverageIgnore
104+
*
93105
* @param string $key Cache item name
94106
* @param mixed $value The data to save
95107
* @param integer $ttl Time To Live, in seconds (default 60)
@@ -108,6 +120,8 @@ public function save(string $key, $value, int $ttl = 60)
108120
/**
109121
* Deletes a specific item from the cache store.
110122
*
123+
* @codeCoverageIgnore
124+
*
111125
* @param string $key Cache item name
112126
*
113127
* @return mixed
@@ -124,8 +138,9 @@ public function delete(string $key)
124138
/**
125139
* Performs atomic incrementation of a raw stored value.
126140
*
127-
* @param string $key Cache ID
128-
* @param integer $offset Step/value to increase by
141+
* @codeCoverageIgnore
142+
* @param string $key Cache ID
143+
* @param integer $offset Step/value to increase by
129144
*
130145
* @return mixed
131146
*/
@@ -144,6 +159,8 @@ public function increment(string $key, int $offset = 1)
144159
/**
145160
* Performs atomic decrementation of a raw stored value.
146161
*
162+
* @codeCoverageIgnore
163+
*
147164
* @param string $key Cache ID
148165
* @param integer $offset Step/value to increase by
149166
*
@@ -164,6 +181,8 @@ public function decrement(string $key, int $offset = 1)
164181
/**
165182
* Will delete all items in the entire cache.
166183
*
184+
* @codeCoverageIgnore
185+
*
167186
* @return mixed
168187
*/
169188
public function clean()
@@ -176,6 +195,8 @@ public function clean()
176195
/**
177196
* Returns information on the entire cache.
178197
*
198+
* @codeCoverageIgnore
199+
*
179200
* The information returned and the structure of the data
180201
* varies depending on the handler.
181202
*
@@ -191,7 +212,8 @@ public function getCacheInfo()
191212
/**
192213
* Returns detailed information about the specific item in the cache.
193214
*
194-
* @param string $key Cache item name.
215+
* @codeCoverageIgnore
216+
* @param string $key Cache item name.
195217
*
196218
* @return mixed
197219
*/

system/CodeIgniter.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CodeIgniter
6161
/**
6262
* The current version of CodeIgniter Framework
6363
*/
64-
const CI_VERSION = '4.0.0-alpha.5';
64+
const CI_VERSION = '4.0.0-beta.1';
6565

6666
/**
6767
* App startup time.
@@ -199,7 +199,7 @@ public function initialize()
199199
* @param \CodeIgniter\Router\RouteCollectionInterface $routes
200200
* @param boolean $returnResponse
201201
*
202-
* @throws \CodeIgniter\HTTP\RedirectException
202+
* @throws \CodeIgniter\Filters\Exceptions\FilterException
203203
* @throws \Exception
204204
*/
205205
public function run(RouteCollectionInterface $routes = null, bool $returnResponse = false)
@@ -234,7 +234,7 @@ public function run(RouteCollectionInterface $routes = null, bool $returnRespons
234234
{
235235
return $this->handleRequest($routes, $cacheConfig, $returnResponse);
236236
}
237-
catch (Router\RedirectException $e)
237+
catch (\CodeIgniter\Filters\Exceptions\FilterException $e)
238238
{
239239
$logger = Services::logger();
240240
$logger->info('REDIRECTED ROUTE at ' . $e->getMessage());
@@ -533,7 +533,7 @@ protected function forceSecureAccess($duration = 31536000)
533533
*
534534
* @throws \Exception
535535
*
536-
* @return boolean
536+
* @return bool|\CodeIgniter\HTTP\ResponseInterface
537537
*/
538538
public function displayCache($config)
539539
{
@@ -564,7 +564,9 @@ public function displayCache($config)
564564
$this->response->setBody($output);
565565

566566
return $this->response;
567-
};
567+
}
568+
569+
return false;
568570
}
569571

570572
//--------------------------------------------------------------------
@@ -574,7 +576,7 @@ public function displayCache($config)
574576
*
575577
* @param integer $time
576578
*
577-
* @return $this
579+
* @return void
578580
*/
579581
public static function cache(int $time)
580582
{

0 commit comments

Comments
 (0)