Bug: Composer dependency constraints allow incompatible CodeIgniter versions
- Dominant language
- CSS
- Stars
- 16
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
A fresh installation of SmartyURL using:
```bash
composer create-project extendy/smartyurl public
```
fails because the current dependency constraints allow Composer to consider incompatible CodeIgniter versions.
SmartyURL currently requires:
```json
"codeigniter4/framework": "^4.3",
"psr/log": "^1.1"
```
The `^4.3` constraint allows CodeIgniter releases from `4.3.0` up to, but not including, `5.0.0`, including recent releases such as CodeIgniter 4.7.x.
However, newer CodeIgniter releases require `psr/log ^3.0`, while SmartyURL explicitly requires `psr/log ^1.1`. This causes Composer dependency resolution to fail during a clean installation.
## Installation environment
- Debian 13
- PHP 8.4
- Composer 2
- SmartyURL 1.0.0
## Steps to reproduce
Run:
```bash
composer create-project extendy/smartyurl public
```
Composer reports a dependency conflict involving:
```text
codeigniter4/framework
psr/log
```
## What happened during manual troubleshooting
Changing the SmartyURL requirement from:
```json
"psr/log": "^1.1"
```
to:
```json
"psr/log": "^3.0"
```
allowed Composer to install CodeIgniter 4.7.4.
However, the current SmartyURL application files are not fully compatible with CodeIgniter 4.7.4. Additional runtime errors then occurred, including:
```text
Undefined property: Config\App::$permittedURIChars
```
The following application entry files also had to be replaced with newer framework-compatible versions:
- `spark`
- `public/index.php`
This confirms that simply upgrading the `psr/log` requirement is not a sufficient fix.
## Expected behaviour
A clean installation should install a CodeIgniter version that SmartyURL has been developed and tested against, without requiring manual dependency changes or framework compatibility patches.
## Proposed fix
The project should use a more restrictive CodeIgniter version constraint that reflects the version series currently supported by SmartyURL.
For example:
```json
"codeigniter4/framework": "4.3.*"
```
Alternatively, the exact tested release could be pinned, for example:
```json
"codeigniter4/framework": "4.3.8"
```
The actual constraint should be selected after confirming the CodeIgniter version originally used and tested with SmartyURL.
The compatibility of the direct `psr/log` requirement should also be reviewed. If SmartyURL does not directly depend on a specific `psr/log` major version, the explicit requirement may need to be removed or adjusted.
Where appropriate for this application, a tested `composer.lock` file should also be maintained so that installations resolve to known-compatible dependency versions.
## Additional recommendation
Add a clean-install CI workflow that runs commands such as:
```bash
composer install
php spark
php spark migrate --all
```
This would help detect dependency-resolution and framework-compatibility issues before publishing a release.
## Impact
This issue currently prevents a standard clean installation of SmartyURL 1.0.0.
Users who attempt to resolve the Composer conflict by upgrading `psr/log` may unintentionally install a newer CodeIgniter release that is incompatible with the current SmartyURL application files.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.