Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version number doc #316

Merged
merged 3 commits into from
Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This release contains the SQLSRV and PDO_SQLSRV drivers for PHP 7 with improveme

SQL Server Team


##Take our survey

Thank you for taking time to take our Febraury survey. Let us know how we are doing and how you use PHP by taking our March pulse survey:
Expand Down Expand Up @@ -341,6 +342,23 @@ For samples, please see the sample folder. For setup instructions, see [here] [
- In certain scenarios a generic error message maybe returned instead of a specific error when pooling is disabled
- When retrieving data from columns with a data type of XML, varchar(max), nvarchar(max), or varbinary(max) no data maybe returned or the data maybe truncated depending on the length of the data in the source table.

##Version number
Version number of PHP drivers follow the [semantic versioning](http://semver.org/):

Given a version number MAJOR.MINOR.PATCH,

- MAJOR version is incremented when an incompatible API changes is made,
- MINOR version is incremented when a functionality in a backwards-compatible manner is added, and
- PATCH version is incremented when backwards-compatible bug fixes are made.

version number MAY have trailing pre-release version to indicate the stability, and/or build meta data.

- Pre-release version is denoted by hyphen followed by `preview` or `rc` keyword and may be followed by a series of dot separated identifiers. Production quality releases do not contain the pre-release version. `preview` has lower precedence than `rc`. Example of precedence: *preview < preview.1 < rc < rc.1*.
*Note that PECL package version does not have the hyphen before pre-release version, due to restrictions in PECL. Example of PECL package version: 1.2.3preview*
- Build metadata MAY be denoted by a plus sign followed by 4 digits, such as `1.2.3-preview+5678` or `1.2.3+5678`. Build meta data does NOT figure into the precedence order.



## Future Plans
- Expand SQL 16 Feature Support (example: Always Encrypted).
- Build Verification/Fundamental Tests.
Expand Down
19 changes: 11 additions & 8 deletions source/shared/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,25 @@
#define SQLVERSION_PATCH 7
#define SQLVERSION_BUILD 0

// Semantic versioning pre-release and buil metadata
#define SEMVER_PRERELEASE "-preview"
// Semantic versioning pre-release, for stable releases should be empty
#define SEMVER_PRERELEASE "preview"
// Semantic versioning build metadata
#define SEMVER_BUILDMETA

#if SQLVERSION_BUILD > 0
#undef SEMVER_BUILDMETA
#define SEMVER_BUILDMETA "+" STRINGIFY( SQLVERSION_BUILD )
#endif

#define VER_FILEVERSION_STR STRINGIFY( SQLVERSION_MAJOR ) "." STRINGIFY( SQLVERSION_MINOR ) "." STRINGIFY( SQLVERSION_PATCH ) SEMVER_PRERELEASE SEMVER_BUILDMETA
// Main version
#define VER_APIVERSION_STR STRINGIFY( SQLVERSION_MAJOR ) "." STRINGIFY( SQLVERSION_MINOR ) "." STRINGIFY( SQLVERSION_PATCH )

// Remove "-" if SEMVER_PRERELEASE is empty (for stable releases)
#define VER_FILEVERSION_STR VER_APIVERSION_STR "-" SEMVER_PRERELEASE SEMVER_BUILDMETA
#define _FILEVERSION SQLVERSION_MAJOR,SQLVERSION_MINOR,SQLVERSION_PATCH,SQLVERSION_BUILD

//PECL extension verison macros
#define PHP_SQLSRV_VERSION VER_FILEVERSION_STR
#define PHP_PDO_SQLSRV_VERSION VER_FILEVERSION_STR
// PECL package version macros (can't have '-' or '+')
#define PHP_SQLSRV_VERSION VER_APIVERSION_STR SEMVER_PRERELEASE
#define PHP_PDO_SQLSRV_VERSION PHP_SQLSRV_VERSION

#endif // VERSION_H