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

New release with PHP 8 support? #386

Closed
dzuelke opened this issue Nov 10, 2020 · 73 comments
Closed

New release with PHP 8 support? #386

dzuelke opened this issue Nov 10, 2020 · 73 comments

Comments

@dzuelke
Copy link

dzuelke commented Nov 10, 2020

Hi @lstrojny and others,

PHP 8.0.0 is getting really close and it looks like this extension supports it already.

All that's missing is a Git tag, and a release to PECL :)

Would be super if that could be done anytime soon so that e.g. PaaSes have a stable release version to provide to customers.

Thanks!

@mynameisbogdan
Copy link

I would rather think even a beta release would be okay till the maintainers consider it's ready for a stable release.

@dzuelke
Copy link
Author

dzuelke commented Nov 27, 2020

Yeah that's totally fine too, I don't expect it to be finished. A tagged beta/RC release, published to PECL, makes it easier for a broader audience to test it and report (and fix!) issues.

@dzuelke
Copy link
Author

dzuelke commented Nov 27, 2020

(I was going by the status tracked at https://blog.remirepo.net/post/2020/09/21/PHP-extensions-status-with-upcoming-PHP-8.0 in my assertion that Git master is in a working state, FWIW)

@dingo-d
Copy link

dingo-d commented Nov 28, 2020

What is the status of PHP8 support? I tried manually installing it, but when running ./configure I keep getting

checking for amqp using pkg-config... configure: error: librabbitmq not found

I'm on MacOS 10.15.7, running PHP 8.

I installed the rabbitmq-c and rabbitmq using brew. Still get the same issue. So I tried building it from https://github.com/alanxz/rabbitmq-c using vcpkg which seemed to have passed, but the installation still fails, and I'm not sure why.

EDIT

This did the trick: https://gist.github.com/wcomnisky/6d276a9894a5b2078b552cc492fa1abd

@mokraemer
Copy link

It would be nice to have a release which compiles with php 8

@BanzaiMan
Copy link

As far as I can tell, the master branch compiles and installs fine, but emits a lot of compiler warnings.

https://travis-ci.com/github/travis-ci/php-src-builder/jobs/452193258#L5526

There is also #383.

@mokraemer
Copy link

Ok, thanks. That would be good enough for a first try. But for packaging a released version would be much better, even if it has many warnings during compile.

@insekticid
Copy link

How to compile AMQP extension for PHP 8.0 via Multistage Dockerfile
https://www.exploit.cz/how-to-compile-amqp-extension-for-php-8-0-via-multistage-dockerfile/

@bmaximenko
Copy link

bmaximenko commented Dec 9, 2020

How to compile AMQP extension for PHP 8.0 via Multistage Dockerfile
https://www.exploit.cz/how-to-compile-amqp-extension-for-php-8-0-via-multistage-dockerfile/

This did not work for me as it was, but it did work after I switched from alpine with apk to full image with apt-get and built https://github.com/remicollet/php-amqp/tree/issue-php8 branch (which I found in pull request) instead of current official repo master branch.

UPD: That branch is merged so now I'm building from the official repo.

@lstrojny
Copy link
Collaborator

lstrojny commented Dec 9, 2020

Will roll a beta release in the next couple of days for everybody to test. Looking forward to your feedback!

@mohsenmottaghi
Copy link

We look forward to seeing AMQP on PHP8.

@akira28
Copy link

akira28 commented Dec 17, 2020

How to compile AMQP extension for PHP 8.0 via Multistage Dockerfile
https://www.exploit.cz/how-to-compile-amqp-extension-for-php-8-0-via-multistage-dockerfile/

Thanks for this! I just had to add the rabbitmq-c library to the final image:
RUN apk add --no-cache rabbitmq-c

@guice
Copy link

guice commented Dec 22, 2020

How to compile AMQP extension for PHP 8.0 via Multistage Dockerfile
https://www.exploit.cz/how-to-compile-amqp-extension-for-php-8-0-via-multistage-dockerfile/

Adding my subscription to this topic. This solution worked for me. Hopefully this will get released soon. I'm a little surprised some of these libraries weren't already made 8 compatible before it's release.

@aurimasniekis
Copy link

Not the first or last time this has happened, right now just compiling extension from git master branch in our Dockerfile

@mlocati
Copy link
Contributor

mlocati commented Dec 23, 2020

The same for my widely used script that installs PHP extensions in docker PHP containers: mlocati/docker-php-extension-installer#233

@michaljusiega
Copy link

@lstrojny friendly ping, we need this release <3

@mlocati
Copy link
Contributor

mlocati commented Dec 24, 2020

@michaljusiega you can easily install amqp with PHP 8.0 by using the master branch of this project:

curl -sSLf https://codeload.github.com/php-amqp/php-amqp/tar.gz/df1241852b359cf12c346beaa68de202257efdf1 | tar xz
cd php-amqp-df1241852b359cf12c346beaa68de202257efdf1
phpize
./configure
make -j$(nproc)
make install
cd ..
rm -rf php-amqp-df1241852b359cf12c346beaa68de202257efdf1

(and if you use Docker you can use my install-php-extensions script, that does that for you 😉)

@lstellway
Copy link

lstellway commented Jan 4, 2021

Roughly following advice from @insekticid & @mlocati, I was able to add the amqp extension to my PHP Docker containers by including the following commands in my build file:

# Extract PHP source
docker-php-source extract

# Create directory for amqp extension
mkdir /usr/src/php/ext/amqp

# Download AMQP master branch files to extension directory
curl -L https://github.com/php-amqp/php-amqp/archive/master.tar.gz | tar -xzC /usr/src/php/ext/amqp --strip-components=1

# Install amqp extension using built-in docker binary
docker-php-ext-install amqp

You can also clean up the image a bit by deleting the PHP source after compiling:

# Delete PHP source
docker-php-source delete

@michaljusiega
Copy link

michaljusiega commented Jan 8, 2021

I think part of the community of PHP don't want to do workaround using your suggestions.
How hard is it to release a version @lstrojny ?

@airoude
Copy link

airoude commented Jan 9, 2021

I think Heroku is also waiting for a release.

@andypost
Copy link

Please create a new release, I guess it will be 1.11.0

@javaDeveloperKid
Copy link

I wonder as well as @michaljusiega. How hard is it to release a version @lstrojny?
If you don't have time just say it. If work is still in progress just say it. We will understand. Your silence does not help.
Here in another repository dependabot/dependabot-core#3039 you asked for a release and you got it on demand so don't have double standards.

@flavioheleno
Copy link
Contributor

Folks, as much as I'm looking forward for a new release as you are, please remember that this is an open source project and not a full time job. I'm fairly sure that the radio silence on @lstrojny's end isn't on purpose.
Please be patient, I do understand that this may be blocking you all as it is blocking me, but be a bit more empathetic with open source developers as they usually work on these projects on their free time.

@michaljusiega
Copy link

You are both right, but if you manage a PHP project, you also have to take responsibility?

@mokraemer
Copy link

Yeah, this situation is not quite a good one. PHP 8 was announced ~ 1 year ago. So changes could have been made here as they were on other projects.
For packagers like me, it is really not nice to patch all packages myself to get them compatible with the latest php release.

For the developer this should be a simple s&r to get it right to the latest api changes. Not much fuss about it. It is really annoying many pecl-packages still don't have php 8 versions.

@x-rated
Copy link

x-rated commented Mar 15, 2021

there are no links for windows and php 8.0 :(
https://pecl.php.net/package/amqp/1.11.0beta/windows

@cmb69
Copy link
Contributor

cmb69 commented Mar 15, 2021

there are no links for windows and php 8.0 :(

See #390.

@Jan-E
Copy link
Contributor

Jan-E commented Apr 6, 2021

PR: #396

@Jan-E
Copy link
Contributor

Jan-E commented Apr 10, 2021

Any workaround for windows users?

See #396 (comment)

@ste93cry
Copy link

@lstrojny sorry for asking again, but do you have any ETA on when the stable release will be released? I know that the beta is on PECL, but as you can imagine I don't feel comfortable using it in production and we're almost half a year after the release of PHP8

@BenMorel
Copy link

@ste93cry If that helps, we've been using 1.11.0beta in production for 4 weeks with no problem.

I would love to see a final release too, though.

@Jan-E
Copy link
Contributor

Jan-E commented May 19, 2021

And compiled Windows versions with PR #396 can be found at
https://www.apachelounge.com/viewtopic.php?t=6359

A phpinfo() dump for instance:
https://phpdev.toolsforresearch.com/php-8.0.6-nts-Win32-vs16-x64.htm

@kasp3r
Copy link

kasp3r commented Jun 3, 2021

And compiled Windows versions with PR #396 can be found at
https://www.apachelounge.com/viewtopic.php?t=6359

A phpinfo() dump for instance:
https://phpdev.toolsforresearch.com/php-8.0.6-nts-Win32-vs16-x64.htm

@Jan-E I am unable to find compiled Windows version for PHP 8 in your provided link. Could you please provide direct link?

@Jan-E
Copy link
Contributor

Jan-E commented Jun 3, 2021

There are no direct links. A php_amqp.dll can be found in each zip-file on https://www.apachelounge.com/viewtopic.php?t=6359

@Jan-E
Copy link
Contributor

Jan-E commented Jun 3, 2021

You will need the rabbitmq.4.dll in the zip as well.

@danilopolani
Copy link

Ehy @lstrojny ,
I don't wanna be that "up" guy, but is there any update about this? PHP8.1 will be available in 3 months, the last "community" comment here is 2 months old and an official update (the beta release) is 5 months old and we cannot upgrade to PHP8 because of this.

What's the blocker? Full support for Windows? Can we help in any way?

@lyrixx
Copy link
Contributor

lyrixx commented Aug 6, 2021

FTR, we are using PHP 8 + php-amqp for many month now. And we don't have any issue.
This ext is installable on Debian (and derivated) disto via sury repo (ref)

@ruudk
Copy link

ruudk commented Aug 18, 2021

Same here, we've been using 1.11.0beta in production on PHP 8 and don't have encountered any issues :shipit: 😊

@Jan-E
Copy link
Contributor

Jan-E commented Aug 18, 2021

What's the blocker? Full support for Windows? Can we help in any way?

Full Windows support should not be a blocker. With #396 Windows support is OK in PHP 8.0. And in PHP 8.1.0 beta 3 as well.

See https://www.apachelounge.com/viewtopic.php?p=30903 if you want to test this on Windows. Or https://ci.appveyor.com/project/Jan-E/php-amqp/builds/40429159 if you want to see how Appveyor builds the DLL's. Look in the artifacts tab of each job to download the results.

@Snowbaha
Copy link

Snowbaha commented Oct 1, 2021

There are no direct links. A php_amqp.dll can be found in each zip-file on https://www.apachelounge.com/viewtopic.php?t=6359

Hello, thank you for the link. I tried to add the php_amqp.dll from the php8 zip but I still have this issue :
"Warning: PHP Startup: Unable to load dynamic library 'amqp' (tried: ext\amqp...."

I don't understand why, my php.ini is right with extension=amqp and the folder ext is OK
image

@cmb69
Copy link
Contributor

cmb69 commented Oct 1, 2021

The PHP downloads from windows.php.net contain a file deplister.exe. Run that on the DLL: deplister.exe php_ampq.dll. This shows whether all dependencies are available.

@Snowbaha
Copy link

Snowbaha commented Oct 1, 2021

The PHP downloads from windows.php.net contain a file deplister.exe. Run that on the DLL: deplister.exe php_ampq.dll. This shows whether all dependencies are available.

I don't understand, there is nothing with this command:
powershell_2021-10-01_14-37-41

@danilopolani
Copy link

danilopolani commented Oct 1, 2021

The PHP downloads from windows.php.net contain a file deplister.exe. Run that on the DLL: deplister.exe php_ampq.dll. This shows whether all dependencies are available.

I don't understand, there is nothing with this command: powershell_2021-10-01_14-37-41

There's a typo: php_ampq should be php_amqp
----------------------- ^^

@aurimasniekis
Copy link

LOL PHP 8.1 was released a few days ago... :D Should we change to also include the 8.1 version? :D

@danilopolani
Copy link

LOL PHP 8.1 was released a few days ago... :D Should we change to also include the 8.1 version? :D

See #399, PHP8.1 support is in development apparently, although the last activity in the experimental PR is a month ago 😕

@lstrojny
Copy link
Collaborator

lstrojny commented Dec 1, 2021

Version 1.11.0 has been released and it supports both PHP 8.0 and 8.1

@lstrojny lstrojny closed this as completed Dec 1, 2021
@aurimasniekis
Copy link

NICE!

@ruudk
Copy link

ruudk commented Dec 1, 2021

@lstrojny Thank you so much! 👏

@lwohlhart
Copy link

awesome, thank you very much.
was working with amqp-1.11.0RC1 - looked totally fine;
looking forward to giving it a go

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