Comments (3)
the reason why composer does not complain is because it has a special handling for such weird php versions: https://github.com/composer/composer/blob/b6826f352390b4c952be8fd75d60cfd4f6f39f11/src/Composer/Repository/PlatformRepository.php#L97-L103
This is not something implemented in the composer/semver
package, because that would allow such weird versioning scheme for all packages out there (thus, that's not semver anymore)
from semver.
bote that for your use case about checking only for being higher than a given PHP version, you could do a check on PHP_VERSION_ID
instead of matching a semver constraint against phpversion()
and having to deal with cleaning it.
from semver.
Thanks for the quick reply and pointing me in the right direction. I'll probably got the PHP_VERSION_ID
or Composer like route.
from semver.
Related Issues (20)
- UnexpectedValueException when running composer update HOT 1
- Proposal: Move functions out of Intervals class HOT 1
- Invalid version string "CLX6_2020R01-dev" in "dev-code-refactory-for-better-readability as CLX6_2020R01-dev", the alias must be an exact version HOT 3
- dev-trunk vs. dev-master HOT 2
- Previously invalid versions now valid (Bad aliases this time) HOT 4
- Invalid version string "8.x-1.x-dev" #671 HOT 2
- Incorrect result of \Composer\Semver\Constraint\ConstraintInterface::matches() HOT 2
- PHP 8.1 compatibility - Passing null to parameter #1 ($string) of type string is deprecated - VersionParser.php:105 HOT 8
- VersionParser->normalize() returns invalid versions HOT 3
- versionRegex in VersionParser->parseConstraint has a dead match HOT 1
- Bumping patch version by one HOT 2
- Support larger MAJOR version numbers
- Unsatisfiable constraint must throw instead of compacting to empty HOT 6
- Inconsistent application of stability flags in parseConstraint HOT 6
- aren't 1.0 and 1.0.0 equal? HOT 1
- get minimum version out of a constraint definition HOT 6
- VersionParser->normalize() throws exception on valid version HOT 3
- Matches constraint with constraint HOT 2
- [Documentation] It's not clear that this package does not follow the semver.org specification HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.