# CodeIgniter 4 Framework

## Legacy application migration

The application was migrated from
`/var/www/php81/navnath/ui.joinleisure.com/html` (CodeIgniter 4.6.4) into
`/var/www/php85/navnath/ui.joinleisure.com/html` (CodeIgniter 4.7.5).
Run this project with PHP 8.5 explicitly; the machine's default `php` may be older.

The legacy controllers, models, libraries, filters, helpers, views, routes, public
assets, authentication rules, database settings, and one-day session lifetime are
retained. The target framework, bootstrap, and new framework configuration
properties are retained. No active source `.env` was present, and the target
environment template was not replaced. Runtime caches, logs, debug data, and
sessions were not copied; the source uploads directory contained only its index
file.

Constants and hardcoded integration settings retain their legacy values and
locations. In particular, development URL generation still contains `/php81/`,
the development API URL contains `/php74/`, and the shared-library path contains
`/php70/`. These are intentional preservation constraints, not new target paths.
Do not change them or point live traffic at a different backend without approval.
The host-dependent configuration requires an HTTP host even for CLI execution:

```sh
HTTP_HOST=dev-ui.joinleisure.com php8.5 spark routes
HTTP_HOST=dev-ui.joinleisure.com php8.5 vendor/bin/phpunit --no-coverage tests/unit
```

For another legacy development host, also provide its original `SCRIPT_NAME`
including the `/phpNN/<user>/` prefix. Serve the application from `public/`.
The shared `msacommon` includes, Redis, and upstream APIs remain deployment
dependencies and are not replaced with local implementations.

Compatibility changes are limited to declaring the two previously dynamic API
client properties, removing the PHP 8.5-deprecated (and already no-op)
`curl_close()` call, and guarding environment definitions when the framework's
test bootstrap has already defined `ENVIRONMENT`. Constant names, values, and
types are unchanged. Unit regression tests use mocked HTTP transports; they do
not submit payments, email, registrations, or other requests to live integrations.
Live integration and browser acceptance testing still require an approved test
environment and test accounts.

Migration validation on PHP 8.5 passed the complete suite (21 tests, 79
assertions), PHP syntax checks, and comparison of all 111 route-table entries.
All 108 public assets match the source, as do the legacy configuration and
constant values under development, production, and localhost host branches
(project-relative filesystem roots are normalized for comparison).
Twenty-four safe HTTP comparisons matched statuses, redirects, content types,
and response bodies. The 404 diagnostic comparison normalized only physical
project paths and framework stack-trace line numbers, which necessarily change
with the framework upgrade. No live integration transactions were performed.

## 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](https://codeigniter.com).

This repository holds the distributable version of the framework.
It has been built from the
[development repository](https://github.com/codeigniter4/CodeIgniter4).

More information about the plans for version 4 can be found in [CodeIgniter 4](https://forum.codeigniter.com/forumdisplay.php?fid=28) on the forums.

You can read the [user guide](https://codeigniter.com/user_guide/)
corresponding to the latest version of the framework.

## Important Change with index.php

`index.php` is no longer in the root of the project! It has been moved inside the *public* folder,
for better security and separation of components.

This means that you should configure your web server to "point" to your project's *public* folder, and
not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter *public/...*, as the rest of your logic and the
framework are exposed.

**Please** read the user guide for a better explanation of how CI4 works!

## Repository Management

We use GitHub issues, in our main repository, 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.

This repository is a "distribution" one, built by our release preparation script.
Problems with it can be raised on our forum, or as issues in the main 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 8.2 or higher is required, with the following extensions installed:

- [intl](http://php.net/manual/en/intl.requirements.php)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)

> [!WARNING]
> - The end of life date for PHP 7.4 was November 28, 2022.
> - The end of life date for PHP 8.0 was November 26, 2023.
> - The end of life date for PHP 8.1 was December 31, 2025.
> - If you are still using below PHP 8.2, you should upgrade immediately.
> - The end of life date for PHP 8.2 will be December 31, 2026.

Additionally, make sure that the following extensions are enabled in your PHP:

- json (enabled by default - don't turn it off)
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
