diff --git a/.travis.yml b/.travis.yml index 8ef13ed2de..cdda6078b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.1 - 7.2 - 7.3 - nightly @@ -9,7 +8,6 @@ php: matrix: fast_finish: true allow_failures: - - php: 7.3 - php: nightly global: diff --git a/README.md b/README.md index c900a5205b..d450a1a9df 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@
## What is CodeIgniter? + CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure. More information can be found at the [official site](http://codeigniter.com). @@ -35,6 +36,7 @@ framework are exposed. The user guide updating and deployment is a bit awkward at the moment, but we are working on it! ## Repository Management + We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages. We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss FEATURE REQUESTS. @@ -57,6 +59,7 @@ Remember that some components that were part of CodeIgniter 3 are being moved to optional packages, with their own repository. ## Contributing + We **are** accepting contributions from the community, specifically those identified as part of phase 2. We will try to manage the process somewhat, by adding a "Help wanted" label to those that we are @@ -68,7 +71,9 @@ We are not looking for out-of-scope contributions, only those that would be cons Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing.md) section in the user guide ## Server Requirements -PHP version 7.1 or higher is required, with the following extensions installed: + +PHP version 7.2 or higher is required, with the following extensions installed: + - [intl](http://php.net/manual/en/intl.requirements.php) - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library @@ -81,4 +86,5 @@ Additionally, make sure that the following extensions are enabled in your PHP: - xml (enabled by default - don't turn it off) ## Running CodeIgniter Tests + Information on running CodeIgniter test suite can be found in the [README.md](tests/README.md) file in the tests directory. diff --git a/admin/README.md b/admin/README.md index 242793acac..ffa514bfce 100644 --- a/admin/README.md +++ b/admin/README.md @@ -1,8 +1,8 @@ -#CodeIgniter 4 Admin +# CodeIgniter 4 Admin This folder contains tools or docs useful for project maintainers. -##Repositories inside https://github.com/codeigniter4 +## Repositories inside https://github.com/codeigniter4 - **CodeIgniter4** is the main development repository. It supports issues and pull requests, and has a rule to enforce GPG-signed commits. @@ -35,7 +35,7 @@ This folder contains tools or docs useful for project maintainers. It is community-maintained, and accepts issues and pull requests. It could be downloaded, forked or composer-installed. -##Contributor Scripts +## Contributor Scripts - **setup.sh** installs a git pre-commit hook into a contributor's local clone of their fork of the `CodeIgniter4` repository. @@ -43,7 +43,7 @@ This folder contains tools or docs useful for project maintainers. to be added as part of a git commit, ensuring that they conform to the framework coding style standards, and automatically fixing what can be. -##Maintainer Scripts +## Maintainer Scripts - **release-config** holds variables used for the maintainer & release building - **docbot** re-builds the user guide from the RST source for it, @@ -51,7 +51,7 @@ This folder contains tools or docs useful for project maintainers. repository (if the user running it has maintainer rights on that repo). See the [writeup](./docbot.md). -##Release Building Scripts +## Release Building Scripts The release workflow is detailed in its own writeup; these are the main scripts used by the release manager: @@ -79,7 +79,7 @@ scripts used by the release manager: Remember to be polite when running it. -##Other Stuff +## Other Stuff - **release-notes.bb** is a boilerplate for forum announcements of a new release. It is marked up using [BBcode](https://en.wikipedia.org/wiki/BBCode). diff --git a/admin/framework/README.md b/admin/framework/README.md index 559185645e..8ab1360385 100644 --- a/admin/framework/README.md +++ b/admin/framework/README.md @@ -1,6 +1,7 @@ # CodeIgniter 4 Framework ## What is CodeIgniter? + CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure. More information can be found at the [official site](http://codeigniter.com). @@ -29,6 +30,7 @@ framework are exposed. The user guide updating and deployment is a bit awkward at the moment, but we are working on it! ## Repository Management + We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages. We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss FEATURE REQUESTS. @@ -51,12 +53,14 @@ Remember that some components that were part of CodeIgniter 3 are being moved to optional packages, with their own repository. ## Contributing + We welcome contributions from the community. Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing.md) section in the development repository. ## Server Requirements -PHP version 7.1 or higher is required, with the following extensions installed: + +PHP version 7.2 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/admin/framework/composer.json b/admin/framework/composer.json index 672c5f183c..012f66e66a 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": ">=7.1", + "php": ">=7.2", "ext-curl": "*", "ext-intl": "*", "kint-php/kint": "^2.1", @@ -14,7 +14,7 @@ }, "require-dev": { "codeigniter4/codeigniter4-standard": "^1.0", - "mikey179/vfsStream": "1.6.*", + "mikey179/vfsstream": "1.6.*", "phpunit/phpunit": "^7.0", "squizlabs/php_codesniffer": "^3.3" }, diff --git a/admin/release-appstarter b/admin/release-appstarter index 8591856101..87281c1536 100644 --- a/admin/release-appstarter +++ b/admin/release-appstarter @@ -12,7 +12,7 @@ git checkout $branch echo -e "${BOLD}Build the framework distributable${NORMAL}" echo -e "${BOLD}Copy the main files/folders...${NORMAL}" -releasable='app public writable README.md contributing.md env license.txt spark' +releasable='app public writable README.md contributing.md env license.txt spark tests/_support' for fff in $releasable ; do if [ -d "$fff" ] ; then rm -rf $fff @@ -23,10 +23,6 @@ done echo -e "${BOLD}Override as needed...${NORMAL}" cp -rf ${CI_DIR}/admin/starter/* . -############# this can only happen after composer create-project/update -#echo -e "${BOLD}Fix paths...${NORMAL}" -#sed -i "/public $systemDirectory = 'system';/s/'system'/'vendor/codeigniter4/framework/system'/" app/Config/Paths.php - #--------------------------------------------------- # And finally, get ready for merging echo -e "${BOLD}Assemble the pieces...${NORMAL}" diff --git a/admin/release-framework b/admin/release-framework index 50ec5f2064..110da980ea 100644 --- a/admin/release-framework +++ b/admin/release-framework @@ -12,7 +12,7 @@ git checkout $branch echo -e "${BOLD}Build the framework distributable${NORMAL}" echo -e "${BOLD}Copy the main files/folders...${NORMAL}" -releasable='app docs public system writable contributing.md env license.txt spark' +releasable='app docs public system writable contributing.md env license.txt spark tests/_support' for fff in $releasable ; do if [ -d "$fff" ] ; then rm -rf $fff diff --git a/admin/starter/README.md b/admin/starter/README.md index f71eacaf12..9d1726d52f 100644 --- a/admin/starter/README.md +++ b/admin/starter/README.md @@ -47,7 +47,7 @@ The user guide updating and deployment is a bit awkward at the moment, but we ar ## Server Requirements -PHP version 7.1 or higher is required, with the following extensions installed: +PHP version 7.2 or higher is required, with the following extensions installed: - [intl](http://php.net/manual/en/intl.requirements.php) - [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library diff --git a/admin/starter/app/Config/Paths.php b/admin/starter/app/Config/Paths.php new file mode 100644 index 0000000000..6251124c64 --- /dev/null +++ b/admin/starter/app/Config/Paths.php @@ -0,0 +1,77 @@ +=7.1", + "php": ">=7.2", "codeigniter4/framework": "^4@alpha" }, "require-dev": { - "mikey179/vfsStream": "1.6.*", + "mikey179/vfsstream": "1.6.*", "phpunit/phpunit": "^7.0" }, "scripts": { diff --git a/admin/starter/phpunit.xml.dist b/admin/starter/phpunit.xml.dist new file mode 100644 index 0000000000..73d51ffc8d --- /dev/null +++ b/admin/starter/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + ./tests + ./tests/system + + + + + + ./system + + ./system + + + + + diff --git a/admin/userguide/README.md b/admin/userguide/README.md index fc4004e04b..1560abe7f7 100644 --- a/admin/userguide/README.md +++ b/admin/userguide/README.md @@ -1,6 +1,7 @@ # CodeIgniter 4 User Guide ## What is CodeIgniter? + CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure. More information can be found at the [official site](http://codeigniter.com). diff --git a/admin/userguide/composer.json b/admin/userguide/composer.json index 6eb7612d8a..62ed362a81 100644 --- a/admin/userguide/composer.json +++ b/admin/userguide/composer.json @@ -5,7 +5,7 @@ "homepage": "https://codeigniter.com", "license": "MIT", "require": { - "php": ">=7.1", + "php": ">=7.2", "codeigniter4/framework": "^4" }, "support": { diff --git a/app/Config/App.php b/app/Config/App.php index 15b20003c8..4627dfa0bc 100644 --- a/app/Config/App.php +++ b/app/Config/App.php @@ -21,7 +21,7 @@ class App extends BaseConfig | environments. | */ - public $baseURL = ''; + public $baseURL = 'http://localhost:8080'; /* |-------------------------------------------------------------------------- diff --git a/app/Config/Cache.php b/app/Config/Cache.php index 15038399a4..015bd6fd68 100644 --- a/app/Config/Cache.php +++ b/app/Config/Cache.php @@ -97,6 +97,7 @@ class Cache extends BaseConfig 'password' => null, 'port' => 6379, 'timeout' => 0, + 'database' => 0, ]; /* diff --git a/app/Config/Filters.php b/app/Config/Filters.php index a6c8a2143a..11359e7c9d 100644 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -7,9 +7,9 @@ class Filters extends BaseConfig // Makes reading things below nicer, // and simpler to change out script that's used. public $aliases = [ - 'csrf' => \App\Filters\CSRF::class, - 'toolbar' => \App\Filters\DebugToolbar::class, - 'honeypot' => \App\Filters\Honeypot::class, + 'csrf' => \CodeIgniter\Filters\CSRF::class, + 'toolbar' => \CodeIgniter\Filters\DebugToolbar::class, + 'honeypot' => \CodeIgniter\Filters\Honeypot::class, ]; // Always applied before every request diff --git a/app/Config/Modules.php b/app/Config/Modules.php index 2dcd22be3c..28bbc7d930 100644 --- a/app/Config/Modules.php +++ b/app/Config/Modules.php @@ -14,6 +14,16 @@ class Modules */ public $enabled = true; + /* + |-------------------------------------------------------------------------- + | Auto-Discovery Within Composer Packages Enabled? + |-------------------------------------------------------------------------- + | + | If true, then auto-discovery will happen across all namespaces loaded + | by Composer, as well as the namespaces configured locally. + */ + public $discoverInComposer = true; + /* |-------------------------------------------------------------------------- | Auto-discover Rules diff --git a/app/Config/Paths.php b/app/Config/Paths.php index 2fd1995caa..5ef168c713 100644 --- a/app/Config/Paths.php +++ b/app/Config/Paths.php @@ -35,7 +35,7 @@ class Paths * * NO TRAILING SLASH! */ - public $appDirectory = __DIR__ . '/../../app'; + public $appDirectory = __DIR__ . '/..'; /* * --------------------------------------------------------------- @@ -73,5 +73,5 @@ class Paths * default this is in `app/Views`. This value * is used when no value is provided to `Services::renderer()`. */ - public $viewDirectory = __DIR__ . '/../../app/Views'; + public $viewDirectory = __DIR__ . '/../Views'; } diff --git a/app/Filters/CSRF.php b/app/Filters/CSRF.php deleted file mode 100644 index a5355556ca..0000000000 --- a/app/Filters/CSRF.php +++ /dev/null @@ -1,64 +0,0 @@ -isCLI()) - { - return; - } - - $security = Services::security(); - - try - { - $security->CSRFVerify($request); - } - catch (SecurityException $e) - { - if (config('App')->CSRFRedirect && ! $request->isAJAX()) - { - return redirect()->back()->with('error', $e->getMessage()); - } - - throw $e; - } - } - - //-------------------------------------------------------------------- - - /** - * We don't have anything to do here. - * - * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request - * @param ResponseInterface|\CodeIgniter\HTTP\Response $response - * - * @return mixed - */ - public function after(RequestInterface $request, ResponseInterface $response) - { - } - - //-------------------------------------------------------------------- -} diff --git a/app/Filters/DebugToolbar.php b/app/Filters/DebugToolbar.php deleted file mode 100644 index 8616bc3c64..0000000000 --- a/app/Filters/DebugToolbar.php +++ /dev/null @@ -1,38 +0,0 @@ -prepare(); - } - - //-------------------------------------------------------------------- -} diff --git a/app/Filters/Honeypot.php b/app/Filters/Honeypot.php deleted file mode 100644 index a16a55c02a..0000000000 --- a/app/Filters/Honeypot.php +++ /dev/null @@ -1,44 +0,0 @@ -hasContent($request)) - { - throw HoneypotException::isBot(); - } - } - - /** - * Attach a honypot to the current response. - * - * @param CodeIgniter\HTTP\RequestInterface $request - * @param CodeIgniter\HTTP\ResponseInterface $response - * @return mixed - */ - public function after(RequestInterface $request, ResponseInterface $response) - { - $honeypot = Services::honeypot(new \Config\Honeypot()); - $honeypot->attachHoneypot($response); - } - -} diff --git a/app/Filters/Throttle.php b/app/Filters/Throttle.php deleted file mode 100644 index b2659e549e..0000000000 --- a/app/Filters/Throttle.php +++ /dev/null @@ -1,46 +0,0 @@ -check($request->getIPAddress(), 60, MINUTE) === false) - { - return Services::response()->setStatusCode(429); - } - } - - //-------------------------------------------------------------------- - - /** - * We don't have anything to do here. - * - * @param RequestInterface|\CodeIgniter\HTTP\IncomingRequest $request - * @param ResponseInterface|\CodeIgniter\HTTP\Response $response - * - * @return mixed - */ - public function after(RequestInterface $request, ResponseInterface $response) - { - } - - //-------------------------------------------------------------------- -} diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php index 2939098ce2..ad6168e9a8 100644 --- a/app/Views/welcome_message.php +++ b/app/Views/welcome_message.php @@ -12,8 +12,9 @@ height: 200px; width: 155px; display: inline-block; - opacity: 0.08; + opacity: 0.12; position: absolute; + z-index: 0; top: 2rem; left: 50%; margin-left: -73px; @@ -32,6 +33,8 @@ margin-top: 145px; margin-bottom: 0; color: #222; + position: relative; + z-index: 1; } .wrap { max-width: 1024px; @@ -81,15 +84,11 @@
-

Welcome to CodeIgniter

- -

version

-