[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8247":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":14,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},8247,"version","phar-io\u002Fversion","phar-io","Library for handling version information and constraints","https:\u002F\u002Fphar.io\u002F",null,"PHP",7475,18,3,0,1,60.64,"BSD 3-Clause \"New\" or \"Revised\" License",false,"master",true,[],"2026-06-12 04:00:38","# Version\n\nLibrary for handling version information and constraints\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fphar-io\u002Fversion\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fphar-io\u002Fversion\u002Factions\u002Fworkflows\u002Fci.yml)\n\n## Installation\n\nYou can add this library as a local, per-project dependency to your project using [Composer](https:\u002F\u002Fgetcomposer.org\u002F):\n\n    composer require phar-io\u002Fversion\n\nIf you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:\n\n    composer require --dev phar-io\u002Fversion\n\n## Version constraints\n\nA Version constraint describes a range of versions or a discrete version number. The format of version numbers follows the schema of [semantic versioning](http:\u002F\u002Fsemver.org): `\u003Cmajor>.\u003Cminor>.\u003Cpatch>`. A constraint might contain an operator that describes the range.\n\nBeside the typical mathematical operators like `\u003C=`, `>=`, there are two special operators:\n\n*Caret operator*: `^1.0`\ncan be written as `>=1.0.0 \u003C2.0.0` and read as »every Version within major version `1`«.\n\n*Tilde operator*: `~1.0.0`\ncan be written as `>=1.0.0 \u003C1.1.0` and read as »every version within minor version `1.1`. The behavior of tilde operator depends on whether a patch level version is provided or not. If no patch level is provided, tilde operator behaves like the caret operator: `~1.0` is identical to `^1.0`.\n\n## Usage examples\n\nParsing version constraints and check discrete versions for compliance:\n\n```php\n\nuse PharIo\\Version\\Version;\nuse PharIo\\Version\\VersionConstraintParser;\n\n$parser = new VersionConstraintParser();\n$caret_constraint = $parser->parse( '^7.0' );\n\n$caret_constraint->complies( new Version( '7.0.17' ) ); \u002F\u002F true\n$caret_constraint->complies( new Version( '7.1.0' ) ); \u002F\u002F true\n$caret_constraint->complies( new Version( '6.4.34' ) ); \u002F\u002F false\n\n$tilde_constraint = $parser->parse( '~1.1.0' );\n\n$tilde_constraint->complies( new Version( '1.1.4' ) ); \u002F\u002F true\n$tilde_constraint->complies( new Version( '1.2.0' ) ); \u002F\u002F false\n```\n\nAs of version 2.0.0, pre-release labels are supported and taken into account when comparing versions:\n\n```php\n\n$leftVersion = new PharIo\\Version\\Version('3.0.0-alpha.1');\n$rightVersion = new PharIo\\Version\\Version('3.0.0-alpha.2');\n\n$leftVersion->isGreaterThan($rightVersion); \u002F\u002F false\n$rightVersion->isGreaterThan($leftVersion); \u002F\u002F true\n\n``` \n","phar-io\u002Fversion 是一个用于处理版本信息和约束的 PHP 库。它支持语义化版本号 `\u003Cmajor>.\u003Cminor>.\u003Cpatch>` 的解析与比较，提供了包括但不限于大于、小于、等于以及特殊的波浪号 `~` 和插入号 `^` 操作符来定义复杂的版本范围规则。该库还从 2.0.0 版本开始支持预发布标签的比较。适用于需要对软件依赖项进行精确版本控制的场景，如在开发过程中通过 Composer 管理项目依赖时指定兼容性要求。",2,"2026-06-11 03:16:57","top_language"]