techscope / laravel-sqlserver

Use ODBC to connect with your SQL Server instances from Laravel 5+
GNU General Public License v3.0
20 stars 9 forks source link

dev-master requires ext-odbc ^1.0 #1

Open fissible opened 6 years ago

fissible commented 6 years ago

I'm getting this error when running composer require:

techscope/laravel-sqlserver dev-master requires ext-odbc ^1.0 -> the 
requested PHP extension odbc has the wrong version (7.0.25) installed
csoseman commented 6 years ago

@ajthenewguy could you tell me what version of Linux and PHP you are running?

Rizzello commented 6 years ago

Same issue here: Ubuntu 16.4 php 7.0

fissible commented 6 years ago

Docker/Alpine - PHP 7.1

freak3dot commented 6 years ago

Same issue here: Amazon Linux php 7.1.13

ODBC appears to be included by default in PHP 7. PHP 7.1.9 ini file on my development machine says:

; Note that ODBC support is built in, so no dll is needed for it.

You can force install with: composer require techscope/laravel-sqlserver:dev-master --ignore-platform-reqs

ghost commented 5 years ago

This is still a problem, because for instance I deploy to heroku and I cannot add the flag to the compilation process. Is there are any other workaround? Thanks

freak3dot commented 5 years ago

If you can fork the code, you could remove the "ext-odbc": "^1.0" from the composer.json file under the require section.

I'd have to do some research to find out if that requirement could be limited to PHP versions less than 7. That would be the ideal fix.

As always we welcome thoughts and comments from the author.

optimdevel commented 5 years ago

We also hit this on Ubuntu 18.04.3 LTS with ondrej's PPA. 18.04 LTS is quite recently released distro, ondrej's packages are also quite recent.

I would suggest if you can check to lover the minimum required version, because most of us, will not compile our own packages.

apt-cache policy php7.3-odbc php7.3-odbc: Installed: 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 Candidate: 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 Version table: *** 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 500 500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status

apt-cache madison php7.3-odbc php7.3-odbc | 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 | http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages