According to composer.json, ext-sockets is just a suggestion, but since 2.8.0 it is an actual requirement since constants that is defined in that extension is used, generating loads of Notices as a result.
http://php.net/manual/en/sockets.constants.php
PHP Notice: Use of undefined constant SOCKET_EAGAIN - assumed 'SOCKET_EAGAIN' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
Notice: Use of undefined constant SOCKET_EAGAIN - assumed 'SOCKET_EAGAIN' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
PHP Notice: Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
Notice: Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
PHP Notice: Use of undefined constant SOCKET_EINTR - assumed 'SOCKET_EINTR' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 343
Notice: Use of undefined constant SOCKET_EINTR - assumed 'SOCKET_EINTR' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 343
PHP Notice: Use of undefined constant SOCKET_EAGAIN - assumed 'SOCKET_EAGAIN' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
Notice: Use of undefined constant SOCKET_EAGAIN - assumed 'SOCKET_EAGAIN' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
PHP Notice: Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
Notice: Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 337
PHP Notice: Use of undefined constant SOCKET_EINTR - assumed 'SOCKET_EINTR' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 343
Notice: Use of undefined constant SOCKET_EINTR - assumed 'SOCKET_EINTR' in /var/www/html/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 343
Great, neither my environment, nor Travis CI, nor anyone testing RC1 ran into this. I'm assuming that the sockets extension is both widely available and enabled in most environments.
I can either revert #599 or move ext-sockets into here. The latter doesn't follow semver but frankly everyone should have this module at least available.
Opinions? @hairyhum @marek-obuchowicz @michaelklishin
:+1: I think that introduction of socket dependency in composer.json is a good solution. Not only those constants, but also whole implementation of SocketIO depends on functions from socket extension.
So I see it more like "explicitly declare dependency that was hidden before", which would qualify as bugfix in SemVer ;)
@marek-obuchowicz thank you for chiming in, that is perfectly reasonable.
@AndreKlang please see #610
This is still a BC Break. After an update from my local (which has the socket extension), it broke my installation from docker.
I don't mind adding it, but a break is still a break.
Adding dependencies is not BC break. Don't run update in completely different environment.
Please see this comment.