# Production Readiness Audit & PHP 7.4 Migration

We are preparing Inveetaire for its first production deployment.

The production hosting currently runs **PHP 7.4**.

From this point onward, the project must remain fully compatible with PHP 7.4.

Your task is to perform a complete audit and migrate the project where necessary.

Do not only check syntax.

Inspect the entire application.

---

# Part 1 — PHP 7.4 Compatibility

Target PHP Version

PHP 7.4

Inspect every PHP file.

Find every PHP 8.x feature.

Examples include but are not limited to:

- match expressions
- constructor property promotion
- named arguments
- union types
- mixed
- static return type
- readonly
- enum
- attributes #[]
- nullsafe operator ?->
- str_contains()
- str_starts_with()
- str_ends_with()
- array_is_list()
- fdiv()
- get_debug_type()

Replace them with PHP 7.4 compatible implementations.

Do not change application behavior.

---

# Part 2 — Composer

Inspect composer.json

Verify every dependency supports PHP 7.4.

If not,

recommend the latest compatible version.

---

# Part 3 — Localhost & Hardcoded Values

Search the entire project for hardcoded values.

Examples:

localhost

127.0.0.1

C:\xampp

xampp

htdocs

/public/

http://

https://localhost

APP_URL

BASE_URL

Absolute filesystem paths

Developer URLs

Replace all hardcoded URLs with configuration-driven values.

The application should rely on configuration or environment variables instead of hardcoded paths.

---

# Part 4 — Environment Variables

Inspect every configuration file.

Verify sensitive configuration is not hardcoded.

Examples:

Database credentials

Mail credentials

API Keys

Base URL

Storage path

Upload path

Application URL

Developer mode

Debug mode

Everything should come from .env.

---

# Part 5 — File Uploads

Inspect upload handling.

Images

Music

QR

Gallery

Story

Avatar

Verify upload paths are portable.

Do not assume Windows paths.

The application should work on:

Windows

Linux

Shared Hosting

VPS

---

# Part 6 — Apache Compatibility

Inspect:

.htaccess

Rewrite rules

Front controller

Routing

Asset URLs

Ensure routing works when DocumentRoot points to:

/public

---

# Part 7 — Security Audit

Ensure production does NOT expose:

reset_dev_db.php

verify_db_reset.php

developer-only routes

phpinfo()

temporary scripts

debug endpoints

test pages

sample pages

development utilities

If needed,

restrict them behind DEVELOPER_MODE or APP_ENV.

---

# Part 8 — Production Configuration

Verify:

APP_ENV

APP_DEBUG

DEVELOPER_MODE

Session configuration

Cookie security

Timezone

Uploads

Cache

Logs

Storage

---

# Part 9 — Output

Produce a report containing:

1.

PHP 7.4 compatibility changes

2.

Composer compatibility

3.

Hardcoded localhost references

4.

Hardcoded Windows paths

5.

Environment configuration issues

6.

Production security issues

7.

Upload portability issues

8.

Apache compatibility

9.

Potential deployment blockers

10.

Summary of all changes performed

The goal is to make the project production-ready and fully compatible with PHP 7.4 without changing existing application behavior.