Syntax
Examples
Check installed version
What it does
Retrieves the package version from Composer’sinstalled.json or the package’s composer.json file.
Shows:
- Stable versions:
3.2.1 - Development versions:
dev-main - Feature branches:
dev-feature-name
Use cases
Verify installation
After installing or updating:Check for updates
Compare your version with the latest release:Debugging
Include version info when reporting issues:CI/CD
Log version in deployment scripts:Version information
Semantic Versioning
NativePHP Mobile follows SemVer:- Major (3.x.x): Breaking changes
- Minor (x.2.x): New features, backward compatible
- Patch (x.x.1): Bug fixes, backward compatible
Development versions
dev-main- Latest development branchdev-v3- Version 3 development branchdev-feature-name- Feature branches
Version constraints in composer.json
Updating NativePHP
Update to latest patch
Update to latest minor version
Changecomposer.json:
Update to latest major version
Troubleshooting
”Unable to determine package version”
Reinstall Composer dependencies:Wrong version showing
Clear Composer cache:Development version showing
If you seedev-main but expect a stable version:
See also
- Installation - Installation guide
- Upgrade Guide - Version upgrade notes