GCC 7 adds a new flag to -Wextra: -Wimplicit-fallthrough, which warns when there is no break; statement at the end each case section. This currently makes the driver not compile with:
/home/derick/dev/php/derickr-mongo-php-driver/src/bson-encode.c: In function ‘php_phongo_bson_append’: /home/derick/dev/php/derickr-mongo-php-driver/src/bson-encode.c:346:7: error: this statement may fall through [-Werror=implicit-fallthrough=] if (php_phongo_is_array_or_document(entry TSRMLS_CC) == IS_ARRAY) { ^ /home/derick/dev/php/derickr-mongo-php-driver/src/bson-encode.c:369:3: note: here case IS_OBJECT: { ^~~~ cc1: all warnings being treated as errors
It needs to use the new attribute as is described at https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/