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

Unable to install using Pickle #1210

Closed
duncan3dc opened this issue Oct 26, 2020 · 8 comments
Closed

Unable to install using Pickle #1210

duncan3dc opened this issue Oct 26, 2020 · 8 comments

Comments

@duncan3dc
Copy link

Pickle expects to find a simple string containing the version number in the headers, however this extension is building the version string dynamically, so Pickle ends up with a version of 'PHP_SQLSRV_VERSION' which leads the following error:

In Loader.php line 141:
   Version mismatch - 'PHP_SQLSRV_VERSION' != '5.8.1' in source vs. XML  

Would it be possible to define these constants as simple strings instead?

#define PHP_SQLSRV_VERSION VER_APIVERSION_STR SEMVER_PRERELEASE
#define PHP_PDO_SQLSRV_VERSION PHP_SQLSRV_VERSION

@yitam
Copy link
Contributor

yitam commented Oct 26, 2020

Thanks for bringing this to our attention @duncan3dc
We will get back to you on this

@yitam
Copy link
Contributor

yitam commented Oct 30, 2020

hi @duncan3dc thanks for your patience. I just tested it in Linux Ubuntu 18.04 and could reproduce this based on pickle readme.

Note that 5.9.0preview1 is the latest PECL package, and this is what I see:

$ php pickle.phar info sqlsrv
  - Installing sqlsrv (latest-stable): Downloading (100%)         

In VersionParser.php line 176:
                                          
  Invalid version string "5.9.0preview1"  
                                          

info [--tmp-dir TMP-DIR] [--] [<path>]


$ php pickle.phar info sqlsrv-5.8.1
  - Installing sqlsrv (5.8.1): Downloading (100%)         

In Loader.php line 141:
                                                                               
  Version mismatch - 'VER_APIVERSION_STR SEMVER_PRERELEASE' != '5.8.1' in sou  
  rce vs. XML                                                                  
                                                                               

info [--tmp-dir TMP-DIR] [--] [<path>]

In trying to understand what changes are required, I found this manual. Does it mean preview is no longer accepted, only beta, RC, etc.?

Is there any other documentation to ease migration and/or support Pickle?

@duncan3dc
Copy link
Author

There's two problems there, one is that yes the latest tag using the prefix "preview" isn't valid, the valid modifiers are:

  • alpha (or just a)
  • beta (or just b
  • rc (release candidate)

But even if that was fixed, the second problem (the one this PR was raised for) is still an issue, these lines here:

#define PHP_SQLSRV_VERSION VER_APIVERSION_STR SEMVER_PRERELEASE
#define PHP_PDO_SQLSRV_VERSION PHP_SQLSRV_VERSION

Should be:

#define PHP_SQLSRV_VERSION "5.9.0"
#define PHP_PDO_SQLSRV_VERSION  "5.9.0"

or in the case of preview releases:

#define PHP_SQLSRV_VERSION "5.9.0-beta1"
#define PHP_PDO_SQLSRV_VERSION  "5.9.0-beta1"

@yitam
Copy link
Contributor

yitam commented Nov 2, 2020

Thanks @duncan3dc. From my brief testing, changing the two versions from macros to plain strings work for a stable version (tested with the latest 5.8.1). However, installing the latest preview still failed in VersionParser.php line 176 because of some issues with the package.xml from the preview.

We plan to release another preview and will update the versions accordingly (replacing 'preview' with 'beta', for example). Please stay tuned.

@yitam
Copy link
Contributor

yitam commented Dec 2, 2020

Just released 5.9.0-beta2. This will be the last preview before the stable release. We have changed to use the beta terminology and used simple strings instead of macros.

@yitam
Copy link
Contributor

yitam commented Dec 2, 2020

Regrettably, it still didn't work.
image

@duncan3dc
Copy link
Author

That looks like a Pickle issue, I've raised it here: FriendsOfPHP/pickle#202

@yitam
Copy link
Contributor

yitam commented Jan 30, 2021

Was able to successfully install the drivers using Pickle in Ubuntu 18.04. Closing this issue now. Please feel free to reopen if necessary.

@yitam yitam closed this as completed Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants