Skip to content

Commit 88965ed

Browse files
committed
Merge branch 'release-4.0.0-alpha.2'
2 parents febe2f0 + ffff2a6 commit 88965ed

File tree

88 files changed

+3436
-793
lines changed

Some content is hidden

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

88 files changed

+3436
-793
lines changed

admin/previous-gitignore

Lines changed: 0 additions & 134 deletions
This file was deleted.

admin/release-notes.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
CodeIgniter-4.0.0-alpha.1 launches today, after a lengthy build-up :)
2+
3+
Huge shoutout to Lonnie Ezell for all of his hard work getting the vision
4+
and the core implementation in place!
5+
6+
This is an early pre-release of 4.0.0. It is not suitable for production!
7+
8+
There are several possible downloads, that you can see on the
9+
[release page](https://github.com/bcit-ci/CodeIgniter4/releases/tag/v4.0.0-alpha.1)
10+
11+
- the runnable versions as a
12+
[zip](https://github.com/bcit-ci/CodeIgniter4/releases/download/v4.0.0-alpha.1/CodeIgniter-4.0.0-alpha.1.zip) or a
13+
[tarball](https://github.com/bcit-ci/CodeIgniter4/releases/download/v4.0.0-alpha.1/CodeIgniter-4.0.0-alpha.1.tar.gz)/
14+
- the developer versions of the framework (with contributor components) as
15+
a [zip](https://github.com/bcit-ci/CodeIgniter4/archive/v4.0.0-alpha.1.zip) or a
16+
[tarball](https://github.com/bcit-ci/CodeIgniter4/archive/v4.0.0-alpha.1.tar.gz)/
17+
- and finally the [epub](https://github.com/bcit-ci/CodeIgniter4/releases/download/v4.0.0-alpha.1/CodeIgniter-4.0.0-alpha.1.epub) version of the user guide for this release.
18+
19+
The release has all the major features in place, but there are still gaps
20+
and issues. See ...
21+
22+
- [Bugs in the 4.0.0-alpha.1](https://github.com/bcit-ci/CodeIgniter4/issues?q=is%3Aopen+is%3Aissue+milestone%3A4.0.0-alpha)
23+
- [Things that we definitely want to see fixed before first proper release](https://github.com/bcit-ci/CodeIgniter4/issues?q=is%3Aopen+is%3Aissue+milestone%3A4.0.0)
24+
- [Features we would like to see in the initial proper release](), if possible, else the next update to it
25+
- [Features that we are consciously deferring to later](https://github.com/bcit-ci/CodeIgniter4/issues?q=is%3Aopen+is%3Aissue+milestone%3A4.1.0)
26+
27+
What we need now is feedback from the community ...
28+
29+
- What doesn't work well (raise a post in [CodeIgniter 4 Development](https://forum.codeigniter.com/forum-27.html))
30+
If you have found a bug, then by all means create a new issue on the repo.
31+
- What you think is missing (raise a post in [CodeIgniter 4 Feature Requests](https://forum.codeigniter.com/forum-29.html))
32+
We will soon start the [candidate new feature](https://forum.codeigniter.com/forum-33.html) posts,
33+
for those items in the feature requests forum that appear to have traction
34+
- Problems that you are having using the release (raise a post in [CodeIgniter 4 Support](https://forum.codeigniter.com/forum-30.html))
35+
Do NOT create repo issues with support questions - we are using github for bug and work package tracking
36+
37+
Do NOT post support questions or feature requests in response to this thread - those
38+
will be deleted. We are trying to make the best of the
39+
limited resousrces that we have!
40+
41+
Thank you, and ENJOY!

admin/release.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ The `release` bash script does the first six workflow steps,
4646
and the `post-release` script does the other three between
4747
the manual steps.
4848

49+
For now, everything past the release branch build will be done
50+
nanually, until the condidence level is high enough to
51+
automate some/all of those steps.
52+
4953
## Assumptions
5054

5155
You (a maintainer) have forked the main CodeIgniter4 repo,
@@ -92,3 +96,9 @@ Once the release branch has been vetted, and you have
9296
completed the manual steps, clean up with:
9397

9498
`admin/post_release version [qualifier]`
99+
100+
## Release notes
101+
102+
On launch of a new release, a release notes post should be made in the
103+
announcements subforum. The planned text for it (so it can be previewed
104+
by admins) is in `admin/release_notes`.

application/Config/Routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
// We get a performance increase by specifying the default
7575
// route since we don't have to scan directories.
76-
$routes->add('/', 'Home::index');
76+
$routes->get('/', 'Home::index');
7777

7878
/**
7979
* --------------------------------------------------------------------

application/Filters/Honeypot.php

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,45 @@
1-
<?php namespace App\Filters;
1+
<?php
2+
3+
namespace App\Filters;
24

35
use CodeIgniter\Filters\FilterInterface;
46
use CodeIgniter\HTTP\RequestInterface;
57
use CodeIgniter\HTTP\ResponseInterface;
68
use Config\Services;
79
use CodeIgniter\Honeypot\Exceptions\HoneypotException;
10+
use CodeIgniter\Honeypot\Honeypot;
811

9-
class Honeypot implements FilterInterface
12+
class Honeypot implements FilterInterface
1013
{
1114

12-
/**
13-
* Checks if Honeypot field is empty, if so
14-
* then the requester is a bot,show a blank
15-
* page
15+
/**
16+
* Checks if Honeypot field is empty; if not
17+
* then the requester is a bot
1618
*
17-
* @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request
19+
* @param CodeIgniter\HTTP\RequestInterface $request
1820
*
1921
* @return mixed
2022
*/
23+
public function before(RequestInterface $request)
24+
{
25+
$honeypot = new Honeypot(new \Config\Honeypot());
26+
if ($honeypot->hasContent($request))
27+
{
28+
throw HoneypotException::isBot();
29+
}
30+
}
2131

22-
public function before (RequestInterface $request)
23-
{
24-
25-
// Checks honeypot field if value was entered then show blank if so.
26-
27-
$honeypot = Services::honeypot(new \Config\Honeypot());
28-
if($honeypot->hasContent($request))
29-
{
30-
throw HoneypotException::isBot();
31-
}
32-
33-
}
34-
35-
/**
36-
* Checks if Honeypot field is empty, if so
37-
* then the requester is a bot,show a blank
38-
* page
32+
/**
33+
* Attach a honypot to the current response.
3934
*
40-
* @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request
41-
* @param ResponseInterface|\CodeIgniter\HTTP\Response $response
35+
* @param CodeIgniter\HTTP\RequestInterface $request
36+
* @param CodeIgniter\HTTP\ResponseInterface $response
4237
* @return mixed
4338
*/
39+
public function after(RequestInterface $request, ResponseInterface $response)
40+
{
41+
$honeypot = new Honeypot(new \Config\Honeypot());
42+
$honeypot->attachHoneypot($response);
43+
}
4444

45-
public function after (RequestInterface $request, ResponseInterface $response)
46-
{
47-
48-
$honeypot = Services::honeypot(new \Config\Honeypot());
49-
$honeypot->attachHoneypot($response);
50-
}
5145
}

application/Views/errors/cli/error_404.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
use CodeIgniter\CLI\CLI;
55

6-
CLI::error('ERROR: '.$heading);
6+
CLI::error('ERROR: ' . $code);
77
CLI::write($message);
88
CLI::newLine();
File renamed without changes.

public/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ----------------------------------------------------------------------
44

55
# Sets the environment that CodeIgniter runs under.
6-
SetEnv CI_ENVIRONMENT development
6+
# SetEnv CI_ENVIRONMENT development
77

88
# ----------------------------------------------------------------------
99
# UTF-8 encoding

public/index.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?php
22

3+
// Valid PHP Version?
4+
$minPHPVersion = '7.1';
5+
if (phpversion() < $minPHPVersion)
6+
{
7+
die("You PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: ". phpversion());
8+
}
9+
unset($minPHPVersion);
10+
311
// Path to the front controller (this file)
412
define('FCPATH', __DIR__.DIRECTORY_SEPARATOR);
513

@@ -32,6 +40,6 @@
3240
* LAUNCH THE APPLICATION
3341
*---------------------------------------------------------------
3442
* Now that everything is setup, it's time to actually fire
35-
* up the engines and make this app do it's thang.
43+
* up the engines and make this app do its thang.
3644
*/
3745
$app->run();

spark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $public = trim($paths->publicDirectory, '/');
4040
define('FCPATH', realpath($public).DIRECTORY_SEPARATOR);
4141

4242
// Ensure the current directory is pointing to the front controller's directory
43-
chdir('public');
43+
chdir($public);
4444

4545
$app = require rtrim($paths->systemDirectory,'/ ').'/bootstrap.php';
4646

0 commit comments

Comments
 (0)